BL Coding Bannerlord Mods via IronPython?

Users who are viewing this thread

After hearing about this test mod, I was wondering if anyone else has done tests in using other programming languages with Bannerlord. The big thing keeping me from trying to mod the game more is that every update breaks mods that use DLL files, and
  1. not everyone releases their source code
  2. mods that I compile don't always run, even if they compile without errors and I use the unblocker tool
Therefore, I'd love to use an interpreted language for the main code of mods that I put together, particularly since I've learned a lot of Python recently. The thing is, I'm not sure how to hook into the existing C# functions and classes via IronPython, so I'd like to know if anyone has tried this or could offer advice on how I could do this.

For testing purposes, I'd like to try doing some basic things first. Things like:
  • Change the "models" in use (such as the marriage model, age model, and so on).
  • Create basic functions (like being able to kill or make an NPC pregnant from a UI button, or jump forward in time)
Ideally, I'd like to be able to do as much as possible without needing to re-compile the code after every tweak. Though I'm not sure how feasible that is...

If it all works out, I'd hope that this would allow people to create mods that only need the C# hook to be updated after each game update. But I'm not familiar enough with DLL and C# to know if that is how it would work.
 
Solution
it doesnt matter which language you use really, you can find threads discussions about using Javascript, VB, etc.

Not using C# tho just means you are isolating yourself. You will have trouble with guides, tutorials, using OSP code, asking questions, etc. Using the tool that everyone else uses makes things easier for you as well.

devs didnt release the modding tools yet, which includes the game code. So you can expect things to change when that happens, including how C# is used.

it also doesnt matter if you use hooks or not. Its the same as using hooks with C#. If the code changes, and it will change a lot for EA, things will continue to break often for mods. You need to support a version and stick with that, not the live one...

kalarhan

Python Saint
Count
WBNWVCWF&S
it doesnt matter which language you use really, you can find threads discussions about using Javascript, VB, etc.

Not using C# tho just means you are isolating yourself. You will have trouble with guides, tutorials, using OSP code, asking questions, etc. Using the tool that everyone else uses makes things easier for you as well.

devs didnt release the modding tools yet, which includes the game code. So you can expect things to change when that happens, including how C# is used.

it also doesnt matter if you use hooks or not. Its the same as using hooks with C#. If the code changes, and it will change a lot for EA, things will continue to break often for mods. You need to support a version and stick with that, not the live one. Eventually the game will stable and the API should also be stable enough that mods wont be fragile.

and when we get total conversion modules that will not be a problem, as they will just have the game code (not the engine code) with them, so it is very unlikely that updates to the Native game would break them.
 
Upvote 0
Solution

builder of the gods

Sergeant at Arms
it doesnt matter which language you use really, you can find threads discussions about using Javascript, VB, etc.

Not using C# tho just means you are isolating yourself. You will have trouble with guides, tutorials, using OSP code, asking questions, etc. Using the tool that everyone else uses makes things easier for you as well.

devs didnt release the modding tools yet, which includes the game code. So you can expect things to change when that happens, including how C# is used.

it also doesnt matter if you use hooks or not. Its the same as using hooks with C#. If the code changes, and it will change a lot for EA, things will continue to break often for mods. You need to support a version and stick with that, not the live one. Eventually the game will stable and the API should also be stable enough that mods wont be fragile.

and when we get total conversion modules that will not be a problem, as they will just have the game code (not the engine code) with them, so it is very unlikely that updates to the Native game would break them.
This guy was helping out warband modders and is still helping today Xd, quick question tho
Did the devs say the game code was being released? I thought they said they would not release it
 
Upvote 0

kalarhan

Python Saint
Count
WBNWVCWF&S
Did the devs say the game code was being released? I thought they said they would not release it

game code = modsys for Warband != engine code

similar to what we have now if you decompile the DLL files to mod Bannerlord, but with actual documentation/etc. You can read about it on the Q&A they released. Somethings will be locked/hardcoded on the engine for performance sake or just to keep them hidden, but those will allow tweaks (you can mess with the numbers, not the code).
 
Upvote 0
Top Bottom