BL Coding Battle AI and formations

Users who are viewing this thread

AshenWaltz

Recruit
Greetings,

I am currently working on a mod that aims to improve battle planning and battle AI for NPC lords as well as defining formations prior to battle.
I have been reading Bannerlord's source code and managed to find, with some help from this forum, where troops are stored and managed. Right now I am struggling to find a few classes or logic I need and I was wondering if someone might help:
- During a battle, where do troop commands come from? Where is the AI that controls npc troops during a battle?
- How does troop placement occur at the start of a battle? Is there a way to define custom formations or placements? I remember finding some references to formations in the source code earlier in my analysis but now I can't seem to find them.

I appreciate any information that might help me advance in my study of the source code.
Thank you in advance!
 
Greetings,

I am currently working on a mod that aims to improve battle planning and battle AI for NPC lords as well as defining formations prior to battle.
I have been reading Bannerlord's source code and managed to find, with some help from this forum, where troops are stored and managed. Right now I am struggling to find a few classes or logic I need and I was wondering if someone might help:
- During a battle, where do troop commands come from? Where is the AI that controls npc troops during a battle?
- How does troop placement occur at the start of a battle? Is there a way to define custom formations or placements? I remember finding some references to formations in the source code earlier in my analysis but now I can't seem to find them.

I appreciate any information that might help me advance in my study of the source code.
Thank you in advance!

You might want to look at other mods on this subject for insights such as https://www.nexusmods.com/mountandblade2bannerlord/mods/1531

Or ask the coders active in the BL-Coding section of the TW Forums - Modding Discord.
 
Upvote 0
Top Bottom