Hello! At first, thanks for your work. I don't want to slander you, I think mod works fine with standard units, but i'm having trouble with the Pilum and the Triangular Throwing Spear.
I'm using mod "My Little Warband" and made unit with 170 lvl of throwing and polearm skill, give him Pilum/Triangular Throwing Spear, but he don't wont to use it as throwing weapon. He didn't wont to do thant even without your mod, but i hoped it will help hi, but unforchenatle its not. Regular throwing darts work well, but not throwing spears.
since i don't use "My Little Warband", i can't say very much where the issue could be.
I had a quick look into the Mod-Data and i can say for sure, that the Files don't get overwritten. But since there is a .dll File in it, some Part of the Source-Code is changed and so it could change the behavior of Troops.
What you could try, if you have "MLW" deactivated and give some Heros Pila, are they throwing it? If Yes, then the issue lies with "MLW".
Hi again, could you tell me if there is a tutorial for creating a mod? Before I just configured the file and then saved it but now it doesn't work. I have the edited files in a folder, they are simple vanilla modifications.
Hey MagnusAsakura, i hope my last Explanation did help you.
Well as for Modding-Tutorials, this can be a bit tricky depending on what you want to mod. Usually you can find some Tutorials on YouTube, but i for my self tend to use the Moddocs from Taleworlds. There are some Elements that are obsolete or no longer correct, but the whole Thing is pretty useful. Especially this Tutorial should help you in the Beginnings.
Feel free to ask, if you get stuck on some part or just need a hint.
There seem to be no issues in using them together, they have no common files. Just in Case, you can put my Mod after RBM in the loading order, since mine just replaces the parameters and not the whole entry.
It's not even that they're particularly affective, the aiming ability of the ai is notoriously trash, but it's the catharsis. This has been broken in the game for as long as I can remember, so it feels good to simply see them throw it.
Pilum is the best 1h spear in the game from the ones available to troops. Unusually high speed and handling makes it very good. I understand why this mod exists but you really nerfing your legions hard with this, if you have a melee focused army they'll be useless against even a few cav if you die, making a battle take forever and many of them will be trampled to death with their 50 length maces. It's not a bug it's intended to be 1h for unit balance and effectiveness. Devs just named it Pilum for flair, model is not even accurate to real pilums that romans used. So I dont even think of them as pilums.
Sorry for the delay on thanking you for the update. I was enjoying playing.
I am trying to do something similar for throwing weapons, yet the game keeps crashing and I know it's because I have absolutely no idea what I'm doing. I tried to use this mod as a guide to accomplish the changes but I'm definitely missing something.
1. What do you want to do? 2. What file are you trying to modify? 3. the id matches you are trying to modify, are not in the Base-File. Are you trying to modify items from a different Mod?
Maybe it would be best, if we could talk via Discord to get order into your ambitions.
Do you want to make a mod file or just change the entry in the Raw Files?
There is no "Cataphract Cavalry Lance" as Item, but a "Cataphract Lance" and a "Courser Lance" that is used by the "Imperial Cataphract" and the "Imperial Elite Cataphract".
I'll be explaining with the "Courser Lance" but this should be working with every weapon of the weapon_class "twohandedpolearm".
Let's do things step by step: 1. What Files are needed to find the right entry. 2. What needs to be done to make a lance being able to couch. 3. How to find the right entry. 4. How to modify the Entry directly 5. Why to make it a Mod
1. <Your Bannerlord Gamedirectory>\Modules\SandBoxCore\ModuleData\spnpccharacters.xml In this file is configured what units are in the game and what loadout they are wearing.
<Your Bannerlord Gamedirectory>\Modules\SandBoxCore\ModuleData\weapons.xml In this one is configured what weapons are in the game, what crafting_pieces are used and what proportions they have.
<Your Bannerlord Gamedirectory>\Modules\Native\ModuleData\weapon_descriptions.xml Here are the entry's, for features and their available crafting_pieces.
2. So to make a lance couch able, it must be of the weapon_class "twohandedpolearm" and all "crafting_pieces" that are used in this weapon need to be part of the List "AvailablePieces" of the ID "TwoHandedPolearm_Couchable" in the weapon_descriptions.xml.
3. The easiest way to find the right ones is to start with the unit, that uses the weapon. Especially if you are not playing in English, since all names in the xml files are in English. In this use case we are starting with the "Imperial Cataphract" and searching for it in the spnpccharacters.xml <NPCCharacter id="imperial_cataphract" default_group="Cavalry" level="26" name="{=u0UNwnw2}Imperial Cataphract" occupation="Soldier" culture="Culture.empire"> <face> <face_key_template value="BodyProperty.fighter_empire" /> </face> <skills> <skill id="Athletics" value="80" /> <skill id="Riding" value="130" /> <skill id="OneHanded" value="130" /> <skill id="TwoHanded" value="50" /> <skill id="Polearm" value="160" /> <skill id="Bow" value="60" /> <skill id="Crossbow" value="20" /> <skill id="Throwing" value="60" /> </skills> <upgrade_targets> <upgrade_target id="NPCCharacter.imperial_elite_cataphract" /> </upgrade_targets> <Equipments> <EquipmentRoster> <equipment slot="Item0" id="Item.empire_lance_2_t4" /> <equipment slot="Item1" id="Item.heavy_horsemans_kite_shield" /> <equipment slot="Item2" id="Item.empire_sword_5_t4" /> <equipment slot="Head" id="Item.imperial_goggled_helmet" /> <equipment slot="Body" id="Item.imperial_lamellar" /> <equipment slot="Gloves" id="Item.lordly_padded_mitten" /> <equipment slot="Leg" id="Item.lamellar_plate_boots" /> </EquipmentRoster> <EquipmentSet id="empire_troop_civilian_template_t3" civilian="true" /> <equipment slot="Horse" id="Item.t3_empire_horse" /> <equipment slot="HorseHarness" id="Item.imperial_scale_barding" /> </Equipments> </NPCCharacter> In this character entry we see a lot of Data, but only one is important right now. We are searching the Equipment of our Unit for a Lance. In this case there is only one EquipmentRoster and already the first entry is our searched lance "Item.empire_lance_2_t4".
Other Units have multiple EquipmentRosters with different weapons, then you have to make sure you are really having the right Item before making any changes.
After finding out the ID of our weapon we are switching to the weapon.xml, where we are searching directly after the ID. Important: The ID of the Weapon is only "empire_lance_2_t4" the part "Item." is only needed in foreign Files for reference reasons. <CraftedItem id="empire_lance_2_t4" name="{=VP74qdJ3}Courser Lance" crafting_template="TwoHandedPolearm" culture="Culture.empire" modifier_group="polearm"> <Pieces> <Piece id="spear_blade_4" Type="Blade" scale_factor="100" /> <Piece id="spear_handle_24" Type="Handle" scale_factor="100" /> </Pieces> </CraftedItem> As we can see, this entry is a lot more manageable. Here is a List of Pieces that this weapon is made of.
Now we have the list of crucial "crafting_pieces" that need to be registered for the feature couch. Let's take a look into the weapon_descriptions.xml, here we are searching for "couch". You should find the following Entry without issue. <WeaponDescription id="TwoHandedPolearm_Couchable" weapon_class="TwoHandedPolearm" item_usage_features="polearm:couch"> <WeaponFlags> <WeaponFlag value="MeleeWeapon" /> <WeaponFlag value="WideGrip" /> </WeaponFlags> <AvailablePieces> <AvailablePiece id="axe_craft_10_head" /> <AvailablePiece id="spear_blade_1" /> <AvailablePiece id="spear_blade_2" /> <AvailablePiece id="spear_blade_3" /> <AvailablePiece id="spear_blade_4" /> <AvailablePiece id="spear_blade_5" /> ... <AvailablePiece id="spear_handle_23" /> <AvailablePiece id="default_polearm_guard" /> ... <AvailablePiece id="mp_pilum_blade_extraammo" /> <!-- AvailablePieces,TwoHandedPolearm_Couchable --> </AvailablePieces> </WeaponDescription> I reduced this one to the most important Part, so it is easier to overview. As we can see, that the spear_blade_4 already exists, but the spear_handle_24 is missing.
4. Just to be sure you should open .xml Files with some kind of Editor (Editor, Notepad++, ...) not any Browser etc. The easiest way to change this fact is to add the spear_handle_24 in the same manner as the other pieces. ... <AvailablePiece id="spear_handle_23" /> <AvailablePiece id="spear_handle_24" /> <AvailablePiece id="default_polearm_guard" /> ... It should be look like this. Don't forget to save the file after changing it. Important Note: If you are changing it like this directly in the Game files every time you verify your Game files or there is a Game Update these changes will be reset.
5. To make these changes Permanent in your game and give other people as well the chance to enjoy this one you should make it into a mod. But this will need a little bit more time and insight, feel free to ask if you want some help there. I am always glad to help people, who want to improve the Game.
Thank you very much, I like to modify some things for myself because I consider that some mods make the soldiers very strong. I will try to do what you explained to me
Two quick questions: 1. Does this also allow other thowable polearms to be thrown or just the pilum? 2. Would the heads for the other polearms be affected by your crafting changes?
I am using a mod similar on Steam Workshop, but would rather avoid workshop mods.
To your questions: no, it does not alter any other polearms/spearheads. It does not restrict or allow anything to other spearheads. However, there are only two spearheads that are restricted throwing weapons. The pilum spearhead and the northern triangular spearhead.
The following flag in the crafting_pieces.xml are the reason why they will not be thrown from units. <Flags> <Flag name="NotStackable"/> </Flags>
Thanks for the response. The mod I am using from Steam Workshop uses an xml format to overwrite both the pilum spearhead and the northern triangular spearhead, while yours is using a xls format to patch the pilum spearhead. Is that correct?
Any chance you could do a version that also includes the northern triangular spearhead?
Is this mod supposed to change the Pilum to a stack of 3 for non-crafted Pilums? E.g. for Imperial Legionary or cheating the item in? Because it seems to only be throwable once for v1.2.8. I haven't tried to craft it.
Hey jamestec, I see what is causing the misunderstanding.
We need to differenciate between javelins and polearms (that can be thrown). What i changed is the stack amount of the pilumhead, this amount is used for Javelins. You can easily recognize them as they are always carried in the holster.
The Imperial Legionary uses the polearm variant, this one has no stack, only one exemplar.
But if you want, i could create an optional mod file that replaces the pilum polearm of the Legionary with a pilum javelin.
47 comments
I'm using mod "My Little Warband" and made unit with 170 lvl of throwing and polearm skill, give him Pilum/Triangular Throwing Spear, but he don't wont to use it as throwing weapon. He didn't wont to do thant even without your mod, but i hoped it will help hi, but unforchenatle its not. Regular throwing darts work well, but not throwing spears.
Can you please help me with thant?
since i don't use "My Little Warband", i can't say very much where the issue could be.
I had a quick look into the Mod-Data and i can say for sure, that the Files don't get overwritten.
But since there is a .dll File in it, some Part of the Source-Code is changed and so it could change the behavior of Troops.
What you could try, if you have "MLW" deactivated and give some Heros Pila, are they throwing it?
If Yes, then the issue lies with "MLW".
Please report the result, if you tried it out.
Best Regards
i hope my last Explanation did help you.
Well as for Modding-Tutorials, this can be a bit tricky depending on what you want to mod.
Usually you can find some Tutorials on YouTube, but i for my self tend to use the Moddocs from Taleworlds.
There are some Elements that are obsolete or no longer correct, but the whole Thing is pretty useful.
Especially this Tutorial should help you in the Beginnings.
Feel free to ask, if you get stuck on some part or just need a hint.
Have a good Time.
i checked the Files of this mod.
There seem to be no issues in using them together, they have no common files.
Just in Case, you can put my Mod after RBM in the loading order, since mine just replaces the parameters and not the whole entry.
Best Regards
Have a good time.
Sorry for the delay on thanking you for the update. I was enjoying playing.
I am trying to do something similar for throwing weapons, yet the game keeps crashing and I know it's because I have absolutely no idea what I'm doing. I tried to use this mod as a guide to accomplish the changes but I'm definitely missing something.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="ItemModifier[@id='legendary_arrows']/">
<xsl:attribute name="price_factor">3.2</xsl:attribute>
</xsl:template>
<xsl:template match="ItemModifier[@id='legendary_bolts']/">
<xsl:attribute name="price_factor">3</xsl:attribute>
</xsl:template>
<xsl:template match="ItemModifier[@id='legendary_axe_throwing']/">
<xsl:attribute name="price_factor">3</xsl:attribute>
</xsl:template>
<xsl:template match="ItemModifier[@id='legendary_knife_throwing']/">
<xsl:attribute name="price_factor">3</xsl:attribute>
</xsl:template>
<xsl:template match="ItemModifier[@id='balanced_knife_throwing']/">
<xsl:attribute name="damage">2</xsl:attribute>
<xsl:attribute name="speed">1</xsl:attribute>
</xsl:template>
<xsl:template match="ItemModifier[@id='legendary_spear_dart_throwing']/">
<xsl:attribute name="price_factor">3</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
1. What do you want to do?
2. What file are you trying to modify?
3. the id matches you are trying to modify, are not in the Base-File. Are you trying to modify items from a different Mod?
Maybe it would be best, if we could talk via Discord to get order into your ambitions.
Best Regards
Gangfreak
sure you are welcome.
Do you want to make a mod file or just change the entry in the Raw Files?
There is no "Cataphract Cavalry Lance" as Item,
but a "Cataphract Lance" and a "Courser Lance" that is used by the "Imperial Cataphract" and the "Imperial Elite Cataphract".
I'll be explaining with the "Courser Lance" but this should be working with every weapon of the weapon_class "twohandedpolearm".
Let's do things step by step:
1. What Files are needed to find the right entry.
2. What needs to be done to make a lance being able to couch.
3. How to find the right entry.
4. How to modify the Entry directly
5. Why to make it a Mod
1.
<Your Bannerlord Gamedirectory>\Modules\SandBoxCore\ModuleData\spnpccharacters.xml
In this file is configured what units are in the game and what loadout they are wearing.
<Your Bannerlord Gamedirectory>\Modules\SandBoxCore\ModuleData\weapons.xml
In this one is configured what weapons are in the game, what crafting_pieces are used and what proportions they have.
<Your Bannerlord Gamedirectory>\Modules\Native\ModuleData\weapon_descriptions.xml
Here are the entry's, for features and their available crafting_pieces.
2.
So to make a lance couch able, it must be of the weapon_class "twohandedpolearm" and all "crafting_pieces" that are used in this weapon need to be part of the List "AvailablePieces" of the ID "TwoHandedPolearm_Couchable" in the weapon_descriptions.xml.
3.
The easiest way to find the right ones is to start with the unit, that uses the weapon. Especially if you are not playing in English, since all names in the xml files are in English.
In this use case we are starting with the "Imperial Cataphract" and searching for it in the spnpccharacters.xml
<NPCCharacter
In this character entry we see a lot of Data, but only one is important right now. We are searching the Equipment of our Unit for a Lance. In this case there is only one EquipmentRoster and already the first entry is our searched lance "Item.empire_lance_2_t4".id="imperial_cataphract"
default_group="Cavalry"
level="26"
name="{=u0UNwnw2}Imperial Cataphract"
occupation="Soldier"
culture="Culture.empire">
<face>
<face_key_template
value="BodyProperty.fighter_empire" />
</face>
<skills>
<skill
id="Athletics"
value="80" />
<skill
id="Riding"
value="130" />
<skill
id="OneHanded"
value="130" />
<skill
id="TwoHanded"
value="50" />
<skill
id="Polearm"
value="160" />
<skill
id="Bow"
value="60" />
<skill
id="Crossbow"
value="20" />
<skill
id="Throwing"
value="60" />
</skills>
<upgrade_targets>
<upgrade_target
id="NPCCharacter.imperial_elite_cataphract" />
</upgrade_targets>
<Equipments>
<EquipmentRoster>
<equipment
slot="Item0"
id="Item.empire_lance_2_t4" />
<equipment
slot="Item1"
id="Item.heavy_horsemans_kite_shield" />
<equipment
slot="Item2"
id="Item.empire_sword_5_t4" />
<equipment
slot="Head"
id="Item.imperial_goggled_helmet" />
<equipment
slot="Body"
id="Item.imperial_lamellar" />
<equipment
slot="Gloves"
id="Item.lordly_padded_mitten" />
<equipment
slot="Leg"
id="Item.lamellar_plate_boots" />
</EquipmentRoster>
<EquipmentSet
id="empire_troop_civilian_template_t3"
civilian="true" />
<equipment
slot="Horse"
id="Item.t3_empire_horse" />
<equipment
slot="HorseHarness"
id="Item.imperial_scale_barding" />
</Equipments>
</NPCCharacter>
Other Units have multiple EquipmentRosters with different weapons, then you have to make sure you are really having the right Item before making any changes.
After finding out the ID of our weapon we are switching to the weapon.xml, where we are searching directly after the ID.
Important: The ID of the Weapon is only "empire_lance_2_t4" the part "Item." is only needed in foreign Files for reference reasons.
<CraftedItem
As we can see, this entry is a lot more manageable. Here is a List of Pieces that this weapon is made of.id="empire_lance_2_t4"
name="{=VP74qdJ3}Courser Lance"
crafting_template="TwoHandedPolearm"
culture="Culture.empire"
modifier_group="polearm">
<Pieces>
<Piece
id="spear_blade_4"
Type="Blade"
scale_factor="100" />
<Piece
id="spear_handle_24"
Type="Handle"
scale_factor="100" />
</Pieces>
</CraftedItem>
Now we have the list of crucial "crafting_pieces" that need to be registered for the feature couch.
Let's take a look into the weapon_descriptions.xml, here we are searching for "couch".
You should find the following Entry without issue.
<WeaponDescription
I reduced this one to the most important Part, so it is easier to overview.id="TwoHandedPolearm_Couchable"
weapon_class="TwoHandedPolearm"
item_usage_features="polearm:couch">
<WeaponFlags>
<WeaponFlag
value="MeleeWeapon" />
<WeaponFlag
value="WideGrip" />
</WeaponFlags>
<AvailablePieces>
<AvailablePiece
id="axe_craft_10_head" />
<AvailablePiece
id="spear_blade_1" />
<AvailablePiece
id="spear_blade_2" />
<AvailablePiece
id="spear_blade_3" />
<AvailablePiece
id="spear_blade_4" />
<AvailablePiece
id="spear_blade_5" />
...
<AvailablePiece
id="spear_handle_23" />
<AvailablePiece
id="default_polearm_guard" />
...
<AvailablePiece
id="mp_pilum_blade_extraammo" />
<!-- AvailablePieces,TwoHandedPolearm_Couchable -->
</AvailablePieces>
</WeaponDescription>
As we can see, that the spear_blade_4 already exists, but the spear_handle_24 is missing.
4.
Just to be sure you should open .xml Files with some kind of Editor (Editor, Notepad++, ...) not any Browser etc.
The easiest way to change this fact is to add the spear_handle_24 in the same manner as the other pieces.
...
It should be look like this. Don't forget to save the file after changing it.<AvailablePiece
id="spear_handle_23" />
<AvailablePiece
id="spear_handle_24" />
<AvailablePiece
id="default_polearm_guard" />
...
Important Note: If you are changing it like this directly in the Game files every time you verify your Game files or there is a Game Update these changes will be reset.
5.
To make these changes Permanent in your game and give other people as well the chance to enjoy this one you should make it into a mod.
But this will need a little bit more time and insight, feel free to ask if you want some help there. I am always glad to help people, who want to improve the Game.
Best Regards
Gangfreak
1. Does this also allow other thowable polearms to be thrown or just the pilum?
2. Would the heads for the other polearms be affected by your crafting changes?
I am using a mod similar on Steam Workshop, but would rather avoid workshop mods.
Great mod by the way. Thanks for making it.
glad to hear you like it.
To your questions: no, it does not alter any other polearms/spearheads.
It does not restrict or allow anything to other spearheads.
However, there are only two spearheads that are restricted throwing weapons.
The pilum spearhead and the northern triangular spearhead.
The following flag in the crafting_pieces.xml are the reason why they will not be thrown from units.
<Flags>
<Flag name="NotStackable"/>
</Flags>
For further Questions, feel free to ask.
Best Regards
Gangfreak
Any chance you could do a version that also includes the northern triangular spearhead?
you have a valid point there.
It is correct, that till now i only patched the pilum spearhead.
I didn't know, that the northern triangular spearhead was also used as throwing weapon from an regular unit.
I just made a update of my mod, now it includes the northern triangular spearhead.
Enjoy and have fun.
Best Regards
Gangfreak
Is this mod supposed to change the Pilum to a stack of 3 for non-crafted Pilums? E.g. for Imperial Legionary or cheating the item in? Because it seems to only be throwable once for v1.2.8. I haven't tried to craft it.
I see what is causing the misunderstanding.
We need to differenciate between javelins and polearms (that can be thrown).
What i changed is the stack amount of the pilumhead, this amount is used for Javelins.
You can easily recognize them as they are always carried in the holster.
The Imperial Legionary uses the polearm variant, this one has no stack, only one exemplar.
But if you want, i could create an optional mod file that replaces the pilum polearm of the Legionary with a pilum javelin.
Best Regards
Gangfreak