Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Plant Modding?  (Read 541 times)

uristjack

  • Bay Watcher
  • The God-Emperor
    • View Profile
Plant Modding?
« on: October 23, 2017, 01:22:23 am »

So, right now, I'm trying to make a growable plant (i.e. in farm plots like plump helmets) but instead of creating an edible food it is harvested for its wood. It's not working properly.

Here it is:
Spoiler (click to show/hide)

Does anyone have a pointer or two to give?
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Plant Modding?
« Reply #1 on: October 23, 2017, 01:17:03 pm »

You should probably have an error in your errorlog about having two of the same material defined WOOD, step 1 is cleaning that up.

Now since farmable plants are harvested as a PLANT item (rather than when a natural tree is cut produces a WOOD object ie a LOG) so there are a few ways of doing this.
Both of which require REACTIONs to get the WOOD from your PLANT.

The reaction can straight up take a [A:1:PLANT:NONE:PLANT_MAT:MUSHROOM_WOOD:STRUCTURAL]
creating the product
[PRODUCT:100:1:WOOD:NONE:PLANT_MAT:MUSHROOM_WOOD:WOOD]
[PRODUCT:100:1:SEEDS:NONE:PLANT_MAT:MUSHROOM_WOOD:SEED]

and that would be that, but due to (I think it still exists) custom reactions have bug were a stack of 5 of these mushrooms would yield 1 log same if a solo stack was used (I think I had this conversation with another Reaction modder and I may be wrong and it will do a 1:1 ratio just fine) but I know the safest and best way is to use MATERIAL_REACTION_PRODUCT on the STRUCTURAL material defined
[MATERIAL_REACTION_PRODUCT:WOOD_MAT:LOCAL_PLANT_MAT:WOOD]
and
[MATERIAL_REACTION_PRODUCT:SEED_MAT:LOCAL_PLANT_MAT:SEED]

Rest is just following how vanilla tanning works, if you need more help I'm happy to keep going
Logged