
- Mount and blade bannerlord smithing mod#
- Mount and blade bannerlord smithing mods#
- Mount and blade bannerlord smithing code#
One example of this paradigm is the SmithingModel and DefaultSmithingModel, respectively. Mount and blade bannerlord smithing code#
TaleWorlds has structured most game code using abstract classes and default implementations. The path attribute specifies the path to the xml file relative to ModuleData\ and excludes the. The effect is similar to what a folder location would indicate in a directory-based data scheme. The id attribute determines the required schema of the data and in what context it is loaded. See Modules\Sandbox\SubModule.xml for many examples. These are emumerated in Modules\*\Submodule.xml. XML data is hooked into the game using nodes such as. For the sandbox campaign the module class is specified as Sandbox.SandBoxSubModule in Modules\SandBox\SubModule.xml and can be found in Modules\SandBox\bin\Win64_Shipping_Client\Sandbox.dll. The behaviors for each game mode are loaded by that module, so the fastest way to get started finding what behaviors to modify may be to look at the submodule class for a game mode. To foundationally change what can happen in the game, behaviors must be changed. Specifically, and .Map contain lots of classes that permit changing balance. For single-player, lots of logic of interest is compiled in. to do thingsįor light modding of balance and to affect existing behaviors, it is probably best to start with modding models. Models are responsible for deciding when, how frequently, how fast, etc. Behaviors are responsible for doing things, like starting and stopping tournaments or unlocking new crafting parts, for example. This separates the responsibilties of the code more-or-less into mechanism and policy, respectively. Taleworlds followed a behavior- model paradigm with the achitecture. The vast majority of modding will require coding in C#. For very limited cases, like changing party sizes or campanion skills, it is possible to make a text-only mod.
There are a minimal number of XML files within each Module\*\ModuleData\. Like Warband, Bannerlord is not very data-driven.
The paid JetBrains ReSharper integrates with VisualStudio for easy browsing of DLLs. Decompiled code will not have comments and will include compiler-generated code like empty constructors that can be deleted.
Once a promising class is found, the 'source' can be recovered by opening the DLL in dotPeek. Mount and blade bannerlord smithing mods#
Adding all DLLs for the sandbox module is also useful for single-player mods ( C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\Modules\SandBox\bin\Win64_Shipping_Client\*.dll).Adding all of the DLLs in the game directory as references makes searching the entire code base possible ( C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.*.dll).
Mount and blade bannerlord smithing mod#
Until TaleWorlds releases mod tools, development is a bit hacky and involves inspection of decompiled code. It may be necessary to set the property GameFolder if Bannerlord is installed at a non-standard path. It is a simple example to demonstrate loading mod code.ĭuring post build, the SmithForever directory will be mirrored to the Bannerlord module directory ( C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\Modules\SmithForever). This mod eliminates the "energy" cost for Refining, Smelting, and Smithing so these actions can be taken as long as materials are available.