Is it possible to make a weapon couch-only? As in unable to actively stab? Is it possible to teach the AI to use it?
I'm trying to make a medieval knightly lance that can outreach most spears *while* couched, but cannot be used to stab actively. I would give them to the Vlandian Banner Knights.
It is possible to do what you are wanting, but I do not know how the AI would use it. Using this mod, the AI seems to couch lance if they are going fast enough, but they stab if they are not going fast enough.
Each spear/lance uses at least 2 pieces from crafting_pieces.xml (Native module) - a Spear Handle and a Spear Head. For the usages for the pieces, find <PieceUsages unavailable_usages= under the piece and you can add OneHandedPolearm:TwoHandedPolearm to make a piece not able to be used for 1h or 2h stabbing.
I think your best bet may be to create new pieces entirely for your lance, to make sure that no other troops are accidentally using the spear handle and head that you modify. Also, you may want to give the banner knights faster horses so that they actually couch more often
I've tested it and very surprisingly the AI didn't completely go to shit. It's not perfect but it's far better than I expected. Sometimes they would charge in with secondary weapon when they are fast enough for couch, and sometimes they'd hold the lance like an idiot when stuck in melee, but I expected far worse.
I've a question though, the game crashes when loading a save if I try to have an existing item (Vlandian Heavy Lance) use a different handle. I have to modify the properties of the handle that they're using. Even then, the duplicate "Couchable" bug appears. It even happens if I replace the vanilla file directly instead of using a module. Any idea why? I do recall that your mod also produced duplicate "Couchable" "Two-Handed" etc.
I have never seen the duplicate couch lance icon myself. Some people said they were getting the duplicate, but didn't provide much information for me to try to reproduce it. I just did a test with what you are trying to do - I changed the spear handle in spitems.xml for Vlandian Heavy Lance from spear_handle_19 to spear_handle_24 and my saved game loaded up just fine. Also no duplicate couch icon.. I tried spear_handle_25 and changed the scale to 200 also with no issues
Are you using any other mods that modify spitems.xml?
I also tried changing the handle to spear_handle_24 and spear_handle_25 with no issue. It's when I try to change it to spear_handle_7 (which has the longest length of 295) that the game crashes. It appears that it is a pike shaft that has to be added to the spear section in crafting_templates.
Also, I think the scale factor in spitems only changes how the weapon looks visually and not the actual hitbox. You'd have the same range no matter how long or short you make it look. The actual length is set in crafting_pieces.
Upon further testing, the duplicate bug appears when a CraftedItem in spitems is added in a module. Nothing to do with your mod. Editing the spitem file in SandBoxCore directly eliminated that bug. Weird behavior, as the Items in spitems like armor and arrows are perfectly fine being in modules.
Just cameback to tell you thank you, do someone has strange behavior with spears lately after game patch e1.1.0? (I see double icons of "Couch" lances everythere)
+1 i tried deleting and reapplying the mod, deleting saves and starting a new game but so far nothing did the trick. double descriptions are a pain in the ass and just pure eye fuckery.. all of them, so far, couch tho, so there's that.. interestingly enough, a crafted glaive i made has proper descriptions... as in, no duplicates.
56 comments
I'm trying to make a medieval knightly lance that can outreach most spears *while* couched, but cannot be used to stab actively. I would give them to the Vlandian Banner Knights.
Each spear/lance uses at least 2 pieces from crafting_pieces.xml (Native module) - a Spear Handle and a Spear Head. For the usages for the pieces, find <PieceUsages unavailable_usages= under the piece and you can add OneHandedPolearm:TwoHandedPolearm to make a piece not able to be used for 1h or 2h stabbing.
I think your best bet may be to create new pieces entirely for your lance, to make sure that no other troops are accidentally using the spear handle and head that you modify. Also, you may want to give the banner knights faster horses so that they actually couch more often
I've a question though, the game crashes when loading a save if I try to have an existing item (Vlandian Heavy Lance) use a different handle. I have to modify the properties of the handle that they're using. Even then, the duplicate "Couchable" bug appears. It even happens if I replace the vanilla file directly instead of using a module. Any idea why? I do recall that your mod also produced duplicate "Couchable" "Two-Handed" etc.
Are you using any other mods that modify spitems.xml?
Also, I think the scale factor in spitems only changes how the weapon looks visually and not the actual hitbox. You'd have the same range no matter how long or short you make it look. The actual length is set in crafting_pieces.
Upon further testing, the duplicate bug appears when a CraftedItem in spitems is added in a module. Nothing to do with your mod. Editing the spitem file in SandBoxCore directly eliminated that bug. Weird behavior, as the Items in spitems like armor and arrows are perfectly fine being in modules.
Thanks so much for your help so far.
i tried deleting and reapplying the mod, deleting saves and starting a new game but so far nothing did the trick. double descriptions are a pain in the ass and just pure eye fuckery.. all of them, so far, couch tho, so there's that..
interestingly enough, a crafted glaive i made has proper descriptions... as in, no duplicates.