Splicing Save files- a question on IDs and associations

Started by sociallyawkwardsurvivor, August 31, 2015, 09:48:40 AM

Previous topic - Next topic

sociallyawkwardsurvivor

So I want one colony of mine to meet and live with another colony. I've spent a few hours studying the save code and how it makes the colonists relate to the map.

This is a bit of a can-of-worms and I was hoping to understand the programming logic a little further, theres something i dont fully understand and need help clarifying on.

in a save file, it appears that each colonist has 2 sections of xml that relates to it.  First section is "Tale Manager"  which gives each colonist an ID and basically says they arrived in a pod, gives them a map placement, and assigns an owning faction ID.

The 2nd section is "Things" which defines the pawn, thier skills, what they are wearing ect.

My question is.. how do the two relate?  Let's say John Doe is given an ID of "1" in the tales manager section.  When he is referenced as a pawn object, there is no field that references the tales manager id of "1", how does the game know that these two definitions go together? Is it by name fields?  Is it even important to preserve the tales manager definitions in the splice?  or is there a section that im missing?


sociallyawkwardsurvivor

upon further experimentation, I spliced the colonist's pawn thing defs only into the other save file.  Debugger did appear to have an issue with it, but resolved it.. it seems. Not sure what future unforseen problems this will cause if any, but it seems to work for now.

Tynan

TaleManager doesn't have any special role here, you can ignore it. It just stores text strings to use while making art descriptions.

You can freely copy/paste pawns from one save into another.

The only issue you should have are:
1. If you delete a pawn the game will complain because other things refer to it
2. If you copy in a pawn with an identical id (e.g. Pawn125 when there is already a Pawn125) you'll have a problem. But this is really unlikely and easily solved just by changing the id.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

RemingtonRyder

Also, since the two maps probably have different layouts, you may want to edit the positions of the arriving colonists. Otherwise they might end up inside a mountain.

Songleaves

I've been thinking for awhile now that it would be really cool if as an event you could get "visitors" from your other save files. I would love to see that my colonists from those games are doing well and visiting other colonies :D