Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
OrionSR

San Andreas Save File Companion

Recommended Posts

OrionSR

Sweet! I'm already tracking size of main to positively IDs script versions. Version differences within a console system don't effect the base template. It'll make more of a difference once I start working in constants for global names. 010 scripts on the other hand, are highly version dependent. An end thread instruction shouldn't be hard to find for PCv2, but my confidence is much lower for Android.

 

I was using pointers > 0xA0000000 to test for Android saves. iOS saves are within the range of PC pointers but quite a bit higher. For iOS, maybe the pointers are higher because the offsets are actually higher, but I've only one save strand of known iOS saves so I can't draw any conclusions.

 

I have failed to install my custom main.scm so that it loads as I'd hoped. I'm pretty sure I'm doing it right as .dat files are loading as expect. I can probably use custom maps. at least I could before. But for some reason the new main isn't working. Maybe they patched it out. So... I'll try another shortcut. Fire up a mission and run a cleo script that loads up a task sequence that is never applied, then trigger whatever activates the checkpoint save. And then work up a checkpoint 1 script so I don't need to do anything for the mission. And if that doesn't work, I'll try pasting my modified mission into the retry save created for that mission.

 

And it looks like I'm going to need to go back and work in your updates or I won't know if there's anything new. Yeah, Seemann's right. We need a github page.

 

TaskTest - Task sequence is loaded but not applied by cleo immediately after starting Nines and AKs. Then it waits for a few seconds before triggering this checkpoint 1 save.

0615: define_AS_pack_begin [email protected] 078F: task_climb -1 flag 107CD: task_char_slide_to_coord -1 coord 2440.58 -1979.89 14.2 angle 270.0 radius 4.007C9: task_complex_pickup_object -1 object $3140[0]0850: task_follow_footsteps -1 char $PLAYER_ACTOR0859: task_walk_alongside_char -1 char $PLAYER_ACTOR085B: task_set_kinda_stay_in_same_place -1 to 10A1D: task_hand_gesture -1 char $PLAYER_ACTOR0616: define_AS_pack_end [email protected]  

tVehicle instead of PlayerCars

add local int IsMissionSave = 0;

 

And... broke on too many objects. This was a drive-by save so I was expecting it to parse if I did it right. Wonder what went wrong.

 

Oh wait. It's IsMissionSave for isCheckpointSave. Still broken though. Fixed! I think.

 

Woah. This save has 418 enex entries so I had to tweak the enex max loops a little. Currently at 500. I wonder what the max entries is for Android. I suppose I should check it out and verify my IPL mods still work on Android.

    for(i, EnexFlag = 0; i < 500; i++)
Edited by OrionSR

Share this post


Link to post
Share on other sites
OrionSR

Tasks by Cleo

 

TaskTest1 - TaskTest2 - TaskTest3 - TaskTest4 - TaskTest5 - TaskTest6

TaskTest7 - TaskTest8 - TaskTest9 - TaskTest10 - TaskTest11

 

TaskTest2B - Redo of broken save

 

TaskTest8a - (325,000 bytes) I tried stirring up trouble at the LV military base and a file size shrunk. Will redo.

 

I'm working my way through the task list script spoiling below. // lines are causing issues so I skipped those for now.

 

AllOpcodes - All sets wrapped into their own task sequence.

068B: task_everyone_leave_car $Smoke_Car // is new (Smoke gets out of his car)

//05DC: task_smart_flee_point $Actor_Smoke coord 2508.359 -1676.538 12.579 radius 80.0 time 5000 // can't save checkpoint

 

 

{$CLEO .csi}//-------------MAIN---------------thread 'TaskTest' :Labelwait 0//set 1 0615: define_AS_pack_begin [email protected] 04EB: task_crouch -1 crouch 105B9: task_pause -1 time 105BA: task_stand_still -1 time -105BB: task_fall_and_get_up -1 fall_down 0 time_on_ground 50005BC: task_jump -1 flag 105BD: task_tired -1 time 6000005BE: task_die -105BF: task_look_at_char -1 char  $PLAYER_ACTOR time 3000005C0: task_look_at_vehicle -1 car $Smoke_Car time 40000616: define_AS_pack_end [email protected]//set 2 0615: define_AS_pack_begin [email protected] 05C1: task_say -1 subject 23005C2: task_shake_fist -105C3: task_cower -105C4: task_hands_up $PLAYER_ACTOR time 1500005C5: task_duck -1 time 105C7: task_use_atm -105C8: task_scratch_head -105C9: task_look_about -1 time 200005CA: task_enter_car_as_passenger -1 car $Smoke_Car seat 0 time 100000616: define_AS_pack_end [email protected] //set 3 0615: define_AS_pack_begin [email protected] 05CB: task_enter_car_as_driver -1 car $Smoke_Car time 1000005CD: task_leave_car -1 car $Smoke_Car05CF: task_leave_car_and_flee -1 car $Smoke_Car to 2316.4 -1519.2 24.305D1: task_car_drive_to_coord -1 car $Smoke_Car to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 speed 15.0 0 unk 0 005D2: task_car_drive_wander -1 car $Smoke_Car speed 20.0 driving_style 205D3: task_go_straight_to_coord -1 coord 681.8004 -474.1063 15.5363 mode 4 time 300005D4: task_achieve_heading -1 heading 77.005D8: task_follow_point_route -1 walk_speed 6 flag 005D9: task_goto_char -1 char $PLAYER_ACTOR time 5000 radius 3.00616: define_AS_pack_end [email protected] //set 40615: define_AS_pack_begin [email protected] 05DA: task_flee_point -1 coord 1646.332 -1053.721 23.385 radius 100.0 time 100005DB: task_flee_char -1 char $PLAYER_ACTOR radius 50.0 time -1//05DC: task_smart_flee_point -1 coord 2336.399 -18.3093 25.4766 radius 30.0 time 100005DD: task_smart_flee_char -1 char $PLAYER_ACTOR radius 100.0 time 100005DE: task_wander_standard -105E2: task_kill_char_on_foot -1 char $PLAYER_ACTOR05F5: task_follow_path_nodes_to_coord -1 coord 2516.686 -1675.861 13.1227 walk_speed 4 time 55000603: task_go_to_coord_any_means -1 coord 2493.82 -1669.91 12.8 walk_speed 7 car $Smoke_Car0605: task_play_anim -1 anim "M_SMKLEAN_LOOP" ifp "LOWRIDER" framedelta 4.0 loop 1 lockX 0 lockY 0 lockF 0 time -10616: define_AS_pack_end [email protected] //set 50615: define_AS_pack_begin [email protected] 0622: task_leave_car_immediately -1 car $Smoke_Car0633: task_leave_any_car -10634: task_kill_char_on_foot_while_ducking -1 char $PLAYER_ACTOR flags 4 action_delay 2000 action_chance 1000635: task_aim_gun_at_char -1 char $PLAYER_ACTOR time 20000637: task_go_to_coord_while_shooting -1 coord 2075.15 -1363.85 23.85 mode 6 turn_radius 0.5 stop_radius 5.0 shoot_at_char $PLAYER_ACTOR0638: task_stay_in_same_place -1 to 10639: task_turn_char_to_face_char -1 char $PLAYER_ACTOR0655: task_look_at_object -1 object [email protected] time 100000667: task_aim_gun_at_coord -1 coord 969.3931 -1098.341 22.877 time 1200000616: define_AS_pack_end [email protected] //set 60615: define_AS_pack_begin [email protected] 0668: task_shoot_at_coord -1 coord 374.2905 -125.681 1001.308 time 20000672: task_destroy_car -1 car $Smoke_Car0673: task_dive_and_get_up -1 direction 1.0 -3.0 time_on_ground 10000676: task_shuffle_to_next_car_seat -1 car $Smoke_Car0677: task_chat_with_char -1 char $PLAYER_ACTOR lead_speaker 1 unknown_flag 10688: task_toggle_ped_threat_scanner -1 unknown_flags 0 0 0068B: task_everyone_leave_car $Smoke_Car06A5: task_dive_from_attachment_and_get_up -1 time_on_ground 1000006A8: task_goto_char_offset -1 char $PLAYER_ACTOR time -1 radius 0.5 angle 90.00616: define_AS_pack_end [email protected] //set 70615: define_AS_pack_begin [email protected] 06A9: task_look_at_coord -1 coord $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 time 99999906B0: task_sit_down -1 time 40000006BA: task_turn_char_to_face_coord -1 coord 2313.414 -1150.093 25.799706BB: task_drive_point_route -1 car $Smoke_Car speed 10.006C2: task_go_to_coord_while_aiming -1 coord -1762.369 951.1278 23.7487 mode 4 turn_radius 1.0 stop_radius 1.0 char $PLAYER_ACTOR offset 0.0 0.0 0.006C7: task_car_temp_action -1 car $Smoke_Car action 6 time 200000006E1: task_car_mission -1 car $Smoke_Car target_car $SWEET_CAR mission 29 cruise_speed 30.0 driving_style 206E2: task_go_to_object -1 object [email protected] time -1 radius 1.006E3: task_weapon_roll -1 direction 10616: define_AS_pack_end [email protected] //set 80615: define_AS_pack_begin [email protected] 06E4: task_char_arrest_char -1 char $PLAYER_ACTOR070A: task_pick_up_object -1 object [email protected] offset 0.0 0.0 0.0 bone 6 16 anim "NULL" ifp "NULL" time 10713: task_drive_by -1 char -1 car -1 coord 952.92 -1102.99 22.85 radius 100.0 style 4 from_rhs 1 fire_rate 900729: task_use_mobile_phone -1 start 1072A: task_warp_char_into_car_as_driver -1 car $Smoke_Car072B: task_warp_char_into_car_as_passenger -1 car $Smoke_Car seat -1074C: task_use_attractor -1 attractor [email protected]: task_shoot_at_char -1 char $PLAYER_ACTOR time -20751: task_flee_char_any_means -1 char $PLAYER_ACTOR run_distance 100000.0 time 999999 change_course 1 unknown 3000 5000 radius 50.00616: define_AS_pack_end [email protected] //set 90615: define_AS_pack_begin [email protected] 0762: task_dead -10772: task_goto_car -1 car $Smoke_Car time 60000 radius 5.0078F: task_climb -1 flag 107A3: task_goto_char_aiming -1 char $PLAYER_ACTOR radius_from 5.0 to 10.007A5: task_kill_char_on_foot_timed -1 char $PLAYER_ACTOR time 150007A7: task_jetpack -107BC: task_set_char_decision_maker -1 to [email protected]: task_complex_pickup_object -1 object [email protected]: task_char_slide_to_coord -1 coord 362.2674 -2035.844 6.836 angle 270.0 radius 4.00616: define_AS_pack_end [email protected] //set 100615: define_AS_pack_begin [email protected] 07E1: task_swim_to_coord -1 coord $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_307E7: task_drive_point_route_advanced -1 car $Smoke_Car speed 25.0 flags 1 0 10804: task_char_slide_to_coord_and_play_anim -1 coord 2351.97 -1170.26 27.013 angle 0.0 radius 0.2 anim "GRLFRD_KISS_03" ifp "BD_FIRE" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 0 time -10812: task_play_anim_non_interruptable -1 anim "LRGIRL_IDLELOOP" ifp "LOWRIDER" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 0 time -10817: task_follow_patrol_route -1 walk_speed 4 route_mode 30823: task_greet_partner -1 char $PLAYER_ACTOR unk 0.5 unk 50829: task_die_named_anim -1 anim "CRCKDETH3" ifp "CRACK" framedelta 4.0 time 00850: task_follow_footsteps -1 char $PLAYER_ACTOR0859: task_walk_alongside_char -1 char $PLAYER_ACTOR0616: define_AS_pack_end [email protected] //set 110615: define_AS_pack_begin [email protected] 085B: task_set_kinda_stay_in_same_place -1 to 1088A: task_play_anim_with_flags -1 anim "RAIL_FALL" ifp "SWAT" framedelta 8.0 loop 0 lockX 0 lockY 0 lockF 1 time -1 disable_force 0 disable_lockZ 1099F: task_set_ignore_weapon_range_flag -1 to 109A0: task_pick_up_second_object -1 object [email protected] offset 0.0 0.0 0.0 bone 5 16 anim "NULL" ifp "NULL" time -10A1A: task_play_anim_secondary -1 anim "HIKER_POSE_L" ifp "MISC" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -10A1D: task_hand_gesture -1 char $PLAYER_ACTOR0A2E: task_follow_path_nodes_to_coord_with_radius -1 coords $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 mode 7 time -2 radius 8.00616: define_AS_pack_end [email protected] //0615: define_AS_pack_begin [email protected] //05DC: task_smart_flee_point -1 coord 2336.399 -18.3093 25.4766 radius 30.0 time 1000 // freeze//05DC: task_smart_flee_point $Actor_Smoke coord 2508.359 -1676.538 12.579 radius 80.0 time 5000 //0616: define_AS_pack_end [email protected]/**/wait 80000A6F: checkpoint_save 1 wait 100004E: end_thread  

 

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
Nick007J

Updating tTask from first of the saves. I will do one or two more saves and will continue in a few hours I think.

 

 

 

struct tTask{    int nTaskType;    switch (nTaskType)    {      case 0: //CTaskSimplePlayerOnFoot        break;      case 202: //CTaskSimplePause        int nPauseTime;        break;      case 203: //CTaskSimpleStandStill        break;      case 204: //CTaskSimpleSetStayInSamePlace        char unk_8;        break;      case 208: //CTaskComplexFallAndGetUp        int nAnimId;        int nAssocId;        int unk_20;        break;      case 211: //CTaskComplexJump        int unk_12;        break;      case 217: //CTaskComplexDie        int unk_12;        int unk_16;        int unk_20;        int unk_24;        int unk_28;        int unk_36;        break;      case 219: //CTaskSimpleTired        int unk_12;        break;      case 223: //CTaskComplexSitDownThenIdleThenStandUp        int unk_12;        char unk_16;        char unk_17;        break;      case 240: //CTaskComplexInAirAndLand        char unk_12;        char unk_13;        break;      case 243: //CTaskComplexBeInGroup        int pedHandle;        int unk_12;        char unk_16;        break;      case 244: //CTaskComplexSequence        break;      case 267: //CTaskComplexClimb        break;      case 269: //CTaskSimpleTriggerLookAt        int targetPedHandle;        int unk_12;        int unk_16;        RwV3D unk_20;        char unk_32;        int unk_36;        int unk_40;        char bHasEntityTarget;        char unk_45;        break;      case 275: //CTaskComplexUseSequence        int unk_12;        int unk_16;        int unk_20;        break;      case 276: //CTaskSimpleSetKindaStayInSamePlace        char bFlags;        break;      case 306: //CTaskSimpleAffectSecondaryBehaviour        break;      case 310: //CTaskComplexGoPickUpEntity        int targetEntityType;        if (targetEntityType == 2 || targetEntityType == 3 || targetEntityType == 4) int entityHandle;        int unk_44;        break;      case 401: //CTaskSimpleRunNamedAnim        char animName[24];        char animBlock[16];        int unk_92;        float unk_56;        int unk_64;        break;       case 412: //CTaskSimpleCower        break;      case 415: //CTaskSimpleDuck        char unk_36;        short unk_12;        short unk_14;        break;      case 421: //CTaskSimpleScratchHead        break;      case 422: //CTaskSimpleLookAbout        int unk_32;        break;      case 504: //CTaskComplexEvasiveDiveAndGetUp        int vehicleHandle;        int unk_16;        RwV3D unk_20;        char unk_32;        break;      case 513: //CTaskComplexDiveFromAttachedEntityAndGetUp        int unk_16;        break;      case 704: //CTaskComplexLeaveCar        int vehicleHandle;        int unk_16;        int unk_20;        char unk_24;        char unk_25;        break;      case 706: //CTaskComplexLeaveCarAndFlee        int vehicleHandle;        RwV3D target;        int unk_16;        int unk_32;        char unk_36;        break;      case 709: //CTaskSimpleCarDrive        int vehicleHandle;        break;      case 710: //CTaskComplexDriveToPoint        int vehicleHandle;        RwV3D target;        int unk_16;        int unk_48;        int unk_20;        int unk_52;        int unk_24;        break;      case 711: //CTaskComplexCarDriveWander        int vehicleHandle;        int unk_24;        int unk_16;        break;      case 712: //CTaskComplexEnterCarAsPassengerTimed        int targetVehicleHandle;        break;      case 713: //CTaskComplexEnterCarAsDriverTimed        int targetVehicleHandle;        break;      case 714: //CTaskComplexLeaveAnyCar        int unk_12;        char unk_16;        char unk_17;        break;      case 720: //CTaskComplexShuffleSeats        int vehicleHandle;        break;      case 901: //CTaskComplexGoToPointShooting        int unk_12;        RwV3D unk_vec32;        int targetType;        if (targetType == 2 || targetType == 3 || targetType == 4) int targetHandle;        RwV3D unk_vec20;        float unk_44;        float unk_48;        break;      case 902: //CTaskSimpleAchieveHeading        float unk_8;        float unk_12;        float unk_16;        break;      case 903: //CTaskComplexGoToPointAndStandStill        int unk_12;        RwV3D vTarget;        int unk_28;        int unk_32;        break;      case 905: //CTaskComplexFollowPointRoute        int unk_20;        CPointRoute route;        int unk_12;        int unk_24;        int unk_28;        char unk_fl40_1;        char unk_fl40_2;        char unk_fl40_3;        break;      case 906: //CTaskComplexFollowNodeRoute        int unk_24;        RwV3D unk_12;         float unk_28;        float unk_32;        float unk_36;        int flag_76_0;        int unk_60;        int flag_76_3;        break;      case 907: //CTaskComplexSeekEntity        Printf("This task isn't expected to be analyzed here\n");        break;      case 908: //CTaskComplexFleePoint        break;      case 909: //CTaskComplexFleeEntity        break;      case 911: //CTaskComplexSmartFleeEntity        int entityType;        if (entityType == 2 || entityType == 3 || entityType == 4) int entityHandle;        break;      case 912: //CTaskComplexWander        break;      case 918: //CTaskComplexGoToPointAnyMeans        RwV3D target;        int unk_24;        float unk_28;        int unk_vehicleHandle;        int unk_36;        break;      case 920: //CTaskComplexTurnToFaceEntityOrCoord        int targetEntityType;        if (targetEntityType == 2 || targetEntityType == 3) int targetEntityHandle;        char unk_16;        RwV3D targetPos;        break;      case 936: //CTaskComplexFollowPedFootsteps        break;      case 1000: //CTaskComplexKillPedOnFoot        int pedHandle;        break;      case 1003: //CTaskComplexDestroyCar        int targetHandle;        int unk_20;        int unk_24;        int unk_28;        break;      case 1020: //CTaskSimpleGunControl        int unk_entityType;        if (unk_entityType == 2 || unk_entityType == 3) int unk_entityHandle;        RwV3D unk_vec16;        RwV3D unk_vec28;        break;      case 1204: //CTaskComplexPartnerChat        int nParnterHandle;        char commandSource[32];        char unk_88;        float unk_60;        char unk_91;        char unk_114;        char unk_115;        RwV3D unk_64;        break;      case 1208: //CTaskComplexWalkAlongsidePed        break;      case 1210: //CTaskComplexSignalAtPed        break;      case 1301: //CTaskSimpleTogglePedThreatScanner        char unk_8;        char unk_9;        char unk_10;        break;      case 1306: //CTaskSimpleDuckToggle        int unk_8;        break;      default:        Printf("unknown type: %d\n", nTaskType);    }};struct tTaskComplexSeekEntity{  int nTemplateClass;  int nTaskType;  int entityType;  if (entityType == 2 || entityType == 3 || entityType == 4) int entityHandle;};struct tTaskShell{    int nType;    if (nType == 907)    {        tTaskComplexSeekEntity task;    }    else if (nType != -1)    {      tTask task;    }};

 

 

Save 2 seems broken.

 

Edit: done for given saves. Tasks with ID 907 have unusual structure, so I had to fix tTaskShell. I don't know if this task can be used in script command event, but if it does there might be problems. On the other hand, game would have had same problems if it was possible so I think there should not be problems with it.

Edited by Nick007J

Share this post


Link to post
Share on other sites
OrionSR

Awesome! There are plenty of matches to confirm that the cleo tasks are saving. I couldn't be sure the new stuff was from cleo or from saving earlier in the mission. I figured that even if it didn't work with cleo that I would at least have a working task command list. Tracking down which of 9 opcodes is crashing the game is time consuming.

 

My strategy for generating the task list was to use Sanny's opcode search for "task" while in SA SCR mode. Much of the time the codes can be intermixed. Opcodes that use a store_to variable are much more problematic. These look safe so far. I'll double check the troubled tasks before I finish. Can you identify anything that should be tested but isn't on the command list?

 

I'll continue the task test progression tomorrow. I'm worn out for the night, but very pleased with the progress. How tough would it be to include comments about the opcode associated with each task? It's not always clear from the language used. I could always runs specific tests for opcodes and tasks in doubt.

 

And I'm sorry if I have overwhelmed you with too much all at once. Relax, enjoy the challenge, and share in my relief that it's not an impossible task to complete.

Share this post


Link to post
Share on other sites
Nick007J

My strategy for generating the task list was to use Sanny's opcode search for "task" while in SA SCR mode. Much of the time the codes can be intermixed. Opcodes that use a store_to variable are much more problematic. These look safe so far. I'll double check the troubled tasks before I finish. Can you identify anything that should be tested but isn't on the command list?

There are some tasks that are unlikely to exist in opcodes. Like CTaskComplexMedicTreatInjuredPed is clearly a generic task from ped AI. I'll try to do something about them after we finish everything possible with opcodes.

 

Opcodes to task association can be calculated more or less easily. I'll try to do it later.

 

Tasks created by opcodes.

 

 

  • CREATE_PLAYER (83): CTaskSimplePlayerOnFoot (0)
  • CREATE_CHAR (154): CTaskSimpleStandStill (203)
  • SET_CHAR_HEALTH (547): CTaskComplexDie (217)
  • CREATE_RANDOM_CHAR (886): CTaskComplexStandStill (203)
  • CREATE_SWAT_ROPE (1283): CTaskComplexUseSwatRope (108)
  • CREATE_SWAT_ROPE (1283): CTaskComplexStandStill (203)
  • TASK_TOGGLE_DUCK (1259): CTaskSimpleDuckToggle (1306)
  • TASK_PAUSE (1465): CTaskSimplePause (202)
  •  

  • ...
  •  

 

Edited by Nick007J

Share this post


Link to post
Share on other sites
OrionSR

Save 2 seems broken.

Do you need a redo on save 2 or did it work out in the end? Making the save is easy enough if the codes don't crash or... freeze the script (the checkpoint save doesn't happen after 4 seconds). Sometimes I run into trouble with my Windows browser being out of sync with the attached Android device. I must always re-jack if I want things to be accurate. I'll proceed with the new stuff and redo save 2 at the end before taking another shot at the problematic codes.

 

Ambulance and fire response might be tricky on Android. Their disappearance is a common complaint on mobile devices.

 

The Tasks by Cleo post above has been updated with a complete set of test files and a redo save.

 

I've got control of my map mods, script changes still aren't working. For the record, it looks like max enex on mobile is 456 - weird limit. This value simply stops the loop from running forever. One value for all versions will do just as well. I'm tempted to set max enexes at 500 but then it'd be harder to find exceptions.

  for(i, EnexFlag = 0; i < 456; i++)

\Android\data\com.rockstargames.gtasa\ (cleo files)

\Android\data\com.rockstargames.gtasa\files\ (saves)

\Android\data\com.rockstargames.gtasa\files\data (gta.dat)

Edited by OrionSR

Share this post


Link to post
Share on other sites
Nick007J

Updated tasks for saves above.

 

 

 

struct CPointRoute{  int nNumPoints;  RwV3D vPoints[8];};struct CPatrolRoute{  char unk[420];};struct tTask{    int nTaskType;    switch (nTaskType)    {      case 0: //CTaskSimplePlayerOnFoot        break;      case 202: //CTaskSimplePause        int nPauseTime;        break;      case 203: //CTaskSimpleStandStill        break;      case 204: //CTaskSimpleSetStayInSamePlace        char unk_8;        break;      case 208: //CTaskComplexFallAndGetUp        int nAnimId;        int nAssocId;        int unk_20;        break;      case 211: //CTaskComplexJump        int unk_12;        break;      case 212: //CTaskSimpleDie        break;      case 217: //CTaskComplexDie        int unk_12;        int unk_16;        int unk_20;        int unk_24;        int unk_28;        int unk_36;        break;      case 219: //CTaskSimpleTired        int unk_12;        break;      case 223: //CTaskComplexSitDownThenIdleThenStandUp        int unk_12;        char unk_16;        char unk_17;        break;      case 240: //CTaskComplexInAirAndLand        char unk_12;        char unk_13;        break;      case 243: //CTaskComplexBeInGroup        int pedHandle;        int unk_12;        char unk_16;        break;      case 244: //CTaskComplexSequence        break;      case 267: //CTaskComplexClimb        break;      case 269: //CTaskSimpleTriggerLookAt        int targetPedHandle;        int unk_12;        int unk_16;        RwV3D unk_20;        char unk_32;        int unk_36;        int unk_40;        char bHasEntityTarget;        char unk_45;        break;      case 271: //CTaskSimpleSetCharDecisionMaker        int unk_8;        break;      case 275: //CTaskComplexUseSequence        int unk_12;        int unk_16;        int unk_20;        break;      case 276: //CTaskSimpleSetKindaStayInSamePlace        char bFlags;        break;      case 306: //CTaskSimpleAffectSecondaryBehaviour        break;      case 310: //CTaskComplexGoPickUpEntity        int targetEntityType;        if (targetEntityType == 2 || targetEntityType == 3 || targetEntityType == 4) int entityHandle;        int unk_44;        break;      case 401: //CTaskSimpleRunNamedAnim        char animName[24];        char animBlock[16];        int unk_92;        float unk_56;        int unk_64;        break;       case 412: //CTaskSimpleCower        break;      case 415: //CTaskSimpleDuck        char unk_36;        short unk_12;        short unk_14;        break;      case 421: //CTaskSimpleScratchHead        break;      case 422: //CTaskSimpleLookAbout        int unk_32;        break;      case 504: //CTaskComplexEvasiveDiveAndGetUp        int vehicleHandle;        int unk_16;        RwV3D unk_20;        char unk_32;        break;      case 513: //CTaskComplexDiveFromAttachedEntityAndGetUp        int unk_16;        break;      case 704: //CTaskComplexLeaveCar        int vehicleHandle;        int unk_16;        int unk_20;        char unk_24;        char unk_25;        break;      case 706: //CTaskComplexLeaveCarAndFlee        int vehicleHandle;        RwV3D target;        int unk_16;        int unk_32;        char unk_36;        break;      case 709: //CTaskSimpleCarDrive        int vehicleHandle;        break;      case 710: //CTaskComplexDriveToPoint        int vehicleHandle;        RwV3D target;        int unk_16;        int unk_48;        int unk_20;        int unk_52;        int unk_24;        break;      case 711: //CTaskComplexCarDriveWander        int vehicleHandle;        int unk_24;        int unk_16;        break;      case 712: //CTaskComplexEnterCarAsPassengerTimed        int targetVehicleHandle;        break;      case 713: //CTaskComplexEnterCarAsDriverTimed        int targetVehicleHandle;        break;      case 714: //CTaskComplexLeaveAnyCar        int unk_12;        char unk_16;        char unk_17;        break;      case 720: //CTaskComplexShuffleSeats        int vehicleHandle;        break;      case 721: //CTaskComplexDrivePointRoute        int vehicleHandle;        CPointRoute pointRoute;        float unk_20;        int unk_24;        int unk_28;        float unk_32;        int unk_36;        break;      case 723: //CTaskSimpleCarSetTempAction        int vehicleHandle;        int unk_96;        int unk_100;        break;      case 724: //CTaskComplexCarDriveMission        int vehicleHandle;        int targetEntityType;        if (targetEntityType == 2 || targetEntityType == 3 || targetEntityType == 4) int targetEntityHandle;        int unk_40;        break;      case 811: //CTaskSimpleCarSetPedInAsPassenger        break;      case 812: //CTaskSimpleCarSetPedInAsDriver        break;      case 901: //CTaskComplexGoToPointShooting        int unk_12;        RwV3D unk_vec32;        int targetType;        if (targetType == 2 || targetType == 3 || targetType == 4) int targetHandle;        RwV3D unk_vec20;        float unk_44;        float unk_48;        break;      case 902: //CTaskSimpleAchieveHeading        float unk_8;        float unk_12;        float unk_16;        break;      case 903: //CTaskComplexGoToPointAndStandStill        int unk_12;        RwV3D vTarget;        int unk_28;        int unk_32;        break;      case 905: //CTaskComplexFollowPointRoute        int unk_20;        CPointRoute route;        int unk_12;        int unk_24;        int unk_28;        char unk_fl40_1;        char unk_fl40_2;        char unk_fl40_3;        break;      case 906: //CTaskComplexFollowNodeRoute        int unk_24;        RwV3D unk_12;         float unk_28;        float unk_32;        float unk_36;        int flag_76_0;        int unk_60;        int flag_76_3;        break;      case 907: //CTaskComplexSeekEntity        Printf("This task isn't expected to be analyzed here\n");        break;      case 908: //CTaskComplexFleePoint        break;      case 909: //CTaskComplexFleeEntity        break;      case 911: //CTaskComplexSmartFleeEntity        int entityType;        if (entityType == 2 || entityType == 3 || entityType == 4) int entityHandle;        break;      case 912: //CTaskComplexWander        break;      case 918: //CTaskComplexGoToPointAnyMeans        RwV3D target;        int unk_24;        float unk_28;        int unk_vehicleHandle;        int unk_36;        break;      case 920: //CTaskComplexTurnToFaceEntityOrCoord        int targetEntityType;        if (targetEntityType == 2 || targetEntityType == 3) int targetEntityHandle;        char unk_16;        RwV3D targetPos;        break;      case 924: //CTaskComplexGoToPointAiming        int unk_12;        int unk_entityType;        if (unk_entityType == 2 || unk_entityType == 3 || unk_entityType == 4) int unk_entityHandle;        RwV3D unk_20;        RwV3D unk_32;        break;      case 927: //CTaskComplexFleeAnyMeans        int unk_entityType;        if (unk_entityType == 2 || unk_entityType == 3 || unk_entityType == 4) int unk_entityHandle;        char unk_64;        float unk_32;        int unk_28;        int unk_68;        int unk_72;        float unk_76;        int unk_40;        float unk_44;        break;      case 931: //CTaskComplexFollowPatrolRoute        short unk_16;        CPatrolRoute patrolRoute;        short unk_12;        float unk_20;        float unk_24;        break;      case 933: //CTaskComplexSeekEntityAiming        int targetEntityType;        if (targetEntityType == 2 || targetEntityType == 3 || targetEntityType == 4) int targetEntityHandle;        float unk_16;        float unk_20;        break;      case 936: //CTaskComplexFollowPedFootsteps        break;      case 1000: //CTaskComplexKillPedOnFoot        int pedHandle;        break;      case 1003: //CTaskComplexDestroyCar        int targetHandle;        int unk_20;        int unk_24;        int unk_28;        break;      case 1020: //CTaskSimpleGunControl        int unk_entityType;        if (unk_entityType == 2 || unk_entityType == 3) int unk_entityHandle;        RwV3D unk_vec16;        RwV3D unk_vec28;        break;      case 1022: //CTaskSimpleGangDriveBy        int unk_entityType;        if (unk_entityType == 2 || unk_entityType == 3) int unk_entityHandle;        RwV3D unk_56;        int unk_32;        char unk_19;        char unk_18;        char unk_10;        break;      case 1033: //CTaskSimpleSetCharIgnoreWeaponRangeFlag        break;      case 1101: //CTaskComplexArrestPed        break;      case 1203: //CTaskComplexPartnerGreet        break;      case 1204: //CTaskComplexPartnerChat        int nParnterHandle;        char commandSource[32];        char unk_88;        float unk_60;        char unk_91;        char unk_114;        char unk_115;        RwV3D unk_64;        break;      case 1208: //CTaskComplexWalkAlongsidePed        break;      case 1210: //CTaskComplexSignalAtPed        break;      case 1301: //CTaskSimpleTogglePedThreatScanner        char unk_8;        char unk_9;        char unk_10;        break;      case 1303: //CTaskSimpleJetpack        RwV3D unk_72;        float unk_84;        int unk_88;        int unk_entityType;        if (unk_entityType == 2 || unk_entityType == 3 || unk_entityType == 4) int unk_entityHandle;        break;      case 1304: //CTaskSimpleSwim        int unk_pedHandle;        RwV3D unk_20;        break;      case 1306: //CTaskSimpleDuckToggle        int unk_8;        break;      case 1600: //CTaskComplexUseMobilePhone        int unk_12;        break;      default:        Printf("unknown type: %d\n", nTaskType);    }};

 

 

It looks like the limit in enex block is 400 on mobile version, unless there is a version with increased limit.

Share this post


Link to post
Share on other sites
OrionSR

I think it was this save that had the extra enexes. Don't have time to double check. I'll make a max enex save after work.

Edited by OrionSR

Share this post


Link to post
Share on other sites
Nick007J

I see, 1.08 version has a limit of 455 enexes. I previously checked a different version (which produces same "file id" as 1.08, which is hashed "GTASA4" string). I am not sure which exact version it was, but certainly 1.06+ according to file id.

 

Edit: it was 1.06. Limit was increased from 400 to 455 in 1.07.

Edited by Nick007J

Share this post


Link to post
Share on other sites
OrionSR

EnexTest - 455 Enexes

Okay, I see what you mean. My enextest save has 456 entries, but index 455 is simply the stopper word, which isn't usable as an enex. This is an unusual structure. It might be worth the trouble to confirm the logic of the routine for multiple versions. How to keep the stopper word out of enex entry structure?

I wouldn't mind adding another local for is107 but how would one detect the version difference? I'm having enough trouble distinguishing between Android and iOS.

Well, crap. Does opcode 085A: ever work?

085A: create_emergency_services_car #FIRETRUK at 2340.637 -1152.722 25.9686

Not sure why a firetruck is used as an example. The only scripted use is to spawn a couple of SF cop cars on the road next to the Wang's Auto's if CJ has a wanted level during Deconstruction when he runs out of time to destroy the portables or bury the foreman. When tested in game the cop cars don't spawn, and when tested with cleo on Android nothing every happens.

085A=4,spawn_emergency_vehicle_modelID %1d% on_street_nearest_3D_coord %2d% %3d% %4d%
spawns at default radius of spawning, with crew and ready to action vehicle.

I don't know what I'm doing wrong.

Any thought on the odd size of this save? TaskTest8a- (325,000 bytes) I tried stirring up trouble at the LV military base and the file size shrunk. I'm curious about why this save is the next size smaller. And, if we added enough jumps, objects, cargens, enexs, and anything else we can think of (threads?) that will increase the amount of data to be saved, can we force a 455000 sized file?

 

Ooooh, 455 max enex entries, and 455,000 max file size... Probably a coincidence.

 

A hypothesis to test tomorrow. Rural and remote missions, and missions with ghost town effects, might result in the... Check.325 saves. The main point to the file size investigation is that Samutz must adjust SnP for unknown files. This is not upgrade season for SnP so I'd prefer not to bother him for frequent updates.

Edited by OrionSR

Share this post


Link to post
Share on other sites
Nick007J

I would expect 085A to work. It does nothing if vehicle model isn't loaded, maybe this is the issue?

 

I think saves size can exceed 390000, game has no limit, it just writes in blocks of 65000 bytes.

Share this post


Link to post
Share on other sites
OrionSR

My basic hypothesis is holding true. Checkpoints during Badlands mission have the larger file size in town, but if CJ proceeds away from congested areas the smaller file size is written. I need to finish updating my template, and adding a checkpoint condition for this file size before examining my sample. I'm expecting to find far few peds -- not sure what else.

 

I'm thinking, if we are on the cusp between two file sizes depending on congestion, then it's pretty unlikely that we could push things far enough to push things to the next level. Maybe as a test save that doesn't function properly, but unlikely in normal play. Still, might be worth a test.

 

Main questions:

  • Can the two larger file sizes (>300KB) always be associated with checkpoint saves? Probably yes.
  • Is a file size of 260,000 bytes unique to mission saves? Can this size be forced by a bloated standard save?
  • How low can we go? (cue limbo music) Can a file size of 130,000 bytes be forced by a stripped main and IPL files modified to remove garages, enexes, or other structures that effect the size of the structure?

I think the question of extremes can wait, for now. But it looks like the 325,000 isn't a fluke, and will need to be accounted for.

 

Yeah, I thought of loading models and went looking for scripted examples and forgot about it when it didn't work in the mission either. Thanks. Will I need to load the crew models as well? (I'll try without first.)

Share this post


Link to post
Share on other sites
Nick007J

Formally speaking, 'checkpoint save' (a type of save that contains ped, vehicles and other data) is determined by IsMissionSave variable which is set if following conditions are true:

1) save has a mission thread (one with a negative index of a script)

2) variable preceeding threads array equals to 0 OR a variable that follows script resource array equals to 1.

 

If condition 2 is false but condition 1 is true, then it's 'mission save'. If condition 1 is false, it's a normal save. I think you can make a save of ususual size if you try or mod the game, so size is not always a guaranteed sign of save type.

 

As far as I understand, you don't need to load peds models for 085A opcode.

Edited by Nick007J

Share this post


Link to post
Share on other sites
OrionSR

Okay... I think I follow the logic for checkpoint, but I need to step through some examples to solidify the matter in my thoughts. My primary concern is that I want to positively identify the save type without processing any template variables. I try to rely on variables found a fixed offsets. Anything after the main thread gets progressively more difficult to target.

 

I suppose I can safely flag mobile saves as any file size that's a multiple of 65000, and work to get more specific from there.

 

Okay, gotta work in my model loads for 058A:. I'm determined to save those exclusive emergency tasks.

 

Ambulance Checkpoint

 

I'll need to update my template to see if this worked for the unique tasks. EMT models needed to be loaded too or it would crash. On PC, ambulances spawn quite a distance away, approach the coordinates, and medics will revive any dead bodies in the area. On Android, ambulances spawn at a distance and appear to either fall through the ground or simply disappear after a few seconds.

 

If I need to get the medic to engage a dead body before the specialty tasks are loaded I may need to learn to scan for ambulances and mark them so they don't disappear. I read about this, but haven't tried it myself. And, the examples are for PC, and I'm not sure if I've got a good handle on Android memory pools. The offsets I was using before probably don't apply to v1.07+, or whatever I'm using with the increased enexes. Hopefully CleoA will offer a solution.

 

I'm having the same problem with an emergency firetruck response. The truck spawns, and is removed after a couple of seconds. I'm not having any luck keeping it alive by approaching.

 

Well... This is disappointing. I lost all of my template update for the tasks. I need to go back and rebuild everything, one update at a time plus revisions, and my notes on omissions, and hopefully I'll have a working template and can run more tests.

Edited by OrionSR

Share this post


Link to post
Share on other sites
OrionSR

Now that my template seems to be working again, I added a line to treat the 325000 sized files just like checkpoint saves. I should probably work in some or statements but this is working for now.

if (FileSize() == 325000) IsMissionSave = 1, isMobile = 1;

The primary difference between two checkpoint saves of different sizes (the Ryder and TaskTest8a checkpoint saves linked above) is that the TaskTest save only has 6 peds (436 bytes), 6 vehicles (200 bytes) and 30 threads (298 bytes), where as the Ryder save has 6 peds, 8 vehicles and 29 threads (mob_la1 shut down when I unlocked the cities). It seems like the checkpoint saves will always be teetering on the edge of this limit.

 

Other structures that can influence file size are objects, but this only varies a by 1 or two (unless glitched, then figure an extra 120 or more) and are fairly small (64 bytes). Enex records (6 bytes) can increase naturally from the 376 IPL enexes if CJ saves outside near burglary houses.

 

Other structures tend to remain static without mods. Variable structures include garages (50 max, 80 bytes) and Unique Stunt Jumps (255 max, 68 bytes). It looks like the busted/wasted restart structures (20 bytes) might be variable. I've got no guess of the limits. I suspect zones can be adjusted, I don't know the limits. Each of the 378 standard zones (32 bytes) has an associated zonepop record (17 bytes).

 

Most of the structures appear to have fixed parameters that would be unlikely to vary without a tool like a limits adjuster. I'm undecided about adding support for saves with adjusted limits or extended IPL.

 

Estimating Max File Size:

 

Rounding a bit, and dropping max enexes as trivial, this is still within a few hundred of my best estimate for maxing out the file size with easy mods.

  • 185 jumps, 12500 bytes
  • 292 cargens, 10000
  • 150 objects, 9500
  • 20 pool peds, 9000
  • 20 pool cars, 4000
  • Total, 45000 - 20000 short of 65000

The max added jumps and cargens numbers are fixed limits on PC, but should probably be tested considering all the other limit adjustments. But if we double the peds and cars in the pool, and glitch in another 100 objects, we're within a few hundred bytes of pushing things to the next level. 1 more ped and car ought to do it. I'm not sure how many peds and cars I can actually save in a pool. I've seen 28 peds so far, but I'm counting added peds to the cusp of 6. Lots of peds seems easier than lots of cars. Maybe. It'll be close. Object are key as there's no hard limit, but add too many (hardly any on PC) and the game starts to crash. Mobile hasn't shown any signs of trouble though.

 

Kill addresses for saved mission threads:

  • PCv1 {61825} 004E: terminate_this_script (confirmed)
  • PCv2 {61804} 004E: terminate_this_script (confirmed)
  • Mobile {69015} 004E: end_thread
Edited by OrionSR

Share this post


Link to post
Share on other sites
OrionSR

Updated tasks for saves above.

AllOpcodes - unknown type: 420

 

I just noticed this while verifying I didn't break anything while shuffling around pieces of my template.

Edited by OrionSR

Share this post


Link to post
Share on other sites
Nick007J

This task doesn't have any fields saved so

 

      case 420: //CTaskSimpleUseAtm        break;

Share this post


Link to post
Share on other sites
OrionSR

Bells and Whistles and Enums

 

I'm trying to upgrade my template so that dozens reference files aren't required to make sense of the data or to make the appropriate changes. I'm making a little progress on my enumeration of different field and wanted to document my progress, get a little feedback, and pose a few questions. I'm working on the low hanging fruit and will list some of the shorter examples.

 

Some enums are a bit too large, and repetitive, to list here. I've got two slightly different copies of the vehicle lists. eCarID, which defaults to an integer, but eVehID <word> is needed for other structures.

enum <ubyte> eBlipIcons {    SmallSquare, LargeSquare, PlayerPosition, Arrow, North, Airport, AmmuNation, Barber, BigSmoke, Docks, BurgerShot, Bulldozer,    Catalina, CesarViapando, Chicken, CarlJohnson, Crash, Dinner, Emmet, EnemyAttack, Fire, Girlfriend, Hospital, LocoSyndicate,     MaddDogg, Mafia, MCStrap, TuningShop, OGLoc, Pizza, Police, PropForSale, PropLocked, Race, Ryder, SaveDisk, School, Unknown,     Sweet, Tattoo, TheTruth, PlayerTarget, Toreno, Triads, TriadsCasino, Clothes, Woozie, Zero, Disco, Bar, Restaurant, Truck,     Robbery, StreetRace, Gym, Car, Light, Runway, AztecasGang, BallasGang, VagosGang, RifaGang, GroveGang, PayNSpray};enum <DWORD> ePedType {Player1, Player2, PlayerNetwork, PlayerUnused, Civmale, Civfemale, Cop,    Gang_1, Gang_2, Gang_3, Gang_4, Gang_5, Gang_6, Gang_7, Gang_8, Gang_9, Gang_10, Dealer,    Medic, Fireman, Criminal, Bum, Prostitute, Special,    Mission1, Mission2, Mission3, Mission4, Mission5, Mission6, Mission7, Mission8};enum <ubyte> eBlipColor {Red, Green, Cyan, White, Yellow};enum <byte> eMonths {Jan = 1, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec };enum <byte> eWeekdays {Mon, Tue, Wed, Thur, Fri, Sat, Sun};enum <byte> eRadio {Emergency_Band, Playback_FM, KROSE, KDST, Bounce, SFUR, Radio_Los_Santos,                    Radio_X, CSR, KJAH_West, Master_Sounds, WCTR, User_Track_Player, Radio_Off};enum <byte> eBombType {NoBombs, FiveSecondDetonator, IgnitionUnarmed, RemoteDetonator, IgnitionArmed = 5};enum <byte> eWeaponGroup {Disarmed, Melee, Handguns, Shotguns, Uzis, Assault, Rifles, Heavy, Thrown, Equipment, Gift, Other, Detonation};enum <byte> eObjectType {Unbreakable = 1, Breakable, ComplexBreakable, NonBreakable};

Puzzlers:

 

external script trigger type: Nothing is coming up in searches.

 

enum <byte> ePickupType

 

This was fun. The pickup Type descriptions that I could find for SA weren't terribly helpful so I went back to basics with a few old-fashioned experiments. Pickups were one of the first structures I ever hex edited, and these were pretty much the same sorts of tests. I think I made a bit more progress this time. The VC documentation was fairly helpful. A lot of my enums are based on those descriptions.

 

A lower case first letter indicates some doubt.

  • 1, probably a defunct shop pickup leftover from VC
  • 6, I'm guessing a hidden package pickup
  • B versions of the mines since I can't tell them apart
  • 23, won't pickup, no idea what it's for

This appears to be the most comprehensive Pickup Type list available.

 

 

enum <byte> ePickupType {    None = 0,    unPickupInShop = 1,     // III/VC legacy, can't pickup    PickupOnStreet = 2,     // 30sec respawm, IPL default, shared ammo picked up    PickupOnce = 3,         // standard, no respawn     FastTimeout = 4,        // 20sec, dropped weapons, shared ammo picked up, no respawn    SlowTimeout = 5,        // 2min, dropped jetpacks, gangwar health and armor, no respawn    unCollectable = 6,      // III/VC legacy, hidden package? can't pickup    OutOfStock = 7,         // darkened model, can't pickup    MoneyTimeout = 8,       // 30sec, no respawn    VehicleMineA = 9,       // 10 sec delay if in vehicle and in range, no respawn    vehicleMineB = 10,      // seems the same as above    NauticalMineA = 11,     // falls to float, 10 sec delay if in range, no respawn    nauticalMineB = 12,     // seems the same as above    FloatingPackage = 13,   // falls slowly to float, vehicle pickup, no respawn    VehiclePackage = 14,    // vehicle pickup, no respawn    StandardPickup = 15,    // standard 6min respawn, 5min for bribes    AssetRevenue = 16,    PropertyLocked = 17,    PropertyForSale = 18,    MoneyOnce = 19,         // no respawn    SnapshotPickup = 20,    // no respawn    TwoPlayerPickup = 21,    OnceWithAmmo = 22,      // shared ammo picked up    wontPickup = 23};

 

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
OrionSR

Latest Puzzle: How to Enumerate the CRC Textures for Clothing

 

The formula is well documented. I think this is probably Paul's note in the SA save wiki.

 

The CRC32 is calculated of the uppercase filename without extension. After calculation the bits are inverted. The files/filenames can be found in data/shopping.dat and by extracting models/player.img. For example, for White Tank the value is 0xffffffff-crc32("VEST") = 0xbb1ca4cc for both model and texture.

 

As far as I can tell, Paul and Ryosuke, the authors of the two most versatile save editors for SA, are the only people that have spent much time on the CRCs for textures. I can't tell what strategy Ryosuke was using but Paul has published his source code. He's got a great database for clothing but it looks like he crunches the hashes on the database so the CRCs aren't recorded.

 

It doesn't look like 010 has any CRC functions that can work on strings, unless, maybe, I can manage them in their own file. But I suspect it'd be quicker to change settings one at a time in the Savegame Editor and pull the hashes out of the save than figure out that process. I'm not terribly optimistic that I can convince my spreadsheet to perform these functions.

 

So... I'm stumped on this one for now. I think I'll let the problem incubate and return to other mysteries. It looks like I should be able to enumerate bit flags but I'm been putting that off in favor of easier fields. I'm appreciating the enumeration process as a strategy for documenting proper settings. Much of the time this information was difficult to include in the save documentation. External references were always required.

 

Another puzzle, possible without easy solutions, is how to... "enumerate my indexes." The ZonePop structure has a couple of good examples. For starter, there's no easy way to tell which zone the record is associated with without looking up the name on an indexed list. How to display ZonePop[sUNMA] instead of ZonePop[0], for example. I suspect 010 doesn't want to do this but it might have options to vary a comment based on the index, maybe.

 

Again in ZonePop are the gang density records; the gang densities are indexed from 0 to 9. I don't want to lose the indexing by breaking them out of the structure but it'd be better if I had a comment or something. Ballas through Vagos is easy enough but I lose track of the rest. Anyway, I'm not really expecting too many people to be familiar with the quirks for the 010 Editor but I wanted to pose the question anyway.

Edited by OrionSR

Share this post


Link to post
Share on other sites
OrionSR

SAS.multi.bt now hosted on GitHub

I've managed to clean up my template enough to get a copy online at GitHub. The template is still in the process of rapid transition but it's starting to take a reasonably good shape. The opening post has been updated with the new link. I'm not at all sure of what to do with the file now that's it's there.

Bitfield Enums are going very well. With only 3 enums for bytes, words and integers I can easily parse individual flags one bit at a time, or in sets. This provided a strategy for managing the annoying blip flags with an integer type mixed in with the flags.

enum <WORD> eBlipType {None_, VehicleBlip, ActorBlip, ObjectBlip, DestinationBlip, ContactBlip, SpotlightBlip, PickupBlip, AirstripBlip};enum <byte>   eByteFlags {Off, On};enum <WORD>   eWordFlags {False, True};enum <int>    eIntFlags  {Disabled, Enabled};struct tBlipFlags {    eWordFlags BrightColors : 1;    eWordFlags Allocated : 1;    eWordFlags LongDistance : 1;    eWordFlags IsFriendly : 1;    eWordFlags WithoutEntity : 1;    WORD       UnusedBlipFlag : 1;    eWordFlags IsThreat : 1;    eWordFlags IsFriend : 1;    eWordFlags MarkEntity : 1;    eWordFlags OnRadar : 1;};

That accounts for the first 10 bits of the word. The other 6 bits are managed in the tRadar struct. The first 4 bits are used to record the blip type, the two remaining bits are usused.

    tBlipFlags  Flags;    eBlipType   Type : 4;    WORD        UnusedBits : 2; 

There, all 16 bits accounted for. Note: It's important to maintain the same variable size during this process. UnusedBits, UnusedBlipFlag and eWordFlags must all be defined as WORDs.

It didn't take long to work out a strategy for structuring large sets of flags. Check out the table for integer flags (handling) and byte flags (CarFlags) in the spoiler below.

 



enum <DWORD>  eIntFlags {Disabled_ = 0, Enabled_ = 1};struct tHandlingFlags { /*1st*/ eIntFlags _1G_Boost:1;        eIntFlags _2G_Boost:1;        eIntFlags NPC_Anti_Roll:1;      eIntFlags NPC_Neutral_Handl:1;/*2nd*/ eIntFlags No_Handbrake:1;     eIntFlags Steer_Rearwheels:1; eIntFlags HB_Rearwheel_Steer:1; eIntFlags Alt_Steer_Opt:1;/*3rd*/ eIntFlags Wheel_F_Narrow2:1;  eIntFlags Wheel_F_Narrow:1;   eIntFlags Wheel_F_Wide:1;       eIntFlags Wheel_F_Wide2:1;/*4th*/ eIntFlags Wheel_R_Narrow2:1;  eIntFlags Wheel_R_Narrow:1;   eIntFlags Wheel_R_Wide:1;       eIntFlags Wheel_R_Wide2:1;/*5th*/ eIntFlags Hydraulic_Geom:1;   eIntFlags Hydraulic_Inst:1;   eIntFlags Hydraulic_None:1;     eIntFlags NOS_Inst:1;/*6th*/ eIntFlags Offroad_Ability:1;  eIntFlags Offroad_Ability2:1; eIntFlags Halogen_Lights:1;     eIntFlags Proc_Rearwheel_1st:1;/*7th*/ eIntFlags Use_MaxSP_Limit:1;  eIntFlags Low_Rider:1;        eIntFlags Street_Racer:1;       int       UnusedFlag:1;/*8th*/ eIntFlags Swinging_Chassis:1; int       UnusedBits:3;};enum <byte>   eByteFlags {Disabled = 0, Enabled = 1};struct tCarFlags {     eByteFlags BulletProof : 1;  eByteFlags FireProof : 1;  eByteFlags ExplosionProof : 1;  eByteFlags CollisionProof : 1;     eByteFlags MeleeProof : 1;   eByteFlags BassBoost : 1;  eByteFlags Hydraulics : 1;      eByteFlags Nitrous : 1;};

 

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
OrionSR
Progress on the enums for the SA save template has been good. I still have a few giant lists to compile but I've run across a few mysteries. I'm showing my work in an effort to solicit a little information. I haven't updated my template on GitHub recently as it's going through a major transition. As the enums stacked up the template became difficult to manage so I broke most of the enums out into a separate include file. I'm still not sure if I want to mix them back into the main template or keep the enums external.


Done List:

ePathType, eCameraView, eTowns, eSaveGameStateType, eWeatherID, eSkyID, eObjectType,

ePedType, eWeaponGroup, eWeaponNum, ePedID, eRadio, eBombType, eGarageType,

eVehID <WORD>, eVehicleMods, eCarCols, ePickupID, ePickupType, eBlipColor,

eBlipType, eBlipIcons, ePopCycle, eCarID <DWORD>


eTorsoModels, eHeadModels, eHandsModels, eLegsModels, eFeetModels,

eChainsModels, eWatchModels, eShadesModels, eHatModels, eSpecialModels,

eTorsoTextures, eHeadTextures, eLegsTextures, eFeetTextures,

eChainsTextures, eWatchTextures, eShadesTextures, eHatTextures, eSpecialTextures,

eTattooTextures, eULArmTattoos, eLLArmTattoos, eURArmTattoos, eLRArmTattoos,

eBackTattoos, eLChestTattoos, eRChestTattoos, eStomachTattoos, eLowBackTattoos


tHandlingFlags, tCarFlags, tGarageFlags, tPickupFlags, tBlipFlags, tEthnicFlags


The enums for clothing include quite a few unused models and textures. I thought I had a complete list and then found some more, but just a list, no suggestion for proper implementation.The clothing CRC list took forever to generate. I'm a bit burned out on them. The blip color enum has a few RBGA colors included.


Todo:

EnexFlags

external script trigger type

ObjectIDs (defined)

ModelIDs (all)

object flags galore

radio stations vehicle pool

player enex

shopping.dat

ipl streams


Stalled:

garage names LifesABeach = mul_lan (not numerical, maybe QWORD?)

garage names with stored cars (can't enum index)

interior (heaven) IDs (no standard)

zoneInfo IDs (redundant link to zonepop)

enum for zonepop (can't enum index)


I'm really hoping someone can help me with the mysteries. I've got notes on some of the object flags earlier in this topic but have little confidence in my experimental results.


Mysteries:

Block 1: Script, tExternalScriptTrigger byte Type

Block 2: Pools, Ped tPed byte unknown_melee1, unknown_melee2;

Block 2: Pools, Objects tObject int ObjectFlags, EntityFlags

Block 2: Pools int CameraTargetEntityType

Block 4: GameLogic byte GameState


I'm not really sure what to do with CameraTargetEntityType. Is a camera target entity type like other entity types? Has there been any progress on entity types? I'm not even sure how to manipulate this in my saves yet. In the second set of values Wesser seemed to be working mostly with vehicles, but Wesser generally knows what he's talking about so... Yeah, not sure how to proceed.


EntityType, CameraTargetEntityType


0x00 = NOTHING,

0x01 = BUILDING,

0x02 = VEHICLE,

0x03 = PED,

0x04 = OBJECT,

0x05 = DUMMY,

0x06 = NOTINPOOLS


0x02 = Player as driver

0x12 = Quiet driver

0x1A = Suspicious driver (when slightly or heavily collided, unlike cops who are never quiet)

0x22 = No driver

0x2A = Destroyed

0x4A = Player as driver is exiting or being wasted, busted or hijacked

Edited by OrionSR

Share this post


Link to post
Share on other sites
Nick007J

CameraTargetEntityType is the one that I can help with. It is clearly a bitfield, and a 010 Editor understands the format as from the topic you linked.

 

    //********* BEGIN CEntityInfo **********//    BYTE nType : 3; // what type is the entity              // 54 (2 == Vehicle)    BYTE nStatus : 5;               // control status       // 54    //********* END CEntityInfo **********//
As for status, original R* constants are actually known for VC:

http://www.gtamodding.com/wiki/SCM_language_III/VC_definitions#STATUS

 

 

STATUSID 	CONSTANT 	0 	STATUS_PLAYER1 	STATUS_PLAYER_PLAYBACKFROMBUFFER2 	STATUS_SIMPLE3 	STATUS_PHYSICS4 	STATUS_ABANDONED5 	STATUS_WRECKED6 	STATUS_TRAIN_MOVING7 	STATUS_TRAIN_NOT_MOVING8 	STATUS_HELI9 	STATUS_PLANE10 	STATUS_PLAYER_REMOTE11 	STATUS_PLAYER_DISABLED
It has, however, been expanded in SA with new types, names of which are unknown, as far as I know.

 

Edit: oops :) I didn't check what I said properly. This particular field can only be a value between 0 and 6, which is covered already in your post. I don't know if the type I defined earlier (which is used in memory) is present anywhere in save file.

Edited by Nick007J

Share this post


Link to post
Share on other sites
OrionSR
Lets see if I've got this right.
        struct  tCameraTarget {                 eEntityType      Type : 3;                eEntityStatus    Status : 5;                char            padding[3];        }Entity;enum <byte> eEntityType {    NOTHING = 0x00,    BUILDING = 0x01,    VEHICLE = 0x02,    PED = 0x03,    OBJECT = 0x04,    DUMMY = 0x05,    NOTINPOOLS = 0x06};enum <byte> eEntityStatus {    STATUS_PLAYER = 0,     STATUS_PLAYER_PLAYBACKFROMBUFFER = 1,     STATUS_SIMPLE = 2,     STATUS_PHYSICS = 3,     STATUS_ABANDONED = 4,     STATUS_WRECKED = 5,     STATUS_TRAIN_MOVING = 6,    STATUS_TRAIN_NOT_MOVING = 7,     STATUS_HELI = 8,     STATUS_PLANE = 9,     STATUS_PLAYER_REMOTE = 10,     STATUS_PLAYER_DISABLED = 11,};

Wesser's Nitro Notes:

  • 0x02 = VEHICLE (2), STATUS_PLAYER (0) - Player as driver
  • 0x12 = VEHICLE (2), STATUS_SIMPLE (2) - Quiet driver
  • 0x1A = VEHICLE (2), STATUS_PHYSICS (3) - Suspicious driver (when slightly or heavily collided, unlike cops who are never quiet)
  • 0x22 = VEHICLE (2), STATUS_ABANDONED (4) - No driver
  • 0x2A = VEHICLE (2), STATUS_WRECKED (5) - Destroyed
  • 0x4A = VEHICLE (2), STATUS_PLANE (9) - Player as driver is exiting or being wasted, busted or hijacked
  • 0x03 = PED (3), STATUS_PLAYER (0) - how it started in the save I manipulated with these variables.

So far so good, but progress will be slow as I can only view this variable in mobile saves. The suggested strategies for determining entity type are out of context and too complex for the purpose of testing enumeration. Is the memory offset of CameraTargetEntityType known for PC? A basic cleo script that displays the value on screen could provide fairly quick data that I can punch into that field on a dummy save.

Edited by OrionSR

Share this post


Link to post
Share on other sites
Nick007J

Sorry for confusing you, I edited my message apearlier. This particular field can only contain values between 0 and 6, so status part is not very important in given context.

Share this post


Link to post
Share on other sites
OrionSR

Okay, now I'm confused. Your status ID list includes a range beyond 6.

 

8 bits

eEntityType Type : 3; value range 0 thru 7
eEntityStatus Status : 5; value range 0 thru 31

 

Wesser's observation of 0x4A (2, 9) suggests that something is going on with the 4th bit of Status, but that observation seems out of context.

 

If this is wrong I want to fix it but otherwise I think I'll bail on looking for more Status enums and move on. I mostly wanted to understand what I was looking at and I think I've got a handle on it, hopefully. Those bitfields always throw me for a loop; I don't "see" them as clearly as other hex data. But at least I've got a strategy for managing them with 010 now.

 

Added: The thread index was discussed before as the uppermost bit of the Index is used to flag a mission thread in a different struct. At the time I was using a simple is_negative evaluation to flag a mission thread in a local. When I learned how to manage my bits I broke out the short into 15 bit and and 1 bit shorts.

 

Now that's I've figured out how to handle a proper bitwise conditional operation I'm wonder which is the most proper form of the variable. Is it somehow more proper to manage as a full 16 bit short? There isn't much of an advantage in breaking out the last bit other than the index is not obscured. I'm also a bit worried about using the variable in a script.

struct tThread {    short   index;//    short   Index : 15;//    short   IsMissionThread : 1;    /* Script Thread */    if (isMobile==1) int streamedScriptIndex <format=hex>;//    if (index < 0) {//    if (IsMissionThread == 1) {    if (index & 0x8000) {        isMissionThread = 1;        byte   MissionCode[69000];        DWORD  LocalVar[1024];    }
Edited by OrionSR

Share this post


Link to post
Share on other sites
Nick007J

What I tried to explain was that mobile SA during the save process gets the value, which is a combined byte of type and status (the one that is duscussed in the topic), only keeps lowest 3 bits (thus only leaving type) and stores it. Therefore in a save only values between 0 and 6 are achievable.

 

I haven't checked status constants in SA, so I might have been wrong that first 11 values are the same. I can definitely say that when player is busted in III and VC, his vehicle's status is changed into STATUS_PLAYER_DISABLED, so 2 of the values might have been removed.

Share this post


Link to post
Share on other sites
OrionSR

Okay. I think I understand. For the purpose of the save variables:

  • Revert CameraTargetEntityType to an int. I'm assuming that all bits are significant for this save variable.
  • Change the eEntityType enum to an int for use with CameraTargetEntityType.
  • Keep eEntityStatus on file in case I ever need to apply these enums to actual entity bytes.

This certainly makes things easier to manage but I'm a little disappointed. I was quite pleased with how the structure enumerated Wesser's notes. But if I'm going to play with that I'll need something with a better choice of targets than a vehicle's camera can allow. And the investigation is yet another tangent that doesn't have any particular application at the time. I'll come back to this if I run into any other save fields describing entity types or status.

 

BTW, I've been trying to distinguish all the different variable names. Global variables are well understood in GTAIII terms - don't mess with that. Local variables is a term usually applied to the 32 or 40 local variables available to threads. Missions have their own set of 1024 local variables. The 010 editor parses the save into template variables, but I'd prefer a term not specific to 010. Save variable seems like it would apply well in other contexts, like the save wiki. It makes sense so far but my templates have their own set of local template variables used to set flags like isMobile or to track progress in a loop.

Share this post


Link to post
Share on other sites
OrionSR

List of all Zones in San Andreas

 

Enumeration includes the zone name, zone index, gxt key, gxt string, ethnic flags, popcycle and dominant gang in the sequence of info.zon.

 

I wasn't planning on posting my longer enums but I need this list for reference in another topic. Besides, other zone lists are often incomplete, sorted by area, and don't include information on the popcycle, so I'm glad to have everything listed in one spot.

 

 

 

enum <uint> eZoneOrdinal {//  ZoneInfo  index     NoneGXT Zone Name            Enthicity  PopCycle                    Gang    SAN_AND = 0,  //, SAN_AND,  San Andreas,                    No zonepop without glitches    SUNMA   = 1,    //, SUNMA,  Bayside Marina,             0F, Residential_Average,     SUNNN   = 2,    //, SUNNN,  Bayside,                    0F, Residential_Rich,     BATTP   = 3,    //, BATTP,  Battery Point,              0F, Residential_Average,     PARA    = 4,    //, PARA,   Paradiso,                   0F, Entertainment,              Rifa    CIVI    = 5,    //, CIVI,   Santa Flora,                0F, Residential_Rich,     BAYV    = 6,    //, BAYV,   Palisades,                  0F, Residential_Average,     CITYS   = 7,    //, CITYS,  City Hall,                  0F, Residential_Average,     OCEAF1  = 8,    //, OCEAF,  Ocean Flats,                0F, Business,     OCEAF2  = 9,    //, OCEAF,  Ocean Flats,                0F, Beach,     OCEAF3  = 10,   //, OCEAF,  Ocean Flats,                0F, Residential_Average,     SILLY3  = 11,   //, SILLY,  Foster Valley,              0F, Beach,     SILLY4  = 12,   //, SILLY,  Foster Valley,              0F, Business,     HASH    = 13,   //, HASH,   Hashbury,                   0F, Business,     JUNIHO  = 14,   //, JUNIHO, Juniper Hollow,             0F, Residential_Poor,     ESPN1   = 15,   //, ESPN,   Esplanade North,            0F, Residential_Average,     ESPN2   = 16,   //, ESPN,   Esplanade North,            0F, Shopping,                   DaNang    ESPN3   = 17,   //, ESPN,   Esplanade North,            0F, Shopping,                   DaNang    FINA    = 18,   //, FINA,   Financial,                  0F, Shopping,                   DaNang    CALT    = 19,   //, CALT,   Calton Heights,             0F, Business,     SFDWT1  = 20,   //, SFDWT,  Downtown,                   0F, Residential_Average,        Triad    SFDWT2  = 21,   //, SFDWT,  Downtown,                   0F, Business,     SFDWT3  = 22,   //, SFDWT,  Downtown,                   0F, Business,     SFDWT4  = 23,   //, SFDWT,  Downtown,                   0F, Business,     JUNIHI  = 24,   //, JUNIHI, Juniper Hill,               0F, Shopping,     CHINA   = 25,   //, CHINA,  Chinatown,                  0F, Residential_Average,     SFDWT5  = 26,   //, SFDWT,  Downtown,                   06, Shopping,                   Triad    THEA1   = 27,   //, THEA,   Kings,                      0F, Shopping,                   Triad    THEA2   = 28,   //, THEA,   Kings,                      0F, Entertainment,     THEA3   = 29,   //, THEA,   Kings,                      0F, Entertainment,     GARC    = 30,   //, GARC,   Garcia,                     0F, Entertainment,              Rifa    DOH1    = 31,   //, DOH,    Doherty,                    0F, Gangland,                   Rifa    DOH2    = 32,   //, DOH,    Doherty,                    0F, Residential_Average,     SFDWT6  = 33,   //, SFDWT,  Downtown,                   0F, Residential_Average,        Rifa    SFAIR3  = 34,   //, SFAIR,  Easter Bay Airport,         0F, Shopping,     EASB1   = 35,   //, EASB,   Easter Basin,               0F, Airport,     EASB2   = 36,   //, EASB,   Easter Basin,               0F, Industry,                   DaNang    ESPE1   = 37,   //, ESPE,   Esplanade East,             0F, Industry,                   DaNang    ESPE2   = 38,   //, ESPE,   Esplanade East,             0F, Shopping,     ESPE3   = 39,   //, ESPE,   Esplanade East,             0F, Shopping,     ANGPI   = 40,   //, ANGPI,  Angel Pine,                 0F, Shopping,     SHACA   = 41,   //, SHACA,  Shady Cabin,                0F, Countryside,     BACKO   = 42,   //, BACKO,  Back o Beyond,              0F, Countryside,     LEAFY   = 43,   //, LEAFY,  Leafy Hollow,               0F, Countryside,     FLINTR  = 44,   //, FLINTR, Flint Range,                0F, Countryside,     HAUL    = 45,   //, HAUL,   Fallen Tree,                0F, Desert,     FARM    = 46,   //, FARM,   The Farm,                   0F, Out_Of_Town_Factory,     ELQUE   = 47,   //, ELQUE,  El Quebrados,               0F, Countryside,     ALDEA   = 48,   //, ALDEA,  Aldea Malvada,              0F, Desert,     DAM     = 49,   //, DAM,    The Sherman Dam,            0F, Desert,     BARRA   = 50,   //, BARRA,  Las Barrancas,              0F, Out_Of_Town_Factory,     CARSO   = 51,   //, CARSO,  Fort Carson,                0F, Desert,     QUARY   = 52,   //, QUARY,  Hunter Quarry,              0F, Desert,     OCTAN   = 53,   //, OCTAN,  Octane Springs,             0F, Out_Of_Town_Factory,     PALMS   = 54,   //, PALMS,  Green Palms,                0F, Out_Of_Town_Factory,     TOM     = 55,   //, TOM,    Regular Tom,                0F, Out_Of_Town_Factory,     BRUJA   = 56,   //, BRUJA,  Las Brujas,                 0F, Desert,     MEAD    = 57,   //, MEAD,   Verdant Meadows,            0F, Desert,     PAYAS   = 58,   //, PAYAS,  Las Payasadas,              0F, Residential_Average,     ARCO    = 59,   //, ARCO,   Arco del Oeste,             0F, Desert,     SFAIR1  = 60,   //, SFAIR,  Easter Bay Airport,         0F, Desert,     HANKY   = 61,   //, HANKY,  Hankypanky Point,           0F, Airport,     PALO    = 62,   //, PALO,   Palomino Creek,             0F, Countryside,     NROCK   = 63,   //, NROCK,  North Rock,                 0F, Countryside,     MONT    = 64,   //, MONT,   Montgomery,                 0F, Countryside,     MONT1   = 65,   //, MONT,   Montgomery,                 0F, Countryside,     HBARNS  = 66,   //, HBARNS, Hampton Barns,              0F, Countryside,     FERN    = 67,   //, FERN,   Fern Ridge,                 0F, Countryside,     DILLI   = 68,   //, DILLI,  Dillimore,                  0F, Countryside,     TOPFA   = 69,   //, TOPFA,  Hilltop Farm,               0F, Countryside,     BLUEB1  = 70,   //, BLUEB,  Blueberry,                  0F, Countryside,     BLUEB   = 71,   //, BLUEB,  Blueberry,                  0F, Countryside,     PANOP   = 72,   //, PANOP,  The Panopticon,             0F, Countryside,     FRED    = 73,   //, FRED,   Frederick Bridge,           0F, Countryside,     MAKO    = 74,   //, MAKO,   The Mako Span,              0F, Residential_Average,     BLUAC   = 75,   //, BLUAC,  Blueberry Acres,            0F, Countryside,     MART    = 76,   //, MART,   Martin Bridge,              0F, Countryside,     FALLO   = 77,   //, FALLO,  Fallow Bridge,              0F, Residential_Average,     CREEK   = 78,   //, CREEK,  Shady Creeks,               0F, Residential_Average,     CREEK1  = 79,   //, CREEK,  Shady Creeks,               0F, Countryside,     WESTP1  = 80,   //, WESTP,  Queens,                     0F, Countryside,     WESTP2  = 81,   //, WESTP,  Queens,                     0F, Residential_Rich,     WESTP3  = 82,   //, WESTP,  Queens,                     0F, Residential_Rich,     LA      = 83,   //, LA,     Los Santos,                 0F, Residential_Rich,     VE      = 84,   //, VE,     Las Venturas,               0F, Residential_Average,     BONE    = 85,   //, BONE,   Bone County,                0F, Residential_Average,     ROBAD   = 86,   //, ROBAD,  Tierra Robada,              0F, Desert,     GANTB   = 87,   //, GANTB,  Gant Bridge,                0F, Desert,     GANTB1  = 88,   //, GANTB,  Gant Bridge,                0F, Residential_Average,     SF      = 89,   //, SF,     San Fierro,                 0F, Residential_Average,     ROBAD1  = 90,   //, ROBAD,  Tierra Robada,              0F, Residential_Average,     RED     = 91,   //, RED,    Red County,                 0F, Residential_Average,     FLINTC  = 92,   //, FLINTC, Flint County,               0F, Countryside,     EBAY    = 93,   //, EBAY,   Easter Bay Chemicals,       0F, Countryside,     EBAY2   = 94,   //, EBAY,   Easter Bay Chemicals,       0F, Out_Of_Town_Factory,     SFAIR4  = 95,   //, SFAIR,  Easter Bay Airport,         0F, Out_Of_Town_Factory,     SILLY1  = 96,   //, SILLY,  Foster Valley,              0F, Airport,     SILLY2  = 97,   //, SILLY,  Foster Valley,              0F, Business,     SFAIR2  = 98,   //, SFAIR,  Easter Bay Airport,         0F, Business,     SFAIR5  = 99,   //, SFAIR,  Easter Bay Airport,         0F, Airport,     WHET    = 100,  //, WHET,   Whetstone,                  0F, Airport,     LAIR1   = 101,  //, LAIR,   Los Santos International,   0F, Countryside,     LAIR2a  = 102,  //, LAIR,   Los Santos International,   0F, Airport,     BLUF1a  = 103,  //, BLUF,   Verdant Bluffs,             0F, Airport,     ELCO2   = 104,  //, ELCO,   El Corona,                  0F, Park,     LIND1a  = 105,  //, LIND,   Willowfield,                09, Gangland,                   Aztecas    LIND1b  = 106,  //, LIND,   Willowfield,                0F, Gangland,                   Ballas    LIND2a  = 107,  //, LIND,   Willowfield,                0F, Industry,                   Ballas    LIND2b  = 108,  //, LIND,   Willowfield,                0F, Industry,                   Ballas    LDOC4   = 109,  //, LDOC,   Ocean Docks,                0F, Industry,                   Ballas    LDOC1b  = 110,  //, LDOC,   Ocean Docks,                0F, Industry,     MAR3    = 111,  //, MAR,    Marina,                     0F, Industry,     VERO4a  = 112,  //, VERO,   Verona Beach,               0F, Residential_Average,     VERO4b  = 113,  //, VERO,   Verona Beach,               0F, Beach,                      Ballas    BLUF1b  = 114,  //, BLUF,   Verdant Bluffs,             0F, Beach,                      Ballas    BLUF2   = 115,  //, BLUF,   Verdant Bluffs,             0F, Residential_Average,     ELCO1   = 116,  //, ELCO,   El Corona,                  0F, Park,     VERO1   = 117,  //, VERO,   Verona Beach,               09, Residential_Poor,           Aztecas    MAR1    = 118,  //, MAR,    Marina,                     0F, Residential_Average,        Ballas    MAR2    = 119,  //, MAR,    Marina,                     0F, Residential_Rich,     VERO3   = 120,  //, VERO,   Verona Beach,               0F, Residential_Average,     VERO2   = 121,  //, VERO,   Verona Beach,               0F, Shopping,                   Ballas    CONF1b  = 122,  //, CONF,   Conference Center,          0F, Shopping,                   Ballas    CONF1a  = 123,  //, CONF,   Conference Center,          0F, Business,     THALL1  = 124,  //, COM,    Commerce,                   0F, Business,     COM1a   = 125,  //, COM,    Commerce,                   0F, Business,     COM1b   = 126,  //, COM,    Commerce,                   0F, Shopping,     COM2    = 127,  //, COM,    Commerce,                   0F, Shopping,     PER1    = 128,  //, PER1,   Pershing Square,            0F, Shopping,     COM4    = 129,  //, COM,    Commerce,                   0F, Shopping,     LMEX1a  = 130,  //, LMEX,   Little Mexico,              0F, Shopping,     LMEX1b  = 131,  //, LMEX,   Little Mexico,              0F, Residential_Average,        Aztecas    COM3    = 132,  //, COM,    Commerce,                   0F, Residential_Average,        Aztecas    IWD3a   = 133,  //, IWD,    Idlewood,                   0F, Shopping,     IWD3b   = 134,  //, IWD,    Idlewood,                   01, Gangland,                   Ballas    IWD4    = 135,  //, IWD,    Idlewood,                   01, Gangland,                   Ballas    IWD1    = 136,  //, IWD,    Idlewood,                   01, Gangland,                   Ballas    IWD2    = 137,  //, IWD,    Idlewood,                   01, Gangland,                   Ballas    GLN2a   = 138,  //, GLN,    Glen Park,                  01, Gangland,                   Ballas    GLN1b   = 139,  //, GLN,    Glen Park,                  0F, Gangland,                   Ballas    JEF3a   = 140,  //, JEF,    Jefferson,                  0F, Residential_Average,     JEF3c   = 141,  //, JEF,    Jefferson,                  0F, Residential_Average,     JEF2    = 142,  //, JEF,    Jefferson,                  0F, Residential_Average,        Ballas    JEF1b   = 143,  //, JEF,    Jefferson,                  0F, Residential_Average,        Ballas    JEF1a   = 144,  //, JEF,    Jefferson,                  0F, Residential_Average,        Ballas    CHC1a   = 145,  //, CHC,    Las Colinas,                0F, Residential_Average,        Ballas    CHC1b   = 146,  //, CHC,    Las Colinas,                09, Residential_Poor,           Vagos    CHC2b   = 147,  //, CHC,    Las Colinas,                09, Residential_Poor,           Vagos    CHC2a   = 148,  //, CHC,    Las Colinas,                09, Residential_Poor,           Vagos    IWD5    = 149,  //, IWD,    Idlewood,                   09, Residential_Poor,           Vagos    GAN2    = 150,  //, GAN,    Ganton,                     01, Gangland,                   Ballas    GAN1    = 151,  //, GAN,    Ganton,                     01, Gangland,                   Grove    LIND4c  = 152,  //, LIND,   Willowfield,                01, Gangland,                   Grove    EBE3c   = 153,  //, EBE,    East Beach,                 0F, Residential_Average,     EBE2a   = 154,  //, EBE,    East Beach,                 0F, Beach,                      Vagos    EBE2b   = 155,  //, EBE,    East Beach,                 0F, Residential_Average,        Vagos    ELS4    = 156,  //, ELS,    East Los Santos,            0F, Residential_Average,        Vagos    ELS3a   = 157,  //, ELS,    East Los Santos,            0A, Gangland,                   Ballas    JEF3b   = 158,  //, JEF,    Jefferson,                  0A, Gangland,                   Ballas    ELS3b   = 159,  //, ELS,    East Los Santos,            0F, Residential_Average,        Ballas    ELS3c   = 160,  //, ELS,    East Los Santos,            0A, Gangland,                   Ballas    ELS1a   = 161,  //, ELS,    East Los Santos,            0F, Residential_Average,     ELS1b   = 162,  //, ELS,    East Los Santos,            0A, Gangland,                   Ballas    ELS2    = 163,  //, ELS,    East Los Santos,            0A, Gangland,                   Ballas    LFL1a   = 164,  //, LFL,    Los Flores,                 0A, Gangland,                   Ballas    LFL1b   = 165,  //, LFL,    Los Flores,                 09, Gangland,                   Vagos    EBE1    = 166,  //, EBE,    East Beach,                 09, Gangland,                   Vagos    CHC4a   = 167,  //, CHC,    Las Colinas,                0F, Residential_Average,        Vagos    CHC4b   = 168,  //, CHC,    Las Colinas,                09, Gangland,                   Vagos    CHC3    = 169,  //, CHC,    Las Colinas,                09, Gangland,                   Vagos    LDT5    = 170,  //, LDT,    Downtown Los Santos,        09, Gangland,                   Vagos    LDT7    = 171,  //, LDT,    Downtown Los Santos,        0F, Business,     LDT4    = 172,  //, LDT,    Downtown Los Santos,        0F, Residential_Average,     LDT3    = 173,  //, LDT,    Downtown Los Santos,        0F, Residential_Average,     LDT6    = 174,  //, LDT,    Downtown Los Santos,        0F, Business,     MULINT  = 175,  //, MULINT, Mulholland Intersection,    0F, Business,     MUL3    = 176,  //, MUL,    Mulholland,                 0F, Residential_Average,     MUL2a   = 177,  //, MUL,    Mulholland,                 0F, Park,     MUL2b   = 178,  //, MUL,    Mulholland,                 0F, Park,     MKT3    = 179,  //, MKT,    Market,                     0F, Park,     VIN3    = 180,  //, VIN,    Vinewood,                   0F, Shopping_Posh,     MKT4    = 181,  //, MKT,    Market,                     0F, Entertainment,     LDT1a   = 182,  //, LDT,    Downtown Los Santos,        0F, Shopping_Posh,     LDT1b   = 183,  //, LDT,    Downtown Los Santos,        0F, Business,     LDT1c   = 184,  //, LDT,    Downtown Los Santos,        0F, Business,     SUN3a   = 185,  //, SUN,    Temple,                     0F, Business,     SUN3b   = 186,  //, SUN,    Temple,                     0F, Entertainment,              Grove    SUN3c   = 187,  //, SUN,    Temple,                     0F, Entertainment,              Grove    MUL7a   = 188,  //, MUL,    Mulholland,                 0F, Entertainment,              Grove    MUL7b   = 189,  //, MUL,    Mulholland,                 0F, Residential_Rich_Secluded,     MUL6    = 190,  //, MUL,    Mulholland,                 0F, Residential_Rich_Secluded,     VIN2    = 191,  //, VIN,    Vinewood,                   0F, Residential_Rich_Secluded,     SUN1    = 192,  //, SUN,    Temple,                     0F, Entertainment,              Grove    SUN4    = 193,  //, SUN,    Temple,                     0F, Entertainment,              Grove    SUN2    = 194,  //, SUN,    Temple,                     0F, Entertainment,              Grove    MUL4    = 195,  //, MUL,    Mulholland,                 0F, Residential_Average,     MUL1a   = 196,  //, MUL,    Mulholland,                 0F, Residential_Rich_Secluded,     MUL1b   = 197,  //, MUL,    Mulholland,                 0F, Residential_Rich_Secluded,     MUL5a   = 198,  //, MUL,    Mulholland,                 0F, Residential_Rich_Secluded,     MUL5b   = 199,  //, MUL,    Mulholland,                 0F, Residential_Rich_Secluded,     MUL5c   = 200,  //, MUL,    Mulholland,                 0F, Residential_Rich_Secluded,     MUL1c   = 201,  //, MUL,    Mulholland,                 0F, Residential_Rich_Secluded,     SMB1    = 202,  //, SMB,    Santa Maria Beach,          0F, Residential_Rich_Secluded,     SMB2    = 203,  //, SMB,    Santa Maria Beach,          0F, Beach,                      Grove    ROD5b   = 204,  //, ROD,    Rodeo,                      0F, Beach,                      Grove    ROD5a   = 205,  //, ROD,    Rodeo,                      0F, Residential_Rich,     ROD1a   = 206,  //, ROD,    Rodeo,                      0F, Residential_Rich,     ROD1b   = 207,  //, ROD,    Rodeo,                      0F, Shopping_Posh,     ROD1c   = 208,  //, ROD,    Rodeo,                      0F, Shopping_Posh,     ROD3a   = 209,  //, ROD,    Rodeo,                      0F, Shopping_Posh,     ROD3b   = 210,  //, ROD,    Rodeo,                      0F, Shopping_Posh,     ROD4a   = 211,  //, ROD,    Rodeo,                      0F, Shopping_Posh,     ROD4b   = 212,  //, ROD,    Rodeo,                      0F, Shopping_Posh,     ROD4c   = 213,  //, ROD,    Rodeo,                      0F, Shopping_Posh,     VIN1b   = 214,  //, VIN,    Vinewood,                   0F, Shopping_Posh,     RIH5a   = 215,  //, RIH,    Richman,                    0F, Entertainment,     RIH5b   = 216,  //, RIH,    Richman,                    0F, Residential_Rich,     ROD2b   = 217,  //, ROD,    Rodeo,                      0F, Residential_Average,     ROD2a   = 218,  //, ROD,    Rodeo,                      0F, Shopping_Posh,     RIH6a   = 219,  //, RIH,    Richman,                    0F, Shopping_Posh,     RIH6b   = 220,  //, RIH,    Richman,                    0F, Residential_Average,     RIH3a   = 221,  //, RIH,    Richman,                    0F, Residential_Rich,     RIH3b   = 222,  //, RIH,    Richman,                    0F, Residential_Rich_Secluded,     RIH4    = 223,  //, RIH,    Richman,                    0F, Residential_Rich_Secluded,     RIH2    = 224,  //, RIH,    Richman,                    0F, Residential_Rich,     RIH1a   = 225,  //, RIH,    Richman,                    0F, Residential_Rich_Secluded,     RIH1b   = 226,  //, RIH,    Richman,                    0F, Residential_Rich_Secluded,     STRIP1  = 227,  //, STRIP,  The Strip,                  0F, Residential_Rich_Secluded,     STRIP2  = 228,  //, STRIP,  The Strip,                  0F, Entertainment_Busy,     DRAG    = 229,  //, DRAG,   The Four Dragons Casino,    0F, Entertainment_Busy,     PINK    = 230,  //, PINK,   The Pink Swan,              0F, Entertainment_Busy,     HIGH    = 231,  //, HIGH,   The High Roller,            0F, Entertainment_Busy,     PIRA    = 232,  //, PIRA,   Pirates in Mens Pants,      0F, Entertainment_Busy,     VISA1   = 233,  //, VISA,   The Visage,                 0F, Entertainment_Busy,     VISA2   = 234,  //, VISA,   The Visage,                 0F, Entertainment_Busy,     JTS1    = 235,  //, JTS,    Julius Thruway South,       0F, Entertainment_Busy,     JTW1    = 236,  //, JTW,    Julius Thruway West,        0F, Residential_Average,     JTS2    = 237,  //, JTS,    Julius Thruway South,       0F, Residential_Average,     RSE     = 238,  //, RSE,    Rockshore East,             0F, Residential_Average,     LOT     = 239,  //, LOT,    Come-A-Lot,                 0F, Residential_Poor,     CAM     = 240,  //, CAM,    The Camels Toe,             0F, Entertainment_Busy,     ROY     = 241,  //, ROY,    Royal Casino,               0F, Entertainment_Busy,     CALI1   = 242,  //, CALI,   Caligulas Palace,           0F, Entertainment_Busy,     CALI2   = 243,  //, CALI,   Caligulas Palace,           0F, Entertainment_Busy,     PILL1   = 244,  //, PILL,   Pilgrim,                    0F, Entertainment_Busy,     STAR2   = 245,  //, STAR,   Starfish Casino,            0F, Shopping,     STRIP3  = 246,  //, STRIP,  The Strip,                  0F, Entertainment_Busy,     STRIP4  = 247,  //, STRIP,  The Strip,                  0F, Entertainment_Busy,     ISLE    = 248,  //, ISLE,   The Emerald Isle,           0F, Entertainment_Busy,     OVS     = 249,  //, OVS,    Old Venturas Strip,         0F, Entertainment_Busy,     KACC    = 250,  //, KACC,   K.A.C.C. Military Fuels,    0F, Entertainment_Busy,     CREE    = 251,  //, CREE,   Creek,                      0F, Residential_Average,     SRY     = 252,  //, SRY,    Sobell Rail Yards,          0F, Shopping,     LST     = 253,  //, LST,    Linden Station,             0F, Residential_Average,     JTE2    = 254,  //, JTE,    Julius Thruway East,        0F, Residential_Average,     LDS     = 255,  //, LDS,    Linden Side,                0F, Residential_Average,     JTE1    = 256,  //, JTE,    Julius Thruway East,        0F, Industry,     JTN1    = 257,  //, JTN,    Julius Thruway North,       0F, Residential_Average,     JTE4    = 258,  //, JTE,    Julius Thruway East,        0F, Residential_Average,     JTE3    = 259,  //, JTE,    Julius Thruway East,        0F, Residential_Average,     JTN2    = 260,  //, JTN,    Julius Thruway North,       0F, Residential_Average,     JTN3    = 261,  //, JTN,    Julius Thruway North,       0F, Residential_Average,     JTN4    = 262,  //, JTN,    Julius Thruway North,       0F, Residential_Average,     JTN5    = 263,  //, JTN,    Julius Thruway North,       0F, Residential_Average,     JTW2    = 264,  //, JTW,    Julius Thruway West,        0F, Residential_Average,     JTN6    = 265,  //, JTN,    Julius Thruway North,       0F, Residential_Average,     HGP     = 266,  //, HGP,    Harry Gold Parkway,         0F, Residential_Average,     REDE1   = 267,  //, REDE,   Redsands East,              0F, Residential_Rich,     REDE2   = 268,  //, REDE,   Redsands East,              0F, Business,     REDE3   = 269,  //, REDE,   Redsands East,              0F, Business,     JTN8    = 270,  //, JTN,    Julius Thruway North,       0F, Entertainment,     REDW2   = 271,  //, REDW,   Redsands West,              0F, Residential_Average,     REDW1   = 272,  //, REDW,   Redsands West,              0F, Residential_Average,     REDW3   = 273,  //, REDW,   Redsands West,              0F, Residential_Average,     REDW4   = 274,  //, REDW,   Redsands West,              0F, Industry,     VAIR1   = 275,  //, VAIR,   Las Venturas Airport,       0F, Residential_Average,     VAIR2   = 276,  //, VAIR,   Las Venturas Airport,       0F, Airport,     VAIR3   = 277,  //, VAIR,   Las Venturas Airport,       0F, Airport,     LVA1    = 278,  //, LVA,    LVA Freight Depot,          0F, Airport,     BINT2   = 279,  //, BINT,   Blackfield Intersection,    0F, Industry,     BINT1   = 280,  //, BINT,   Blackfield Intersection,    0F, Residential_Average,     BINT3   = 281,  //, BINT,   Blackfield Intersection,    0F, Residential_Average,     BINT4   = 282,  //, BINT,   Blackfield Intersection,    0F, Residential_Average,     LVA2    = 283,  //, LVA,    LVA Freight Depot,          0F, Residential_Average,     LVA3    = 284,  //, LVA,    LVA Freight Depot,          0F, Out_Of_Town_Factory,     LVA4    = 285,  //, LVA,    LVA Freight Depot,          0F, Industry,     LVA5    = 286,  //, LVA,    LVA Freight Depot,          0F, Industry,     GGC1    = 287,  //, GGC,    Greenglass College,         0F, Residential_Average,     GGC2    = 288,  //, GGC,    Greenglass College,         0F, Park,     BFLD1   = 289,  //, BFLD,   Blackfield,                 0F, Entertainment,     BFLD2   = 290,  //, BFLD,   Blackfield,                 0F, Park,     ROCE1   = 291,  //, ROCE,   Roca Escalante,             0F, Entertainment,     ROCE2   = 292,  //, ROCE,   Roca Escalante,             0F, Business,     LDM     = 293,  //, LDM,    Last Dime Motel,            0F, Business,     RSW1    = 294,  //, RSW,    Rockshore West,             0F, Residential_Poor,     RSW2    = 295,  //, RSW,    Rockshore West,             0F, Residential_Poor,     RIE     = 296,  //, RIE,    Randolph Industrial Estate, 0F, Residential_Poor,     BFC1    = 297,  //, BFC,    Blackfield Chapel,          0F, Business,     BFC2    = 298,  //, BFC,    Blackfield Chapel,          0F, Residential_Average,     JTN7    = 299,  //, JTN,    Julius Thruway North,       0F, Residential_Average,     PINT    = 300,  //, PINT,   Pilson Intersection,        0F, Residential_Average,     WWE     = 301,  //, WWE,    Whitewood Estates,          0F, Residential_Average,     PRP1    = 302,  //, PRP,    Prickle Pine,               0F, Residential_Average,     PRP2    = 303,  //, PRP,    Prickle Pine,               0F, Residential_Rich,     PRP3    = 304,  //, PRP,    Prickle Pine,               0F, Residential_Rich,     SPIN    = 305,  //, SPIN,   Spinybed,                   0F, Residential_Rich,     PRP4    = 306,  //, PRP,    Prickle Pine,               0F, Industry,     PILL2   = 307,  //, PILL,   Pilgrim,                    0F, Residential_Rich,     SASO    = 308,  //, SASO,   San Andreas Sound,          0F, Shopping,     FISH    = 309,  //, FISH,   Fishers Lagoon,             0F, Residential_Average,     GARV    = 310,  //, GARV,   Garver Bridge,              0F, Residential_Average,     GARV1   = 311,  //, GARV,   Garver Bridge,              0F, Residential_Average,     GARV2   = 312,  //, GARV,   Garver Bridge,              0F, Residential_Average,     KINC    = 313,  //, KINC,   Kincaid Bridge,             0F, Residential_Average,     KINC1   = 314,  //, KINC,   Kincaid Bridge,             0F, Residential_Average,     KINC2   = 315,  //, KINC,   Kincaid Bridge,             0F, Residential_Average,     LSINL   = 316,  //, LSINL,  Los Santos Inlet,           0F, Residential_Average,     SHERR   = 317,  //, SHERR,  Sherman Reservoir,          0F, Residential_Average,     FLINW   = 318,  //, FLINW,  Flint Water,                0F, Residential_Average,     ETUNN   = 319,  //, ETUNN,  Easter Tunnel,              0F, Residential_Average,     BYTUN   = 320,  //, BYTUN,  Bayside Tunnel,             0F, Residential_Average,     BIGE    = 321,  //, BIGE,   The Big Ear,                0F, Residential_Average,     PROBE   = 322,  //, PROBE,  Lil Probe Inn,              0F, Desert,     VALLE   = 323,  //, VALLE,  Valle Ocultado,             0F, Desert,     GLN1    = 324,  //, GLN,    Glen Park,                  0F, Desert,     LDOC3a  = 325,  //, LDOC,   Ocean Docks,                0F, Gangland,                   Ballas    LINDEN  = 326,  //, LINDEN, Linden Station,             0F, Industry,     UNITY   = 327,  //, UNITY,  Unity Station,              0F, Residential_Average,     VIN1a   = 328,  //, VIN,    Vinewood,                   0F, Residential_Average,     MARKST  = 329,  //, MARKST, Market Station,             0F, Entertainment,     CRANB   = 330,  //, CRANB,  Cranberry Station,          0F, Shopping_Posh,     YELLOW  = 331,  //, YELLOW, Yellow Bell Station,        0F, Residential_Average,     SANB1   = 332,  //, SANB,   San Fierro Bay,             0F, Residential_Rich,     SANB2   = 333,  //, SANB,   San Fierro Bay,             0F, Residential_Average,     ELCA    = 334,  //, ELCA,   El Castillo del Diablo,     0F, Residential_Average,     ELCA1   = 335,  //, ELCA,   El Castillo del Diablo,     0F, Desert,     ELCA2   = 336,  //, ELCA,   El Castillo del Diablo,     0F, Residential_Average,     REST    = 337,  //, REST,   Restricted Area,            0F, Residential_Average,     MONINT  = 338,  //, MONINT, Montgomery Intersection,    0F, Residential_Average,     MONINT_ = 339,  //, MONINT, Montgomery Intersection,    0F, Desert,     ROBINT  = 340,  //, ROBINT, Robada Intersection,        0F, Desert,     FLINTI  = 341,  //, FLINTI, Flint Intersection,         0F, Desert,     SFBAG2  = 342,  //, SFAIR,  Easter Bay Airport,         0F, Airport_Runway,     SFBAG3  = 343,  //, SFAIR,  Easter Bay Airport,         0F, Airport_Runway,     SFBAG1  = 344,  //, SFAIR,  Easter Bay Airport,         0F, Airport_Runway,     MKT1    = 345,  //, MKT,    Market,                     0F, Shopping_Posh,     MKT2    = 346,  //, MKT,    Market,                     0F, Shopping_Posh,     SFGLF4  = 347,  //, c*ntC,  Avispa Country Club,        0F, Golf_Club,     c*ntC2  = 348,  //, c*ntC,  Avispa Country Club,        0F, Residential_Rich,     HILLP   = 349,  //, HILLP,  Missionary Hill,            0F, Park,     MTCHI2  = 350,  //, MTCHI,  Mount Chiliad,              0F, Countryside,     MTCHI3  = 351,  //, MTCHI,  Mount Chiliad,              0F, Countryside,     MTCHI1  = 352,  //, MTCHI,  Mount Chiliad,              0F, Countryside,     MTCHI4  = 353,  //, MTCHI,  Mount Chiliad,              0F, Countryside,     YBELL1  = 354,  //, YBELL,  Yellow Bell Golf Course,    0F, Golf_Club,     YBELL2  = 355,  //, YBELL,  Yellow Bell Golf Course,    0F, Residential_Rich,     LVBAG   = 356,  //, VAIR,   Las Venturas Airport,       0F, Airport_Runway,     LDOC1a  = 357,  //, LDOC,   Ocean Docks,                0F, Industry,     LAIR2b  = 358,  //, LAIR,   Los Santos International,   0F, Airport,     LDOC3b  = 359,  //, LDOC,   Ocean Docks,                0F, Industry,     LBAG1   = 360,  //, LAIR,    Los Santos International,  0F, Airport_Runway,     LBAG2   = 361,  //, LAIR,   Los Santos International,   0F, Airport_Runway,     LBAG3   = 362,  //, LAIR,   Los Santos International,   0F, Airport_Runway,     CONST1  = 363,  //, STAR,   Starfish Casino,            0F, Out_Of_Town_Factory,     BEACO   = 364,  //, BEACO,  Beacon Hill,                0F, Countryside,     SFGLF1  = 365,  //, c*ntC,  Avispa Country Club,        0F, Golf_Club,     SFGLF2  = 366,  //, c*ntC,  Avispa Country Club,        0F, Golf_Club,     SFGLF3  = 367,  //, GARC,   Garcia,                     0F, Golf_Club,     c*ntC1  = 368,  //, c*ntC,  Avispa Country Club,        0F, Residential_Rich,     c*ntC3  = 369,  //, c*ntC,  Avispa Country Club,        0F, Residential_Rich,     PLS     = 370,  //, PLS,    Playa del Seville,          0F, Beach,                      Grove    LDOC3c  = 371,  //, LDOC,   Ocean Docks,                0F, Industry,     STAR1   = 372,  //, STAR,   Starfish Casino,            0F, Entertainment_Busy,     RING    = 373,  //, RING,   The Clowns Pocket,          0F, Entertainment_Busy,     LDOC2   = 374,  //, LDOC,   Ocean Docks,                0F, Industry,     LIND3   = 375,  //, LIND,   Willowfield,                0F, Industry,                   Ballas    LIND4a  = 376,  //, LIND,   Willowfield,                0F, Residential_Average,     WWE1    = 377,  //, WWE,    Whitewood Estates,          0F, Residential_Average,     LDT8    = 378,  //, LDT,    Downtown Los Santos,        0F, Residential_Average, }; 

 

 

 

Ethnicity Flags for reference:

struct tEthnicFlags {    eByteFlags  BlackPeds : 1;      // 0x1    eByteFlags  WhitePeds : 1;      // 0x2    eByteFlags  AsianPeds : 1;      // 0x4    eByteFlags  HispanicPeds : 1;   // 0x8    byte        unusedFlags : 4;    };
Edited by OrionSR

Share this post


Link to post
Share on other sites
OrionSR

The lastest puzzler - How to display the coordinates of the pickups and cargens in a useful format using a custom function?

 

The problem is that SA encodes float coordinates for pickups and cargens as a 16 bit integer after multiplying the coordinate by 8, so I need to make a few calculations before I can use or manipulated the data. I didn't know to look for a strategy to change how the coordinates are displayed, but I was having other problems getting started with custom functions so I was practicing with examples I could find of custom auto-inspector functions for dates. The auto-inspector is a side-bar tool that displays the bytes after the cursor as signed or unsigned byte, word, dword, qword, float, etc. - a very handy tool if your not sure what your looking at.

 

The function below is from InspectorDate.bt on the template repository at SweetScape.

//----------------------------------------------------------------// BlackberryDate//      32-bit integer, number of minutes since 01/01/1900 00:00:00typedef uint BlackberryDate <read=BlackberryDateRead, write=BlackberryDateWrite>;FSeek( pos ); BlackberryDate _gt <name="BlackberryDate">;string BlackberryDateRead( BlackberryDate t ){       // Convert to FILETIME    return FileTimeToString( t*600000000L + 94354848000000000L );}int BlackberryDateWrite( BlackberryDate &t, string value ){    // Convert from FILETIME    FILETIME ft;    int result = StringToFileTime( value, ft );    t = (int)(((uint64)ft - 94354848000000000L)/600000000L);    return result;}

The result of the date investigation, btw, it that I'm pretty sure system time is only recorded in PC saves so I've blocked out PS2 and mobile data as unknown bytes.

 

But the point of this post is: typedef uint BlackberryDate <read=BlackberryDateRead, write=BlackberryDateWrite>;

 

It sure looks like I can use one function to read data to something that's easy to work with and write it back to the proper format if I change it. At this point I feel I'm doing well if I can take a working function and implement it properly within the template. I've had no luck adapting functions to a new purpose. So... I think I'll let this problem sit, practice some more, and come back to it with a better skill set - unless someone is kind enough to help me out. This seems like a good example to build from. I just can't manage my data types well enough to get started.

 

Added: Milliseconds to Hours for the timers. Damn. Now that I know it's possible I'm in for a lot of frustration if I can't figure these things out.

 

So instead, I'll finish on a positive note. The investigation with a custom date inspector lead to experiments with a custom GTASA inspector, and I've been quite happy with the results. Usually I've got a half dozen or more saves of different types open at one time as I test my template modifications. Except for PS2, which has a unique naming convention, it can be difficult to tell them apart.

 

qMiPKSG.png

 

The GTASA Inspector struct only appears for larger files. I need to change that to .b extension or something.

  • Current Version - the first field in the save, File ID, EXE Version
  • string | wstring - character type, and the Last Mission Passed string
  • Block 1 Offset - the name field is different depending on the offset found for the 2nd "BLOCK" (+9 for varspace)
  • Script version - size of main, a very positive identifier of script versions
  • PC/PS2 Standard (file size) - labeling the current "Heaven" - and heavens enummed with a common safehouse interior
  • Save Pickup Index - many safehouses share the same pickup, kind of confusing. These need better enums.
  • Glitches popup only if detected. These are all at static offsets - SimpleVars and global variables.
    • Two-Timing - not really a glitch. -1 means the script is disabled but that's pretty normal
    • Girlfriend Censor - HC 2.0 unlocked the cities early and glitched the phone calls, so I track this setting
    • Gym glitch appears if not -1. This guy's subscription will run out for two weeks at the first of year
    • Basketball glitch from saving at Madd Dogg's crib
    • Pool Player glitch from saving near an active pool player
    • Looks like I forgot to enable the Pimping glitch in this save. An old glitch from a bad mission passer script.
    • Riot Glitch - this has been popping up a lot recently. Something popular is corrupting $58.

When I get back to an investigative mode I'm planning to implement some of the SA enums on the current cursor location. I'm hoping it'll help tease out unknown field types, especially when I'm poking around in memory and not really sure what I'm looking at.

 

Added: Glitch detection is currently only working for PC. I need to work out a strategy for defining constants for the global variables associated with common glitches.

Edited by OrionSR

Share this post


Link to post
Share on other sites
OrionSR

Object Flags

 

I've had very little luck finding complete information or any kind of naming convention for the object flags in SA, so I had to mix data from VC with a few in-game observations to round out this list as best I can. Comments and suggestions would be appreciated.

 

The completely inaccurate information included in the spoiler below has provoked a much more accurate list in the next post. Apparently I was mixing observations about object flags with documentation on the model flags which are not included in the save.

 

Check the next post for information on object flags and ignore the old garbage in the spoiler.

 

 

Item Definition on GTAModding

 

Below is my first best-guess for enumerating the object flags in San Andreas.

  • Names in ALL_CAPS are taken directly from the VC documentation.
  • Names in Title_Case were invented. Please advise.
  • All tests were conducted on SCM objects (dynamic objects don't work, not sure what else).
  • Stealable SCM objects (think stunt ramps and barricades) can be moved and saved in the new location.
  • Magnetic objects must require some sort of registration (worked on the tied quarry cop).
  • I have no data for the unknown script and unknown physics flags.
// https://www.gtamodding.com/wiki/Item_Definitionstruct tObjectFlags {    eIntFlags   IS_ROAD : 1;                    //  0x01, Wet effect (objects appear darker).     eIntFlags   DO_NOT_FADE : 1;                //  0x02, Do not fade the object when it is being loaded into or out of view.    eIntFlags   DRAW_LAST  : 1;                 //  0x04, Allow transparencies of other objects to be visible through this object.     eIntFlags   ADDITIVE : 1;                   //  0x08, Alpha transparency 2    eIntFlags   Subtractive : 1;                //  0x10, Opposite to flag 2    eIntFlags   IGNORE_LIGHTING : 1;            //  0x20, Indicates an object to be used inside an interior.     eIntFlags   NO_ZBUFFER_WRITE : 1;           //  0x40, Disables the shadow mesh to project a shadow; allow transparencies of other objects, shadows, and lights to be visible through this object.    eIntFlags   DONT_RECEIVE_SHADOWS : 1;       //  0x80, Object surface will not be culled.     eIntFlags   IGNORE_DRAW_DISTANCE : 1;       //  0x0100, Disables draw distance (Only used for LOD objects with an LOD value greater than 299).    eIntFlags   IS_GLASS_TYPE_1 : 1;            //  0x0200, Object is breakable (like glass – additional parameters defined inside the object.dat file, otherwise there is no effect).    eIntFlags   IS_GLASS_TYPE_2 : 1;            //  0x0400, Similar to flag 0x0200: object first cracks on a strong collision, then it breaks (does also require object.dat registration).    eIntFlags   Is_Garage_Door : 1;             //  0x0800, Indicates an object as a garage door (for more information see GRGE – requires object.dat registration).    eIntFlags   Is_MultiTexture : 1;            //  0x1000, Indicates a multi mesh object (Object switches from mesh 2 to mesh 1 after collision – requires object.dat registration).    eIntFlags   Is_Stealable : 1;               //^ 0x2000, liftable, stealable (08E9:)– scm objects can be moved and saved in new position    eIntFlags   Is_Vegetation : 1;              //  0x4000, Indicates a vegetation object (Object moves in wind).     eIntFlags   Use_Weather_Brightness : 1;     //  0x8000, Uses object brightness from the current weather definition (See timecyc.dat – PoleShd).    eIntFlags   Is_Explosive : 1;               //  0x010000, Object explodes after getting hit (requires object.dat registration). Dynamic objects don't work as SCM.    eIntFlags   unk_Script : 1;                 //  0x020000, Unknown – apparently some flag for the Script.    eIntFlags   Is_Attractive_To_Magnet : 1;    //^ 0x040000, attractive to magnet (0916:)    eIntFlags   Is_Tag : 1;                     //^ 0x080000, Object will switch from mesh 2 to mesh 1 after getting sprayed by the player (graffity flag).    eIntFlags   Disable_Backface_Culling : 1;   //  0x100000, Disables backface culling – as an result the texture will be drawed on both sides of the model (Always enabled for GTA III and Vice City)    eIntFlags   unk_Physics : 1;                //  0x200000, Unknown – apparently related into physics.    int         unusedflags : 10;               //  0x400000, unused flags};

 

 

Edited by OrionSR

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.