Is there a way to create new Behaviors from BehaviorComponent?

Users who are viewing this thread

AshenWaltz

Recruit
Hello everyone,
I am currently working on a mod that aims to overhaul the battle AI currently implemented on Bannerlord. I am using Harmony and I already know what I need to do in order to change the AI during a battle. I have created my own tactics which use the behaviors already implemented by the native code. I however, find the amount of formation behaviors (classes which implement the BehaviorComponent class) extremely limiting. With that in mind, I wanted to create behaviors of my own just like I did my own tactics, however, the class BehaviorComponent has two constructors, one empty construtor and another which receives the Formation it will be working upon. The first is marked as protected and I can access it from my own code, but the one which receives a formation is marked as Internal and is, therefore, unreachable from my code. Without the main constructor, I am unable to set and access the behaviors' formation and thus can't properly set its behavior.
I want to know if there is a way to bypass this problem and create custom behaviors or if I am wasting my time and can just override the already existing ones.

Thank you in advance,
Ashenwaltz
 
Back
Top Bottom