Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: Create a new workshop able item?  (Read 4978 times)

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Create a new workshop able item?
« Reply #15 on: July 11, 2012, 01:11:31 pm »

In option 1

I mean "every tree/plant" entity/object

in option 2

I mean WOOD_TEMPLATE
Logged

supified

  • Bay Watcher
    • View Profile
Re: Create a new workshop able item?
« Reply #16 on: July 11, 2012, 02:03:29 pm »

Is there an easier way to test if I got this right other than hope to see the trees?  Editing every tree/plant each time I want to test it is kind of hard.  Also I'm not sure what I did wrong yet, just that it doesn't seem to be doing anything as of yet.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Create a new workshop able item?
« Reply #17 on: July 11, 2012, 02:17:06 pm »

Edit say PALM and give it the two WOOD types

then make a reaction that makes PALM logs from nothing so you can feed them into the other reaction.
Logged

supified

  • Bay Watcher
    • View Profile
Re: Create a new workshop able item?
« Reply #18 on: July 11, 2012, 02:18:13 pm »

OH! So I need a reaction for -each- different tree
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Create a new workshop able item?
« Reply #19 on: July 11, 2012, 02:36:21 pm »

OH! So I need a reaction for -each- different tree
erm... not if you do it my way... you should only need 1 reaction to turn WOOD logs into WOOD2 blocks...

Do you know how MATERIAL_REACTION_PRODUCTs work?
Logged

supified

  • Bay Watcher
    • View Profile
Re: Create a new workshop able item?
« Reply #20 on: July 11, 2012, 03:06:00 pm »

Aparently not.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Create a new workshop able item?
« Reply #21 on: July 11, 2012, 03:08:51 pm »

Well I have a explainion here http://www.bay12forums.com/smf/index.php?topic=55259.msg3419616#msg3419616

look at "reaction_other.txt" the tanning process, for the reaction.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Create a new workshop able item?
« Reply #22 on: July 11, 2012, 05:44:35 pm »

Hugo, trying to follow the discussion here, my reaction and material modding is still rather beginner level.

Am I right in assuming that the advantage to method 1 is that you now have a new material that is independent of standard wooden blocks? Meaning you could create these planks or create standard wooden blocks.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Create a new workshop able item?
« Reply #23 on: July 11, 2012, 06:04:26 pm »

Hugo, trying to follow the discussion here, my reaction and material modding is still rather beginner level.

Am I right in assuming that the advantage to method 1 is that you now have a new material that is independent of standard wooden blocks? Meaning you could create these planks or create standard wooden blocks.

That is correct. Because standard/vanilla trees have
WOOD:WOOD_TEMPLATE
TREE:WOOD

which means cutting them down makes "WOOD logs"

By copying that WOOD:WOOD_TEMPALTE and making another
WOOD2:WOOD_TEMPLATE and slapping a BLOCK_NAME:plank:planks into it. Then jamming a
[MATERIAL_REACTION_PRODUCT:PLANK_MAT:LOCAL_PLANT_MAT:WOOD2] on the origional WOOD material you can make a reaction that takes normal WOOD logs and makes WOOD2 blocks(planks)

Code: (Plam tree that just as been altered) [Select]
[PLANT:PALM]
[NAME:palm][NAME_PLURAL:palms][ADJ:palm]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
[USE_MATERIAL_TEMPLATE:WOOD:WOOD_TEMPLATE]
[STATE_NAME:ALL_SOLID:palm]
[STATE_ADJ:ALL_SOLID:palm]
[PREFIX:NONE]
Based on Red Palm (Cocos nucifera)
http://www.wood-database.com/lumber-identification/monocots/red-palm/
[STATE_COLOR:ALL_SOLID:TAUPE_DARK]
[SOLID_DENSITY:680]
[MATERIAL_REACTION_PRODUCT:PLANK_MAT:LOCAL_PLANT_MAT:WOOD2] ------ This here classes it as PLANK_MAT and targets the new WOOD2
[USE_MATERIAL_TEMPLATE:WOOD2:WOOD_TEMPLATE] --------- This here is the copied WOOD material
[STATE_NAME:ALL_SOLID:palm]
[STATE_ADJ:ALL_SOLID:palm]
[PREFIX:NONE]
Based on Red Palm (Cocos nucifera)
http://www.wood-database.com/lumber-identification/monocots/red-palm/
[STATE_COLOR:ALL_SOLID:TAUPE_DARK]
[SOLID_DENSITY:680]
[BLOCK_NAME:plank:planks]
[TREE:LOCAL_PLANT_MAT:WOOD][TREE_TILE:226]
[PREFSTRING:leaves]
[DRY]
[BIOME:ANY_TROPICAL]
[SAPLING]

Code: (Reaction (again)) [Select]
[REACTION:MAKE_WOOD_PLANKS]
[NAME:cut logs into 6 planks]
[BUILDING:WOOD_REGEN:CUSTOM_SHIFT_B]
[BUILDING:WOOD_PROCESSOR:CUSTOM_B]
[REAGENT:A:1:WOOD:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:PLANK_MAT] ---- Reagent takes WOOD/aka LOGs (because WOOD is the ITEM_ID for logs) and it takes any LOG that is classed as PLANK_MAT
[PRODUCT:100:6:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:A:PLANK_MAT] --- Gets the material for the new BLOCKS, but uses the PLANK_MAT instead (if left as NONE it would use the old WOOD and make palm blocks, PLANK_MAT will use the new WOOD2 and make palm planks)
[SKILL:CARPENTRY]

EDIT:
Fixed a derp
« Last Edit: July 12, 2012, 08:54:34 pm by Hugo_The_Dwarf »
Logged

supified

  • Bay Watcher
    • View Profile
Re: Create a new workshop able item?
« Reply #24 on: July 12, 2012, 06:55:49 pm »

I'm still failing.  So here is my edits.

Every tree looks a lot like this:

[PLANT:MANGROVE]
   [NAME:mangrove][NAME_PLURAL:mangroves][ADJ:mangrove]
   [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
   [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
   [USE_MATERIAL_TEMPLATE:WOOD:WOOD_TEMPLATE]
      [STATE_NAME:ALL_SOLID:mangrove]
      [STATE_ADJ:ALL_SOLID:mangrove]
      [PREFIX:NONE]
      [MATERIAL_REACTION_PRODUCT:PLANK_MAT:LOCAL_PLANT_MAT:WOOD2]
      [USE_MATERIAL_TEMPLATE:WOOD2:WOOD_TEMPLATE]
      [STATE_NAME:ALL_SOLID:mangrove]
      [STATE_ADJ:ALL_SOLID:mangrove]
      [PREFIX:NONE]
[BLOCK_NAME:plank:planks]
   [TREE:LOCAL_PLANT_MAT:WOOD][TREE_TILE:5]
   [PREFSTRING:roots]
   [WET]
   [BIOME:SWAMP_MANGROVE]
   [SAPLING]

Here is Palm

[PLANT:PALM]
   [NAME:palm][NAME_PLURAL:palms][ADJ:palm]
   [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
   [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
   [USE_MATERIAL_TEMPLATE:WOOD:WOOD_TEMPLATE]
      [STATE_NAME:ALL_SOLID:palm]
      [STATE_ADJ:ALL_SOLID:palm]
      [PREFIX:NONE]
      [MATERIAL_REACTION_PRODUCT:PLANK_MAT:LOCAL_PLANT_MAT:WOOD2]
      [USE_MATERIAL_TEMPLATE:WOOD2:WOOD_TEMPLATE]
      [STATE_NAME:ALL_SOLID:palm]
      [STATE_ADJ:ALL_SOLID:palm]
[PREFIX:NONE]
      [BLOCK_NAME:plank:planks]
   [TREE:LOCAL_PLANT_MAT:WOOD][TREE_TILE:226]
   [PREFSTRING:leaves]
   [DRY]
   [BIOME:ANY_TROPICAL]
   [SAPLING]

My reaction:

[REACTION:MAKE_WOOD_PLANKS]
   [NAME:cut logs into 6 planks]
   [BUILDING:WOOD_REGEN:CUSTOM_SHIFT_B]
   [BUILDING:WOOD_PROCESSOR:CUSTOM_B]
   [REAGENT:A:1:WOOD:NONE:NONE:NONE][HAS_MATERIAL_REACTION_CLASS:PLANK_MAT]
   [PRODUCT:100:6:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:A:PLANK_MAT]
   [SKILL:CARPENTRY]

My entity file:

   [PERMITTED_REACTION:GLAZE_CRAFT]
   [PERMITTED_REACTION:PRESS_OIL]
   [PERMITTED_REACTION:MAKE_WOOD_PLANKS]
   [PERMITTED_REACTION:MAKE_CLAY_HIVE]


These are the only places I did edits.  So I cut down a tree.. nothing happens.  I create a crafts workshop just in case (though I'm pretty sure it wouldn't happen there,) nothing.

I'm not sure how it should work, but my stock shows no blocks and I have the logs I cut, nothing extra, nothing less.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Create a new workshop able item?
« Reply #25 on: July 12, 2012, 08:48:45 pm »

it's your reaction

you want [HAS_MATERIAL_REACTION_PRODUCT:PLANK_MAT]
not
[HAS_MATERIAL_REACTION_CLASS:PLANK_MAT]

try that

EDIT:
Derp relised you used my very code that I posted, haha stupid me. I must have somehow got REACTION_CLASS mixed into my brain as I wrote that REACTION
« Last Edit: July 12, 2012, 08:54:06 pm by Hugo_The_Dwarf »
Logged

supified

  • Bay Watcher
    • View Profile
Re: Create a new workshop able item?
« Reply #26 on: July 12, 2012, 09:45:38 pm »

Right, but I'm still not clear on how it is supposed to work.  When I cut the trees should it create planks?
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Create a new workshop able item?
« Reply #27 on: July 12, 2012, 09:48:39 pm »

When you cut the trees, they will drop everyday Vanilla logs. When run through the carpenter's shop in a "make blocks" reaction they will make everyday "wood blocks" however the "fixed" reaction will take these everyday logs and make "planks" from them.

Thus adding flavour, either make 2 wood blocks from 1 log, or 6 planks from 1 log.
Logged

supified

  • Bay Watcher
    • View Profile
Re: Create a new workshop able item?
« Reply #28 on: July 13, 2012, 08:45:09 am »

Are we supposed to be replacing or adding the lines to get the logs into wood2 instead of standard wood logs? Looking at my plant file it occurs to me that without replacing lines wouldn't it just take standard wood logs?  Is there a help file explaining the tags in the plant_standard and what they mean?
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Create a new workshop able item?
« Reply #29 on: July 13, 2012, 11:39:04 am »

You want to add them so that you still have the option for normal wood logs.

What you might be missing and not realizing is that you need the building WOOD_REGEN or WOOD_PROCESSOR

[REACTION:MAKE_WOOD_PLANKS]
   [NAME:cut logs into 6 planks]
   [BUILDING:WOOD_REGEN:CUSTOM_SHIFT_B]
   [BUILDING:WOOD_PROCESSOR:CUSTOM_B]
   [REAGENT:A:1:WOOD:NONE:NONE:NONE][HAS_MATERIAL_REACTION_CLASS:PLANK_MAT]
   [PRODUCT:100:6:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:A:PLANK_MAT]
   [SKILL:CARPENTRY]

So if you add those buildings then the reaction to cut a log into the planks will appear in that building.
Logged
Pages: 1 [2] 3