View Full Version : How to edit savegame files
irish1958
01-05-08, 03:55 PM
The weather in SHIII has always been a problem. SH3Weather will modify it at the startup of a patrol, but it doesn't appear to have any effect during the patrol; as a result, one often has several weeks of undesirable weather and high winds.
Since the weather changes appear to be hard coded, it seems to me the only answer would be to save the game, and edit the save game file to change the weather. Since the weather is saved, this should be possible SH3Gen reads this file. Does anyone know what program is used for read the file? And is it possible to write to the save game file?
It's the million dollar question you're asking, the sav files are a propietary format and as far as I know only the devs know how it's encoded, I asked them several times about that, but they always denied the info, it could be usefull not only for the weather, but to add markers and other stuff on the maps among other things.
Ref
irish1958
01-05-08, 08:17 PM
Ref,
Apparently, Globalexplorer knows how to do it, as his program (SH3Gen) reads the saved game file and generates info and maps based on the data. I think he just frequents the German forums. (It should be formi, not forums).
Wave Skipper
01-06-08, 12:37 AM
the ideal would have been for the devs to create storm maps in the game with real storm tracks - so that a player would encounter something more real than just a ramdomized storm event. But that would have greatly drained computer resources and slowed the game down. Still it is something one might wish for.
Are you sure Globalexplorer's program reads the saved game file? I could be wrong but, I was under the impression it read the campaign files for its information. :hmm:
JScones
01-06-08, 06:07 AM
Are you sure Globalexplorer's program reads the saved game file? I could be wrong but, I was under the impression it read the campaign files for its information. :hmm:
:yep: Yeah, I'm pretty sure too.
I tried cracking the save file a while ago because I saw it as a better way to implement milk cows. For example, if I knew the offsets for the torpedoes, fuel level and date, I could use a tool (surprisingly) like SH3Cmdr to modify those values to simulate replenishment...and all this without SH3 recording the docking as a completed patrol.
I asked Timetraveler for assistance and he couldn't crack it either. :(
irish1958
01-06-08, 09:58 AM
Saved game files;
I am probably wrong.:oops::oops: I just assumed that since you load the saved game file in his program, that it used that file.:damn::damn: Still, there must be some way to access this file as the developers wrote it and presumably know how to read it.:hmm::hmm:
Perhaps somebody with an in at Ubisoft could contact the developers and find out. (?Neal??).
As JSCones pointed out, access to this file would open up a whole lot of new possibilities for addons and game play.:rock::rock:
Keeping this game active has to be in Ubisoft's advantage. :sunny::sunny:
bgeorgalas
01-06-08, 07:32 PM
Since the weather changes appear to be hard coded, it seems to me the only answer would be to save the game, and edit the save game file to change the weather.
I do not know if it is revelant but sometimes i save a game with good weather and when i reload it i find myself in the middle of a storm.... aree you sure that savegame files keep track of the weather also?
Captain Nemo
01-07-08, 07:24 AM
Since the weather changes appear to be hard coded, it seems to me the only answer would be to save the game, and edit the save game file to change the weather.
I do not know if it is revelant but sometimes i save a game with good weather and when i reload it i find myself in the middle of a storm.... aree you sure that savegame files keep track of the weather also?
As far as I am aware the weather counter is reset everytime you save and reload a your campaign. The weather counter runs for approximately 11-12 hours of game time and then rolls the dice for a weather change. So if you save in bad weather then you should have bad weather when you reload and for at least another 12 hours of game time.
Nemo
Here's a good topic to make a petition to UBI/Romanian Dev team, instead of the futile request for the SDK, we can ask them for something more reasonable like info about the files structure, at this point we're limited by the lack of solid information in certain areas, not by not having an SDK, I've got some half finished tools that can almost replace the SDK (so has Skjwaster), the main reason I don't make them public is that without having some hard info on certain aspects I can't make them work consistently... so their output still require a good knowledge of Hex editing and trial and error... and a lot of luck...
Ref
irish1958
01-07-08, 09:43 AM
Ref.
I don't have any skills in file structure. Would it be possible for a few modelers to get together and submit some specific questions to the developers?
There are several aspects of the game that small changes would make a big difference.
Ref.
Would it be possible for a few modelers to get together and submit some specific questions to the developers?
Already did it without much luck, perhaps a request signed by the hole comunity can have a positive reply...
Ref
bigboywooly
01-07-08, 10:00 AM
Aye good idea Ref
Ask them for the unfinished work on wolfpacks and resupply too
Twas started IIRC but dropped due to lack of time
They have no need for it now
Stiebler
01-07-08, 10:44 AM
The devs probably decided to write out all parameter values as specific data types to the data files without recording the parameter names. In the C-language (which was used for SH3) this can be made very fast. Equally, the same file can be read straight back into memory without any error checking at all. That is why corrupt saves can cause a CTD on reload.
The advantage of this approach, apart from speed, is that it reduces the size of the file written in the first place. The disadvantage is that, as everyone has discovered, it is impossible to discover what inset is associated with what parameter. You cannot even be sure that all the values are of the same data-type (eg single float). Again to conserve space, many are likely to have been written as short integers - or even bytes. I've done the same in the past - I am in no position to criticise the devs.
If the devs cannot provide the key to the data insets, then it is a staggeringly difficult task (involving hundreds of tests by trial-and-error) to assign even the first few bytes written to the data file. Practically, then, this is an insoluble problem without help from those who, according to Ref, do not know the answer either. Perhaps the answer is undocumented, and cannot be found just by looking at the code required to save the data (e.g. use of data buffer$ with unexpected names).
It has also occurred to me that the data files were compressed in some way before being written, and un-compressed when reloaded. However, the files seem to be too large for that.
Stiebler.
skwasjer
01-07-08, 12:14 PM
I highly doubt the files are compressed. They haven't done that anywhere else either. But as far as the rest I agree. I've observed some patterns in the files though, so it would be possible to figure out, but it will be time consuming.
[OT] The full Quake 3 game source was released 6 years after the game was initially released, so there is hope (although a different studio/publisher). The only problem I see is that they will continue to hold off releasing source code/info, because the codebase of sequel (SH4/expansion) is too close to SH3. They don't want to give (future) competitors an (extra) edge, which makes perfect sense to me. Any software house is reluctant to release source code.
So I don't have high hopes just yet. Maybe in a few years :(
GlobalExplorer
01-07-08, 12:25 PM
Are you sure Globalexplorer's program reads the saved game file? I could be wrong but, I was under the impression it read the campaign files for its information. :hmm:
Thats correct. Apart from the campaign files I also read the text based parts of the savegames, but they contain only very basic information.
The idea of having some sort of savegame-api is intriguing, especially if it could not only read, but also write the savegames.
A year ago or so, after the encouraging breakthroughs Ref made with the terrain, I posted a request if someone had the balls to crack the binary parts of the savegames, and the response was nil. As JScones and other have posted, it is intriguing, but very hard, and imo more the kind of work a hacker would enjoy, not a programmer.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.