Bay 12 Games Forum

Please login or register.

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

Author Topic: [MODDING] REACTIONS QUESTIONS THREAD  (Read 42787 times)

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #30 on: January 26, 2013, 01:21:49 pm »

How do you make a reaction accept only CORPSES and SEVERED BODY PARTS, and not turtle shells or such?
I don't believe that it is possible due to the way that body parts and corpses are handled. You might be able to do it by adding a reaction class to every single body part material except the ones that you didn't want to be used (such as shells) and then require that reaction class in order to limit what the reaction takes, but that's about all I can think of.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Urist McGoombaBrother

  • Bay Watcher
  • Trust the plump helmet! ♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #31 on: December 28, 2014, 04:50:33 am »

Usually I am not into Thread-Necromancing. But that one appears to be the most fitting for that issue.

Following questions regarding creating reactions. I am sure you can help me to get some basic understanding. I take the one regarding Pewter Making of the vanilla game as example:

Code: [Select]
[REACTION:PEWTER_TRIFLE_MAKING]
[NAME:make trifle pewter bars (use ore)]
[BUILDING:SMELTER:NONE]
[REAGENT:A:2:METAL_ORE:TIN]
[REAGENT:B:1:METAL_ORE:COPPER]
[PRODUCT:100:12:BAR:NO_SUBTYPE:METAL:PEWTER_TRIFLE][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:SMELT]

[REACTION:PEWTER_TRIFLE_MAKING2]
[NAME:make trifle pewter bars (use bars)]
[BUILDING:SMELTER:NONE]
[REAGENT:A:300:BAR:NO_SUBTYPE:METAL:TIN]
[REAGENT:B:150:BAR:NO_SUBTYPE:METAL:COPPER]
[PRODUCT:100:3:BAR:NO_SUBTYPE:METAL:PEWTER_TRIFLE][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:SMELT]

1) Is it correct to assume that each ore has a size of 1, each bar has a size of 150 and each wafer a size of 15000? And for the number of ingridients I have to simply multiply them? E.g. When I want to create 1 Unit of Test-Metal consisting of 1 Unit Tin Ore, 3 Units Gold Bars and 5 Units Adamantine Wafers, the code will look like:

Code: [Select]
[REAGENT:A:1:METAL_ORE:TIN]
[REAGENT:B:450:BAR:NO_SUBTYPE:METAL:GOLD]
[REAGENT:C:75000:THREAD:NO_SUBTYPE:METAL:ADAMANTINE]

2) What do the first two figures after product mean? Why is it in Pewter Trifle Making1 100:12 and in Pewter Trifle Making2 100:3, when the final product is the same?

3) What is the Skill "Smelt" referring to? It is also not listed in the wiki article. http://dwarffortresswiki.org/index.php/Skill Why isn't it called "Furnace Operating" instead?

Thx

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #32 on: December 28, 2014, 05:07:56 am »

1. No, since wafers have a size of 150. Since you seem to have meant thread, however, yes, you are correct. And yes, those reagents are correct.
2. 100:12 means it has a 100% chance to make 12 bars while 100:3 means it has a 100% chance to make 3 bars.
3. http://dwarffortresswiki.org/index.php/DF2014:Skill_token

Urist McGoombaBrother

  • Bay Watcher
  • Trust the plump helmet! ♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #33 on: December 28, 2014, 09:03:05 am »

Many thanks.  :)

Urist McGoombaBrother

  • Bay Watcher
  • Trust the plump helmet! ♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #34 on: January 16, 2015, 08:49:35 am »

One more question.

I do want to extract mercury from cinnabar and have it available in a vial. How should a proper reaction look like. I did already create a metal called mercury. But I fear I need some help regarding the code. Will this work:?


Code: [Select]
[REACTION:MERCURY_MAKING]
[NAME:smelt cinnabar into mercury (liquid)]
[BUILDING:SMELTER:NONE]
[REAGENT:A:1:BOULDER:NO_SUBTYPE:INORGANIC:CINNABAR]
[REAGENT:empty vial:1:VIAL:NONE:NONE:NONE]
                [EMPTY]
                [GLASS_MATERIAL]
                [DOES_NOT_ABSORB]
[PRESERVE_REAGENT]
[PRODUCT:100:1:GLOB:NONE:METAL:MERCURY][PRODUCT_TO_CONTAINER:empty vial]
[FUEL]
[SKILL:SMELT]


Thx
« Last Edit: January 16, 2015, 09:09:38 am by Urist McGoombaBrother »
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #35 on: January 16, 2015, 01:43:46 pm »

One more question.

I do want to extract mercury from cinnabar and have it available in a vial. How should a proper reaction look like. I did already create a metal called mercury. But I fear I need some help regarding the code. Will this work:?


Code: [Select]
[REACTION:MERCURY_MAKING]
[NAME:smelt cinnabar into mercury (liquid)]
[BUILDING:SMELTER:NONE]
[REAGENT:A:1:BOULDER:NO_SUBTYPE:INORGANIC:CINNABAR]
[REAGENT:empty vial:1:FLASK:NONE:NONE:NONE]
                [EMPTY]
                [GLASS_MATERIAL]
                [DOES_NOT_ABSORB]
[PRESERVE_REAGENT]
[PRODUCT:100:1:GLOB:NONE:METAL:MERCURY][PRODUCT_TO_CONTAINER:empty vial][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:SMELT]


Thx

I've adjusted it a little bit.

The item token for vials, waterskins, and flasks are the same, which is FLASK.

Additionally, globs have a dimension, which affects the amount you would use in product and reagent lines. It has a dimension of 150, which it shares with BAR, POWDER_MISC, LIQUID_MISC, and DRINK.

For reagent lines you would directly change the amount entered into the reaction, and for product lines you would use the tag [PRODUCT_DIMENSION:number]
« Last Edit: January 16, 2015, 01:45:38 pm by BlackFlyme »
Logged

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #36 on: January 18, 2015, 01:52:31 pm »

I got it working
Code: [Select]
[REACTION:EXTRACT_FROM_FRUIT]
[NAME:make extract from fruit]
[BUILDING:STILL:CUSTOM_ALT_E]
[REAGENT:fruit:1:PLANT_GROWTH:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:EXTRACT_MAT]
[UNROTTEN]
[REAGENT:flask:1:FLASK:NONE:NONE:NONE]
[EMPTY]
[PRESERVE_REAGENT][CAN_USE_ARTIFACT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:LIQUID_MISC:NONE:GET_MATERIAL_FROM_REAGENT:fruit:EXTRACT_MAT]
[PRODUCT_TO_CONTAINER:flask]
                [PRODUCT_DIMENSION:150]
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:fruit:SEED_MAT]
[SKILL:BREWING]
Code: [Select]
[REACTION:MILL_FRUIT_TO_POWDER]
[NAME:mill fruit to powder]
[BUILDING:QUERN:CUSTOM_ALT_F]
[BUILDING:MILLSTONE:CUSTOM_ALT_F]
[REAGENT:fruit:1:PLANT_GROWTH:NONE:NONE:NONE][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:MILL_MAT]
[REAGENT:bag:1:BOX:NONE:NONE:NONE]
[EMPTY]
[BAG]
[PRESERVE_REAGENT][CAN_USE_ARTIFACT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:POWDER_MISC:NONE:GET_MATERIAL_FROM_REAGENT:fruit:MILL_MAT]
                [PRODUCT_TO_CONTAINER:bag][PRODUCT_DIMENSION:150]
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:fruit:SEED_MAT]
[SKILL:MILLING]
« Last Edit: January 20, 2015, 10:52:25 pm by Snergler »
Logged

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #37 on: January 21, 2015, 03:52:48 pm »

Anybody know the proper way to use a BAG_ITEM (like quarry bush leaves in a bag) as a reagent?
Do I call for a reagent BAG containing reagent   PLANT_GROWTH:MMM:LEAVES ?
or is a BAG_ITEM it's own item type, like   BAG_ITEM:SUB:MMM:GROWTH ? 
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #38 on: January 21, 2015, 04:05:51 pm »

You mean to use an item inside of a container?

If so, here is an example from within the game: the reaction to make mead.
Code: [Select]
[REACTION:MAKE_MEAD]
[NAME:make mead]
[BUILDING:STILL:CUSTOM_M]
[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:HONEY_BEE:HONEY]
[UNROTTEN]
[REAGENT:honey container:1:NONE:NONE:NONE:NONE]
[CONTAINS:honey]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:barrel/pot:1:NONE:NONE:NONE:NONE]
[EMPTY]
[FOOD_STORAGE_CONTAINER] barrel or any non-absorbing tool with FOOD_STORAGE
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:honey:DRINK_MAT]
[PRODUCT_TO_CONTAINER:barrel/pot]
[PRODUCT_DIMENSION:150]
[SKILL:BREWING]

The key tag here is [CONTAINS:honey], where you replace 'honey' with whatever the ID of your bagged item is.
Logged

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #39 on: January 21, 2015, 06:53:20 pm »

You mean to use an item inside of a container?

If so, here is an example from within the game: the reaction to make mead.
Code: [Select]
[REACTION:MAKE_MEAD]
[NAME:make mead]
[BUILDING:STILL:CUSTOM_M]
[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:HONEY_BEE:HONEY]
[UNROTTEN]
[REAGENT:honey container:1:NONE:NONE:NONE:NONE]
[CONTAINS:honey]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:barrel/pot:1:NONE:NONE:NONE:NONE]
[EMPTY]
[FOOD_STORAGE_CONTAINER] barrel or any non-absorbing tool with FOOD_STORAGE
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:honey:DRINK_MAT]
[PRODUCT_TO_CONTAINER:barrel/pot]
[PRODUCT_DIMENSION:150]
[SKILL:BREWING]

The key tag here is [CONTAINS:honey], where you replace 'honey' with whatever the ID of your bagged item is.
specificly my question is, are BAG_ITEMS their own item type?
would I need to use    
[REAGENT:plant-growth:1:PLANT_GROWTH:NONE:NONE:NONE:]
      [UNROTTEN]
[REAGENT:bag:1:BOX:NONE:NONE:NONE][BAG]
      [CONTAINS:plant-growth]
or
[REAGENT:bag-item:1:BAG_ITEM:NONE:NONE:NONE:]
sorry I didn't make it clear before
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #40 on: January 21, 2015, 07:14:15 pm »

Oh, I see now.

Bags are a type of BOX, so you would use that item token, with the [BAG] token to specify that it is made of a bag-type material.

So it would be the first one, not the second.
Logged

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #41 on: January 21, 2015, 07:33:46 pm »

thanks, it works like a glove!
Spoiler (click to show/hide)
extracts as well...
Spoiler (click to show/hide)
« Last Edit: January 23, 2015, 03:42:20 pm by Snergler »
Logged

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #42 on: February 12, 2015, 02:33:07 pm »

i'm trying to make a reaction with unusual token use, just to see if its possible
Code: [Select]
[REACTION:TRANSMUTATION]
[NAME:transmutation]
[BUILDING:CUSTOM_WORKSHOP:NONE]
[REAGENT:a:1:NONE:NONE:INORGANIC:NONE][NOT_IMPROVED]
[REAGENT:b:1:NONE:NONE:INORGANIC:NONE][PRESERVE_REAGENT][CAN_USE_ARTIFACT]
[PRODUCT:100:1:GET_ITEM_DATA_FROM_REAGENT:a:NONE:GET_MATERIAL_FROM_REAGENT:b:NONE]
        [SKILL:MAGIC_NATURE]
it's supposed to make an item with same type as one reagent, and with the material type of the other reagent.
so far it just makes a new item with same type and material as reagent a. the first unpreserved one.
has anybody ever tried this or accomplished such a reaction?   
« Last Edit: February 12, 2015, 02:45:13 pm by Snergler »
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #43 on: February 12, 2015, 03:00:14 pm »

i'm trying to make a reaction with unusual token use, just to see if its possible
Code: [Select]
[REACTION:TRANSMUTATION]
[NAME:transmutation]
[BUILDING:CUSTOM_WORKSHOP:NONE]
[REAGENT:a:1:NONE:NONE:INORGANIC:NONE][NOT_IMPROVED]
[REAGENT:b:1:NONE:NONE:INORGANIC:NONE][PRESERVE_REAGENT][CAN_USE_ARTIFACT]
[PRODUCT:100:1:GET_ITEM_DATA_FROM_REAGENT:a:NONE:GET_MATERIAL_FROM_REAGENT:b:NONE]
        [SKILL:MAGIC_NATURE]
it's supposed to make an item with same type as one reagent, and with the material type of the other reagent.
so far it just makes a new item with same type and material as reagent a. the first unpreserved one.
has anybody ever tried this or accomplished such a reaction?
According to the wiki, the GET_ITEM_DATA_FROM_REAGENT specified the material in addition to the item type.  Maybe if you reverse the order of GET_s it will trick the game into doing what you want.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: [MODDING] REACTIONS QUESTIONS THREAD
« Reply #44 on: February 12, 2015, 03:30:41 pm »

According to the wiki, the GET_ITEM_DATA_FROM_REAGENT specified the material in addition to the item type.  Maybe if you reverse the order of GET_s it will trick the game into doing what you want.

not sure if you mean this...
Code: [Select]
[PRODUCT:100:1:GET_MATERIAL_FROM_REAGENT:thing2:NONE:GET_ITEM_DATA_FROM_REAGENT:thing1:NONE]I tried it, and it crashed my shell, and causes a Unrecognized Item Token error.
changing the order of reagents just changes which reagent will be copied, it always takes the item data and material from the first reagent listed... afaik
« Last Edit: February 12, 2015, 03:56:43 pm by Snergler »
Logged
Pages: 1 2 [3] 4 5 ... 13