bmaupin / civ5save-editor

Civilization V save editor
https://bmaupin.github.io/civ5save-editor/
MIT License
28 stars 2 forks source link

Civ BE? #34

Open will-ca opened 3 years ago

will-ca commented 3 years ago

Is there any chance of getting this to work with Beyond Earth (and Rising Tide)?

From exterior appearances, it looks like the game mechanics, engine, and thus save format are basically equivalent to Civ V's.

However, the victory types are different and the other flags do have different names— "Allow policy saving" is "Allow virtue saving", "Allow promotion saving" is "Allow veterancy saving" or something, "barbarians" are "aliens", etc.

Idk how deep of a change that implies? Most of the BE properties are just UI reskins I think, and from a quick skim of this codebase, it seems like the design of this app is robust enough to access different properties without many deep/hard-coded changes to the parser.

Adapting this existing project seems like a much better starting point than trying to start a new one. And, though I don't mean to act demanding or anything, the developer of this project is probably one of few people outside of the original Firaxis team that already knows how the apparently undocumented save format is structured, and has an established project to read and edit them.

In a hex editor, frankly the V and BE file formats look very similar— Virtually indistinguishable, except for civ/game/DLC names.

Currently the app simply errors because the "File signature does not match". If the current developer is open to taking a shot at supporting BE, I can supply test save files if needed.

will-ca commented 3 years ago

After tracking down some byte offsets and useful reference strings for Civ V, and using them to apparently successfully edit a BE save file, I confirm that the file formats are basically identical, just with different field names/values.

EDIT: Ah, turdnugget, no, it didn't work— Though I think that might just be error on my part.

I actually ended up using information about the max turns that was posted by the developer of this app, so thanks for that too!

bmaupin commented 3 years ago

Interesting! I don't own Civ BE but I'm up for giving it a shot if you're up for testing and providing saves for me to test with. Off the top of my head, these should be enough to get me started:

Please zip them and attach them directly to this issue and I'll take a look.

Thanks!