Picks, axes and hammers.

Users who are viewing this thread

Moldri

Sergeant
Is it possible to program, for example the steel pick, to use the blunt side of the weapon just like you can swich a javelin to a polearm?
I have tried fiddling with the module system, but I don't have almost any experience with it.
The forum search got me nowhere. But that could have been my own mistake. :grin:
Has this been done or even asked? This seems like a really good idea to me.
 
It's wholly possible, in fact you don't even need the module system if you want this for personal use.

You'd have to use OpenBRF and possibly a modelling program to make the model actually flip, though.
 

Lav

Sergeant Knight at Arms
M&BWB
Actually you do need a Module System for that, because programming such behavior means using itp_next_item_as_melee flag in item declaration, which means you must insert another item immediately after the pick which will screw all subsequent item ID's if done in a txt file.

Moldri, you can search module_items.py file for "long_axe"/"long_axe_alt" entry to see how to make an item with two melee modes. Then do as Austupaio said, make a copy of your item's mesh, rename it and flip around so it will use the blunt end. Then duplicate your item entry in module_items, add itp_next_item_as_melee in the first declaration and edit the second to use your new mesh and desired parameters.
 

Moldri

Sergeant
Thank you both very much. Doesn't sound like an extremely hard thing to do, even to me, but we'll see. :smile:
 

Lav

Sergeant Knight at Arms
M&BWB
Austupaio said:
As long as you start a new game, it's easy enough to do with Morgh's.
I doubt that. What happens to troop/hero equipment after all items after the modified one have their ID's shifted by one?

My prediction is that you'll see minstrels who wield torches instead of lyres, and some naked ladies in the castles (because the ID previously used by itm_court_dress will be used by itm_strange_short_sword) et cetera.

You cannot alter the sequence of items in compiled txt files without problems, and to add alternative wielding mode for an item you need to do exactly that. So I still claim that Module System is the only way to go.

If the goal was just to add a pickaxe which is using it's blunt side, without it being switchable between using pointed/blunt side, then true, Morgh's editor would be enough.
 
You can alter the order of items, but you need a proper decompiler/compiler that adjusts all item references, and as far as I know nobody released one.
 
Sorry, I should have clarified. Tack the old warhammer (with the itp_next_item_as_melee tag added) and the new flipped one on to the end of the items_txt with Morgh's is what I meant and seemed easiest to me.
 

Lav

Sergeant Knight at Arms
M&BWB
Ah, that's possible, and quite easy too. Sometimes I feel stupid for not seeing the most obvious solution. :smile:

Of course unless you fix equipment for all troops you'll still be looting old style warhammers from your enemies, but I guess that shouldn't be a big problem (and with a few tricks fixing troop eq can be done very easily).
 

Moldri

Sergeant
Why the mesh in module_items.py named steel_pick_new but in weapons_meshes1.brf just steel_pick? And when I try to build the module it says that "itp_one_handed" is not defined?
 

Azrooh

Baron
I tried something like this before, and I'm fairly sure that 'itp_next_item_as_melee' just keeps the model and changes the stats.
 

Lav

Sergeant Knight at Arms
M&BWB
Moldri said:
Why the mesh in module_items.py named steel_pick_new but in weapons_meshes1.brf just steel_pick? And when I try to build the module it says that "itp_one_handed" is not defined?
1. Because there's another mesh named steel_pick_new in the CommonRes brf files. There's more than one brf with weapon meshes there.
2. Check correct flag name in header_items.py
 
As a last resort, you can write a trigger that replaces the original weapon with a rotated blunt version and vice versa whenever a certain key is pressed then.
 

Swyter

Grandmaster Knight
M&BWBWF&S
Dusk Voyager said:
You can write a trigger that replaces the original weapon with a rotated blunt version and vice versa whenever a certain key is pressed.
The old hacks, looks like we can't live without them. An indissoluble part of our beloved game.
Even the devs prefer them instead of adding proper support. Mad world.


Vertex animation didn't worked for this?. Sorry but I haven't started with Warband items yet.
 

FrisianDude

Archduke
M&BWB
Swyter said:
Vertex animation didn't worked for this?
Not in the normal way, no. I think it has to change weapon type for it to work. You could use x to switch between two-handed and polearm mode and between one-handed and two-handed and to switch missile weapons to melee ones, but you can't switch, for example, a polearm for a polearm and a one-hander for a one-hander if you don't use a script like Dusk Voyager mentioned.
Which is rather a shame, ofcourse.
 

Moldri

Sergeant
FrisianDude said:
Not in the normal way, no. I think it has to change weapon type for it to work. You could use x to switch between two-handed and polearm mode and between one-handed and two-handed and to switch missile weapons to melee ones, but you can't switch, for example, a polearm for a polearm and a one-hander for a one-hander if you don't use a script like Dusk Voyager mentioned.
Which is rather a shame, ofcourse.
So it will not work? Hmm, I have atleast gotten to a point where I don't a ****load of errors when building the module. Only one in process_items saying "IndexError: list index out of range". I have no clue what that means.
 

FrisianDude

Archduke
M&BWB
Hmm, I think that's not to do with the x-function. IIrc asking it to change mesh in the same weapon type gave no error messages but just didn't work when you tried. But I might be mistaken, it's been a while.
 
Top Bottom