Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

OrionSR

Introduction to SA Chain Game Style Save Editing - Mobile/PC

Recommended Posts

kevinwilliszjs

this is those magic hex code ,they are a lot of , if you know how they work ,maybe all the 0ddX opcode cleo can be used in all version

 

_ZN6CRadar13ms_RadarTraceE
_ZN9CSprite2d13Draw2DPolygonEffffffffRK5CRGBA
_ZN6CRadar15ArrowBlipColourE
_ZN6CRadar10LimitToMapEPfS0_
_ZN6CRadar18CalculateBlipAlphaEf
_ZN6CRadar16vec2DRadarOriginE
_ZN6CRadar12m_radarRangeE
_ZN6CRadar33TransformRealWorldToTexCoordSpaceER9CVector2DRKS0_ii
_ZN6CRadar21CalculateCachedSinCosEv
_ZN6CRadar23HasThisBlipBeenRevealedEi
_ZN6CRadar15DisplayThisBlipEia
_ZN6CRadar20ChangeBlipBrightnessEii
_ZN6CRadar11SetBlipFadeEih
_ZN6CRadar14ShowRadarTraceEffjhhhh
_Z15Menu_DeleteSloti
_Z18Menu_PopulateSavesb
_ZN22KeyboardControlsScreen8GetYSizeEi
_ZN22KeyboardControlsScreen14GetScissorRectEv
_ZN22KeyboardControlsScreen11IsScrollingEv
gMobileMenu
_ZN11AudioScreen17OnRestoreDefaultsEP12SelectScreeni
_Z23Menu_ApplyAudioSettingsv
_ZN12CAudioEngine11RetuneRadioEa
..........................

Share this post


Link to post
Share on other sites
OrionSR

Thanks for the update Kevin. Markuza97 has been coaching me on the magic hex strings and given a little free time I'm pretty sure I can change my perspective on this from computer magic to computer science. Unfortunately I don't yet understand enough to offer my own explanation, and probably won't for another 6 weeks.

Share this post


Link to post
Share on other sites
ric-013

damn ... i just learned 1.06 was out .

 

thanks for the info,s on savefile changes .

Share this post


Link to post
Share on other sites
ric-013

??? my game version says 1.03 now , wtf !!!

 

now im confused .... was i on 1.05 and somehow reverted to 1.03 ? ... i doubt it !

 

seems i always was on 1.03 and beleived it was 1.05 ( weird i clearly remember checking version a few weeks ago )

 

hell , that would mean my memory mappping were 1. 03 ( awwwwwwwww , that sucks )

 

EDIT : i edited my previous posts and changed 1.05 id to 1.03 ,

this feels like such a waste o time ... im sorry for the version confusion .

Edited by ric-013

Share this post


Link to post
Share on other sites
OrionSR

Actually, having access to multiple versions makes it a lot easier to test for compatibility as we move forward with the magic hex strings. And since most of your reference is all in relative offsets it wouldn't be too tough to simply add hard coded addresses for each version to the documentation. Don't worry. Nothing has been wasted. It'll all come together once we work out the hex strings.

 

More motivation and higher confidence in the results. Sounds like good news to me.

Share this post


Link to post
Share on other sites
ric-013

I located the export labels I want to use ... I'll build test scripts this weekend.

 

Well, I could easily re-map the memory locations 1.06 ( maybe I will ) but seems that the magic hex string is the proper way ... all my next testings goes toward understanding it.

Share this post


Link to post
Share on other sites
kevinwilliszjs

OrionSR, do you know how to get the x y z Coordinate of the weapon aim target like the below image the red box?

VOgIYoe.jpg?1

Edited by kevinwilliszjs

Share this post


Link to post
Share on other sites
OrionSR

I have no idea, but I think I've seen similar questions asked before. I don't think the answer will be specific to SA Mobile so you are probably free to ask in the III Era Coding forum.

Share this post


Link to post
Share on other sites
khsh97

I have tried to edit v1.06 save with SASE but when I do the change and save those changes, the save file become 198kB. Editing directly v1.06 saves with SASE is not possible. However, copying/pasting mobile blocks into pc and vice versa after doing changes in SASE works.

Share this post


Link to post
Share on other sites
ric-013

i been testing " hex magic " method in past few days ...

its actually easy , however a good knowledge of the memory structure you want to use is important .


here a basic step-by-step description of my 1.06 testings :

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------

 

# 1 - Find the EXPORT label you want to use in libGTASA.so using IDA.


for this example i used zonepop densities label , it points to first zone in array SAN_AND

.bss:00901E6C        EXPORT _ZN9CTheZones13ZoneInfoArrayE

note: the .bss on left is memory address where the label points to .

 

# 2 - Start to build cleo test script , use 0DD0 and 0DD1 opcodes and declare labels at end of script

this test script will get label address and store it to [email protected]

{$CLEO .csi}//test.txt03A4: name_thread 'test' :Top0001: wait 0 ms 0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]_thread// label:_ZN9CTheZones13ZoneInfoArrayEhex"_ZN9CTheZones13ZoneInfoArrayE" 00end

note: address stored at [email protected] will be 00901E6C + img base , so when using [email protected] in a script , make sure the " add_ib " param of read / write opcodes u will use is set to 0 .... ex:

0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0 0DD9: write_mem_addr [email protected] value 32 size 1 add_ib 0 protect 0

# 3 - finish your test CLEO to proof test that your label return proper address

this test could be anything you want ! ...
in my case, i wanted to see the returned address [email protected] on screen , so i could compare it with the 0x00901E6C memory address attached to label . but like i said above ... [email protected] have img base added to its result , so in test script below i substracted img base from [email protected] before it get displayed on screen

{$CLEO .csi}//test.txt03A4: name_thread 'test' :Top0001: wait 0 ms 0DD7: [email protected] = get_image_base0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]: [email protected] -= [email protected]   // minus img base01E5: show_text_1number_highpriority GXT 'NUMBER' number [email protected] time 10000 flag 1end_thread// label:_ZN9CTheZones13ZoneInfoArrayEhex"_ZN9CTheZones13ZoneInfoArrayE" 00end

Screenshot_2014-11-07-12-33-58_zpsb418e9
note : address on screen is in decimal use calculator to convert to hex ... 9444972 = 0x00901E6C

That's it !!! ... script made using " hex magic " are said to work on all versions .

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Here are my latest cleo test scripts using " hex magic " ,,, i quickly tested them working on 1.06

 

 

- Add City's Turfs :
this test script use found gang densities , it will randomly give territories in major cities to Ballas / Vagos for a total of 250 .

Add City's Turfs - CLEO test script :

 

  {$CLEO .csi}//CTurfs.txt// Add City's Turfs :// Give city's turfs ( LS, SF, LV ) to vagos / ballas .// Add drug dealers .// For a total of 250 territories .// Script take about 30 seconds to complete its work .// Wait for the " load complete " message .// All changes are savable .03A4: name_thread 'CTURFS' 0001: wait 0 ms 0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]   // start of SAN_AND0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 000A: [email protected] += 0x0A // offset to zone dealers0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]: [email protected] += 0x0F // offset to zone peds&cars0006: [email protected] = 0x00  // local int for max records check0879: enable_gang_wars 0:NextZoneSkip0001: wait 1 ms000A: [email protected] += 0x11		// skip to next zone000A: [email protected] += 0x11		// skip to next zone dealers000A: [email protected] += 0x11       	// skip to next zone P&C000A: [email protected] += 0x01       	// increase local int check0002: jump @CheckZone:CheckZone00D6: if 002B:   0x17b >= [email protected] 	    // local int check max records    004D: jump_if_false @TurfsDone0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0  	// read P&C00D6: if002B:   0x0E >= [email protected]      	// avoid = 15+ settings004D: jump_if_false @NextZoneSkip00D6: if or0039:   [email protected] == 0x01     		// avoid = 1 setting    0039:   [email protected] == 0x03    		// avoid = 3 setting004D: jump_if_false @SetRandom0002: jump @NextZoneSkip:SetRandom0DD9: write_mem_addr [email protected] value 10 size 1 add_ib 0 protect 0	// add dealers density 100209: [email protected] = random_int_in_ranges 0 2     	// random gang 1:200D6: if0039:   [email protected] == 1004D: jump_if_false @SetVagosTurf0DD9: write_mem_addr [email protected] value 32 size 1 add_ib 0 protect 0	// add ballas density 320002: jump @NextZoneSkip:SetVagosTurf000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value 32 size 1 add_ib 0 protect 0  // add vagos dendity 32000E: [email protected] -= 0x020002: jump @NextZoneSkip:TurfsDone			// remove left over zones076C: set_zone 'ROBAD1' gang 0 density_to 0076C: set_zone 'ROBAD1' gang 2 density_to 0076C: set_zone 'VE' gang 0 density_to 0076C: set_zone 'VE' gang 2 density_to 0076C: set_zone 'SF' gang 0 density_to 0076C: set_zone 'SF' gang 2 density_to 0076C: set_zone 'LA' gang 0 density_to 0076C: set_zone 'LA' gang 2 density_to 0076C: set_zone 'GANTB' gang 0 density_to 0076C: set_zone 'GANTB' gang 2 density_to 0076C: set_zone 'GANTB1' gang 0 density_to 0076C: set_zone 'GANTB1' gang 2 density_to 0076C: set_zone 'SANB1' gang 0 density_to 0076C: set_zone 'SANB1' gang 2 density_to 0076C: set_zone 'SANB2' gang 0 density_to 0076C: set_zone 'SANB2' gang 2 density_to 0076C: set_zone 'GARV' gang 0 density_to 0076C: set_zone 'GARV' gang 2 density_to 0076C: set_zone 'GARV1' gang 0 density_to 0076C: set_zone 'GARV1' gang 2 density_to 0076C: set_zone 'GARV2' gang 0 density_to 0076C: set_zone 'GARV2' gang 2 density_to 0076C: set_zone 'KINC' gang 0 density_to 0076C: set_zone 'KINC' gang 2 density_to 0076C: set_zone 'KINC1' gang 0 density_to 0076C: set_zone 'KINC1' gang 2 density_to 0076C: set_zone 'KINC2' gang 0 density_to 0076C: set_zone 'KINC2' gang 2 density_to 0076C: set_zone 'BYTUN' gang 0 density_to 0076C: set_zone 'BYTUN' gang 2 density_to 0076C: set_zone 'c*ntC1' gang 0 density_to 0076C: set_zone 'c*ntC1' gang 2 density_to 0076C: set_zone 'c*ntC3' gang 0 density_to 0076C: set_zone 'c*ntC3' gang 2 density_to 0076C: set_zone 'ETUNN' gang 0 density_to 0076C: set_zone 'ETUNN' gang 2 density_to 0076C: set_zone 'LSINL' gang 0 density_to 0076C: set_zone 'LSINL' gang 2 density_to 0076C: set_zone 'FLINW' gang 0 density_to 0076C: set_zone 'FLINW' gang 2 density_to 0076C: set_zone 'MART' gang 0 density_to 0076C: set_zone 'MART' gang 2 density_to 0076C: set_zone 'FALLO' gang 0 density_to 0076C: set_zone 'FALLO' gang 2 density_to 0076C: set_zone 'SHERR' gang 0 density_to 0076C: set_zone 'SHERR' gang 2 density_to 0076C: set_zone 'REST' gang 0 density_to 0076C: set_zone 'REST' gang 2 density_to 0076C: set_zone 'ELCA1' gang 0 density_to 0076C: set_zone 'ELCA1' gang 2 density_to 0076C: set_zone 'ELCA2' gang 0 density_to 0076C: set_zone 'ELCA2' gang 2 density_to 0076C: set_zone 'MAKO' gang 0 density_to 0076C: set_zone 'MAKO' gang 2 density_to 0076C: set_zone 'SASO' gang 0 density_to 0076C: set_zone 'SASO' gang 2 density_to 0076C: set_zone 'FRED' gang 0 density_to 0076C: set_zone 'FRED' gang 2 density_to 0076C: set_zone 'FISH' gang 0 density_to 0076C: set_zone 'FISH' gang 2 density_to 0076C: set_zone 'MUL2A' gang 0 density_to 0076C: set_zone 'MUL2A' gang 2 density_to 0076C: set_zone 'MUL2B' gang 0 density_to 0076C: set_zone 'MUL2B' gang 2 density_to 0076C: set_zone 'MUL3' gang 0 density_to 0076C: set_zone 'MUL3' gang 2 density_to 0076C: set_zone 'LDT8' gang 0 density_to 0076C: set_zone 'LDT8' gang 2 density_to 000BB: show_text_lowpriority GXT 'FESZ_LS' time 2000 flag 1 	// Load Successful.0001: wait 1000 ms0879: enable_gang_wars 10629: change_integer_stat 337 to 1end_thread // elf label:_ZN9CTheZones13ZoneInfoArrayEhex"_ZN9CTheZones13ZoneInfoArrayE" 00end

 


Add City's Turfs - Screenshots:


Screenshot_2014-10-11-09-43-05_zps60c95d
Screenshot_2014-10-11-09-43-53_zpsfefcd3
Screenshot_2014-10-11-09-44-22_zps45bd52
Screenshot_2014-10-11-09-44-47_zps8caad7



- Hood Under Attack Control :
this test script let you trigger or cancel a " hood under attack " situation by pressing 4 ( top center screen ) and 7 ( top right screen ) note: if you cancel the attack you will lose influence.

Hood Under Attack Control - CLEO test script :

 

{$CLEO .csi}//HatkC.txt// Hood Under Attack Control :// Press TOP CENTER and TOP RIGHT on game screen .// This will trigger or cancel a hood attack .// note : you will lose influence if you cancel atk .03A4: name_thread 'HATKC' 0001: wait 0 ms 0DD0: [email protected] = get_label_addr @_ZN9CGangWars10FightTimerE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]      // hood attack time out0DD0: [email protected] = get_label_addr @_ZN9CGangWars18TimeTillNextAttackE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]      // next attack timer0DD0: [email protected] = get_label_addr @_ZN9CGangWars6State2E0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]      // hood attack stage:HoodControl0001: wait 0 ms 00D6: if and 00E1:   key_pressed 3 touch_point 4   // top center00E1:   key_pressed 3 touch_point 7   // top right004D: jump_if_false @HoodControl0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0   // read atk stage00D6: if 0039:   [email protected] == 0x00  // no hood atk004D: jump_if_false @EndAtk0DD9: write_mem_addr [email protected] value 0 size 4 add_ib 0 protect 0  // trigger hood atk0001: wait 1000 ms 0002: jump @HoodControl :EndAtk0001: wait 0 ms0DD9: write_mem_addr [email protected] value 0 size 4 add_ib 0 protect 0   // cancel hood atk0001: wait 1000 ms 0002: jump @HoodControl // elf labels:_ZN9CGangWars10FightTimerEhex"_ZN9CGangWars10FightTimerE" 00end:_ZN9CGangWars18TimeTillNextAttackEhex"_ZN9CGangWars18TimeTillNextAttackE" 00end:_ZN9CGangWars6State2Ehex"_ZN9CGangWars6State2E" 00end

 


note : no screenshots ! since it only trigger/cancel hood attacks .


- Random Gang At Hood Attacks :
this test script set a random gang in" hoods under attack " situations. expect all gangs of SA to attack your territories ( ballas, gsf ,vagos , rifa, danang, mafia, triads, aztecas ) even GSF will attack its own turfs ! kinda funny , imagine a mutiny of rogue gang members and remember this is a TEST script. note: if you fail to defend you territory you will lose influence and rival gang who win will get density in territory .

Random Gang At Hood Attacks - CLEO test script :

 

 {$CLEO .csi}//RHAtk.txt03A4: name_thread 'RHATK'// Random Gangs At Hood Attack :// Random gangs will show up in hood under attack .// ballas, gsf, vagos, rifa, danang, mafia, triads, aztecas .// note : if you lose, attackers get influence in zone .0001: wait 0 ms 0DD0: [email protected] = get_label_addr @_ZN9CGangWars6State2E0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]    // hood attack stage 0DD0: [email protected] = get_label_addr @_ZN9CGangWars5Gang1E0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]    // gang ID #10DD0: [email protected] = get_label_addr @_ZN9CGangWars5Gang2E0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]    // gang ID #20DD0: [email protected] = get_label_addr @_ZN9CGangWars11WarFerocityE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]    // war strenght0006: [email protected] = 0x00     // local toggle int:ScanHoodAtk0001: wait 0 ms0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0   // read atk stage00D6: if and0039:   [email protected] == 0x00   // local toggle off0039:   [email protected] == 0x01   // hood under atk004D: jump_if_false @ResetToggle0209: [email protected] = random_int_in_ranges 0 8  // random int for gang id0209: [email protected] = random_int_in_ranges 0 4  // random int for war strenght0DD9: write_mem_addr [email protected] value [email protected] size 1 add_ib 0 protect 0  // id #10DD9: write_mem_addr [email protected] value [email protected] size 1 add_ib 0 protect 0  // id #20DD9: write_mem_addr [email protected] value [email protected] size 1 add_ib 0 protect 0  // war strenght0006: [email protected] = 0x01  // local toggle on0002: jump @ScanHoodAtk:ResetToggle0001: wait 0 ms 00D6: if and0039:   [email protected] == 0x01  // local toggle on0039:   [email protected] == 0x00  // no hood atk004D: jump_if_false @ScanHoodAtk0006: [email protected] = 0x00   // local toggle off0002: jump @ScanHoodAtk // elf labels:_ZN9CGangWars6State2Ehex"_ZN9CGangWars6State2E" 00end:_ZN9CGangWars5Gang1Ehex"_ZN9CGangWars5Gang1E" 00end:_ZN9CGangWars5Gang2Ehex"_ZN9CGangWars5Gang2E" 00end  :_ZN9CGangWars11WarFerocityEhex"_ZN9CGangWars11WarFerocityE" 00end   

 


Random Gang Hood Attacks - Screenshots :


Screenshot_2014-10-11-22-18-57_zps4c54fc
Screenshot_2014-10-11-22-10-10_zps6106da
Screenshot_2014-10-11-22-13-24_zps6acfc7



any feedback on them working on another version than 1.06 would be great .

 

edit : fixed a minor error in City's Turfs test script .

Edited by ric-013

Share this post


Link to post
Share on other sites
khsh97
062A: change_float_stat 22 to 1000.0   // stamina062A: change_float_stat 21 to 150.0    // fat062A: change_float_stat 23 to 1000.0   // muscle//062A: change_float_stat 23 to 150.0   // muscle062A: change_float_stat 64 to 1000.0   // total respect062A: change_float_stat 65 to 1000.0   // girlfriend respect062A: change_float_stat 66 to 1000.0   // clothes respect062A: change_float_stat 67 to 1000.0   // fitness respect062A: change_float_stat 68 to 2500.0   // running respect0629: change_integer_stat 225 to 1000  // lung capacity0629: change_integer_stat 160 to 1000  // driving skill0629: change_integer_stat 229 to 1000  // bike skill0629: change_integer_stat 230 to 1000  // cycle skill0629: change_integer_stat 223 to 1000   // flying skill

This will change the value of the stats only. Then what about the values of the global variables that control these stats? will the value of global variables automatically change?

Edited by khsh97

Share this post


Link to post
Share on other sites
OrionSR

I don't think these stats have a global variable associated with them like the girlfriend stats do. These codes have always been sufficient to implement the desired change.

Edited by OrionSR

Share this post


Link to post
Share on other sites
khsh97

Do you have the list of the stats that are associated with global variables? Or the list of the stats that are not associated with global variables?

Share this post


Link to post
Share on other sites
OrionSR

No... unless the girlfriend progress stats are the whole list and I am unaware of it. The girlfriend scripts, in general, apply some unique coding strategies. Perhaps these are the only global/stat pairs that work this way. My recommendation, assume that adjusting the stats will implement a change in-game and start digging through the scripts for globals when things don't work as expected.

 

The missing context for anyone else: The girlfriend progress stats are used for display and only get updated at the end of dates or by the phone call routines. The progress stats are never read by the scripts. Change the progress global if you want to change game behavior and update the stat too if you don't want to wait for a dating update.

Edited by OrionSR

Share this post


Link to post
Share on other sites
khsh97

If the two-timing date scripts got disabled then can we re-enable them with hex editor? If Yes, then in which block is it stored?

 

-----------------------------------

 

What is the difference between absolute offsets and relative offsets? If possible explain it with examples

 

What type of offsets(relative or absolute) are used in the documentation of SA save format?

Edited by khsh97

Share this post


Link to post
Share on other sites
OrionSR

Sorry I didn't notice this sooner. Lot's of projects going on these days.

 

The two-timing flag is stored in a global variable. It's been a while since we've been over this but you could probably figure out how to calculate the offset for whichever version of the save you are using. However, global variables are really easy to set with cleo so go with that unless you are editing a save you can't load. One strategy for identifying which variable needs to be adjusted is to use the PC documentation to find where the global is used in the PC scripts, find some unique looking code near the variable in the PC script, and then look for the same unique code in the Android scripts. However, the two-timing variable is on of first things I ported to Android; it's listed in a couple of places on the first page but the best reference is probably the Transposing PC Global Variables for Android post.

Share this post


Link to post
Share on other sites
khsh97

Ok. Thank you!

I have got some skills to edit the save with hex editor by comparing different save. Its been a while but I still don't how to calculate the offsets? I only calculating offsets of global variables I.e mutiplying global variable by 4 then converting it to hex which we did with basketball glitch. If you can teach me how to calculate offsets even for pc version then I am sure my hex editing skills will get much better. Right Now, I can hex edit money, weapons ammo, stats block, basketball glitch, pool player glitch, gym glitch and changing safehouse into armory. in documentation, people write offset like 0x000, 0x0C etc... I know the 0x designates hex number. I am really confused. You once mention that we need memory address then we can find relative offset or something like that(can't remember it now).

 

In documentation, do the offsets (0x000, 0x0C etc) means that its the data length?

 

When I need to find something in specific block, I copy that block from different saves into new files. In this way it become much easier to compare those blocks.

Edited by khsh97

Share this post


Link to post
Share on other sites
OrionSR

The offsets (in bytes from here to there) are always relative to the start of the structure (here) being described. So for something short you could mark the start with the cursor and drag to a length of 0xC to find the offset from the start of your selected block.

 

I've been working on GTA III save documentation so I've been using you block copy trick a lot to help line things up correctly. It makes things a lot easier if the absolute file offset matches the start of my structure. A handy trick I've been having fun with lately; when working with record structures, try changing the Bytes Per Row to match the length of the record.

 

Okay, global hex editing, but this time without any sort of hard reference so you can find it again even if things change a little (c0de words). Load the PC save documentation and find where the global variable space starts. It's easy, 2nd BLOCK (block 1), there's a global space size dword and the next thing is $0. You may need to adjust for c0de words depending on the version but it should be easy enough to find. Stick your cursor there.

 

Do the math using the global number * 4 and converting to hex and... it'll be way too awkward to select a block length that long. Let's use a better trick. Cursor at $0, then hit Ctrl-G to bring up the Goto tool. Enter your hex offset and notice you could have skipped a step and went with decimal. If you remember that then use the shortcut but in general, stick with hex. Anyway, offset entered, change the Relative To setting to Current Offset, and OK should take you directly to the desired variable.

 

Note: $13, the default wait time for SA Mobile ($14 on PC), should be set to 250 (0xFA) and provides an easy reference point early in the save. You can use that to confirm that you found $0 and the math is working correctly.

Edited by OrionSR

Share this post


Link to post
Share on other sites
HeroBrineR007

Could anybody help me? My game crashes after loading when i use this and i think the script is ok.

 

 

{CLEO.csi}:START0001: wait 0 ms00D6: if00E0: player $PLAYER_CHAR driving004D: jump_if_false @START03C1: [email protected] = player $PLAYER_CHAR car_no_save02AC: set_car [email protected] immunities 0 0 0 0 10002: jump @START
Edited by HeroBrineR007

Share this post


Link to post
Share on other sites
khsh97

In Sanny builder options, uncheck "add extra info into SCM" option.

Share this post


Link to post
Share on other sites
khsh97

Orion, which option should I enable/disable in sanny builder? I can't remember what you said about these options because I don't know how to access google chat history.

Share this post


Link to post
Share on other sites
khsh97

which tool is better? HxD or 010 editor? What is the difference between these two tools? Which tool has better functionality? which tool you like and using?

Share this post


Link to post
Share on other sites
OrionSR

HxD is pretty good for a free hex editor. I've been really happy with it. I intend to keep HxD as my common-reference editor. I am very unfamiliar with 010 and have only explored the use of the template feature for analyzing saves and that feature alone is a giant leap ahead of anything else I've used. But at $50USD is it really worth it? I think it is a great investment for me since I do this sort of thing all the time, but for general use I'm not so sure. It seems like the sort of application that is so powerful that it might get out of the control of a beginner. But the interface doesn't seem too complicated. I don't see why it wouldn't do just as good of job as HxD if you can ignore all the extra bells and whistles you paid so much to get.

Share this post


Link to post
Share on other sites
khsh97

$50... huh? Then I am going with HxD. I will buy something more valuable then since 010 will be not be of any use for me. HxD can do all the tasks which I want especially comparing of different files. Thats enough for the skills which I have.

Share this post


Link to post
Share on other sites
BobyFrançais

i been testing " hex magic " method in past few days ...

 

its actually easy , however a good knowledge of the memory structure you want to use is important .

 

 

here a basic step-by-step description of my 1.06 testings :

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------

 

# 1 - Find the EXPORT label you want to use in libGTASA.so using IDA.

 

for this example i used zonepop densities label , it points to first zone in array SAN_AND

 

.bss:00901E6C        EXPORT _ZN9CTheZones13ZoneInfoArrayE
note: the .bss on left is memory address where the label points to .

 

 

# 2 - Start to build cleo test script , use 0DD0 and 0DD1 opcodes and declare labels at end of script

 

this test script will get label address and store it to [email protected]

 

{$CLEO .csi}//test.txt03A4: name_thread 'test' :Top0001: wait 0 ms 0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]_thread// label:_ZN9CTheZones13ZoneInfoArrayEhex"_ZN9CTheZones13ZoneInfoArrayE" 00end
note: address stored at [email protected] will be 00901E6C + img base , so when using [email protected] in a script , make sure the " add_ib " param of read / write opcodes u will use is set to 0 .... ex:

 

0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0 0DD9: write_mem_addr [email protected] value 32 size 1 add_ib 0 protect 0
# 3 - finish your test CLEO to proof test that your label return proper address

 

this test could be anything you want ! ...

in my case, i wanted to see the returned address [email protected] on screen , so i could compare it with the 0x00901E6C memory address attached to label . but like i said above ... [email protected] have img base added to its result , so in test script below i substracted img base from [email protected] before it get displayed on screen

 

{$CLEO .csi}//test.txt03A4: name_thread 'test' :Top0001: wait 0 ms 0DD7: [email protected] = get_image_base0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]: [email protected] -= [email protected]   // minus img base01E5: show_text_1number_highpriority GXT 'NUMBER' number [email protected] time 10000 flag 1end_thread// label:_ZN9CTheZones13ZoneInfoArrayEhex"_ZN9CTheZones13ZoneInfoArrayE" 00end
Screenshot_2014-11-07-12-33-58_zpsb418e9

note : address on screen is in decimal use calculator to convert to hex ... 9444972 = 0x00901E6C

 

That's it !!! ... script made using " hex magic " are said to work on all versions .

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Here are my latest cleo test scripts using " hex magic " ,,, i quickly tested them working on 1.06

 

 

- Add City's Turfs :

this test script use found gang densities , it will randomly give territories in major cities to Ballas / Vagos for a total of 250 .

 

Add City's Turfs - CLEO test script :

 

 

 

 {$CLEO .csi}//CTurfs.txt// Add City's Turfs :// Give city's turfs ( LS, SF, LV ) to vagos / ballas .// Add drug dealers .// For a total of 250 territories .// Script take about 30 seconds to complete its work .// Wait for the " load complete " message .// All changes are savable .03A4: name_thread 'CTURFS' 0001: wait 0 ms 0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]   // start of SAN_AND0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 000A: [email protected] += 0x0A // offset to zone dealers0DD0: [email protected] = get_label_addr @_ZN9CTheZones13ZoneInfoArrayE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]: [email protected] += 0x0F // offset to zone peds&cars0006: [email protected] = 0x00  // local int for max records check0879: enable_gang_wars 0:NextZoneSkip0001: wait 1 ms000A: [email protected] += 0x11		// skip to next zone000A: [email protected] += 0x11		// skip to next zone dealers000A: [email protected] += 0x11       	// skip to next zone P&C000A: [email protected] += 0x01       	// increase local int check0002: jump @CheckZone:CheckZone00D6: if 002B:   0x17b >= [email protected] 	    // local int check max records    004D: jump_if_false @TurfsDone0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0  	// read P&C00D6: if002B:   0x0E >= [email protected]      	// avoid = 15+ settings004D: jump_if_false @NextZoneSkip00D6: if or0039:   [email protected] == 0x01     		// avoid = 1 setting    0039:   [email protected] == 0x03    		// avoid = 3 setting004D: jump_if_false @SetRandom0002: jump @NextZoneSkip:SetRandom0DD9: write_mem_addr [email protected] value 10 size 1 add_ib 0 protect 0	// add dealers density 100209: [email protected] = random_int_in_ranges 0 2     	// random gang 1:200D6: if0039:   [email protected] == 1004D: jump_if_false @SetVagosTurf0DD9: write_mem_addr [email protected] value 32 size 1 add_ib 0 protect 0	// add ballas density 320002: jump @NextZoneSkip:SetVagosTurf000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value 32 size 1 add_ib 0 protect 0  // add vagos dendity 32000E: [email protected] -= 0x020002: jump @NextZoneSkip:TurfsDone			// remove left over zones076C: set_zone 'ROBAD1' gang 0 density_to 0076C: set_zone 'ROBAD1' gang 2 density_to 0076C: set_zone 'VE' gang 0 density_to 0076C: set_zone 'VE' gang 2 density_to 0076C: set_zone 'SF' gang 0 density_to 0076C: set_zone 'SF' gang 2 density_to 0076C: set_zone 'LA' gang 0 density_to 0076C: set_zone 'LA' gang 2 density_to 0076C: set_zone 'GANTB' gang 0 density_to 0076C: set_zone 'GANTB' gang 2 density_to 0076C: set_zone 'GANTB1' gang 0 density_to 0076C: set_zone 'GANTB1' gang 2 density_to 0076C: set_zone 'SANB1' gang 0 density_to 0076C: set_zone 'SANB1' gang 2 density_to 0076C: set_zone 'SANB2' gang 0 density_to 0076C: set_zone 'SANB2' gang 2 density_to 0076C: set_zone 'GARV' gang 0 density_to 0076C: set_zone 'GARV' gang 2 density_to 0076C: set_zone 'GARV1' gang 0 density_to 0076C: set_zone 'GARV1' gang 2 density_to 0076C: set_zone 'GARV2' gang 0 density_to 0076C: set_zone 'GARV2' gang 2 density_to 0076C: set_zone 'KINC' gang 0 density_to 0076C: set_zone 'KINC' gang 2 density_to 0076C: set_zone 'KINC1' gang 0 density_to 0076C: set_zone 'KINC1' gang 2 density_to 0076C: set_zone 'KINC2' gang 0 density_to 0076C: set_zone 'KINC2' gang 2 density_to 0076C: set_zone 'BYTUN' gang 0 density_to 0076C: set_zone 'BYTUN' gang 2 density_to 0076C: set_zone 'c*ntC1' gang 0 density_to 0076C: set_zone 'c*ntC1' gang 2 density_to 0076C: set_zone 'c*ntC3' gang 0 density_to 0076C: set_zone 'c*ntC3' gang 2 density_to 0076C: set_zone 'ETUNN' gang 0 density_to 0076C: set_zone 'ETUNN' gang 2 density_to 0076C: set_zone 'LSINL' gang 0 density_to 0076C: set_zone 'LSINL' gang 2 density_to 0076C: set_zone 'FLINW' gang 0 density_to 0076C: set_zone 'FLINW' gang 2 density_to 0076C: set_zone 'MART' gang 0 density_to 0076C: set_zone 'MART' gang 2 density_to 0076C: set_zone 'FALLO' gang 0 density_to 0076C: set_zone 'FALLO' gang 2 density_to 0076C: set_zone 'SHERR' gang 0 density_to 0076C: set_zone 'SHERR' gang 2 density_to 0076C: set_zone 'REST' gang 0 density_to 0076C: set_zone 'REST' gang 2 density_to 0076C: set_zone 'ELCA1' gang 0 density_to 0076C: set_zone 'ELCA1' gang 2 density_to 0076C: set_zone 'ELCA2' gang 0 density_to 0076C: set_zone 'ELCA2' gang 2 density_to 0076C: set_zone 'MAKO' gang 0 density_to 0076C: set_zone 'MAKO' gang 2 density_to 0076C: set_zone 'SASO' gang 0 density_to 0076C: set_zone 'SASO' gang 2 density_to 0076C: set_zone 'FRED' gang 0 density_to 0076C: set_zone 'FRED' gang 2 density_to 0076C: set_zone 'FISH' gang 0 density_to 0076C: set_zone 'FISH' gang 2 density_to 0076C: set_zone 'MUL2A' gang 0 density_to 0076C: set_zone 'MUL2A' gang 2 density_to 0076C: set_zone 'MUL2B' gang 0 density_to 0076C: set_zone 'MUL2B' gang 2 density_to 0076C: set_zone 'MUL3' gang 0 density_to 0076C: set_zone 'MUL3' gang 2 density_to 0076C: set_zone 'LDT8' gang 0 density_to 0076C: set_zone 'LDT8' gang 2 density_to 000BB: show_text_lowpriority GXT 'FESZ_LS' time 2000 flag 1 	// Load Successful.0001: wait 1000 ms0879: enable_gang_wars 10629: change_integer_stat 337 to 1end_thread // elf label:_ZN9CTheZones13ZoneInfoArrayEhex"_ZN9CTheZones13ZoneInfoArrayE" 00end

 

Add City's Turfs - Screenshots:

 

Screenshot_2014-10-11-09-43-05_zps60c95dScreenshot_2014-10-11-09-43-53_zpsfefcd3Screenshot_2014-10-11-09-44-22_zps45bd52Screenshot_2014-10-11-09-44-47_zps8caad7

 

- Hood Under Attack Control :

this test script let you trigger or cancel a " hood under attack " situation by pressing 4 ( top center screen ) and 7 ( top right screen ) note: if you cancel the attack you will lose influence.

 

Hood Under Attack Control - CLEO test script :

 

 

 

{$CLEO .csi}//HatkC.txt// Hood Under Attack Control :// Press TOP CENTER and TOP RIGHT on game screen .// This will trigger or cancel a hood attack .// note : you will lose influence if you cancel atk .03A4: name_thread 'HATKC' 0001: wait 0 ms 0DD0: [email protected] = get_label_addr @_ZN9CGangWars10FightTimerE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]      // hood attack time out0DD0: [email protected] = get_label_addr @_ZN9CGangWars18TimeTillNextAttackE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]      // next attack timer0DD0: [email protected] = get_label_addr @_ZN9CGangWars6State2E0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]      // hood attack stage:HoodControl0001: wait 0 ms 00D6: if and 00E1:   key_pressed 3 touch_point 4   // top center00E1:   key_pressed 3 touch_point 7   // top right004D: jump_if_false @HoodControl0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0   // read atk stage00D6: if 0039:   [email protected] == 0x00  // no hood atk004D: jump_if_false @EndAtk0DD9: write_mem_addr [email protected] value 0 size 4 add_ib 0 protect 0  // trigger hood atk0001: wait 1000 ms 0002: jump @HoodControl :EndAtk0001: wait 0 ms0DD9: write_mem_addr [email protected] value 0 size 4 add_ib 0 protect 0   // cancel hood atk0001: wait 1000 ms 0002: jump @HoodControl // elf labels:_ZN9CGangWars10FightTimerEhex"_ZN9CGangWars10FightTimerE" 00end:_ZN9CGangWars18TimeTillNextAttackEhex"_ZN9CGangWars18TimeTillNextAttackE" 00end:_ZN9CGangWars6State2Ehex"_ZN9CGangWars6State2E" 00end

 

note : no screenshots ! since it only trigger/cancel hood attacks .

 

- Random Gang At Hood Attacks :

this test script set a random gang in" hoods under attack " situations. expect all gangs of SA to attack your territories ( ballas, gsf ,vagos , rifa, danang, mafia, triads, aztecas ) even GSF will attack its own turfs ! kinda funny , imagine a mutiny of rogue gang members and remember this is a TEST script. note: if you fail to defend you territory you will lose influence and rival gang who win will get density in territory .

 

Random Gang At Hood Attacks - CLEO test script :

 

 

 

{$CLEO .csi}//RHAtk.txt03A4: name_thread 'RHATK'// Random Gangs At Hood Attack :// Random gangs will show up in hood under attack .// ballas, gsf, vagos, rifa, danang, mafia, triads, aztecas .// note : if you lose, attackers get influence in zone .0001: wait 0 ms 0DD0: [email protected] = get_label_addr @_ZN9CGangWars6State2E0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]    // hood attack stage 0DD0: [email protected] = get_label_addr @_ZN9CGangWars5Gang1E0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]    // gang ID #10DD0: [email protected] = get_label_addr @_ZN9CGangWars5Gang2E0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]    // gang ID #20DD0: [email protected] = get_label_addr @_ZN9CGangWars11WarFerocityE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]    // war strenght0006: [email protected] = 0x00     // local toggle int:ScanHoodAtk0001: wait 0 ms0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0   // read atk stage00D6: if and0039:   [email protected] == 0x00   // local toggle off0039:   [email protected] == 0x01   // hood under atk004D: jump_if_false @ResetToggle0209: [email protected] = random_int_in_ranges 0 8  // random int for gang id0209: [email protected] = random_int_in_ranges 0 4  // random int for war strenght0DD9: write_mem_addr [email protected] value [email protected] size 1 add_ib 0 protect 0  // id #10DD9: write_mem_addr [email protected] value [email protected] size 1 add_ib 0 protect 0  // id #20DD9: write_mem_addr [email protected] value [email protected] size 1 add_ib 0 protect 0  // war strenght0006: [email protected] = 0x01  // local toggle on0002: jump @ScanHoodAtk:ResetToggle0001: wait 0 ms 00D6: if and0039:   [email protected] == 0x01  // local toggle on0039:   [email protected] == 0x00  // no hood atk004D: jump_if_false @ScanHoodAtk0006: [email protected] = 0x00   // local toggle off0002: jump @ScanHoodAtk // elf labels:_ZN9CGangWars6State2Ehex"_ZN9CGangWars6State2E" 00end:_ZN9CGangWars5Gang1Ehex"_ZN9CGangWars5Gang1E" 00end:_ZN9CGangWars5Gang2Ehex"_ZN9CGangWars5Gang2E" 00end  :_ZN9CGangWars11WarFerocityEhex"_ZN9CGangWars11WarFerocityE" 00end   

 

Random Gang Hood Attacks - Screenshots :

 

Screenshot_2014-10-11-22-18-57_zps4c54fcScreenshot_2014-10-11-22-10-10_zps6106daScreenshot_2014-10-11-22-13-24_zps6acfc7

 

any feedback on them working on another version than 1.06 would be great .

 

 

edit : fixed a minor error in City's Turfs test script .

Hello! I am hopeless modding there, but I saw that your script CLEO was interesting. I does not understand to install him how (I am French thus the translations it is not great). Made, I try to have for a long time how new gangs (Triade, Los Varios...) and I saw that your mod corresponded to my expectations. My question is the following one. Can you put your mod in download so that I can integrate him with no problem at all into the game? Thank you for your answer and I hope that I do not ask you for it too much... Sorry for my English.

Share this post


Link to post
Share on other sites
ric-013

 

 

Hello! I am hopeless modding there, but I saw that your script CLEO was interesting. I does not understand to install him how (I am French thus the translations it is not great). Made, I try to have for a long time how new gangs (Triade, Los Varios...) and I saw that your mod corresponded to my expectations. My question is the following one. Can you put your mod in download so that I can integrate him with no problem at all into the game? Thank you for your answer and I hope that I do not ask you for it too much... Sorry for my English.

 

thoses are test script examples , not actually a official mod releases ... theres no dowload links for them .

 

to use thoses scripts, you need to compile them using sanny builder and copy them in proper folder on your android device ( where your other cleo scripts are )

 

im slowly working on other gang related test-scripts , they will be posted here whenever im done.

Share this post


Link to post
Share on other sites
BobyFrançais

Ok, thank you for your answer . If I understood , (Google translation is not great) they are testing, and when thou dost finalized , you will share them ? If you download the dishes later, could you tell me where ? Thank you again: P

Share this post


Link to post
Share on other sites
ric-013

Ok, thank you for your answer . If I understood , (Google translation is not great) they are testing, and when thou dost finalized , you will share them ? If you download the dishes later, could you tell me where ? Thank you again: P

I'll pm you ... I speak French.

Share this post


Link to post
Share on other sites
ric-013

Morph gang 7 peds and cars models in PLS and MKT1 :

this script example serve as a proof of concept , the goal was to change peds and cars model ( popcycle ) for gang 7 when CJ is within a selected zone and revert back to default models when CJ leave zone . this concept shall later be used in a project by " jeansowaty "

Notes :
- change gang 7 peds models to stripper with flower in hair & change cars models to infernus when CJ in PLS or MKT1
- revert gang 7 peds & cars models to default when CJ not in PLS or MKT1
- the ped models change is easy to notice , cars models change tend to spawn rarely .
- original version made on android version ( CLEOA )
- ported to PC version by OrionSR ( CLEO3 )
- theres 2 versions for PC port ( a & b )
- in " port-a " OrionSR used a alternate way to check zone ( he later found address of " current zoneinfo " )
- in " port-b " i edited OrionSR original port to include " current zoneinfo "


test-script Android ( all version )

 






 {$CLEO .csi}//MorphG7.txt// this test script change aztecas ped & cars models// change occur when player is in zone// test zones are PLS & MKT1// test ped model is stripper with flower in hair ( 0x57 )// test car model is infernus ( 0x19B )03A4: name_thread 'MORPHG7'0001: wait 100 ms 0DD0: [email protected] = get_label_addr @_ZN11CPopulation11m_PedGroupsE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]                        // ped models address000A: [email protected] += 0x80A                                               // offset to gang 7 ped models0001: wait 100 ms 0DD0: [email protected] = get_label_addr @_ZN11CPopulation11m_CarGroupsE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]                        // car models address000A: [email protected] += 0x47E 0001: wait 100 ms                                              // offset to gang 7 cars models0DD0: [email protected] = get_label_addr @_ZN9CPopCycle15m_pCurrZoneInfoE0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]                        // current zone info0001: wait 100 ms0006: [email protected] = 0x00                                                 // local ( stored zone )0006: [email protected] = 0x00                                                 // local ( morph bool )0006: [email protected] = 0x00                                                 // default ped model #10006: [email protected] = 0x00                                                 // default ped model #20006: [email protected] = 0x00                                                 // default ped model #30006: [email protected] = 0x00                                                 // default car model #10006: [email protected] = 0x00                                                 // default car model #20006: [email protected] = 0x00                                                // default car model #3// note : below are zone settings , un-needed if zones are already set and saved to gang 7.076C: set_zone 'PLS' gang 0 density_to 0076C: set_zone 'PLS' gang 1 density_to 0x01076C: set_zone 'PLS' gang 2 density_to 0076C: set_zone 'PLS' gang 3 density_to 0076C: set_zone 'PLS' gang 4 density_to 0076C: set_zone 'PLS' gang 5 density_to 0076C: set_zone 'PLS' gang 6 density_to 0076C: set_zone 'PLS' gang 7 density_to 0x32076A: set_zone 'PLS' dealer_density_to 0x0A076C: set_zone 'MKT1' gang 0 density_to 0076C: set_zone 'MKT1' gang 1 density_to 0x01076C: set_zone 'MKT1' gang 2 density_to 0076C: set_zone 'MKT1' gang 3 density_to 0076C: set_zone 'MKT1' gang 4 density_to 0076C: set_zone 'MKT1' gang 5 density_to 0076C: set_zone 'MKT1' gang 6 density_to 0076C: set_zone 'MKT1' gang 7 density_to 0x32076A: set_zone 'MKT1' dealer_density_to 0x0A0002: jump @Bcheck:Bcheck0001: wait 0 ms00D6: if0039:  [email protected] == 0x00                                               // check morph bool off004D: jump_if_false @Default0002: jump @Zone1:Zone10001: wait 0 ms00D6: if                                                        0583:   player $PLAYER_CHAR in_zone 'PLS'                       // check zone PLS004D: jump_if_false @Zone20002: jump @Morph:Zone20001: wait 0 ms00D6: if0583:   player $PLAYER_CHAR in_zone 'MKT1'                       // check zone MKT1004D: jump_if_false @Zone10002: jump @Morph:Morph0001: wait 0 ms0006: [email protected] = 0x01                                                 // set morph bool on0DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 ped model #1 ( default )0DD9: write_mem_addr [email protected] value 0x57 size 2 add_ib 0 protect 0    // write gang 7 ped model #1000A: [email protected] += 0x020DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 ped model #2 ( default )0DD9: write_mem_addr [email protected] value 0x57 size 2 add_ib 0 protect 0    // write gang 7 ped model #2000A: [email protected] += 0x020DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 ped model #3 ( default )0DD9: write_mem_addr [email protected] value 0x57 size 2 add_ib 0 protect 0    // write gang 7 ped model #3000E: [email protected] -= 0x040DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 car model #1 ( default )0DD9: write_mem_addr [email protected] value 0x19B size 2 add_ib 0 protect 0   // write gang 7 car model #1000A: [email protected] += 0x020DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 car model #2 ( default )0DD9: write_mem_addr [email protected] value 0x19B size 2 add_ib 0 protect 0   // write gang 7 car model #2000A: [email protected] += 0x020DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                    // read gang 7 car model #3 ( default )0DD9: write_mem_addr [email protected] value 0x19B size 2 add_ib 0 protect 0   // write gang 7 car model #3000E: [email protected] -= 0x040DD8: [email protected] = read_mem_addr [email protected] size 4 add_ib 0                     // read & store current zonejump @Zcheck:Zcheck0001: wait 0 ms0DD8: [email protected] = read_mem_addr [email protected] size 4 add_ib 0                     // read current zone 00D6: if003B:  [email protected] == [email protected]                                                 // zone check ( is player still in stored zone )004D: jump_if_false @Defaultjump @Zcheck:Default0001: wait 0 ms00D6: if0039:  [email protected] == 0x01                                               // check morph bool on004D: jump_if_false @Zone10006: [email protected] = 0x00                                                 // set morph bool off0DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 ped model #1 ( default )000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 ped model #2 ( default ) 000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 ped model #3 ( default )000E: [email protected] -= 0x040DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 car model #1 ( default )000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 car model #2 ( default )000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0     // write gang 7 car model #3 ( default )000E: [email protected] -= 0x04jump @Bcheck// labels:_ZN11CPopulation11m_PedGroupsEhex"_ZN11CPopulation11m_PedGroupsE" 00end:_ZN11CPopulation11m_CarGroupsEhex"_ZN11CPopulation11m_CarGroupsE" 00end:_ZN9CPopCycle15m_pCurrZoneInfoEhex"_ZN9CPopCycle15m_pCurrZoneInfoE" 00

 



PC version ( CLEO3 )

test-script Port - a ( original port , still have OSR notes )

 

{$CLEO .cs}//MorphG7.txt// this test script change aztecas ped & cars models// change occur when player is in zone// test zones are PLS & MKT1// test ped model is stripper with flower in hair ( 0x57 )// test car model is infernus ( 0x19B )// 0xC0BC68 offset to current zonepop record.03A4: name_thread 'MORPHG7'0001: wait 100 ms0006: [email protected] = 0xC0F358                                             // Start of PedGrp structure000A: [email protected] += 0x80A     //index[49]*record length[42]             // offset to gang 7 ped models0006: [email protected] = 0xC0ED38                                             // Start of CarGrp structure000A: [email protected] += 0x47E     //index[25]*record length[46]             // offset to gang 7 cars models0001: wait 100 ms0006: [email protected] = 0x00                                                 // local ( morph bool )0006: [email protected] = 0x00                                                 // default ped model #10006: [email protected] = 0x00                                                 // default ped model #20006: [email protected] = 0x00                                                 // default ped model #30006: [email protected] = 0x00                                                 // default car model #10006: [email protected] = 0x00                                                 // default car model #20006: [email protected] = 0x00                                                // default car model #30006: [email protected] = 0x00                                                // 8 byte string ( current zone )0006: [email protected] = 0x00                                                // 8 byte string ( stored zone )0006: [email protected] = 0x00                                                // player coord x0006: [email protected] = 0x00                                                // player coord y0006: [email protected] = 0x00                                                // player coord z// note : below are zone settings , un-needed if zones are already set and saved to gang 7.076C: set_zone 'PLS' gang 0 density_to 0076C: set_zone 'PLS' gang 1 density_to 0x01076C: set_zone 'PLS' gang 2 density_to 0076C: set_zone 'PLS' gang 3 density_to 0076C: set_zone 'PLS' gang 4 density_to 0076C: set_zone 'PLS' gang 5 density_to 0076C: set_zone 'PLS' gang 6 density_to 0076C: set_zone 'PLS' gang 7 density_to 0x32076A: set_zone 'PLS' dealer_density_to 0x0A076C: set_zone 'MKT1' gang 0 density_to 0076C: set_zone 'MKT1' gang 1 density_to 0x01076C: set_zone 'MKT1' gang 2 density_to 0076C: set_zone 'MKT1' gang 3 density_to 0076C: set_zone 'MKT1' gang 4 density_to 0076C: set_zone 'MKT1' gang 5 density_to 0076C: set_zone 'MKT1' gang 6 density_to 0076C: set_zone 'MKT1' gang 7 density_to 0x32076A: set_zone 'MKT1' dealer_density_to 0x0A0002: jump @Bcheck:Bcheck0001: wait 0 ms00D6: if0039:  [email protected] == 0x00                                               // check morph bool off004D: jump_if_false @Default0002: jump @Zone1:Zone10001: wait 0 ms00D6: if                                                        0583:   player $PLAYER_CHAR in_zone 'PLS'                       // check zone PLS004D: jump_if_false @Zone20002: jump @Morph:Zone20001: wait 0 ms00D6: if0583:   player $PLAYER_CHAR in_zone 'MKT1'                       // check zone MKT1004D: jump_if_false @Zone10002: jump @Morph:Morph0001: wait 0 ms00BB: show_text_lowpriority GXT 'FELD_WR' time 3000 flag 1  // Loading data, please wait...0006: [email protected] = 0x01                                                 // set morph bool on{0DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 ped model #1 ( default )0DD9: write_mem_addr [email protected] value 0x57 size 2 add_ib 0 protect 0    // write gang 7 ped model #1000A: [email protected] += 0x020DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 ped model #2 ( default )0DD9: write_mem_addr [email protected] value 0x57 size 2 add_ib 0 protect 0    // write gang 7 ped model #2000A: [email protected] += 0x020DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 ped model #3 ( default )0DD9: write_mem_addr [email protected] value 0x57 size 2 add_ib 0 protect 0    // write gang 7 ped model #3000E: [email protected] -= 0x040DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 car model #1 ( default )0DD9: write_mem_addr [email protected] value 0x19B size 2 add_ib 0 protect 0   // write gang 7 car model #1000A: [email protected] += 0x020DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                     // read gang 7 car model #2 ( default )0DD9: write_mem_addr [email protected] value 0x19B size 2 add_ib 0 protect 0   // write gang 7 car model #2000A: [email protected] += 0x020DD8: [email protected] = read_mem_addr [email protected] size 2 add_ib 0                    // read gang 7 car model #3 ( default )0DD9: write_mem_addr [email protected] value 0x19B size 2 add_ib 0 protect 0   // write gang 7 car model #3000E: [email protected] -= 0x040DD8: [email protected] = read_mem_addr [email protected] size 4 add_ib 0                     // read & store current zone}0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0              // read gang 7 ped model #1 ( default )0A8C: write_memory [email protected] size 2 value #VWFYST1 virtual_protect 0       // write gang 7 ped model #1000A: [email protected] += 0x020A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0              // read gang 7 ped model #2 ( default )0A8C: write_memory [email protected] size 2 value 87 virtual_protect 0       // write gang 7 ped model #2000A: [email protected] += 0x020A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0              // read gang 7 ped model #3 ( default )0A8C: write_memory [email protected] size 2 value 0x57 virtual_protect 0       // write gang 7 ped model #3000E: [email protected] -= 0x040A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0              // read gang 7 car model #1 ( default )0A8C: write_memory [email protected] size 2 value #INFERNUS virtual_protect 0      // write gang 7 car model #1000A: [email protected] += 0x020A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0              // read gang 7 car model #2 ( default )0A8C: write_memory [email protected] size 2 value 411 virtual_protect 0      // write gang 7 car model #2000A: [email protected] += 0x020A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0             // read gang 7 car model #3 ( default )0A8C: write_memory [email protected] size 2 value 0x19B virtual_protect 0      // write gang 7 car model #3000E: [email protected] -= 0x04//0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0              00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] 08F1: get_zone_at [email protected] [email protected] [email protected] nameB_to [email protected] // 8-byte string    // read & store current zonejump @Zcheck:Zcheck0001: wait 0 ms//0DD8: [email protected] = read_mem_addr [email protected] size 4 add_ib 0                    // read current zone 00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] 08F1: get_zone_at [email protected] [email protected] [email protected] nameB_to [email protected] // 8-byte string    // read current zone00D6: if003B:  [email protected] == [email protected]                                               // zone check ( is player still in stored zone )004D: jump_if_false @Defaultjump @Zcheck:Default0001: wait 0 ms00D6: if0039:  [email protected] == 0x01                                               // check morph bool on004D: jump_if_false @Zone10006: [email protected] = 0x00                                                 // set morph bool off{0DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 ped model #1 ( default )000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 ped model #2 ( default ) 000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 ped model #3 ( default )000E: [email protected] -= 0x040DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 car model #1 ( default )000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0      // write gang 7 car model #2 ( default )000A: [email protected] += 0x020DD9: write_mem_addr [email protected] value [email protected] size 2 add_ib 0 protect 0     // write gang 7 car model #3 ( default )}0A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0         // write gang 7 ped model #1 ( default )000A: [email protected] += 0x020A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0         // write gang 7 ped model #2 ( default ) 000A: [email protected] += 0x020A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0        // write gang 7 ped model #3 ( default )000E: [email protected] -= 0x040A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0         // write gang 7 car model #1 ( default )000A: [email protected] += 0x020A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0         // write gang 7 car model #2 ( default )000A: [email protected] += 0x02     0A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0        // write gang 7 car model #3 ( default )000E: [email protected] -= 0x04  00BB: show_text_lowpriority GXT 'FESZ_LS' time 2000 flag 1  // Load Successful.                                              jump @Bcheck

 



test-script Port - b ( edited port , OSR notes removed )

 

{$CLEO .cs}//MorphG7.txt// this test script change aztecas ped & cars models// change occur when player is in zone// test zones are PLS & MKT1// test ped model is stripper with flower in hair ( 0x57 )// test car model is infernus ( 0x19B )03A4: name_thread 'MORPHG7'0001: wait 100 ms0006: [email protected] = 0xC0F358                                            // Start of PedGrp structure000A: [email protected] += 0x80A     //index[49]*record length[42]            // offset to gang 7 ped models0006: [email protected] = 0xC0ED38                                            // Start of CarGrp structure000A: [email protected] += 0x47E     //index[25]*record length[46]            // offset to gang 7 cars models0006: [email protected] = 0xC0BC68                                            // current zoneinfo 0006: [email protected] = 0x00                                                // local ( stored zone )0006: [email protected] = 0x00                                                // local ( morph bool )0006: [email protected] = 0x00                                                // default ped model #10006: [email protected] = 0x00                                                // default ped model #20006: [email protected] = 0x00                                                // default ped model #30006: [email protected] = 0x00                                                // default car model #10006: [email protected] = 0x00                                                // default car model #20006: [email protected] = 0x00                                               // default car model #3// note : below are zone settings , un-needed if zones are already set and saved to gang 7.076C: set_zone 'PLS' gang 0 density_to 0076C: set_zone 'PLS' gang 1 density_to 0x01076C: set_zone 'PLS' gang 2 density_to 0076C: set_zone 'PLS' gang 3 density_to 0076C: set_zone 'PLS' gang 4 density_to 0076C: set_zone 'PLS' gang 5 density_to 0076C: set_zone 'PLS' gang 6 density_to 0076C: set_zone 'PLS' gang 7 density_to 0x32076A: set_zone 'PLS' dealer_density_to 0x0A076C: set_zone 'MKT1' gang 0 density_to 0076C: set_zone 'MKT1' gang 1 density_to 0x01076C: set_zone 'MKT1' gang 2 density_to 0076C: set_zone 'MKT1' gang 3 density_to 0076C: set_zone 'MKT1' gang 4 density_to 0076C: set_zone 'MKT1' gang 5 density_to 0076C: set_zone 'MKT1' gang 6 density_to 0076C: set_zone 'MKT1' gang 7 density_to 0x32076A: set_zone 'MKT1' dealer_density_to 0x0A0002: jump @Bcheck:Bcheck0001: wait 0 ms00D6: if0039:  [email protected] == 0x00                                              // check morph bool off004D: jump_if_false @Default0002: jump @Zone1:Zone10001: wait 0 ms00D6: if                                                        0583:   player $PLAYER_CHAR in_zone 'PLS'                      // check zone PLS004D: jump_if_false @Zone20002: jump @Morph:Zone20001: wait 0 ms00D6: if0583:   player $PLAYER_CHAR in_zone 'MKT1'                     // check zone MKT1004D: jump_if_false @Zone10002: jump @Morph:Morph0001: wait 0 ms0006: [email protected] = 0x01                                                // set morph bool on0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0             // read gang 7 ped model #1 ( default )0A8C: write_memory [email protected] size 2 value #VWFYST1 virtual_protect 0  // write gang 7 ped model #1000A: [email protected] += 0x020A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0             // read gang 7 ped model #2 ( default )0A8C: write_memory [email protected] size 2 value 87 virtual_protect 0        // write gang 7 ped model #2000A: [email protected] += 0x020A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0             // read gang 7 ped model #3 ( default )0A8C: write_memory [email protected] size 2 value 0x57 virtual_protect 0      // write gang 7 ped model #3000E: [email protected] -= 0x040A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0             // read gang 7 car model #1 ( default )0A8C: write_memory [email protected] size 2 value #INFERNUS virtual_protect 0 // write gang 7 car model #1000A: [email protected] += 0x020A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0             // read gang 7 car model #2 ( default )0A8C: write_memory [email protected] size 2 value 411 virtual_protect 0       // write gang 7 car model #2000A: [email protected] += 0x020A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0            // read gang 7 car model #3 ( default )0A8C: write_memory [email protected] size 2 value 0x19B virtual_protect 0     // write gang 7 car model #3000E: [email protected] -= 0x040A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0              jump @Zcheck:Zcheck0001: wait 0 ms0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0            // read current zone00D6: if003B:  [email protected] == [email protected]                                               // zone check ( is player still in stored zone )004D: jump_if_false @Defaultjump @Zcheck:Default0001: wait 0 ms00D6: if0039:  [email protected] == 0x01                                              // check morph bool on004D: jump_if_false @Zone10006: [email protected] = 0x00                                                // set morph bool off0A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0        // write gang 7 ped model #1 ( default )000A: [email protected] += 0x020A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0        // write gang 7 ped model #2 ( default ) 000A: [email protected] += 0x020A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0        // write gang 7 ped model #3 ( default )000E: [email protected] -= 0x040A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0        // write gang 7 car model #1 ( default )000A: [email protected] += 0x020A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0        // write gang 7 car model #2 ( default )000A: [email protected] += 0x02     0A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0       // write gang 7 car model #3 ( default )000E: [email protected] -= 0x04                                                jump @Bcheck

 



here some pics taken during testing :


shot_2015-01-25_13-20-11_zps3bcm9ujo.png

shot_2015-01-25_13-12-36_zps7zh5ppwt.png

shot_2015-01-25_16-04-48_zps8gan1cdv.png

shot_2015-01-25_16-04-07_zpsmdnj6pe0.png

shot_2015-01-25_16-01-34_zpstsoysynr.png

 

Edited by ric-013

Share this post


Link to post
Share on other sites
OrionSR

Note that I'm still using hard-coded addresses to find structures in PC memory. I think I've seen PC coding that does something similar to the magic hex strategy used to call for addresses on Android, but I lost track of the reference. The hard coded values shouldn't matter as the addresses should always be consistent for v1, but I'd eventually like to learn the right way to do things.

 

Typo: Please correct.

//003B: [email protected] == [email protected]: [email protected] == [email protected]

Also, I'm a little worried about this evaluation. It should work just fine on these two zones with short names but I didn't isolate a code for 8 byte equals. I had suggested IF [email protected] == [email protected] AND [email protected] == [email protected] but the revised strategy works just find with the original coding.

Edited by OrionSR

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


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

×
×
  • Create New...

Important Information

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