Making a static NPC

Users who are viewing this thread

Tenshi_Hnnw

Recruit
So let's say I want a NPC that stays at a fixed tavern no matter what happens, like Ramun. Except instead of selling prisoners, you can recruit special troops there. How would I do that? I haven't really seen any mod do that, but I'm assuming it can't be that complicated, right?
 
Version e1.9.0 changed tavern mercenary recruitment from a single troop tree to multiple troop trees (Eastern mercenaries, Western mercenaries & sword sisters). AFAIK you can add any number of troop trees in the new mercenaries section of spcultures.xml. As has been done by mods such as this one https://www.nexusmods.com/mountandblade2bannerlord/mods/4401?tab=description

However, if you wish them to be recruited via a mercenary broker that will require C# coding.
 
Upvote 0
Ah, that was half of what I was asking. The first and easier part of my question was how to make a NPC that stays indefinitely in a town, say, Poros or somewhere else. He doesn't join your party or anything, just staying in the tavern and offering the same few pieces of dialogue.

The second and more complex part is being able to recruit specific troops from him through dialogue, which as you said requires C# coding. While I do have some programming knowledge, my modding knowledge is quite limited so I would appreciate any help on the second part. But, if it is too complex or for any other reason I would like to at least accomplish the first part.
 
Upvote 0
AFAIK, if you want to add a new NPC in a fixed location and control their dialogue, you'll need to code it in C#.
Ah well. Go ahead and explain it if you don't mind I guess, and I'll see how much I can comprehend. I do have basic C# programming knowledge so that's a start I guess.
 
Upvote 0
Upvote 0
Well that's more coding than I have. :smile: You'll find the api documentation here https://apidoc.bannerlord.com/v/1.0.0/ and if you want an easy intro into understanding Bannerlord there are these modding videos https://forums.taleworlds.com/index...etup-dialogs-game-menu-gauntletui-etc.451081/
Well, thanks for your help anyways. Due to some reasons I can't watch youtube unless someone was kind enough to download it and upload it somewhere, but I'll see what I can make sense of the document and maybe try looking at other mod's dlls.
 
Upvote 0
Upvote 0
Back
Top Bottom