Closed tractorbeam0 closed 1 year ago
https://github.com/cmkushnir/NMSModBuilder#libmbindll "A given NMSMB version can only roll the libmbin.dll version forward."
The app is compiled against a specific version of libmbin, and can only use that version or newer. Even newer libmbin versions may not work if classes, functions, fields that the app code explicitly uses have changed. In order to mod an old version of the game you'd need a version of nmsmb that is coded to use the older libmbin|mbincompiler.
However, to view older mbin's you can use any nmsmb as it will load the correct libmbin at runtime and use reflection to "do the right thing". The reason the same mechanism isn't used to support modding w/ older libmbin is due to the amount of reflection required and differences that have occured throughout libmbin lifetime.
I did start down the path of trying to support modding w/ older libmbin, but didn't finish it. There are 3 general areas where libmbin is used: 1) To populate the lookup tabs, like products. This will likely always require a specific range of libmbin versions for a given nmsmb version. 2) Loading mbin's and converting to text for viewing. This loads the correct libmbin version at runtime. No change needed. 3) Using the correct libmbin when compiling and executing mods. Currently requires the libmbin from 1) but would like it to work like 2). This is still a wip.
"And I'm asking this now because I don't see anywhere else I could... might I ask how one would pack a custom texture into a modpack using your tools? There's no example scripts or documentation that I could find."
See: https://github.com/cmkushnir/NMSModBuilder/blob/main/Doc/Tab/ScriptMod/Readme.md#new "When you create | rename | delete a mod script the application will automatically create | rename | delete a subfolder with the same name as the script. e.g. ./Scripts/Mod/MyScript.cs will have a corresponding ./Scripts/Mod/MyScript/ folder. The subfolder is where you can put script specific loose files e.g. textures, audio, other files that are needed, but aren't generated, by the script. A dummy (Loose_Files) script is provided as somewhere to place loose files that should be added to the mod pak, but not tied to a script being enabled or not.
The path used for the loose files, when added to the mod pak, is relative to their script subfolder e.g. ./Scripts/Mod/MyScript/Dir1/Dir2/Item.ext would be added to the mod pak as DIR1/DIR2/ITEM.EXT."
The older libMBIN downloading process goes fine, but it comes up with a strange issue with on initialization of it. It works entirely fine on modern versions, at least the current update.