How to save a variable?

Started by battlemage64, January 15, 2020, 07:32:45 PM

Previous topic - Next topic

battlemage64

I have two (possibly three) IDictionaries as part of a MapComponent, each recording a count of a certain timer for each pawn (for example, one is a dictionary where each Pawn has an int counting up to a certain value). I need to save these so they aren't reset to new each time, as they currently are. How do I add them to the player's save file?
I love to mod and boy am I bad at it

K

Here's a nice reference on the various saving functions in RimWorld: https://spdskatr.github.io/RWModdingResources/saving-guide.html

Down at the bottom there's a reference on how to save collections, including dictionaries.