Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Grow Wood reaction-Please Double-Check My Work.  (Read 460 times)

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Grow Wood reaction-Please Double-Check My Work.
« on: August 25, 2011, 04:58:31 pm »

Would the following reaction work?

Code: [Select]
[REACTION:WOOD_GROW]
[NAME:grow wood]
[BUILDING:WOOD_PROCESSING:CUSTOM_B]
[REAGENT:wood:1:WOOD:NO_SUBTYPE:NONE:LOCAL_PLANT_MAT:WOOD][PRESERVE_REAGENT]
[PRODUCT:90:1:WOOD:NO_SUBTYPE:GET_MATERIAL_FROM_REAGENT:wood:WOOD_MAT]

I just want a double-check, plus maybe some pointers.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Kweri

  • Bay Watcher
    • View Profile
Re: Grow Wood reaction-Please Double-Check My Work.
« Reply #1 on: August 25, 2011, 05:35:13 pm »

Would the following reaction work?

Code: [Select]
[REACTION:WOOD_GROW]
[NAME:grow wood]
[BUILDING:WOOD_PROCESSING:CUSTOM_B]
[REAGENT:wood:1:WOOD:NO_SUBTYPE:NONE:LOCAL_PLANT_MAT:WOOD][PRESERVE_REAGENT]
[PRODUCT:90:1:WOOD:NO_SUBTYPE:GET_MATERIAL_FROM_REAGENT:wood:WOOD_MAT]

I just want a double-check, plus maybe some pointers.

Nope.

First of all, I want to make sure I'm understanding what you want the reaction to do. It takes a wood log, then has a 90% chance of producing an additional wood log of the same material while returning the original log, correct?

Honestly, why 90%? The reaction will complete pretty much instantly with no skill requirement, so is there much of a purpose to setting it to 90% instead of 100%?

I'm going to assume you've already created your own WOOD_PROCESSING workshop, since that's where you've pointed this reaction to take place.

For [REAGENT:wood:1:WOOD:NO_SUBTYPE:NONE:LOCAL_PLANT_MAT:WOOD], there are several errors.

The WOOD:NO_SUBTYPE (or NONE instead of NO_SUBTYPE - I prefer NONE as it's shorter) is fine. The material section is where it gets wonky. You have an extra NONE at the beginning, then use LOCAL_PLANT_MAT:WOOD - but you can't use LOCAL_*_MAT in reagents. Something like PLANT_MAT:OAK:WOOD would work (but restrict you to only oak logs) but you can't use LOCAL_PLANT_MAT because your reaction doesn't know what plant is the local plant.

My suggestion would be [REAGENT:wood:1:WOOD:NONE:NONE:NONE] as this allows logs of ANY material to be used. As long as you don't have custom reactions making logs out of soap or something this should work fine.

For the product, did you add a [MATERIAL_REACTION_PRODUCT:WOOD_MAT:<blah>] to the wood material? If not, this won't work. Also, since you're just copying the material of the reagent (my assumption) then there's a much easier way to do this - [PRODUCT:90:1:WOOD:NO_SUBTYPE:GET_MATERIAL_FROM_REAGENT:wood:NONE]. That says to just take the material of your reagent called wood. When you change the last bit to something other than NONE, you're telling the game to look for a MATERIAL_REACTION_PRODUCT called whatever you put at the end in the material of the reagent used. This is handy for changing one material to another (for example, linking fat to tallow) but totally unnecessary when you're keeping the same material.
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Grow Wood reaction-Please Double-Check My Work.
« Reply #2 on: August 25, 2011, 05:38:09 pm »

Thanks. Glad I asked, partly because I screwed up the product and partly because I failed to notice the lack of a skill.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: Grow Wood reaction-Please Double-Check My Work.
« Reply #3 on: August 27, 2011, 02:28:24 am »

I'm curious to see if [REAGENT:wood:1:WOOD:NONE:PLANT_MAT:NONE:WOOD] would work. 

Although there isn't much point to the material tokens at all, since any log item is going to be made of some type of wood, unless you've modded in something really bizarre.

[REAGENT:wood:1:WOOD:NONE:NONE:NONE][PRESERVE_REAGENT] would work just fine.