Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Savefile mapping - the complete reference

Well I may never complete my savefile mapping reference but it looks pretty exhaustive to me. So whether you want to know about planets, ships enroute, transports, players, diplo, spying, planetary production, tech, ships at planets, ship specifications, limited research list, known technology, events, player messages, last votes, game setup and your current knowledge of each planet then here is my reference.

Savefile mapping (moo-savefile mapping.xls.zip): http://www.realmsbeyond.net/forums/attac...=893&stc=1
[EDIT] Ignore link above, now broken, see attachment for Savefile mapping (12Jul13). Lost, re-added 28Jul13 & 1Aug13 & 8Aug13 & 10Aug13 & 11Aug13 (if attached file goes missing try following link).
http://realmsbeyond.net/forums/attachment.php?aid=627


Attached Files
.zip   moo-savefile mapping1.xls.zip (Size: 20.9 KB / Downloads: 53)
Reply

That's an incredibly comprehensive reference, Sargon! Terrific work! (Even if I didn't get around to commenting until a month after the fact...) Is it possible, using information like this, to edit a savefile (or create a program to do so) so as e.g. to turn off certain events, ensure that certain techs are in a certain race's tree, or make a race's homeworld Ultra-Poor (heh) without obtaining any other spoiler knowledge about the map, tech trees, and the like?
Reply

Certainly you can do programmed 'blind edits' using the mapping to change values without knowledge of any unchanged data. For example:

filepos = X2D(DE86)
output = '0100'x
savefile = 'SAVE1.GAM'
rc = charout( savefile, output, filepos + 1)
rc = stream( savefile, 'c', 'close')

This simple Rexx script would disable the Plague event in SAVE1.GAM. Setting up and running Rexx scripts can be found here: [url=]http://forums.civfanatics.com/showthread.php?t=281283[/url]. Accessing particular players data or a particular planets data takes greater effort but can be calculated from the mapping or indirectly addressed from a script. For instance:

1. To add Soil to Human player, start at limited research list at xC638, bypass 3 fields (30 x 3) of comp/cons/ff, and 3 quadrants (3 x 3) gives an address of xC69B, change to '10'x for Soil tech. Would take greater logic to check existing allocation and sort 3 available techs into order for some changes.
2. To update homeworld as UP, program would have to get homeworld planet index from xDF20 (for you), then calculate location (from beginning of file) multiply index by xB8 (size of each planets data), add x28 for minerals field then set to '0000'x for UP.

Purpose built scripts could be built for particular needs or a general purpose one for a variety of more regular updates. If you have specific needs let me know in post or via PM. The scripts are easy, coming up with good ideas to use them is the harder part.
Reply

Thanks! I'll look over the Rexx data and try to create some test scripts (i.e. to test my understanding of how to make it work) when I have a chance (i.e. probably not for at least two months!) - the simplest application I was considering was to just turn off all events in a starting save file to create a game with Events Off without everyone having to remember to use ALT-events for every game session. As for bigger changes, I actually have several ideas for scenarios that I've not used because I don't know how they'll live up to my expectations and haven't had time to playtest them. I think this tool will be great for crafting such things ... when I have a little time again at least!
Reply

Hmm...sorry for the necro, but the link doesn't work (forum migration at some point in the past few years maybe? Some of the older links don't work...). Does anyone have a copy of the savefile mapping? I'd like to take a look at it to write an Imperium game viewer graphic at some point.
Reply

(July 12th, 2013, 12:15)Vanshilar Wrote: Hmm...sorry for the necro, but the link doesn't work (forum migration at some point in the past few years maybe? Some of the older links don't work...). Does anyone have a copy of the savefile mapping? I'd like to take a look at it to write an Imperium game viewer graphic at some point.

Original post updated with file as attachment since link now broken.
Reply

Cool. Thanks! Time to mess around with some save files...
Reply

(February 19th, 2009, 15:36)sargon0 Wrote: Well I may never complete my savefile mapping reference but it looks pretty exhaustive to me. So whether you want to know about planets, ships enroute, transports, players, diplo, spying, planetary production, tech, ships at planets, ship specifications, limited research list, known technology, events, player messages, last votes, game setup and your current knowledge of each planet then here is my reference.

Savefile mapping (moo-savefile mapping.xls.zip): http://www.realmsbeyond.net/forums/attac...=893&stc=1
[EDIT] Ignore link, now broken, see attachment for Savefile mapping (12Jul13). Lost, re-added 28Jul13 & 1Aug13.

The thread topic says there's attachments, but I don't see anyplace where I can download the file? Or maybe I'm blind?
Dominus Galaxia, a Master of Orion inspired game I'm working on.
Reply

(August 8th, 2013, 10:40)Zeraan Wrote: The thread topic says there's attachments, but I don't see anyplace where I can download the file? Or maybe I'm blind?

The Forum currently has a bug where attachments disappear. Check first post and I have re-added yet again, for how long it will be there I do not know.
Reply

(August 8th, 2013, 11:16)sargon0 Wrote:
(August 8th, 2013, 10:40)Zeraan Wrote: The thread topic says there's attachments, but I don't see anyplace where I can download the file? Or maybe I'm blind?

The Forum currently has a bug where attachments disappear. Check first post and I have re-added yet again, for how long it will be there I do not know.

Thanks, got it!

What does your terminology with size means? First one with planets, it says xB8 by 108. Does it mean each planet contains 184 (B8x) x 32 bit worth of data? And there's 108 entries allocated for the planets in all?
Dominus Galaxia, a Master of Orion inspired game I'm working on.
Reply



Forum Jump: