[MODDING] Incomplete Mod Approval & Init

Issue #1117 resolved
Armithaig created an issue
  1. Some assets aren’t re/loaded when a mod’s approved.
  2. Some assets aren’t loaded on use/when mod sensitive initialisation runs.

The former’ll frequently lead to user exceptions/crashes which’s then chalked up as “Ah well, guess the mod’s porked”.

Sniffed out most cases of it below, attached the scruffy unit test mods used to confirm.


  • ColorUtility (Display.txt)

    • Not initialised on use, null on mod sensitive init - 🆘
    • Not reloaded on mod approval - 🆘
    • ColorMap and ColorToCharMap is Added to, throws when a colour already exists - 🆘
  • Anatomies (Bodies.xml)

    • Initialised in static constructor - 🆗
    • Not reloaded on mod approval - 🆘
  • Options (Options.xml)

    • Initialised on awake - 🆗
    • Not reloaded on mod approval - 🆘
  • ConversationLoader (Conversations.xml)

    • Initialised on use - 🆗
    • Not reloaded on mod approval - 🆘
    • (PreGameCacheInit but neither HasGameBasedStaticCache/HasModSensitiveStaticCache to use it)
  • PronounSet (PronounSets.xml)

    • Not initialised on use, null on mod sensitive init - 🆘
    • Not reloaded on mod approval (Manual reset on new game, not on save load) - 🆘

The ApprovalSetup mod’ll need to be hotloaded first to trigger a load in ConversationLoader, before ApprovalTests' own conversation file is included. Prints to the Player.log, would’ve shown it in a popup but it relies on MarkupShaders n' consequently on ColorUtility which hasn’t loaded at the time, as mentioned above.

Comments (4)

  1. Log in to comment