[B.18.1722] Mod lessons throw error when mod disabled

Started by GiantSpaceHamster, December 07, 2017, 01:44:33 PM

Previous topic - Next topic

GiantSpaceHamster

I'm using the lesson feature to display helpful tips for a mod I make, which is a great feature by the way. Unfortunately whenever someone disables my mod RimWorld pops up the log and displays an error for every completed lesson from my mod after RimWorld restarts. The completed lessons are being loaded from the player profile but the game cannot find their definitions since the mod has been disabled. The errors look like the following:

Could not resolve cross-reference to RimWorld.ConceptDef named Moody

and then there are a few of these

Failed to load key/value pair: ,0

This can cause confusion to players because they think something is broken, but in reality it's just that the lesson data isn't there for lessons that aren't currently in play.

It would be great if the game only threw a warning (since it doesn't appear to actually cause any problems) or, even better, if the game could detect lessons from mods and not throw errors if the associated mod is not enabled.

Log file attached.

[attachment deleted by admin: too old]

Ozymandias

"This can cause confusion to players because they think something is broken, but in reality it's just that the lesson data isn't there for lessons that aren't currently in play."

That's why I'm here!