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

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
      3. The Armadillo Inn
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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. Forum Support

    2. Site Suggestions

thehambone

GTA III Save File Documentation

Recommended Posts

thehambone

 

BuildingSwap only allows types 0 to 2 and InvisibilitySetting only allows types 0 to 4. I documented this for VC and haven't fully explored III but they should be equivalent.

Interesting. When I used opcode 0363: toggle_model_render_at to remove the Callahan Bridge barrier (the same opcode used in main.scm), an InvisibilitySetting entry was added with a type of 2. You say that type 4 is an unloaded dynamic object, but I don't think the Callahan Bridge barrier is a dynamic object, unless my understanding of static and dynamic objects is wrong.

 

spaceeinstein, I was reading your post again and I realized that you said that "InvisibilitySetting only allows types 0 to 4." When I first read it, I thought you said that only types 0 and 4 are allowed. My mistake. :p

 

 

 

My definition of a dynamic object is any object that can change when damaged, like streetlights. When you use the opcode on a streetlight that hasn't been loaded, the type is 4. When you use it on one that has been loaded, the type is 3. Barrier objects are static so type 2 is right.

That's what I thought, but I just wanted to be sure :)

 

 

 

 

1.) Is there a way to confirm that object handles are constant?

For the sake of simplicity consider a handle as an index the pool of same entities. Objects created in the same order will always have the same handle.

 

Perfect, thanks Seemann! So, as long as the object loading in main.scm hasn't been modified, it's safe to assume that the object handles in question will remain the same, correct? Edited by thehambone

Share this post


Link to post
Share on other sites
OrionSR

If you can verify the handles of objects before and after your handleless objects that should be good confirmation. A strategy I suggested for locating the handleless hidden packages in III and VC was to use the index of the pickup just prior to the package array plus 1. I think Samutz just went with a scan routine but the premiss is still valid. These suggestions are out of an abundance of caution.

 

And speaking of caution... If you are going to be making scm style edits with your editor you may want to verify that the script version for that save is appropriate. You wouldn't want to break something like an All-In-On script or custom main. I'd recommend a warning rather than locking out edits though.

Edited by OrionSR

Share this post


Link to post
Share on other sites
Seemann

2.) Does anybody know how forbidden car/ped cubes are stored in the save file? I figure they'd be stored in block 5 (PathFind), but I have no idea how this block is structured. I may need to spend some time mapping out the structure of block 5.

 

I've figured what kind of data block 5 stores:

http://www.gtamodding.com/wiki/Saves_(GTA_3)#Block_5:_Path_Find

 

There are actually not a single array, but two arrays, one for ped paths, and one for car paths. Each byte is a bitmask, setting values for 8 path nodes. If the bit is set, the node is off, otherwise it's on.

Opcodes 01e8 and 022b disable all path nodes in a cube space (there may be multiple ones).

 

Need to figure out which node is which in that arrays.

Edited by Seemann

Share this post


Link to post
Share on other sites
OrionSR

Ah, now I know what was bugging me about this...

 

Objects that are not part of the initial new game start should not have static handles - unless I'm thinking of "handle" incorrectly. If we are talking about slot indexes then the location of later objects will vary depending on things like how many packages have been collected or peds have been run over as each pickup has an associated object in III and VC.

 

I would think that IPL mods could easily alter the sequence of objects. I can't think of a practical method to test for them either.

 

In SA, initial cargen indexes will vary depending on factors such as a fresh start without loading a previous save or how many gargens are near when a new game is restarted (working hypothesis). My hunch is that this is unlikely to be an issue with objects.

Edited by OrionSR

Share this post


Link to post
Share on other sites
thehambone

Multiplatform Save File Template

I've constructed a 010 Editor binary template for the GTA III save file that will match files created by the PC, Xbox, Android, and iOS versions of the game. The template will automatically detect which version of the save file you're working with. I derived most of it from Seemann's existing template, but also included new findings by OrionSR, spaceeinstein, and myself. Therefore, I deem this template to be the most up-to-date template available. The PS2 format differs drastically from the rest, so it is not supported in the template at this time.

 

Anyone can contribute to this template via GitHub if they choose, just contact me and I'll give you permission to commit.

 

https://github.com/thehambone93/FileFormats/blob/master/gta/saves/gta-III_save_multi.bt

Edited by thehambone

Share this post


Link to post
Share on other sites
spaceeinstein

Phone structure is now completely documented.

 

0x00 float[3] x, y, z coordinates0x0C dword[6] pointer to phone message string (024B, 024C, 0378, 0379, 037A, 037B, 037C, 037D, 0386, 0387, 0388, 0389)0x24 dword    game time when phone message ends for states 5 and 60x28 dword    object index0x2C dword    phone state                3 - no ringing                4 - ringing, message just once (024C, 0379, 037B, 037D, 0387, 0389)                5 - ringing, message repeated, phone was never picked up (024B, 0378, 037A, 037C, 0386, 0388)                6 - ringing, message repeated, phone was picked up before                7 - no ringing, finished state of state 4                8 - no ringing, finished state of states 5 and 6                9 - only ringing0x30 byte     is player within range of phone0x31 byte[3]  padding
Check out the articles at GTAModding for more information on the special behaviors of the phone.Surprisingly many of these behaviors carried over to Vice City like the cranes. It is possible to recreate them all there. Edited by spaceeinstein

Share this post


Link to post
Share on other sites
thehambone

Nice :^:

 

The template has been updated.

Share this post


Link to post
Share on other sites
automoto95

The template looks great! I've been meaning to update the GTAModding page but I've been getting sidetracked. I guess I could do that now. I'm going to follow what space did on VC's save file page and indent the tables.

 

It seems like the game does care about whether or not the file is 201820 bytes. I tried adding and removing 4 bytes from the end of the file (before the checksum) and updating the block size and checksum accordingly and the game showed a "Slot is corrupted" message. Perhaps Seemann can look in the executable for a definite confirmation.

 

More updates on 5th vehicle immunity

After some testing on VC, I've concluded that the 5th vehicle immunity is NOT Melee-proof. It took 60 hits with a hammer to make a car catch fire, whether the car had the elusive 5th immunity or not. It seems that, in VC at least, setting the collision-proof immunity on a car makes it melee-proof (technically, melee impacts are collisions). GTAG's opcode database probably only reflects SA's parameters for this particular opcode.

What could this immunity be? I've tried checking pop-proof tires (which is only possible from VC onwards), tip-proof, and heavy. It doesn't seem to be any of these. At this point, I would start to think the immunity is unused, but that wouldn't explain why so many cars have it:

securica,  1 1 0 0 1, Van Heist stretch,   1 1 1 1 1, Salvatores Called A Meetingtrash,     1 1 0 0 1, Blow Fishcheetah,   1 1 1 0 1, Turismocheetah,   1 1 1 0 1, Turismo cheetah,   1 1 1 0 1, Turismorhino,     1 0 0 0 0, Arms Shortagebarracks,  1 0 0 0 0, Arms Shortagebobcat,    1 1 1 0 1, Evidence Dashpatriot,   1 0 0 0 0, Marked Mansecurica,  0 0 1 0 0, Escort Service"Chopper", 1 1 1 1 1, The Exchange

how to open and edit gta3 save file like that ? what software i need i am new

Share this post


Link to post
Share on other sites
spaceeinstein

They use the 010 Editor.

Share this post


Link to post
Share on other sites
crashoverride93

 

The template looks great! I've been meaning to update the GTAModding page but I've been getting sidetracked. I guess I could do that now. I'm going to follow what space did on VC's save file page and indent the tables.

 

It seems like the game does care about whether or not the file is 201820 bytes. I tried adding and removing 4 bytes from the end of the file (before the checksum) and updating the block size and checksum accordingly and the game showed a "Slot is corrupted" message. Perhaps Seemann can look in the executable for a definite confirmation.

 

More updates on 5th vehicle immunity

After some testing on VC, I've concluded that the 5th vehicle immunity is NOT Melee-proof. It took 60 hits with a hammer to make a car catch fire, whether the car had the elusive 5th immunity or not. It seems that, in VC at least, setting the collision-proof immunity on a car makes it melee-proof (technically, melee impacts are collisions). GTAG's opcode database probably only reflects SA's parameters for this particular opcode.

What could this immunity be? I've tried checking pop-proof tires (which is only possible from VC onwards), tip-proof, and heavy. It doesn't seem to be any of these. At this point, I would start to think the immunity is unused, but that wouldn't explain why so many cars have it:

securica,  1 1 0 0 1, Van Heist stretch,   1 1 1 1 1, Salvatores Called A Meetingtrash,     1 1 0 0 1, Blow Fishcheetah,   1 1 1 0 1, Turismocheetah,   1 1 1 0 1, Turismo cheetah,   1 1 1 0 1, Turismorhino,     1 0 0 0 0, Arms Shortagebarracks,  1 0 0 0 0, Arms Shortagebobcat,    1 1 1 0 1, Evidence Dashpatriot,   1 0 0 0 0, Marked Mansecurica,  0 0 1 0 0, Escort Service"Chopper", 1 1 1 1 1, The Exchange
how to open and edit gta3 save file like that ? what software i need i am new

Is it possibly the immune to non player immunity?

Share this post


Link to post
Share on other sites
thehambone

Is it possibly the immune to non player immunity?

I don't think so. Spaceeinstein proivided a pretty good explanation as to what the 5th immunity is supposed to do in this post.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

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

×

Important Information

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