Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Is it possible to restrict weapons to certain materials?  (Read 1061 times)

Ptasznikt

  • Bay Watcher
    • View Profile
Is it possible to restrict weapons to certain materials?
« on: March 09, 2019, 02:04:35 am »


I've recently started playing with modding and felt the immense need to see my dwarves wielding khopeshi (Egyptian sickle swords). Realistically, they were quite useful and fell out of use, because introduction of iron basically phased them out. Is it possible to mod the weapon in the way, that it wouldn't accept iron, but accept bronze or copper?
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: Is it possible to restrict weapons to certain materials?
« Reply #1 on: March 09, 2019, 04:28:55 am »

Yes, but you'll need to make a custom reaction that produces the khopesh. You can then limit what  raw materials  (reagents) it accepts by using a reaction class. You 'll have to also add said reaction class to the materials you want to use. This will be enough if you just want to produce them yourself at your own fort.

Now if you want to also get them through caravans, it will be more complicated. You'll need to add a [WEAPON:ITEM_WEAPON_X] entry to your civ's raws but doing so will enable your weaponsmith to make them from any available metal. The only way around this problem (that I know) is to limit what resources are available to the whole civ and that will mess with all the other weapons/items.
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

Ptasznikt

  • Bay Watcher
    • View Profile
Re: Is it possible to restrict weapons to certain materials?
« Reply #2 on: March 09, 2019, 05:16:21 am »

Thank you.
That solves problems, I haven't tried to think about. It even makes it easier.
Logged

Ptasznikt

  • Bay Watcher
    • View Profile
Re: Is it possible to restrict weapons to certain materials?
« Reply #3 on: March 30, 2019, 07:21:17 am »

Instead of making a new post, I'll continue with the matter.

If I do not add the khopesh to the Civ:Entity as a weapon, but I'll ad
Yes, but you'll need to make a custom reaction that produces the khopesh. You can then limit what  raw materials  (reagents) it accepts by using a reaction class. You 'll have to also add said reaction class to the materials you want to use. This will be enough if you just want to produce them yourself at your own fort.

Now if you want to also get them through caravans, it will be more complicated. You'll need to add a [WEAPON:ITEM_WEAPON_X] entry to your civ's raws but doing so will enable your weaponsmith to make them from any available metal. The only way around this problem (that I know) is to limit what resources are available to the whole civ and that will mess with all the other weapons/items.

If I skip adding a [WEAPON:ITEM_WEAPON_x] to the civ's raws, but I'll add let's say FORGE_STRANGEMETAL_KHOPESH to the permitted reaction, will I let the whole civ ability to forge strangemetal khopeshes/khopeshi?
Logged