Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Worldgen-generated equipment and custom reactions?  (Read 471 times)

squishynoob

  • Bay Watcher
    • View Profile
Worldgen-generated equipment and custom reactions?
« on: January 01, 2013, 12:57:42 pm »

Alright, the premise is that I'm trying to replace the default chain mail armor - the reason for that is that...
Spoiler: boring story (click to show/hide)

So I've removed structural elasticity and [METAL] tag so they won't make it out of the ordinary metal materials, but only with special materials like INORGANIC:METAL_CHAIN with impact yield values such that blunt damage will pretty much ignore it the way it does in vanilla. I also removed [ITEM_WEAPONS] etc. from such materials.

Spoiler: armor raws (click to show/hide)

Spoiler: metal chain example (click to show/hide)
I've added this line to metal materials:
Code: [Select]
[MATERIAL_REACTION_PRODUCT:CHAIN_MAT:INORGANIC:IRON_CHAIN](added this to iron)
Then I've created a reaction to create armor from a ordinary metal bar.

Spoiler: reaction raws (click to show/hide)

And added it to the human civ. I've also forced them to use mail shirts and not breastplates or leather.
Spoiler: entity raws (click to show/hide)

The result is that soldiers go around with «rope reed fiber mail shirts».

The errorlog doesn't say anything about it. Only one duplicate creature that I forgot to fix.
Do randomly generated armors not support custom reactions or did I mess up?


PS: to be clearer, the goal is for the equipment to appear in adventure mode. Shops, dungeons, bandits, guards... I haven't tried in fort mode, but similar things worked and they should work now. If they don't, it's ok. If they do, even better.
« Last Edit: January 01, 2013, 01:06:07 pm by squishynoob »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Worldgen-generated equipment and custom reactions?
« Reply #1 on: January 01, 2013, 01:38:32 pm »

Quote
Do randomly generated armors not support custom reactions or did I mess up?

Custom items, that are made in reactions, and not by enabling them in the entity file, are not produced by civs in worldgen.

This means: You add armor:item_armor_mailshirt to the entity, they will have it.
You add permitted_reaction:mailshirt and make a mailshirt reaction, they will not have it.

The same is true for toys, instruments, weapons, tools, anything really. Bars are an exception. If you give them a custom reaction for a metal bar, they start trading those, and make all sorts of items from them.
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 :::