Jump to content

modded Spices


Sanchozz
  • Branch: Preview Branch Version: Linux Pending

I am a modder and I want to create a mod that adds new Spices to the Spice Grinder, with new interesting effects.
In principle, everything is OK, well, almost.
But I found an unpleasant nuance.
If there is a food seasoned with a new Spice, and when you disable the mod that adds this Spice, then this save file cannot be loaded, the game will simply crash.

Test-Spises.thumb.png.ba733d65adb19295f161773f5fdf60c9.png

[ERROR] FruitCake Error in FruitCake.Edible.OnSpawn 
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at SpiceInstance.get_FoodModifier () [0x00000] in <7d9cf966adb94377b3061f4e321f5c92>:0 
  at Edible.ApplySpiceEffects (SpiceInstance spice, StatusItem status) [0x00031] in <7d9cf966adb94377b3061f4e321f5c92>:0 
  at Edible.OnSpawn () [0x0003f] in <7d9cf966adb94377b3061f4e321f5c92>:0 
  at KMonoBehaviour.Spawn () [0x00078] in <60e75e333441472f9431123630e954b1>:0 

A save file with such seasoned food is attached.

Test-Spises.sav


Steps to Reproduce
  1. create a mod that adds new Spices.
  2. let the Duplicant to season the food with a new Spice.
  3. save.
  4. disable the mod and restart the game.
  5. try to load the save file.
  • Sad Dupe 1



User Feedback


That's normal as without your mode game doesn't know what it is and how to handle it. Such reaction happens with any mod adding something completely new, and its common for most games, not only oni

Share this comment


Link to comment
Share on other sites

20 hours ago, asurendra said:

That's normal as without your mode game doesn't know what it is and how to handle it. Such reaction happens with any mod adding something completely new, and its common for most games, not only oni

If you haven't noticed by now.
Most of the mods in the workshop, with rare exceptions, including ALL my mods at the moment - can be safely disabled on an existing safe, without crashes or other serious consequences.
Because checks are provided in key places of the game. If any entity cannot be loaded, it will be ignored.
Such a check is lacking when loading spices applied to food.

  • Like 2

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...