[1.1] Error when choosing scenario if missing custom ScenParts

Started by krafs, February 28, 2020, 02:05:40 PM

Previous topic - Next topic

krafs

I made a mod with some custom ScenParts, and created a new scenario that depended on one of those ScenParts. I then removed the mod and wanted to pick a different scenario for a new game.

As soon as I opened the "Open Scenario" page, the debug log gave a System.ArgumentException because it couldn't find the ScenParts one of the saved scenarios were made from.

I expected nothing to happen. I understand yielding an error if I try to open or pick the custom scenario, but not just by opening the Open Scenario-page.

Steps:
1. Make a mod with a class that extends ScenPart.
2. Add a ScenPartDef that points to the class.
3. Make and save a custom scenario that includes the ScenPart.
4. Remove the mod from the Mod folder.
5. Start RimWorld and click New Game.
6. -> Error.

I think there's a lot of potential in Scenarios, especially as scenarios can be built using custom ScenParts. But this kind of errors doesn't encourage the use.

Solution?
The simplest solution I can come up with is to stop yielding an error to the debug log. If you must say anything about it, give a warning instead. And maybe mark the custom scenario as incompatible with the current set of mods or something.

Log attached.