Quantcast

Jump to content

» «
Photo

Vice City Save File Format

44 replies to this topic
thehambone
  • thehambone

    Don't remind me of home Or I might notice where I am

  • Members
  • Joined: 27 Dec 2013
  • United-States

#31

Posted 17 June 2015 - 11:39 PM Edited by thehambone, 18 June 2015 - 02:49 AM.

 

I'm not sure how easy it is to get at the program files on iOS. Isn't that stuff filtered by the default file browser? I think I saw reference to an app that can do a bit more without any need to modify the OS, but this is all too far out of my experience base to offer any practical solution. How does the process work on Android? Aren't the data files stored in a compressed file of some sort?


yeah, you have a big file (and in sa 2) which is always called for big apps (appname).obb (in the case of vice city com.rockstargames.gtavc.obb)
you just rename .obb to .zip and extract main.scm from the data folder ;)

 

I've extracted .obb files before, but I've never tried modifying the contents of an .obb file. Can you just re-zip the file and change the extension back to .obb for the modifications to commit? Or can you do what Orion suggested above and place the modified file in a particular folder?


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#32

Posted 18 June 2015 - 02:07 AM Edited by OrionSR, 18 June 2015 - 02:10 AM.

It's my understanding that repacking the obb file won't work, and isn't needed. Swapping and renaming normal folders should be a much better mod management strategy than messing this the original files.

 

 

Modified LAe.ipl goes into " Internal memory \ Android \ data \ com.rockstargames.gtasa \ files \ data \ maps \ LA \ LAe.ipl "

This is the example I have from SA. It looks like it's only a matter of maintaining the proper file path within the "files" folder, the same folder with the game saves. In this example, only the modified IPL needs to be placed. The other data files will still read in the proper sequence.


thehambone
  • thehambone

    Don't remind me of home Or I might notice where I am

  • Members
  • Joined: 27 Dec 2013
  • United-States

#33

Posted 18 June 2015 - 02:54 AM Edited by thehambone, 18 June 2015 - 02:54 AM.

This is the example I have from SA. It looks like it's only a matter of maintaining the proper file path within the "files" folder, the same folder with the game saves. In this example, only the modified IPL needs to be placed. The other data files will still read in the proper sequence.

Ah, I see -- so you would the "files" directory as the game root. That's pretty cool!

  • gangster2332 likes this

gangster2332
  • gangster2332

    wandering encyclopedia

  • BUSTED!
  • Joined: 18 Apr 2015
  • United-Arab-Emirates

#34

Posted 18 June 2015 - 06:09 AM

 

I'm not sure how easy it is to get at the program files on iOS. Isn't that stuff filtered by the default file browser? I think I saw reference to an app that can do a bit more without any need to modify the OS, but this is all too far out of my experience base to offer any practical solution. How does the process work on Android? Aren't the data files stored in a compressed file of some sort?

yeah, you have a big file (and in sa 2) which is always called for big apps (appname).obb (in the case of vice city com.rockstargames.gtavc.obb)
you just rename .obb to .zip and extract main.scm from the data folder ;)
 
I've extracted .obb files before, but I've never tried modifying the contents of an .obb file. Can you just re-zip the file and change the extension back to .obb for the modifications to commit? Or can you do what Orion suggested above and place the modified file in a particular folder?

dont do that. it doesnt work and only maks your game crash.

if you just put it in folders like orionsr said ecerything is fine. you wont even need backups of the original files. if you remove it from the folder, the original one gets applied again

MorsPrincipiumEst
  • MorsPrincipiumEst

    GTA Series Special Vehicle Collector

  • Feroci
  • Joined: 15 Nov 2013
  • United-States
  • The collector [Amazing work on the Special Vehicle Guide!]

#35

Posted 24 June 2015 - 11:12 AM Edited by Militia, 24 June 2015 - 12:40 PM.

Ok, I finished my VC iOS 100% Save with all Special Vehicles.  I am posting it shortly to the Forum.  It'll be in the Gameplay Section of the VC Forum, where my VC PS2 100% Save with all Special Vehicles is posted and pinned.

 

If you want to have a look at it for Android comparison, go right ahead, but I am not holding my breath for these things to become compatible, that is why I took the liberty to just do everything myself and obtain all the Special Vehicles instead of relying on other people's Saves for the Mobile Versions.

 

Furthermore, I did the VC Mobile Save 2 hours less playing time than PS2 (surprisingly) and I also have 1 LESS Mission Attempt than on PS2 since this time I passed Martha's Mug Shot with the EC Gold Stretch.

 

Stay tuned.

 

EDIT: It's posted. :)


spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#36

Posted 02 July 2015 - 10:07 PM Edited by spaceeinstein, 05 July 2015 - 10:53 PM.

Crane structure (based on GTA III):
0x00 dword index
0x04 dword 
0x08 float pickup zone x1 (crane opcode parameter 3)
0x0C float pickup zone x2 (crane opcode parameter 5)
0x10 float pickup zone y1 (crane opcode parameter 6)
0x14 float pickup zone y2 (crane opcode parameter 4)
0x18 float destination point x (crane opcode parameter 7)
0x1C float destination point y (crane opcode parameter 8)
0x20 float destination point z (crane opcode parameter 9)
0x24 float heading in radians (crane opcode parameter 10)
0x28 float crane arm idle rotation in radians
0x2C float crane arm destination rotation in radians
0x30 float crane arm idle distance from center of crane
0x34 float crane arm destination distance from center of crane
0x38 float crane arm idle height
0x3C float crane arm destination height
0x40 float crane arm current rotation in radians
0x44 float crane arm current distance from center of crane
0x48 float crane arm current height
0x4C float crane hook initial x
0x50 float crane hook initial y
0x54 float crane hook initial z
0x58 float crane hook current x
0x5C float crane hook current y
0x60 float crane hook current z
0x64 float 
0x68 float 
0x6C dword pointer to vehicle to pick up
0x70 dword current game time + 10000 (only updates when crane has finished lifting car)
0x74 byte crane activity
       0 = idle crane
       1 = crusher/military crane active
       2 = crane inactive
0x75 byte crane status
       0 = idle
       1 = crane moving to pick up
       3 = moving upwards from pick up
       2 = moving to destination
       4 = moving downwards to drop off
       5 = moving upwards from drop off
0x76 byte number of vehicles dropped off
0x77 byte is crusher crane
0x78 byte is military crane
0x79 byte 
0x7A byte model is not doc_crane_cab0
0x7B byte align
Bonus:
  • Seemann, OrionSR and thehambone like this

_CP_
  • _CP_

    Boss

  • Feroci
  • Joined: 27 Dec 2007
  • Poland
  • Most Helpful Modding 2016 [Runner-up]
    Best Vehicle 2016 [IVPack]
    Best Map 2013 "ViceCityStories PC Edition"

#37

Posted 03 July 2015 - 10:45 AM

Was it used in Vice City or is it just a leftover in code?


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#38

Posted 03 July 2015 - 05:36 PM

I'm not really sure how the cranes are used in Vice City. There are no crusher or emergency vehicle cranes. The activation test above was a follow through on speculation based on an investigation into the crane structure in the save files of GTA3. The same crane structure exists in VC saves, so maybe they could be activated. So... Success! Well done.

 

However, most of the cranes records in GTA3 seem to be associated with ambient cranes that don't do anything but move about; I think. I haven't followed through to see what the other crane records were really doing. I've speculated that the crane structure might exist in VC to perform similar ambient movement but again, no observations have been made.


MorsPrincipiumEst
  • MorsPrincipiumEst

    GTA Series Special Vehicle Collector

  • Feroci
  • Joined: 15 Nov 2013
  • United-States
  • The collector [Amazing work on the Special Vehicle Guide!]

#39

Posted 04 July 2015 - 12:18 PM

If VC could have a Crusher to convert Special Vehicles to DP, that would be spectacular! :)  So many EC Vehicles to be found, but not enough Proof Vehicles. :/


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#40

Posted 04 July 2015 - 11:22 PM

Keep your Friends Close... Converted iOS to Android

 

Manual iOS to Android conversion of Militia's Ultimate 100% Save File for Vice City iOS.

 

The conversion process was similar to GTA3, and just as brutal. I get into trouble adjusting the block sizes, mostly. iOS has an extra couple of align bytes with an odd number of objects and that throws everything off. I'm a bit worried about the objects. I padded the end of each record with 2 extra bytes but the extra bytes in Android weren't always blank. The values had the appearance of random align data but I didn't follow through with multiple saves or saves over time to increase confidence in this assumption. I figured I'd just start with blank data and look for trouble first.

 

Process:

 

Added 2 bytes to the end of each object record and adjust the size of the block and data block.

Set the player ped block to the expected Android size and then inserted or deleted bytes to align known fields.

Trim file to length, adjust the size of the slack block, and fix the checksum.

 

Track down errors in the manual addition of bytes in the object records.

Trim file to length, adjust the size of the slack block.

Fiddle with the block sizes until I finally got template to fully process the save as Android.

Fix the checksum and test.

 

The save loads; the player seems to move and drive normally. Weapons scroll as expected. Health, armor and money look good. Vehicles in the Sunshine garage look special enough to me - mostly black, right? I'll leave it to more experienced players to take a closer look. I wouldn't know normal or not at this point anyway. Please

 

I noticed that this 100% iOS save appeared to have the minimum value for max stamina - 150. Anyone know what's up with that? The 100% Android save I was looking at had 1000 for max stamina.

  • thehambone likes this

MorsPrincipiumEst
  • MorsPrincipiumEst

    GTA Series Special Vehicle Collector

  • Feroci
  • Joined: 15 Nov 2013
  • United-States
  • The collector [Amazing work on the Special Vehicle Guide!]

#41

Posted 05 July 2015 - 12:23 AM

There is 7 solid Black Vehicles and one that is Black and Pink secondary.  The Romero's Hearse is a Unique Vehicle and also FP.  The Cheetah, Infernus, and Banshee are all FP, as well.  The Spand Express is a Unique Vehicle and the Gold and Silver Stretch, plus Maverick are EC.

 

Idk why I am listing this all, as it's in the OP of my Topic that I posted.


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#42

Posted 05 July 2015 - 01:31 AM

No, it's cool. Thanks for confirming my observations. Any idea about the stamina stat? The 100% Android save I was using for comparison had 1000.0, but yours was stuck at 150.0, which I  think is the starting value. So... maybe you sprinted less than 500 meters before earning infinite sprint and it never built from then on. Does that match your play style?


MorsPrincipiumEst
  • MorsPrincipiumEst

    GTA Series Special Vehicle Collector

  • Feroci
  • Joined: 15 Nov 2013
  • United-States
  • The collector [Amazing work on the Special Vehicle Guide!]

#43

Posted 05 July 2015 - 12:42 PM Edited by Militia, 05 July 2015 - 01:07 PM.

NEW Game.......Once loaded, drive EC White Admiral to Ocean Beach.  Next, I drove to Vice Point Hospital and left the EC White Admiral in memory and completed Paramedics.  After that, I bought Safehouses to put the Admiral into, and then Saved my game.  I do the same thing every playthrough I do in VC for PS2/3 and iOS.

 

I can NOT stand running without Paramedics complete and infinite sprint awarded, so I ALWAYS do it first thing in III, VC, LCS, and VCS.  I can stand CJ's speed, but none of the other Characters cuz they get tired way too quickly it would appear and when you have a spec of health left in a Rampage, you NEED the Infinite Sprint to get the hell out of there so the Gang Members stop spawning.

 

So yeah, Idk what that is all about.  Tommy sprints, never gets tired, like how it should be acting.

 

EDIT: Also, I have Photos in EVERY Topic I have posted for my 100% Saves, so you can just look in there to see the Vehicles which are saved in the Garages.

 

Also, if you're looking at HeroBrineR007's Mobile VC Save, it probably has Mods or something strange installed or embedded in the Save File.  He told me a few months ago that he increased the Health to 1000 or something to mess around.  That is why I don't really trust his Saves anymore.  I can trust myself, though.  And since I got OCD, you can guarantee that I am doing it P.E.R.F.E.C.T.


spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#44

Posted 05 July 2015 - 11:13 PM

I have done enough research to get the crane to work decently in Vice City. Check out the updated information above. I've only gotten this to work through memory editing but I think it should be possible to activate cranes by editing the save. The crane's idle properties and destination properties are static and precalculated in GTA III when cranes are activated. That allows the crane to know how to move the car from the pick up zone to the drop off point. It seems that the destination point x,y,z are only used for precalculation and not directly used by the crane. There is no magnet in Vice City so this is the most I can do for the crane.


This code is used to activate this specific crane. You can change it to any cranes you want.
[email protected] = 0x7C // size of crane struct
[email protected] *= 1 // get second crane
[email protected] += 0x7E4048 // base crane address
05DF: write_memory [email protected] size 4 value -974.0 virtual_protect 1 // x1
[email protected] += 4
05DF: write_memory [email protected] size 4 value -954.3 virtual_protect 1 // x2
[email protected] += 4
05DF: write_memory [email protected] size 4 value -1500.4 virtual_protect 1 // y1
[email protected] += 4
05DF: write_memory [email protected] size 4 value -1483.7 virtual_protect 1 // y2
[email protected] += 4
//05DF: write_memory [email protected] size 4 value -924.8 virtual_protect 1 // dest x
[email protected] += 4
//05DF: write_memory [email protected] size 4 value -1512.5 virtual_protect 1 // dest y
[email protected] += 4
//05DF: write_memory [email protected] size 4 value 24.4 virtual_protect 1 // dest z
[email protected] += 4
05DF: write_memory [email protected] size 4 value 3.14 virtual_protect 1 // dest heading
[email protected] += 4
05DF: write_memory [email protected] size 4 value 2.35 virtual_protect 1 // idle rotation
[email protected] += 4
05DF: write_memory [email protected] size 4 value 3.92 virtual_protect 1 // dest rotation
[email protected] += 4
05DF: write_memory [email protected] size 4 value 6.0 virtual_protect 1 // idle dist
[email protected] += 4
05DF: write_memory [email protected] size 4 value 20.0 virtual_protect 1 // dest dist
[email protected] += 4
05DF: write_memory [email protected] size 4 value 25.0 virtual_protect 1 // idle height
[email protected] += 4
05DF: write_memory [email protected] size 4 value 24.4 virtual_protect 1 // dest height
[email protected] += 56
05DF: write_memory [email protected] size 1 value 1 virtual_protect 1 // activity
What's left to do is to figure out how to precisely move the crane and hook but this is good enough.

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#45

Posted 31 July 2016 - 09:08 PM

For anyone who hasn't checked out the article at GTAModding, I've been updating the documentation and have corrected many seriously incorrect information. The sections that have major updates are:
  • Block 1: Player Peds
  • Block 2: Garages
  • Block 4: Vehicles
  • Block 8: Pickups
  • Block 9: Phone Info
  • Block 11: Radar Blips
  • Block 13: Gangs
  • ‎Block 14: Car Generators
  • OrionSR and thehambone like this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users