Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: [SOLVED] Remove the standard reaction for armour/weapons?  (Read 1188 times)

SpeardwarfErith

  • Bay Watcher
    • View Profile
[SOLVED] Remove the standard reaction for armour/weapons?
« on: August 20, 2018, 03:11:32 pm »

I'm making a mod that, among other things, adds scale and lamellar armour. I want the process of crafting these to be rather long, and I have a series of custom reactions for it- For example, a scale shirt is made by producing several stacks of scales, then riveting them to a a leather shirt.

My issue is that because these armours have the [METAL] tag, these reactions are useless- They can just be produced in one easy step through the "armour" submenu of the forge. Removing the [METAL] token from their raws fixes this, but also stops them from appearing naturally in the world. This occurs despite the fact that the civilization has access to both the scale-making and scale-riveting reactions.

Is there a way to force the player to use the custom reactions, while still giving world-gen civs access to my armour?
« Last Edit: August 23, 2018, 04:18:20 pm by SpeardwarfErith »
Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #1 on: August 20, 2018, 04:18:15 pm »

Not without DFhackery. Not sure if anyone has written a script to either remove those reactions or make them produce something else instead, would be interested if someone has.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Remove the standard reaction for armour/weapons?
« Reply #2 on: August 20, 2018, 05:34:15 pm »

Make their Material size extremely large, so people dont use the forge?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

SpeardwarfErith

  • Bay Watcher
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #3 on: August 20, 2018, 05:39:51 pm »

Make their Material size extremely large, so people dont use the forge?

I thought of that, but that seems somewhat exteremely inelegant.
Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Remove the standard reaction for armour/weapons?
« Reply #4 on: August 20, 2018, 06:30:42 pm »

Well, welcome to df modding. Either your civ can make it, but so can the player, or the player cant make it in the forge, but neither can your worldgen civ.

In short: items from custom reactions wont be used in worldgen.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

SpeardwarfErith

  • Bay Watcher
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #5 on: August 20, 2018, 08:56:05 pm »

Well, [MATERIAL_SIZE:9999] here I come...
Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Remove the standard reaction for armour/weapons?
« Reply #6 on: August 22, 2018, 08:40:31 am »

What's so bad about worldgen not using it? People still have it in their forts.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

SpeardwarfErith

  • Bay Watcher
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #7 on: August 22, 2018, 06:47:46 pm »

It's just that this is an overhaul, not an add-on. If the civs don't have it, they'll show up naked.
Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Remove the standard reaction for armour/weapons?
« Reply #8 on: August 22, 2018, 07:44:10 pm »

Thinking about it, doesn't MATERIAL_SIZE also affect the (m)elt option? so melting a piece could give you insane amounts of it?

Logged

SpeardwarfErith

  • Bay Watcher
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #9 on: August 22, 2018, 08:47:44 pm »

Not to mention that your dwarves will literally haul every single metal bar in your fortress to the workshop before giving the not enough bars error...
Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #10 on: August 22, 2018, 10:09:08 pm »

So I'm wondering, is it possible to use DFhack to transform whatever output a default reaction has into something else? I know that's possible with raw modded reactions so it shouldn't be a huge stretch for default ones.

If you can do that you can just turn whatever output the default reactions has either into nothing or some unfinished product.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

SpeardwarfErith

  • Bay Watcher
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #11 on: August 23, 2018, 10:10:12 am »

Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

SpeardwarfErith

  • Bay Watcher
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #12 on: August 23, 2018, 11:26:45 am »

By Armok, I have been blind. I present to you straight from the DFHack documentation page for the Eventful plugin the following excerpt:

Quote
2. removeNative(shop_name)

Removes native choice list from the building.

I will test it to see how it works, and hopefully I can mark this as [SOLVED]
Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

SpeardwarfErith

  • Bay Watcher
    • View Profile
Re: Remove the standard reaction for armour/weapons?
« Reply #13 on: August 23, 2018, 04:18:04 pm »

After finally finding out what eventful refers to forges as, I have been able to use the following code to remove the natural reactions from the forge. Thankfully, eventful is managed by a lua script, so I can hopefully recreate the removeNative function in such a way that it only targets a specific reaction.

Code: [Select]
eventful = require "plugins.eventful"
eventful.removeNative("METALSMITHSFORGE")
eventful.addReactionToShop("FORGE_SCALES_COPPER", "METALSMITHSFORGE")
eventful.addReactionToShop("FORGE_SCALES_BRONZE", "METALSMITHSFORGE")
eventful.addReactionToShop("FORGE_SCALES_BISMUTH", "METALSMITHSFORGE")
--etc etc etc
Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SOLVED] Remove the standard reaction for armour/weapons?
« Reply #14 on: August 24, 2018, 02:49:35 am »

Once you do have the final solution, please post it for others to use too. :-)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::
Pages: [1] 2