Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Weapon crafting question(s)!  (Read 450 times)

Alyfox

  • Bay Watcher
    • View Profile
Weapon crafting question(s)!
« on: November 07, 2019, 01:41:43 am »

Entirely possible that this has been answered and explained thoroughly somewhere - my search-fu on the forums and the wiki has been weak
Is it possible to mod the game to allow dwarven weaponsmiths to craft weapons normally considered exotic/non-standard? Id love to be able to craft flails, mauls, halberds and morning stars especially
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #1 on: November 07, 2019, 05:02:46 am »

Yes, I'm sure it is (I've never done it, though).

I'd expect all you'd have to do is to add the desired items to the dorf section of entity_defaults.txt. I'd expect you could just copy the weapon tags you want from the humie section to get the names right.

Someone who actually know will probably come along and provide verified information.

Edit: Note that it won't make dorfs able to wield weapons too large for dorfs, but if you're accepting humie petitions you ought to be able to outfit those with the big weapons.
« Last Edit: November 07, 2019, 05:08:17 am by PatrikLundell »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Weapon crafting question(s)!
« Reply #2 on: November 07, 2019, 05:21:02 am »

In an existing save, you would need a dfhack script. Also works for missing high boots and such.

DerMeister

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #3 on: November 07, 2019, 06:27:25 am »

If mod dwarves and add them blowdarts, it will be made in number as bolts?
Logged

Ulfarr

  • Bay Watcher
  • Dabbling modder, Adequate Thread Derailer
    • View Profile
Re: Weapon crafting question(s)!
« Reply #4 on: November 07, 2019, 02:19:06 pm »

Probably yes. Customs civs with arrows as ammo get automatically reactions for 25 wooden arrows and 5 bone arrows respectively. I haven't tried it with blowdarts but it stands to reason that it works for them too.

Alyfox

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #5 on: November 07, 2019, 08:06:30 pm »

In an existing save, you would need a dfhack script. Also works for missing high boots and such.

was going to do it then create a new world; once a world has been gen'd I avoid messing with the raws
Logged

DerMeister

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #6 on: November 07, 2019, 08:35:23 pm »

Probably yes. Customs civs with arrows as ammo get automatically reactions for 25 wooden arrows and 5 bone arrows respectively. I haven't tried it with blowdarts but it stands to reason that it works for them too.
Arrows are the same size as bolts. But blowdarts is smaller.
Logged

Alyfox

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #7 on: November 08, 2019, 03:49:33 am »

Another question: The wiki indicates that due to their size, its often unlikely that dwarves will be able to equip 2 handed weapons. If I change their body size (up to 80000 from 60000) I assume this will make it more likely for them to be able to do so; however, will this change break anything?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #8 on: November 08, 2019, 05:01:50 am »

It's probably a bug, but currently the ability to wield a weapon is tied to the race size, not the size of the individual, so it doesn't matter how big and beefy a dorf is if the race number is too low.

If you change the race size of dwarves to be the same as that of humies they should be able to use the same weapons that humies can. A side effect of that is that dwarves and humies would be able to share clothes, while elves and gobbos fall into a smaller size tier. If the objective was to allow dorfs to use weapons sized for humies I would make them the same size, as that should eliminate the risk of some weapons falling within the limits and others not.
I doubt a moderate change of the size of dorfs would break anything (if you were to try to make them giant or gremlin size you might run into various issues). After all, humies seem to work fairly well in dwarven fortresses.

The other alternative would be to change the raws of each weapon of interest to set its restriction to match the dwarven size (I assume that can be done, but I haven't actually looked at the raws).
Logged

Ulfarr

  • Bay Watcher
  • Dabbling modder, Adequate Thread Derailer
    • View Profile
Re: Weapon crafting question(s)!
« Reply #9 on: November 08, 2019, 08:53:12 am »

The other alternative would be to change the raws of each weapon of interest to set its restriction to match the dwarven size (I assume that can be done, but I haven't actually looked at the raws).

I've done it before and it works. You just need to change [MINIMUM_SIZE:62500] to [MINIMUM_SIZE:60000]. The only side effect will be that it will also let goblins, elves or any other humanoid at that size group to use said weapons if they can get them somehow. The condition for whether they'll use them with one or two hands will still apply.

Alyfox

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #10 on: November 08, 2019, 07:01:06 pm »

Alright so I backtracked on my changing dwarves base body size (IE kept it at 60k), changed weapons in items_weapon.txt to have smaller minimum sizes.

For adding it to dwarves so that they can craft them, I just put 

"   [WEAPON:ITEM_WEAPON_PIKE]"

into their list in the entity_default.txt ? or does it need to go somewhere else as well?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #11 on: November 10, 2019, 05:26:31 am »

That ought to be the only reference needed. I see no reason for a need for a change elsewhere, and Toady is generally rather good at avoiding redundancies.

Again, it would be best if someone who's actually done it could confirm it (or, if you're impatient, you could just embark with fuel and metal bars, build a forge, produce the weapon, create a squad, and assign the weapon. There's a decent chance you'd have that done before a confirmation comes along).
Logged

Ulfarr

  • Bay Watcher
  • Dabbling modder, Adequate Thread Derailer
    • View Profile
Re: Weapon crafting question(s)!
« Reply #12 on: November 10, 2019, 05:28:04 am »

Just in their list in entity_default.txt. The game will then give them the necessary reactions on its own.

Ant

  • Bay Watcher
    • View Profile
Re: Weapon crafting question(s)!
« Reply #13 on: November 19, 2019, 09:08:52 am »

In an existing save, you would need a dfhack script. Also works for missing high boots and such.

Hallo, the link to DL doesn't connect to anything. Is there still a lua for this?

Nvm, found it, was little more down.
« Last Edit: November 19, 2019, 10:28:39 am by Ant »
Logged