Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 4 5 [6] 7

Author Topic: Reaction Tutorial/Information  (Read 8736 times)

Lazureus

  • Bay Watcher
  • Perfection is Flawed
    • View Profile
Re: Reaction Tutorial/Information
« Reply #75 on: April 14, 2010, 11:20:27 am »

Here are some reactions I figured out for my crematorium mod.. hope they can be helpful to you.

Spoiler (click to show/hide)

The first of the two reactions require 2 lines of code inserted into the material_template_default.txt file..

Spoiler (click to show/hide)
Logged
Current modding project:Tyranids 2010
Past modding projects:
DF2010: Crematorium
40d: ‼TYRANIDS‼
Quote from: Dark Pegasus
Just when I thought I couldn't despise him any more... He finds a whole new and undiscovered way!!

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: Reaction Tutorial/Information
« Reply #76 on: April 14, 2010, 11:25:05 am »

oh, good luck suggesting it then :\ i was putting so much hope in my kitchen overhaul

Rhenaya

  • Bay Watcher
  • Usstan tlun natha hargluk ssinssriggin ilythiiri!
    • View Profile
    • X-Fire Profile
Re: Reaction Tutorial/Information
« Reply #77 on: April 14, 2010, 03:52:04 pm »

Yeah, I was trying to get it for just the remains of the vermin. And actually, all REMAINS is fine because only vermin produce REMAINS - non-vermin create CORPSEs and CORPSEPIECEs.

oh, awesome:

[REACTION:DESTROY_VERMIN]
[NAME:incinerate vermin remains]
[BUILDING:SMELTER:CUSTOM_V]
[REAGENT:A:1:REMAINS:NONE:NONE:NONE]
[PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:ADAMANTINE][PRODUCT_DIMENSION:150]
[SKILL:SMELT]

that works. tomorrow i'll get the product to nothing (or mabye a small chance of ash) but yeah.

How did you get this to work?  I've tried putting it everywhere and it doesn't show up on the menu for smelters or in the job manager.  It pauses for a second the first time I go to the building options for a smelter after loading, so it seems to be there, but just doesn't show up at all.   The 2s scattered everywhere are driving me crazy.

i have the same problem, i cant get that to be working :/
Logged
User Profile: http://df.magmawiki.com/index.php/User:Rhenaya
Mods: http://dffd.wimbli.com/who.php?id=554

From "Angroshs Kinder" Das schwarze Auge Zwergenhandbuch - (Angrosh Children, the dark eye, german pen&paper, dwarven handbook):
"Elves!? Their men dont wear beards, and their women bathe nacked to lure you into the water and drown you. Thank Angrosh they are as ugly as the day and all big and skinny."

abysmalminton

  • Escaped Lunatic
    • View Profile
Re: Reaction Tutorial/Information
« Reply #78 on: April 14, 2010, 04:32:52 pm »

   [PERMITTED_REACTION:DESTROY_VERMIN]

is in entity_default.txt, right?
Logged

Rhenaya

  • Bay Watcher
  • Usstan tlun natha hargluk ssinssriggin ilythiiri!
    • View Profile
    • X-Fire Profile
Re: Reaction Tutorial/Information
« Reply #79 on: April 14, 2010, 04:42:31 pm »

ARRGS... i am dumb :x
Logged
User Profile: http://df.magmawiki.com/index.php/User:Rhenaya
Mods: http://dffd.wimbli.com/who.php?id=554

From "Angroshs Kinder" Das schwarze Auge Zwergenhandbuch - (Angrosh Children, the dark eye, german pen&paper, dwarven handbook):
"Elves!? Their men dont wear beards, and their women bathe nacked to lure you into the water and drown you. Thank Angrosh they are as ugly as the day and all big and skinny."

Intelligent Shade of Blue

  • Bay Watcher
  • Sanity Loss: 0/1d4 points
    • View Profile
Re: Reaction Tutorial/Information
« Reply #80 on: April 14, 2010, 05:03:06 pm »

So, I'm looking to create a meat grinder type workshop, though without a big list of tokens (the wiki is incredibly incomplete in that regard) I'm stumbling through the dark and not even sure if it will be possible. My original idea was for it to use live creatures like the butcher's shop, but instead of having all sorts of parts as the product, the meat grinder just spits out some ground meat and blood. It seems using live creatures is impossible, unfortunately (though I would love to be proven wrong), and I am not sure how/if a corpse can be used in a reaction.

One thing you could do is make any "x sweetbread" or "prepared cow liver" or whatever all go into "sausage".

If I wanted to have a reagent be any butchery byproduct (except bone, hopefully), what would be the correct tags? I'm thinking it uses the CREATURE_MAT item token, but the subtype tokens are unclear. Does anyone know of a place where the various tokens are listed?

[REAGENT:A:1:CREATURE_MAT:???:NONE:NONE]
Logged
[COLOR:PRUSSIAN_BLUE]
[NAME:ISoB]
[RGB:0:49:83]

shadow_slicer

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #81 on: April 14, 2010, 06:46:59 pm »

If I wanted to have a reagent be any butchery byproduct (except bone, hopefully), what would be the correct tags? I'm thinking it uses the CREATURE_MAT item token, but the subtype tokens are unclear. Does anyone know of a place where the various tokens are listed?

[REAGENT:A:1:CREATURE_MAT:???:NONE:NONE]

You probably would want
[REAGENT:A:1:MEAT:NONE:NONE:NONE].

One problem is that this includes all the outputs from the butcher shop, including meat. You could work around this limitation if you add [MATERIAL_REACTION_PRODUCT:SAUSAGE_MAT:LOCAL_CREATURE_MAT:<organ>] to all of the templates for organs you want included (replace <organ> with material name from b_detail_plan_default.txt linked to the template you're editing), and then add [HAS_MATERIAL_REACTION_PRODUCT:SAUSAGE_MAT] after the reagent line.

Edit: A better solution was posted below

« Last Edit: April 14, 2010, 07:59:56 pm by shadow_slicer »
Logged

Intelligent Shade of Blue

  • Bay Watcher
  • Sanity Loss: 0/1d4 points
    • View Profile
Re: Reaction Tutorial/Information
« Reply #82 on: April 14, 2010, 07:07:24 pm »


You probably would want
[REAGENT:A:1:MEAT:NONE:NONE:NONE].

One problem is that this includes all the outputs from the butcher shop, including meat. You could work around this limitation if you add [MATERIAL_REACTION_PRODUCT:SAUSAGE_MAT:LOCAL_CREATURE_MAT:<organ>] to all of the templates for organs you want included (replace <organ> with material name from b_detail_plan_default.txt linked to the template you're editing), and then add [HAS_MATERIAL_REACTION_PRODUCT:SAUSAGE_MAT] after the reagent line.



Cool, thanks! I'll give that a try.

I'm hoping the following is close to right for the product line: [PRODUCT:100:1:ITEM_FOOD:ITEM_FOOD_SAUSAGE:GET_MATERIAL_FROM_REAGENT:A:none]

Will that produce gazelle meat sausage, if gazelle meat is used as the reagent?
Logged
[COLOR:PRUSSIAN_BLUE]
[NAME:ISoB]
[RGB:0:49:83]

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: Reaction Tutorial/Information
« Reply #83 on: April 14, 2010, 07:41:09 pm »

Spoiler (click to show/hide)
you could try this instead
add [REACTION_CLASS:ORGAN_FOR_SAUSAGE] to the organs' material entries, and to the end of the reagent line,like this
[REAGENT:A:1:MEAT:NONE:NONE:NONE][REACTION_CLASS:ORGAN_FOR_SAUSAGE]

and this to every organ material(scroll down all the way)
Spoiler (click to show/hide)

Intelligent Shade of Blue

  • Bay Watcher
  • Sanity Loss: 0/1d4 points
    • View Profile
Re: Reaction Tutorial/Information
« Reply #84 on: April 15, 2010, 12:48:39 pm »

Okay, so I've got the building & reaction set up, and the dwarves seem to use the correct meat, but the output of the reaction is simply called "meat."

I set up almost every meat template with the [REACTION_CLASS:ORGAN_FOR_SAUSAGE], except for the gut and stomach (I gave the gut [REACTION_CLASS:INTESTINE]), and I created a template for sausage meat:

Spoiler (click to show/hide)

Here's the reaction, which is supposed to take a piece of meat and some intestines and produce a <meat name> sausage:

Spoiler (click to show/hide)

I'm sure the problem has something to do with the use of the material template, but I'm hoping someone has a better idea than me...

EDIT: Okay, well upon a second look, it looks like I accidentally put A instead of ORGAN in the product line, but changing it didnt' do anything... Unless I need to regen the world after altering a reaction.

EDIT2: Yeah, even regen didn't do anything.. Still getting the mystery meat :-\
« Last Edit: April 15, 2010, 01:00:37 pm by Intelligent Shade of Blue »
Logged
[COLOR:PRUSSIAN_BLUE]
[NAME:ISoB]
[RGB:0:49:83]

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: Reaction Tutorial/Information
« Reply #85 on: April 15, 2010, 02:48:17 pm »

[REACTION:MAKE_SAUSAGE]
   [NAME:make sausage]
   [BUILDING:GRINDER:CUSTOM_S]
   [REAGENT:ORGAN A:1:MEAT:NONE:NONE:NONE][REACTION_CLASS:ORGAN_FOR_SAUSAGE][UNROTTEN]
   [REAGENT:INTESTINE B:1:MEAT:NONE:NONE:NONE][REACTION_CLASS:INTESTINE][UNROTTEN]
   [USE_MATERIAL_TEMPLATE:SAUSAGE:SAUSAGE_TEMPLATE]
   [PRODUCT:100:1:MEAT:SAUSAGE:GET_MATERIAL_FROM_REAGENT:A:NONE]
   [SKILL:BUTCHER]
   [AUTOMATIC]

soul4hdwn

  • Bay Watcher
  • make due with what you have
    • View Profile
Re: Reaction Tutorial/Information
« Reply #86 on: April 15, 2010, 08:13:31 pm »

[REACTION:MAKE_SAUSAGE]
   [NAME:make sausage]
   [BUILDING:GRINDER:CUSTOM_S]
   [REAGENT:ORGAN A:1:MEAT:NONE:NONE:NONE][REACTION_CLASS:ORGAN_FOR_SAUSAGE][UNROTTEN]
   [REAGENT:INTESTINE B:1:MEAT:NONE:NONE:NONE][REACTION_CLASS:INTESTINE][UNROTTEN]
   [USE_MATERIAL_TEMPLATE:SAUSAGE:SAUSAGE_TEMPLATE]
   [PRODUCT:100:1:MEAT:SAUSAGE:GET_MATERIAL_FROM_REAGENT:A:NONE]
   [SKILL:BUTCHER]
   [AUTOMATIC]

that looks beautiful  :o
Logged

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: Reaction Tutorial/Information
« Reply #87 on: April 15, 2010, 08:20:37 pm »

because of all the blood?

Intelligent Shade of Blue

  • Bay Watcher
  • Sanity Loss: 0/1d4 points
    • View Profile
Re: Reaction Tutorial/Information
« Reply #88 on: April 15, 2010, 10:47:30 pm »

SUCCESS!!! Praise Armok, for a breakthrough in dwarven culinary science is upon us!

Okay, while the solution to the sausage dilemma actually turned out to be slightly different than everyone's suggestions (the above reaction actually took a piece of meat and an intestine, and resulted in an identical piece of meat minus the intestine), I have to thank Askot & shadow_slicer for pointing me in the right direction. In the end, I discovered a way to mimic the tanning reaction, and put [MATERIAL_REACTION_PRODUCT:SAUSAGE_MAT:LOCAL_CREATURE_MAT:SAUSAGE] onto the desired meat templates. Then, in b_detail_plan_default, I had to add [ADD_MATERIAL:SAUSAGE:SAUSAGE_TEMPLATE] to the standard and chitin material plans. I did keep [REACTION_CLASS:INTESTINE] on the guts (thanks guys), so my reaction ended up like so:

[REACTION:MAKE_SAUSAGE]
   [NAME:make sausage]
   [BUILDING:GRINDER:CUSTOM_S]
   [REAGENT:A:1:MEAT:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:SAUSAGE_MAT][UNROTTEN]
   [REAGENT:B:1:MEAT:NONE:NONE:NONE][REACTION_CLASS:INTESTINE][UNROTTEN]
   [USE_MATERIAL_TEMPLATE:SAUSAGE:SAUSAGE_TEMPLATE]
   [PRODUCT:100:1:MEAT:SAUSAGE:GET_MATERIAL_FROM_REAGENT:A:SAUSAGE_MAT]
   [SKILL:BUTCHER]
   [AUTOMATIC]


Now, behold the glory of the sausage!

Before:
Spoiler (click to show/hide)

After:
Spoiler (click to show/hide)
« Last Edit: April 15, 2010, 10:50:13 pm by Intelligent Shade of Blue »
Logged
[COLOR:PRUSSIAN_BLUE]
[NAME:ISoB]
[RGB:0:49:83]

Intelligent Shade of Blue

  • Bay Watcher
  • Sanity Loss: 0/1d4 points
    • View Profile
Re: Reaction Tutorial/Information
« Reply #89 on: April 16, 2010, 01:59:32 am »

Blast. Another setback in sausage science... For some reason, the reaction isn't showing up at the workshop anymore. The error log keeps saying "MAKE_SAUSAGE: Unrecognized Reaction Token: USE_MATERIAL_TEMPLATE." I've looked over everything to try to find out what's wrong, and I'm stumped. I was attempting to duplicate the process to make some blood pudding when this error started showing up, so now I've gone over every file to make sure everything is the way it was when it was working before. Yet, the dwarves are without sausage :'(
« Last Edit: April 16, 2010, 02:02:01 am by Intelligent Shade of Blue »
Logged
[COLOR:PRUSSIAN_BLUE]
[NAME:ISoB]
[RGB:0:49:83]
Pages: 1 ... 4 5 [6] 7