Hello fellow warriors! Since there seems to be interest in this mod/tutorial still, even though there are a bunch of troops changers mods and the amazing "Custom Troop" mod by helokero13 (https://www.nexusmods.com/mountandblade2bannerlord/mods/2482?tab=description) I'll try to update it and make a more comprehensive tutorial on the matter. Maybe even make a video explaining what every line of code does in this particular part of the game. Even thought I'm a photographer and video editor by trade, I hate making my own videos. If any of you fine gents and/or ladies wish to cooperate and have your own YouTube channel or are affiliated with someone that does, shoot me a PM, so we can work together and make a video tutorial or multiple tutorials on basic modding stuff!
Just a question as I may have overlooked something, is there a way to have the soldiers be women? I imagine it would have something to do with the template you choose, but I'm unsure.
I keep getting a crash and "XML state should be interactive" popup. Can someone explain what's wrong with my code that might be causing this? I feel like this is really basic and I'm just missing something obvious.
This mod is pretty great. I just wish someone would make a program to do this. with pictures showing you the armors, and the weapons, etc, where you can visualize the upgrade tree, and make it easier to setup just by click drag, things like that. XD tall order i know. but it would be amazing.
right now i just try the items on my character and search the names and add to the troops :D thx for the mod btw.
I've been using this for many game versions, i don't exactly remember which ones, and it has worked on every single one. So if u are getting crashes its probably another mod.
196 comments
I'll try to update it and make a more comprehensive tutorial on the matter. Maybe even make a video explaining what every line of code does in this particular part of the game.
Even thought I'm a photographer and video editor by trade, I hate making my own videos. If any of you fine gents and/or ladies wish to cooperate and have your own YouTube channel or are affiliated with someone that does, shoot me a PM, so we can work together and make a video tutorial or multiple tutorials on basic modding stuff!
example:
name="{=GUQ3zfg2}Wolf Knight"
if i want to create my own troop, do i have include some letters enclosed with curly brackets before the troop name?
context:
<NPCCharacter id="wolf_knight"
default_group="Infantry"
level="25"
civilianTemplate="NPCCharacter.vlandia_troop_civilian_template_t1"
name="{=GUQ3zfg2}Wolf Knight"
is_basic_troop="true"
occupation="Soldier"
culture="Culture.vlandia">
<?xml version="1.0" encoding="utf-8"?>
<NPCCharacters>
<NPCCharacter id="wolf_knight"
default_group="Cavalry"
level="30"
civilianTemplate="NPCCharacter.empire_troop_civilian_template_t1"
name="{=GUQ3zfg2}Cortian_Bladesmith"
is_basic_troop="true"
occupation="Soldier"
culture="Culture.empire">
<face>
<face_key_template value="NPCCharacter.villager_empire" />
</face>
<skills>
<skill id="Athletics"
value="250" />
<skill id="Riding"
value="250" />
<skill id="OneHanded"
value="250" />
<skill id="TwoHanded"
value="250" />
<skill id="Polearm"
value="50" />
<skill id="Bow"
value="300" />
<skill id="Crossbow"
value="50" />
<skill id="Throwing"
value="50" />
</skills>
<equipmentSet>
<equipment slot="Item0"
id="Item.vlandia_sword_5_t5" />
<equipment slot="Item1"
id="Item.heavy_round_shield" />
<equipment slot="Item2"
id="Item.noble_bow" />
<equipment slot="Item3"
id="Item.bodkin_arrows_a" />
<equipment slot="Body"
id="Item.imperial_scale_armor" />
<equipment slot="Head"
id="Item.peaked_helmet_over_mail_coif" />
<equipment slot="Cape"
id="Item.imperial_lamellar_shoulders" />
<equipment slot="Gloves"
id="Item.lamellar_plate_gauntlets" />
<equipment slot="Leg"
id="Item.lamellar_plate_boots" />
</equipmentSet>
<equipment slot="Horse"
id="Item.desert_war_horse" />
<equipment slot="HorseHarness"
id="Item.celtic_frost" />
</NPCCharacters>
You need an </NPCCharacter> tag to close <NPCCharacter>
I suggest installing Notepad++, which has a built-in XML checker that will catch errors like these.
-c.
spnpccharacters.xml
<?xml version="1.0" encoding="utf-8"?>
<NPCCharacters>
</NPCCharacter>
<NPCCharacter id="imperial_recruit"
default_group="Infantry"
level="29"
civilianTemplate="NPCCharacter.empire_troop_civilian_template_t1"
name="{=s3IJIFUw}Viking Berserker"
occupation="Soldier"
is_basic_troop="true"
culture="Culture.empire">
<face>
<face_key_template value="NPCCharacter.fighter_empire" />
</face>
<skills>
<skill id="Athletics"
value="60" />
<skill id="Riding"
value="0" />
<skill id="OneHanded"
value="80" />
<skill id="TwoHanded"
value="100" />
<skill id="Polearm"
value="20" />
<skill id="Bow"
value="5" />
<skill id="Crossbow"
value="5" />
<skill id="Throwing"
value="80" />
</skills>
<equipmentSet>
<equipment slot="Item0"
id="Item.peasant_pitchfork_2_t1" />
<equipment slot="Head"
id="Item.leather_cap" />
<equipment slot="Body"
id="Item.tunic_with_shoulder_pads" />
<equipment slot="Leg"
id="Item.empire_horseman_boots" />
</equipmentSet>
<equipmentSet>
<equipment slot="Item0"
id="Item.peasant_polearm_1_t1" />
<equipment slot="Head"
id="Item.merchants_hat" />
<equipment slot="Body"
id="Item.footmans_tunic" />
<equipment slot="Leg"
id="Item.empire_horseman_boots" />
</equipmentSet>
<equipmentSet>
<equipment slot="Item0"
id="Item.peasant_sickle_1_t1" />
<equipment slot="Body"
id="Item.tied_cloth_tunic" />
<equipment slot="Leg"
id="Item.empire_horseman_boots" />
</equipmentSet>
<equipmentSet>
<equipment slot="Item0"
id="Item.empire_sword_1_t2" />
<equipment slot="Body"
id="Item.tied_cloth_tunic" />
<equipment slot="Leg"
id="Item.empire_horseman_boots" />
</equipmentSet>
<upgrade_targets>
<upgrade_target id="NPCCharacter.imperial_infantryman" />
<upgrade_target id="NPCCharacter.imperial_archer" />
</upgrade_targets>
</NPCCharacter>
</NPCCharacters>
SubModule.xml
<Module>
<Name value="Test Mod"/>
<Id value="test_mod"/>
<Version value="v1.0.0"/>
<SingleplayerModule value="true"/>
<MultiplayerModule value="false"/>
<DependedModules>
<DependedModule Id="Native" />
<DependedModule Id="SandBoxCore" />
<DependedModule Id="Sandbox" />
<DependedModule Id="StoryMode" />
</DependedModules>
<SubModules>
</SubModules>
<Xmls>
<XmlNode>
<XmlName id="NPCCharacters" path="spnpccharacters"/>
<IncludedGameTypes>
<GameType value = "Campaign"/>
<GameType value = "CampaignStoryMode"/>
<GameType value = "CustomGame"/>
<GameType value = "EditorGame"/>
</IncludedGameTypes>
</XmlNode>
</Xmls>
</Module>
what do i do?
right now i just try the items on my character and search the names and add to the troops :D thx for the mod btw.