Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Create trap component using non-standard materials?  (Read 1266 times)

Gashcozokon

  • Bay Watcher
    • View Profile
Create trap component using non-standard materials?
« on: February 09, 2020, 11:03:49 pm »

I have a fort with an absurdly large quantity of gold in the mountains and as such I wanted to do it's sort of an Aztec build and for thematic reasons was hoping to be able to make menacing golden spikes.

Is there a tag that I can add to the existing trap component to allow use of gold bars in construction, or should I go to reaction_other.txt and create a custom recipe all together?
Logged

.

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: Create trap component using non-standard materials?
« Reply #1 on: February 10, 2020, 07:16:25 am »

I'd go with a custom reaction.

To a trapcomp you can command nothing.

To a material you can command
[ITEMS_WEAPON]
[ITEMS_WEAPON_RANGED]
[ITEMS_AMMO]
[ITEMS_DIGGER]
[ITEMS_ARMOR]
[ITEMS_ANVIL]
[ITEMS_HARD]
[ITEMS_METAL]
[ITEMS_BARRED]
[ITEMS_SCALED]
I guess trapcomp are commanded via the ITEMS_WEAPON.

here's some silver/gold/brass/lead reactions I've added to OldGenesis (due to mining a hella lot silver..)
Spoiler (click to show/hide)

remember to add the new reaction to your dwarf entity, to allow it.
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

Gashcozokon

  • Bay Watcher
    • View Profile
Re: Create trap component using non-standard materials?
« Reply #2 on: February 15, 2020, 01:29:50 pm »

Nice! Thank you, I look forward to trying these out. I also have a few custom glass reactions, they work but the items produced do not show any material description, I am researching more info on how the [reaction] tags work, as I suspect that is my issue.

Code: (reaction_other.txt) [Select]
[REACTION:CUSTOM_CART_GLASS]
    [NAME:Construct glass minecart]
    [BUILDING:CRAFTSMAN:NONE]
    [REAGENT:A:1:ROUGH:NONE:NONE:NONE][GLASS_MATERIAL]
    [PRODUCT:100:1:ITEM:ITEM_TOOL_MINECART:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
 [SKILL:GLASSMAKER]

just a guess from looking at your reactions might be:
[reagent:A:1:ROUGH:NO_SUBTYPE:GLASS:GLASS]
I'm still figuring things out.
Logged

.

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: Create trap component using non-standard materials?
« Reply #3 on: February 15, 2020, 04:09:13 pm »

All right.  REAGENT:A:1:ROUGH:NONE:GLASS_GREEN:NONE is the common green glass reagent.

your "from any glass" type [REAGENT:A:1:ROUGH:NONE:NONE:NONE]  [GLASS_MATERIAL]
is good too.

Spoiler (click to show/hide)
« Last Edit: February 15, 2020, 04:12:34 pm by TomiTapio »
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

Gashcozokon

  • Bay Watcher
    • View Profile
Re: Create trap component using non-standard materials?
« Reply #4 on: February 15, 2020, 08:25:24 pm »

Fancy! I was thinking i was going to have to tripple the reactions.
The GLASS_MAYERIAL route will accept green or clear glass, but both only produce  "minecart" not  "clear glass minecart" so i will change the tags and see what happens. I wish the reaction
Logged

.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Create trap component using non-standard materials?
« Reply #5 on: February 16, 2020, 08:39:19 am »

Nice! Thank you, I look forward to trying these out. I also have a few custom glass reactions, they work but the items produced do not show any material description, I am researching more info on how the [reaction] tags work, as I suspect that is my issue.

Code: (reaction_other.txt) [Select]
[REACTION:CUSTOM_CART_GLASS]
    [NAME:Construct glass minecart]
    [BUILDING:CRAFTSMAN:NONE]
    [REAGENT:A:1:ROUGH:NONE:NONE:NONE][GLASS_MATERIAL]
    [PRODUCT:100:1:ITEM:ITEM_TOOL_MINECART:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
 [SKILL:GLASSMAKER]
Your reagent was correct, but your product was bad - you've got an extra "NONE" token in the middle (i.e. it should be "[PRODUCT:100:1:ITEM:ITEM_TOOL_MINECART:GET_MATERIAL_FROM_REAGENT:A:NONE]").
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.