Jump to content

Doing per-save configuration correctly


Recommended Posts

I'm currently working on a small project which requires me to save and load some configuration on a per-save basis.

I am however unable to find any examples or documentation on how to do this properly.

I see some examples of people creating their own configuration file and storing per-save states there side by side, but I imagine the right way is to store the configuration right in the `persistent.sfs` config tree.

Any advice is appreciated.

Link to comment
Share on other sites

Inherit from ScenarioModule, slap on a [KSPScenario] attribute, and override OnLoad and OnSave, and the game will give you your own ConfigNode in the save file to do with as you please. Here's how I did it:

Edited by HebaruSan
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...