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. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    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 IV 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 SA Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA III 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

thehambone

GTA III Save File Documentation

Recommended Posts

OrionSR

It means that a coversion process is much more likely. When I get matching starter saves I can start looking for structural differences, but there's a much better chance we can work something out.

Share this post


Link to post
Share on other sites
Lethal Vaccine

You don't mean matching 53% Starter Saves, right? You mean just pass Luigi's Girls on iOS and Android and send you the Save? This will be done in a day or two. Stay tuned. I will post both the Android and iOS Luigi's Girls Saves here tomorrow or the next day.

 

I can't reach 53% in III for a Starter Save. At best, I can reach 50-51%. I only get 99/100 Hidden Packages early and I don't bring the Dodo for Import/Export. Both involve flying the Dodo. I can't, I suck at it. Thus I wait until later. I also don't get 20/20 Rampages. I try to get as many as I can, but sometimes if I am having troubles, I just move on and worry about the few I am having trouble with until later. If I did get the Dodo, 1 Hidden Package, and ALL 20 Rampages, I'd have 53%. But yeah, 51% is better for me. This same thing happens in VC. You can get 44%, but I always get 42% due to 1 or 2 Stunt Jumps and Vigilante Level 12.

Share this post


Link to post
Share on other sites
gangster2332

http://gtasnp.com/wYPZCV

 

android save. give me liberty and luigis girls passed.

 

disabled cleo so it wont write code onto the save

Edited by gangster2332

Share this post


Link to post
Share on other sites
Lethal Vaccine

Nice! I will post the iOS Save tomorrow, then.

Share this post


Link to post
Share on other sites
OrionSR

disabled cleo so it wont write code onto the save

 

Good idea. In general I am not worried about Cleo, in itself, altering the saves. But you need to have control of your scripts. Disabling cleo is one way to manage your scripts, but if you need cleo to run a coords hud or teleport script there shouldn't be any conflicts. So if you need it, use it, and if you have any concerns just include a note on it's use.

Share this post


Link to post
Share on other sites
Lethal Vaccine

Ok, I am 50% in my Starter Save. I just need to do 100 Taxi Fares, which I will do later on, and then 20 Rampages, or as many as I can do. In III, you do not receive any percentage until ALL 20 are complete. So even if I don't get all 20 in my Starter Save, I am ok with it. But yeah, I will be fully done with it tomorrow, most likely. So I will post the Luigi's Girls Save in less than 24 hours.

Share this post


Link to post
Share on other sites
gangster2332

 

disabled cleo so it wont write code onto the save

Good idea. In general I am not worried about Cleo, in itself, altering the saves. But you need to have control of your scripts. Disabling cleo is one way to manage your scripts, but if you need cleo to run a coords hud or teleport script there shouldn't be any conflicts. So if you need it, use it, and if you have any concerns just include a note on it's use.

i usually have it on, but i have no autorun scripts. but i disabled cleo entirely just in case

 

also, do you need to have a android save after luigis girls with ped riot cheat too? ive seen your topic about pc vice city but idk about 3

Edited by gangster2332

Share this post


Link to post
Share on other sites
OrionSR

Save File Differences for GTA III - PC, Android, iOS

 

The save structure of these three versions is nearly identical. I have alternate 010 templates that seem to be working for each.

 

PC to Android

Remove the entire SystemTime structure from the SimpleVars block.

Add an unknown dword after the 2nd camera related unknown float, just before the size of the thread data structure (SimpleVars).

Android to iOS

Change the last unknown DWORD in the object structure to a WORD. (updated)

So as far as major structures go, conversions from PC to Android to iOS shouldn't be too difficult as the added dword doesn't seem to be used, at least in the two files I've looked at so far. Converting for from iOS to Android might be problematic as an unknown field needs to be added. It looks like this value is always 00 00 though. Converting back to PC will only require adding system time; that should be easy enough.

 

Don't get too excited just yet though. There are liable to be other issues that are difficult to detect without matching saves. So... a whole day to complete one mission, huh? I have time and motivation to work on this now. That may change tomorrow.

 

Added for gangster: No, I don't need III cheat saves right now. The problem with Vice City is my only working copy is on PS2 and it's a pain in the butt to get at the saves. I didn't see the need to look into the cheats for III as thehambone's editor has a fix for the cheat so I figured that he'd already worked out the details. I can run my own tests for III on PC if I need to, but thanks for the offer.

 

________________________________________

 

Additional notes added as I find them:

 

PlayerPed - Cped structure (added bytes are all 00 in current examples)

BYTE _ped1[1456]; - PC

BYTE _ped1[1496]; - Android +40

BYTE _ped1[1492]; - iOS +36

 

My iOS objects still aren't correct. (found iit, fixed above)

Edited by OrionSR

Share this post


Link to post
Share on other sites
Lethal Vaccine

When I finish the Taxi Fares, I will back up my Save, then do the Luigi's Girls and post the iOS Save. The reason is cuz I am the type of person who starts something and finishes it. My Goal is to finish the Starter Save. The next task on my list is Luigi's Girls. You shouldn't have "ants and your pants." It's not the end of the world that it takes an extra day, lol...

 

But it'll be posted in a few hours once I finish Taxi Fares. Can't use a DP Taxi either. f*cking Taxi Glitch doesn't work in III Mobile, thus even the Crusher Glitch to DP Vehicles is barely existent and you need to fail certain Missions who have a passenger in the front seat just to make a Vehicle DP. Whereas in PS2 and PC, you could do this whenever and it was done in free roam without any Story Missions needed.

 

EDIT: Only 36 more Taxi Fares. Then I will post the Luigi's Girls iOS Save. Give me 30 minutes or so...

Edited by Militia

Share this post


Link to post
Share on other sites
thehambone

I dug up my iOS and Android templates that I made about a month and a half ago, went through them again, and found the same differences that OrionSR found, which shows we are on the same page. From looking at Militia's iOS starter save and gangster2332's Android starter save (as well as my own), it definitely appears as if both the iOS and Android versions of the game store the save title as a GXT key. However, I do have one iOS save that I got from GTASnP a while back (not sure how I found it) that has a normal string for the save title as opposed to a GXT key. Could this file have been made from a different version of the game? Here's the link to that save.

 

From the looks of it, all three platforms reserve 24 wide characters (48 bytes) for storing the save title string/key. The string/key is always null-terminated and the remaining buffer is filled with arbitrary data. It also appears that the GXT keys are always preceded 0xFFFF. Not sure why this is.

 

Orion, I have broken down the CPed structure further to reveal weapon data and player health/armor. Below is a snippet of my Android template. I've included the differences between Android, iOS, and PC for comparison.

/* In case your template doesn't have RwV3D defined. */// typedef struct RwV3D// {//     FLOAT X, Y, Z;// };struct{    BYTE    _ped0[52];    RwV3D   vPos; // BYTE    _ped1[640];         /* PC */ // BYTE    _ped1[644];         /* iOS */    BYTE    _ped1[648];         /* ANDROID */    FLOAT   playerHealth;    FLOAT   playerArmor;    BYTE    _ped2[148];    struct    {        struct        {            DWORD   weaponID;            DWORD   _unknown;            DWORD   bulletsInClip;            DWORD   bulletsTotal;            DWORD   _unknown;            DWORD   _unknown;        } aWeaponSlot[13] <optimize=false>;    } playerWeapons; // BYTE    _ped3[348];         /* PC */    BYTE    _ped3[380];         /* ANDROID/iOS */} CPed;
It'd be nice to map out what each byte of the CPed structure is for so we know exactly what is being added/removed when converting files. This seems like a difficult task that would require extensive research inside the executable, however. For now, we can only experiment until something works.

 

Has anybody successfully converted a file and gotten it to run on the target platform?

Edited by thehambone

Share this post


Link to post
Share on other sites
Lethal Vaccine

Has anybody successfully converted a file and gotten it to run on the target platform?

 

That is the big thing. I hope it works. If it works, I will be very, very happy.

 

EDIT: Why does gangster2332's Save on GTASnP say "Luigi's Girls," but mine does not?

 

Also, here is my 51% Starter Save. Just have to work on the 20 Rampages over the next day or 2 and it should be finished.

Edited by Militia

Share this post


Link to post
Share on other sites
thehambone

EDIT: Why does gangster2332's Save on GTASnP say "Luigi's Girls," but mine does not?

I believe Samutz has begun working on a GXT lookup table for save titles, but only for Android so far -- the file shows "LM1", the GXT tag for "'LUIGI'S GIRLS'", in the save title field. I should point out that the name is missing the 's' in "Girls" on GTASnP.

Edited by thehambone

Share this post


Link to post
Share on other sites
OrionSR

Are PS2 and PC saves compatible for GTA III? I just compared the scripts and got an exact match.

 

Has anybody successfully converted a file and gotten it to run on the target platform?

I tried:

[GTASnP] Error! · Could not determine game type.

 

I gave an iOS to Android conversion a shot using one of Militia's saves since there are far fewer objects included. Apparently the pickups are included in the object pool, so there are an awful lot of them - 292 on gangster's save. This makes a manual edit very difficult, but I thought I had it right. I padded the object records and tweaked the playerpeds stuff, fiddled with the align bytes at the end of the blocks, trimmed the file size, fixed the size of the padding at the end of file, adjusted the size of the playerpeds and object blocks, fixed the checksum and... don't know why GTASnP rejected the save. The Android template seems to be processing the save properly. I wonder what Samutz's detection strategy could be. Maybe I'll try again with the matching starter saves.

 

Pickups in the object pool - better check on that in VC before moving the Havana clothing pickup with an editor.

Edited by OrionSR

Share this post


Link to post
Share on other sites
Samutz

 

EDIT: Why does gangster2332's Save on GTASnP say "Luigi's Girls," but mine does not?

I believe Samutz has begun working on a GXT lookup table for save titles, but only for Android so far -- the file shows "LM1", the GXT tag for "'LUIGI'S GIRLS'", in the save title field. I should point out that the name is missing the 's' in "Girls" on GTASnP.

 

 

Not yet. The site currently expects a GXT key from Android saves, but not from iOS saves, because at the time that I wrote the code for it, iOS saves didn't appear to use GXT keys (see the oldest 2 saves here for example). I plan on updating it tomorrow to check for either type of save name.

 

Are PS2 and PC saves compatible for GTA III? I just compared the scripts and got an exact match.

 

Has anybody successfully converted a file and gotten it to run on the target platform?

I tried:

[GTASnP] Error! · Could not determine game type.

 

I gave an iOS to Android conversion a shot using one of Militia's saves since there are far fewer objects included. Apparently the pickups are included in the object pool, so there are an awful lot of them - 292 on gangster's save. This makes a manual edit very difficult, but I thought I had it right. I padded the object records and tweaked the playerpeds stuff, fiddled with the align bytes at the end of the blocks, trimmed the file size, fixed the size of the padding at the end of file, adjusted the size of the playerpeds and object blocks, fixed the checksum and... don't know why GTASnP rejected the save. The Android template seems to be processing the save properly. I wonder what Samutz's detection strategy could be. Maybe I'll try again with the matching starter saves.

 

Pickups in the object pool - better check on that in VC before moving the Havana clothing pickup with an editor.

 

For III and VC, the site checks SCR\0 location first. If it's found at the mobile offset, the site then checks the size of block 1, which is different between the two mobile platforms.

  • III
    • PC SCR\0 offset: 196
    • Mobile SCR offset: 184
      • Android Block 1 Size: 1612
      • iOS Block 1 Size: 1608
  • VC
    • PC SCR\0 offset: 236 (retail) or 240 (steam)
    • Mobile SCR offset: 232
      • Android Block 1 Size: 1892
      • iOS Block 1 Size: 1884

Share this post


Link to post
Share on other sites
thehambone

For III and VC, the site checks SCR\0 location first. If it's found at the mobile offset, the site then checks the size of block 1, which is different between the two mobile platforms.

  • III
  • PC SCR\0 offset: 196
  • Mobile SCR offset: 184
  • Android Block 1 Size: 1612
  • iOS Block 1 Size: 1608
[*]VC
  • PC SCR\0 offset: 236 (retail) or 240 (steam)
  • Mobile SCR offset: 232
  • Android Block 1 Size: 1892
  • iOS Block 1 Size: 1884

 

Perfect, thank you! I was going to ask you at some point about how you detect the different file versions because I want to be able to do that with my editor.

 

It just occurred to me that maybe the 0xFFFF value that precedes the GXT keys denotes that the text is a GXT key and not a regular string. That could be how some iOS saves have the full name and others just the GXT key. I'll have to do some testing to confirm this.

 

EDIT: I have confirmed that adding 0xFFFF before the text in the save title will cause the game to treat the text as a GXT string. Removing 0xFFFF will make the game display whatever text is found within the title field.

Edited by thehambone

Share this post


Link to post
Share on other sites
OrionSR

Mafia Massacre

 

The save above is Militia's "Updated" 44% GTA III iOS save that has been bashed with a hammer and wrapped in duck tape until it started to take a similar shape to the Android saves. I think I finally have GTASnP recognizing the save as Android and reading the available variables correctly, but my confidence is low for a working save. But here it is anyway. Please let me know if the save will load on Android.

Share this post


Link to post
Share on other sites
thehambone

Mafia Massacre

 

The save above is Militia's "Updated" 44% GTA III iOS save that has been bashed with a hammer and wrapped in duck tape until it started to take a similar shape to the Android saves. I think I finally have GTASnP recognizing the save as Android and reading the available variables correctly, but my confidence is low for a working save. But here it is anyway. Please let me know if the save will load on Android.

Good news, it loads!! It seems to run okay from what little testing I have done.

 

I did see one bug, however. When on foot, if you pull the virtual analog stick downward (i.e. make Claude turn around and run towards you), Claude will moonwalk in the opposite direction than one would expect:

C8V2VBx.jpg

Claude is moving in the direction of the arrow.

 

This bug is probably attributed to some of the values you removed from the unknown bytes in the CPed structure.

 

I will do more testing tomorrow. Great work Orion! :^:

Edited by thehambone

Share this post


Link to post
Share on other sites
OrionSR

I removed nothing from the iOS save except the excess slack. The Cped data and object data were both additions. And in all of the (few) examples I've examined these bytes have been empty. I think it more likely that some data has been transposed. I know this is true for the object structures of iOS and Android in SA.

 

The starter saves provided are not as similar as I had hoped. The main problem are additional objects from dropped pickups, usually money from dead peds. The pickups are easy to account for, but the extra objects associated with the pickups change the file size and throw everything off. I tried a few times myself and didn't have any luck avoiding dead peds. NPCs cause plenty of drops on their own. The only solution I can think of is running a custom main on iOS and Android, easy enough on Android but I don't think this is within our iOS tester's skill set.

 

We need to find a good strategy for synchronizing our templates. Reinventing the wheel is a frustrating activity.

 

Hey, ham. Did you ever get the 010 stuff I worked up on cranes into your III template?

 

Holy crap! The player info stuff is completely scrambled. Teasing out the differences will be a major chore.

Edited by OrionSR

Share this post


Link to post
Share on other sites
gangster2332

i coud try the main.scm on android.

 

idk if it works though. i once tried a mod which moves some weapons to the park area at the portland safehouse. didnt work :/

Share this post


Link to post
Share on other sites
Lethal Vaccine

Yikes....Seems like a nightmare! :panic:

 

Good work, anyways! But I will just do III myself and it'll only be for people using iOS, I guess. Same for VC, I suppose. But it still baffles me why Rockstar or Wardrum or whoever made these Ports that they made them only work for one Platform. Lets say my iPhone gets broke and I want to switch to Android. Now I gotta buy the Game again and play it over again, since I can't even put my Save onto the new Phone and continue. That's just stupid. But then SA and CTW work on both Platforms. If those 2 work, why on planet earth wouldn't they make III and VC compatible. What were they thinking?!

Share this post


Link to post
Share on other sites
gangster2332

Yikes....Seems like a nightmare! :panic:

 

Good work, anyways! But I will just do III myself and it'll only be for people using iOS, I guess. Same for VC, I suppose. But it still baffles me why Rockstar or Wardrum or whoever made these Ports that they made them only work for one Platform. Lets say my iPhone gets broke and I want to switch to Android. Now I gotta buy the Game again and play it over again, since I can't even put my Save onto the new Phone and continue. That's just stupid. But then SA and CTW work on both Platforms. If those 2 work, why on planet earth wouldn't they make III and VC compatible. What were they thinking?!

propably because vc and iii were released first on ios and only much later on android.

 

and in sa they introduced social club for storing your saves online, so yeah...

Share this post


Link to post
Share on other sites
Lethal Vaccine

Still, they release Patches for all these Mobile Ports and also newer GTA's like IV and V. They can easily make them compatible themselves, but they don't. Rockstar's Goal is to dish something out as fast as they can for the quick buck and then releasing Patch after Patch to "fix" things, yet, that breaks the Game even more. I am getting sick of it, tbh...

Share this post


Link to post
Share on other sites
gangster2332

it woukd be useless. r* sucks too much to make patches where the saves stay compatible

Share this post


Link to post
Share on other sites
Lethal Vaccine

Well, they kept SA and CTW compatible between the two platforms all these years. They can easily do it for III and VC, too. But like I said, they won't.

 

EDIT: My GTA III iOS Starter Save is so close to being done. All that I need to do is 1 Hidden Package and bring the Dodo, Enforcer, and Barracks OL to Portland for Import/Export and I got 53% in a GTA III Starter Save. Even BETTER than I did in PS2/3, lol...

Edited by Militia

Share this post


Link to post
Share on other sites
OrionSR

i coud try the main.scm on android.

 

idk if it works though. i once tried a mod which moves some weapons to the park area at the portland safehouse. didnt work :/

Thanks, but it won't help as the player info structure is controlled by the engine, and the scripts are identical anyway. I'm not sure why your mod didn't work. In theory a modified main can offer a great deal of control over the game settings. My thought was that if we could run the same enhanced "stripped" main on Android and iOS then we could eliminate many more of the natural differences between saves to make byte level comparisons much easier. However, I don't think this is necessary at this time.

 

For a temporary solution to help with testing; paste gangster's player info into a copy of Militia's ported save and then overwrite all the known fields and structures with the data from a backup of the ported save. I suppose a modified Android template with the iOS player info offsets will be required. It won't be a true port but should allow continued testing while we work out a strategy for documenting the player info structure. The Cped structure is not the sort of data I'm familiar with. I'm not sure I can make any meaningful progress.

 

Maybe we should move on to Vice City and come back to III. The memory addresses for the VC ped block has been mapped out. I can't find any reference for III. I'm guessing this is due to the lack of a multi-player mod. My first thought was to try to use the VC reference to provide clues to the III data but now I'm thinking it will be a lot easier to make sense of the numbers if I learn on a well mapped example.

 

For now I think I'll follow up with the potential timer issues in GTA III for iOS and Android now that I've got good starter saves to edit and testers available.

 

Should we start a dedicated 010 Template topic?

Edited by OrionSR

Share this post


Link to post
Share on other sites
Seemann

Just a note, my 010 templates are open for anyone's update with a pull request (if one knows git, for sure). I will eventually update them with the latest findings, your help may speed up the process.

Edited by Seemann

Share this post


Link to post
Share on other sites
thehambone

Hey, ham. Did you ever get the 010 stuff I worked up on cranes into your III template?

I have not, I'll go ahead and add that info.

 

Holy crap! The player info stuff is completely scrambled. Teasing out the differences will be a major chore.

I agree. Between the player info and the CPed stuff, it'll be a lot of work. Judging by my little knowledge of the game's executable, the CPed structure is a serialized version of the CPed class in the executable. Perhaps I should learn Assembly and attempt to figure out how it's saved! :lol: (sarcasm, of course. Though I do want to learn Assembly at some point, or at least get better at analyzing it)

 

Just a note, my 010 templates are open for anyone's update with a pull request (if one knows git, for sure). I will eventually update them with the latest findings, your help may speed up the process.

Yeah, your Git repo is something I was going to suggest. Seemann, I can send you my modified versions of your template via GitHub.

 

It'd be nice to get a single template going for all versions of GTA III save file formats (PC, (Mac?), PS2, Xbox, iOS, Android) using various methods of file detection. We should try to map out all of the differences first though.

Edited by thehambone

Share this post


Link to post
Share on other sites
thehambone

Orion, I played on your converted iOS => Android save for a while and did not find any glitches apart from Claude's screwy motion. Missions threads seem to execute correctly, and stunt jumps, pickups, etc. all seem to be in working order.

 

When I get time again, I'll attempt to tweak some values in the CPed structure in an attempt to both map out some of the CPed struct's unknown bytes as well as correct the issue of Claude's strange movement.

Share this post


Link to post
Share on other sites
OrionSR

GTA3_Cped.bt - read or write to saves, snippets, and game memory.

 

 

 

//--------------------------------------//--- 010 Editor v6.0.2 Binary Template//// Author: OrionSR// Purpose: Mapping GTA3 CPed in saves,//          snippets, and process memory.// Last edit: 14  June 2015//--------------------------------------typedef struct RwV3D{  FLOAT X, Y, Z;};void align(int n){    FSkip(n);};// Find first instance of Cped based on weight and the following 4 floatsFSeek(FindFirst("00 00 8C 42 00 00 C8 42 00 00 80 3F E7 3E BB 3B CD CC 4C 3D,h", true, false));FSkip(-0xC0);Printf( "%d\n", FindFirst("00 00 8C 42 00 00 C8 42 00 00 80 3F E7 3E BB 3B CD CC 4C 3D,h", true, false));//                      Cped Stucture                        struct                        {                            DWORD vtbl;                 // 0x00                            RwV3D cam_roll_xyz;         // 0x04                            DWORD unknown_CMatrix;      // 0x10                            RwV3D cam_direction_xyz;    // 0x14                            DWORD unknown_CMatrix;      // 0x20                            RwV3D cam_was_xyz;          // 0x24                            DWORD unknown_CMatrix;      // 0x30                            RwV3D playerCoords;         // 0x34                            DWORD unknown_playerCoords; // 0x40                            struct {                                BYTE unknown[124];    // 0x44                            } unknownBytes;                            FLOAT weight <comment="search string">;       // 0xC0                              FLOAT unknown_c100 <comment="search string">; // 0xC4                            FLOAT unknown_c1 <comment="search string">;   // 0xC8                            FLOAT unknown_s0 <comment="search string">;   // 0xCC                            FLOAT unknown_s1 <comment="search string">;   // 0xD0                            struct {                                BYTE unknown[64];     // 0xD4                            } unknownBytes;                            FLOAT unknonwnFloat[3];   // 0x114                            DWORD unknownDword[2];    // 0x120                            RwV3D unknownCoords[3];   // 0x128                            struct {                                BYTE unknown[164];    // 0x14C                            } unknownBytes;                            DWORD pPlayerCPed;        // 0x1F0                            struct {                                BYTE unknown[204];    // 0x1F4                            } unknownBytes;                            FLOAT health;             // 0x2C0                            FLOAT armor;              // 0x2C4                            struct {                                BYTE unknown[148];    // 0x2C8                            } unknownBytes;                            struct {                                DWORD weaponID;                                     DWORD WeaponState;                                DWORD clipAmmo;                                DWORD weaponAmmo;                                DWORD LastShotTime;                                BYTE WepCamMode;                                BYTE align[3];                            } weaponslots[13];        // 0x35C                            struct {                                BYTE unknown[12];     // 0x494                            } unknownBytes;                            RwV3D unknownCoords;      // 0x4A0                            struct {                                BYTE unknown[72];     // 0x4AC                            } unknownBytes;                            DWORD pNearestCPeds[10];  // 0x4F4                            BYTE nLoadedCpeds;        // 0x51C                            struct {                                BYTE unknown[43];     // 0x51D                            } unknownBytes;                            FLOAT currentStamina;     // 0x548                            FLOAT maxStamina;         // 0x54C                            struct {                                BYTE unknown[160];    // 0x550                            } unknownBytes;//                        } CPed;            // 0x5F0 size of CPed                        } CPed[138];       // for use in memory array

 

 

 

After a great deal of confusion I finally figured out that 010 is not very cooperative with managing process memory. I can't find a way to make it keep track of the unreadable bytes and include them in the offsets. Any block that is unreadable is simply ignored, even blocks in the middle of the data, so I'm not having any luck using standard offsets and pointers. The current strategy relies on finding a unique string of bytes (weight and the 3 floats the follow) within the CPed structure. Hopefully I can find better constants, or ideally, a way to get 010 to work with the proper offsets.

 

What is the maximum number of peds within CPed structure?

 

Updated with currentStamina and maxStamina,

 

Updated 6/14/2015:

Added offsets comments to each field

currentStamina and maxStamina confirmed in game

pNearestCPeds pointer array and nLoadedCpeds identified

Mapped some unknown coordinate-looking structures

GTA3 CPed

0x6FB1C8  DWORD   pPlayerCPed // pointer to player CPed game memory offsetstruct    CPed    0x5F0            0x0000    DWORD    vtbl        0x0004    FLOAT[3] cam_roll_xyz        0x0014    FLOAT[3] cam_direction_xyz        0x0024    FLOAT[3] cam_was_xyz        0x0034    FLOAT[3] playerCoords        0x00C0    FLOAT    weight        0x01F0    DWORD    pPlayerCPed        0x02C0    FLOAT    health        0x02C4    FLOAT    armor        0x035C    struct   weaponslots[13]          0x00    DWORD    weaponID      0x04    DWORD    WeaponState      0x08    DWORD    clipAmmo      0x0C    DWORD    weaponAmmo      0x10    DWORD    LastShotTime      0x14    BYTE     WepCamMode      0x15    BYTE[3]  align    0x04F4    DWORD    pNearestCPeds[10]        0x051C    BYTE     nLoadedCpeds        0x0548    FLOAT    currentStamina        0x054C    FLOAT    maxStamina  
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.
Note: Your post will require moderator approval before it will be visible.

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.