Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Reaction] Burn wooden object to ash  (Read 1636 times)

Ygvir

  • Bay Watcher
    • View Profile
[Reaction] Burn wooden object to ash
« on: July 10, 2015, 03:13:24 pm »

I'm trying to make a reaction that will allow me to take my low quality furniture and other things (like elven crafts, etc) and turn them into useful ash (or charcoal). Here is what I've tried.

[REACTION:MAKE_WAX_CRAFTS]
   [NAME:Burn wooden object to ash]
   [BUILDING:KILN:CUSTOM_P]
   [REAGENT:A:1:NONE:NONE:ANY_PLANT_MAT:WOOD]
   [PRODUCT:100:1:BAR:NONE:ASH:NONE][PRODUCT_DIMENSION:150]
   [SKILL:WOOD_BURNER]

Unfortunately, my little workers will happily take my ANVIL (no, it isn't wood) and turn it into ash. While this is hilarious, it isn't quite what I had in mind. Can anyone give me a hand?

While I'm at it, I'd also like to do the same with cloth goods. I'd also like to be able to limit it by quality (I suspect this isn't possible but I thought I should ask) and perhaps require a minimum size - to preserve a little realism.
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: [Reaction] Burn wooden object to ash
« Reply #1 on: July 10, 2015, 11:02:00 pm »

ANY_PLANT_MAT is not a valid argument. The closest to that would be the tag [ANY_PLANT_MATERIAL]

To specify a plant material as an argument, you would put PLANT_MAT:plant id:material id

For example, [REAGENT:A:1:NONE:NONE:PLANT_MAT:MUSHROOM_HELMET_PLUMP:STRUCTURAL] would specify plump helmets.

You could try this, but I do not actually know if it would work:
[REAGENT:A:1:NONE:NONE:PLANT_MAT:NONE:WOOD]
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: [Reaction] Burn wooden object to ash
« Reply #2 on: July 11, 2015, 12:44:51 am »

Hmm. There's no explicit "WOODEN_CRAP_ONLY" token, but try this:

Code: [Select]
[REAGENT:A:1:NONE:NONE:NONE:NONE]
[ANY_PLANT_MATERIAL]
[HARD_ITEM_MATERIAL]

It should look for items of whatever kind, made of whatever kind of material that is both subordinate to a plant and has ITEMS_HARD. From what I can figure, wood is the only plant-associated material that fits that criteria.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: [Reaction] Burn wooden object to ash
« Reply #3 on: July 11, 2015, 10:04:38 am »

You could try this, but I do not actually know if it would work:
[REAGENT:A:1:NONE:NONE:PLANT_MAT:NONE:WOOD]
It will not work, because it's not possible to translate WOOD into a plant material index if the game doesn't know which plant it's dealing with.

What you need to do is add [REACTION_CLASS:WOOD] to the WOOD_TEMPLATE material template and specify [REACTION_CLASS:WOOD] in the reaction reagent.
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.

Ygvir

  • Bay Watcher
    • View Profile
Re: [Reaction] Burn wooden object to ash
« Reply #4 on: July 11, 2015, 08:54:32 pm »

Quietust - that is obviously the most elegant solution. Can I modify a WOOD_TEMPLATE without a world regen?

I was hoping to mod it into an existing game (that's why I'm using the MAKE_WAX_CRAFTS reaction).

scamtank - It does seem like that ought to work.

I'll try both of these ideas it later today or tomorrow when I get a chance.

Thanks  for all the help!

Edit: spelled Quietust correctly. I can't believe I screwed it up... I blame muscle memory.
« Last Edit: July 12, 2015, 10:06:36 am by Ygvir »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: [Reaction] Burn wooden object to ash
« Reply #5 on: July 11, 2015, 09:01:42 pm »

Quietest - that is obviously the most elegant solution. Can I modify a WOOD_TEMPLATE without a world regen?
1. Yes, you can modify a material template without generating a new world.
2. it's spelled "Quietust", with a "u".
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.

Ygvir

  • Bay Watcher
    • View Profile
Re: [Reaction] Burn wooden object to ash
« Reply #6 on: July 12, 2015, 01:08:36 pm »

I tried both ways and I have success.

Using scamtank's method I have this

Spoiler (click to show/hide)

Edit: Use the following reaction instead or your burner will take barrels full of booze (or whatnot) and turn them to charcoal. I would recommend that you manage this reaction with a stockpile anyway to prevent burning masterworks. It will burn any wooden object to make one bar of charcoal.

Spoiler (click to show/hide)

This works exactly as intended. When I used the method suggested by Quietust

Spoiler (click to show/hide)
I get a weird effect. The first round of reaction goes exactly as intended. However, on the subsequent reactions my worker proceeds to grab the existing bar of charcoal in the kiln and make hundreds of bars of charcoal from it, very odd. (I think he might be making exactly 150, due to the material size?) I'm sure I've screwed something up.

Now I'm trying to make the other reaction I mentioned above - burning cloth to ash. I tried this

Spoiler (click to show/hide)

But it still seems to grab any wooden object and make ash... Maybe I have the wrong token for soft items?

Oh, one more thing... is there any way to restrict this to items of a certain size?

Thanks for all the help!
« Last Edit: July 12, 2015, 02:22:09 pm by Ygvir »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [Reaction] Burn wooden object to ash
« Reply #7 on: July 13, 2015, 09:16:42 pm »

Quietust - that is obviously the most elegant solution.

[REAGENT:A:1:WOOD:NONE:NONE:NONE] is probably the most elegant solution, since there aren't many situations AFAIK where a log is not made of wood

Ygvir

  • Bay Watcher
    • View Profile
Re: [Reaction] Burn wooden object to ash
« Reply #8 on: July 13, 2015, 11:56:09 pm »

Putnam - I'm trying to burn things like furniture... I'm pretty sure that only works for logs.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [Reaction] Burn wooden object to ash
« Reply #9 on: July 14, 2015, 12:01:49 am »

Ah.

Trapezohedron

  • Bay Watcher
  • No longer exists here.
    • View Profile
Re: [Reaction] Burn wooden object to ash
« Reply #10 on: July 14, 2015, 01:38:58 am »

For many things, [REACTION_CLASS:CLASS] is your best friend. You can apply it to each organic variant of tree, or apply it directly to the wood template in one of the files.
Logged
Thank you for all the fish. It was a good run.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: [Reaction] Burn wooden object to ash
« Reply #11 on: July 16, 2015, 06:32:16 am »

When I used the method suggested by Quietust

Spoiler (click to show/hide)
I get a weird effect. The first round of reaction goes exactly as intended. However, on the subsequent reactions my worker proceeds to grab the existing bar of charcoal in the kiln and make hundreds of bars of charcoal from it, very odd. (I think he might be making exactly 150, due to the material size?) I'm sure I've screwed something up.
You did indeed screw something up - change "[HAS_REACTION_CLASS:WOOD]" to "[REACTION_CLASS:WOOD]", since the former isn't actually a valid raw token (and should've been reported in errorlog.txt - you are checking that for errors, right?).
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.