Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Adding a Lucerne Hammer  (Read 830 times)

Spectre9000

  • Bay Watcher
    • View Profile
Adding a Lucerne Hammer
« on: September 09, 2016, 03:54:01 am »

So, I'm trying to add an entirely new weapon to the game, and I'm not sure what all would be needed to do this.

So far this is the weapon entry I've created:

[ITEM_WEAPON:ITEM_WEAPON_LUCERNE_HAMMER]
[NAME:lucerne hammer:lucerne hammers]
[SIZE:1200]
[SKILL:HAMMER]
[TWO_HANDED:77500]
[MINIMUM_SIZE:60000]
[MATERIAL_SIZE:5]
[ATTACK:BLUNT:10:5000:bash:bashes:NO_SUB:2500]
   [ATTACK_PREPARE_AND_RECOVER:3:3]
[ATTACK:EDGE:20:10000:stab:stabs:NO_SUB:1000]
   [ATTACK_PREPARE_AND_RECOVER:3:3]
[ATTACK:BLUNT:20000:6000:bash:bashes:shaft:1250]
   [ATTACK_PREPARE_AND_RECOVER:3:3]

I've modeled it off the Halberd, modeled its main attack off the war hammer, adding more penetration to account for it not being a flat hammer head, but a pronged one (not that penetration is even taken into account for blunt), and modeled its stab attack after the spear as a Lucerne Hammer had a pronounced spike on the end akin to the spear. I don't know how to simulate the crows beak though, as it was as much for utility as punching through armor.

Anyway, I'm wondering if its stats are a little op and what adjustments need to be made to make it more balanced, if any. Most likely a dwarf would be giving up a shield for use it, so there's that trade off. Also, would I possibly create a new skill for this type of weapon as it has very prominent spear and hammer aspects?

Where all would I need to edit to get this first to actually work, and second into a current game?
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Adding a Lucerne Hammer
« Reply #1 on: September 09, 2016, 05:44:32 am »

1: You can make a spike-like attack with something like [ATTACK:EDGE:10:500:spike:spikes:NO_SUB:1500].
2: Vanilla weapon balance is wonky already, but you can just test the weapon in the arena and modify the attack's velocity (the last number is a velocity multiplier)
3: You can force entity characters (invaders, adventure mode soldiers, caravan guards, etc) to use no shield by giving the weapon the PIKE skill.
4: Adding more skills is sadly not possible, though you can rename them by using the profession tags in the dwarf creature file, as such: [PROFESSION_NAME:PIKEMAN:stavesdwarf:stavesdwarves]
5: The combat AI gives EDGE attacks a 100 times more priority than BLUNT ones, unless there is a special opportunity attack generated for one. You can get around this by making an EDGE attack with no penetration depth which will function the same as a blunt one, with the right priority. One downside is that the combat text will say things like 'cloven asunder' instead of the blunt equivalent. In this case you can add a small amount of penetration (80 or so) to simulate the prongs on the hammerhead.
Currently there is no way to make the AI use one edged attack more than the other, but you can copy-paste one for the same effect.

To make the weapon actually show up ingame, add [WEAPON:ITEM_WEAPON_LUCERNE_HAMMER] to entity_default under the dwarf entry, and whoever else you want to give it to.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Spectre9000

  • Bay Watcher
    • View Profile
Re: Adding a Lucerne Hammer
« Reply #2 on: September 09, 2016, 07:24:05 am »

1: You can make a spike-like attack with something like [ATTACK:EDGE:10:500:spike:spikes:NO_SUB:1500].
2: Vanilla weapon balance is wonky already, but you can just test the weapon in the arena and modify the attack's velocity (the last number is a velocity multiplier)
3: You can force entity characters (invaders, adventure mode soldiers, caravan guards, etc) to use no shield by giving the weapon the PIKE skill.
4: Adding more skills is sadly not possible, though you can rename them by using the profession tags in the dwarf creature file, as such: [PROFESSION_NAME:PIKEMAN:stavesdwarf:stavesdwarves]
5: The combat AI gives EDGE attacks a 100 times more priority than BLUNT ones, unless there is a special opportunity attack generated for one. You can get around this by making an EDGE attack with no penetration depth which will function the same as a blunt one, with the right priority. One downside is that the combat text will say things like 'cloven asunder' instead of the blunt equivalent. In this case you can add a small amount of penetration (80 or so) to simulate the prongs on the hammerhead.
Currently there is no way to make the AI use one edged attack more than the other, but you can copy-paste one for the same effect.

To make the weapon actually show up ingame, add [WEAPON:ITEM_WEAPON_LUCERNE_HAMMER] to entity_default under the dwarf entry, and whoever else you want to give it to.

3. Do enemies not perform a two-handed check? Also, I've added weapons to my current game and they aren't showing up as craftable. Any help?

5. I've never heard of this. Could you point me to where I can read more on the game preferring EDGE attacks to BLUNT? Also, if you can copy paste an attack to trick the AI into using it more, could I not copy paste the BLUNT attack total 197 entries (since there are two edge attacks and 1 other blunt) for it to be used 99% of the time for example?

« Last Edit: September 09, 2016, 07:27:03 am by Spectre9000 »
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Adding a Lucerne Hammer
« Reply #3 on: September 09, 2016, 08:17:45 am »

NPC with any weapon skill other than pike get generated with a shield and a random weapon of that skill that is assigned to their entity, not even removing shields entirely changes that. They will get a penalty for one-handing a two-handed weapon.

You can't add items in the middle of a game, sadly. You can add an existing item to your entity, but new items need to have a new world generated. You could sacrifice a vanilla weapon and replace its raws with the lucerne though.

I can't find any wiki page about combat AI, and the general combat page is a bit sparse in details, but the priority effect is pretty noticeable in the arena if you just look at the combat log. I know the attack priority is noted somewhere, but don't recall where exactly.

I hadn't considered copying the attack a few hundred times though hahah, it should work, but the combat menu in adventure mode will get pretty spammy. It won't get used 99% of the time that way though, just about as much as the edged attacks.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!