edbmods / EdBPrepareCarefully

EdB Prepare Carefully, a RimWorld mod
MIT License
233 stars 91 forks source link

Error when saving a character #188

Closed Mythos closed 6 years ago

Mythos commented 7 years ago

Hey there, when I'm saving a character (multiple times by overwriting the existing one) I'm getting this exception:

Called InitSaving() but current mode is Saving Verse.Log:Error(String) Verse.ScribeSaver:InitSaving(String, String) EdB.PrepareCarefully.ColonistSaver:SaveToFile_Patch0(CustomPawn, String) EdB.PrepareCarefully.ControllerPawns:SaveCharacter(CustomPawn, String) EdB.PrepareCarefully.<>c__DisplayClass12_0:b1(String) EdB.PrepareCarefully.Dialog_SaveColonist:DoSpecialSaveLoadGUI(Rect) EdB.PrepareCarefully.Dialog_Colonist:DoWindowContents(Rect) Verse.cAnonStorey2C4:<>m__1B1(Int32) UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle)

The file of the colonist is empty afterwards.

Mythos commented 7 years ago

Saving a different preset / character finishes saving the previous character / preset. The problem is just, that the character/preset saved "now" is being incomplete and in use by the RimWorld.exe. Loading the now complete character/preset finishes the incomplete one and releases the file.

VasVadum commented 7 years ago

I have this issue as well, just wanted to speak up so he knows there are more people with the issue. For a while, I thought there was no way to solve the issue other than to restart the game after every single save of any kind at all for colonist or preset due to the game being impossible to start after.

Lyndai commented 6 years ago

I didn't experience this. Is there something different you did when making the characters to save?

Mythos commented 6 years ago

When I've experienced that error, I had "Psychology" installed. IMHO it's an issue of EdBPrepareCarefully that's why I posted it here. Seems like it has problems serializing properties added by other mods.

VasVadum commented 6 years ago

Actually I experience this issue without Psychology, so its not Psychology. I mean it could be that any mod that adds content to the game that Prepare Carefully tries to register too could cause this, like Argonians.

I found a loop that lets you exit this issue however.

Save your character. Load your character. The restriction from saving anymore is lifted. At least back in A17 when I last tried it.

edbmods commented 6 years ago

Closing this issue as 1.0 nears. The save code will be changed. There will likely continue to be issues with mod compatibility as there always are, but we'll need to create new issues for those after 1.0 comes out.