[1.1] Folders in a mod are loaded backward.

Started by NotooShabby, March 19, 2020, 02:34:11 PM

Previous topic - Next topic

NotooShabby

In ModUpdate.txt, it writes
"
So if mods load folders for current game version look like this:

  <v1.5>
    <li>Common</li>
    <li>1.5</li>
  </v1.5>

And you have 'Amazing.dll' defined in both 'Common' and '1.5', it will load the 'Amazing.dll' from '1.5'.
"
    The reason for that is the game first loads contents in '1.5' then 'Common'. .Net won't load an assembly with the same identity twice.
    It creates a problem where there is a dll in 'Common' that a dll in '1.5' references, because the derived type is loaded before the base type. The game will throw a ReflectionTypeLoadException. I cannot find any related information is recorded in either Player.log or output_log.txt. However, I verifies this bug using dnSpy to debug the source code.
    If this is considered a bug and is verified on your end, a quick fix is to update the txt and tell modders to organize their folders in a reversed order. Hope this helps.

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

Nowhere

Should be fixed in next release. Thanks for reporting!