Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modify reaction, need urgent help  (Read 3523 times)

towerdude

  • Bay Watcher
  • Legendary elf skin tanner
    • View Profile
Modify reaction, need urgent help
« on: February 26, 2013, 04:16:36 pm »

I need to change one of the reactions, for example the woodfurnace, to produce not charcoal, but 50 or 100 rutile stone, or rutile blocks. Thanks.
Logged
Szuvas Fogbank the Skinny Innocent Inn-Dinner of Spinning

The spinning ☼dwarf leather earring☼ strikes the Spirit of Fire in the lower body!
The lower body flies off in an arc!

A new crazy succession game! Are you up to the challange? http://www.bay12forums.com/smf/index.php?topic=114041.0

evictedSaint

  • Bay Watcher
  • if (ANNOYED_W_FANS==true) { KILL_CHAR(rand()); }
    • View Profile
Re: Modify reaction, need urgent help
« Reply #1 on: February 26, 2013, 04:20:26 pm »

The wood furnace is nonmodable, but you can easily do what you want with the smelter.

Open up the raws and find the smelter .txt and just copy/paste one of the existing reactions and modify it to fit your taste. 

It's a really simple mod, check out the wiki for an easy to understand how-to.
http://dwarffortresswiki.org/index.php/Modding

towerdude

  • Bay Watcher
  • Legendary elf skin tanner
    • View Profile
Re: Modify reaction, need urgent help
« Reply #2 on: February 27, 2013, 07:51:57 pm »

The wood furnace is nonmodable, but you can easily do what you want with the smelter.

Open up the raws and find the smelter .txt and just copy/paste one of the existing reactions and modify it to fit your taste. 

It's a really simple mod, check out the wiki for an easy to understand how-to.
http://dwarffortresswiki.org/index.php/Modding

Thanks but it's not that easy.

Can you change this, for making 100 rutile stone, from 1 copper bar?

[REACTION:LIGNITE_TO_COKE]
[NAME:make coke from lignite]
[BUILDING:SMELTER:NONE]
[REAGENT:A:1:BOULDER:NO_SUBTYPE:INORGANIC:LIGNITE]
[PRODUCT:100:5:BAR:NO_SUBTYPE:COAL:COKE][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:SMELT]
Logged
Szuvas Fogbank the Skinny Innocent Inn-Dinner of Spinning

The spinning ☼dwarf leather earring☼ strikes the Spirit of Fire in the lower body!
The lower body flies off in an arc!

A new crazy succession game! Are you up to the challange? http://www.bay12forums.com/smf/index.php?topic=114041.0

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modify reaction, need urgent help
« Reply #3 on: February 27, 2013, 08:12:03 pm »

It is that easy.

[REAGENT:A:150:BAR:NO_SUBTYPE:INORGANIC:COPPER]
[PRODUCT:100:100:BOULDER:NO_SUBTYPE:INORGANIC:RUTILE]
« Last Edit: February 27, 2013, 08:13:46 pm by Putnam »
Logged

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Modify reaction, need urgent help
« Reply #4 on: February 27, 2013, 08:13:18 pm »

150:BAR though right?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modify reaction, need urgent help
« Reply #5 on: February 27, 2013, 08:13:51 pm »

towerdude

  • Bay Watcher
  • Legendary elf skin tanner
    • View Profile
Re: Modify reaction, need urgent help
« Reply #6 on: February 28, 2013, 05:04:18 pm »

It is that easy.

[REAGENT:A:150:BAR:NO_SUBTYPE:INORGANIC:COPPER]
[PRODUCT:100:100:BOULDER:NO_SUBTYPE:INORGANIC:RUTILE]

Gee thanks, for me it is hard because I don't know what a bunch of things mean (like A), and what I should replace them with.

[On the side note it was a poor attempt to trick me to make 100 rutile from 150 copper bars. I don't know much about modding, but I know what that specific number means.]
Logged
Szuvas Fogbank the Skinny Innocent Inn-Dinner of Spinning

The spinning ☼dwarf leather earring☼ strikes the Spirit of Fire in the lower body!
The lower body flies off in an arc!

A new crazy succession game! Are you up to the challange? http://www.bay12forums.com/smf/index.php?topic=114041.0

Wannabehero

  • Bay Watcher
    • View Profile
Re: Modify reaction, need urgent help
« Reply #7 on: February 28, 2013, 05:20:22 pm »

...I don't know what a bunch of things mean (like A)...

[On the side note it was a poor attempt to trick me to make 100 rutile from 150 copper bars. I don't know much about modding, but I know what that specific number means.]

It is 150 bar, because bars use sizes.  The size of 1 bar is default 150, so a reaction using 1 bar will use a value of 150 for that particular string in the reaction.

Bars, liquids, and powders tend to have sizes of 150.  Threads are 15000, and cloth is 10000.  Things like boulders and logs don't have sizes, or rather their size is 1.  This is basically designed so that hard coded things in the game (like thread used for suturing in hospitals, or soap bars used in cleaning) can use up portions of items without consuming the whole item.

The (A) you referred to is the reagent identifier, it allows the reaction to reference back to that particular reagent if it needs to.  For example, if you made a reaction that would take a piece of leather and turn it into a rope, using the reagent identifier allows you to tell the reaction to make the rope out of the same material as the leather.  For the purpose of this example, the command to do that is [GET_MATERIAL_FROM_REAGENT:"reagent identifier":NONE]

To learn more about reactions, check out http://dwarffortresswiki.org/index.php/DF2012:Reactions.  With a little reading and experimenting, you will make reactions your bitch in no time!
« Last Edit: February 28, 2013, 05:27:32 pm by Wannabehero »
Logged

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Modify reaction, need urgent help
« Reply #8 on: February 28, 2013, 05:25:06 pm »

On the side note it was a poor attempt to trick me to make 100 rutile from 150 copper bars.

Well, go ahead and put a 1 there and learn for yourself then.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modify reaction, need urgent help
« Reply #9 on: February 28, 2013, 06:08:59 pm »

If it were 1 bar, you'd get 15000 rutile, not 100.

Mohreb el Yasim

  • Bay Watcher
  • ♫♪♫♫♪♫♪♪♫♪
    • View Profile
Re: Modify reaction, need urgent help
« Reply #10 on: February 28, 2013, 07:40:51 pm »

I need to change one of the reactions, for example the woodfurnace, to produce not charcoal, but 50 or 100 rutile stone, or rutile blocks. Thanks.
on a side note if you need it urgently i would presume you would like to change it for an existing fort. in this case you need to modify the raw in the existing worlds folder and do not under any circonstances add a new reaction.
Logged
Mohreb el Yasim


GENERATION 24:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

mocman

  • Bay Watcher
    • View Profile
Re: Modify reaction, need urgent help
« Reply #11 on: February 28, 2013, 10:25:06 pm »

It is that easy.

[REAGENT:A:150:BAR:NO_SUBTYPE:INORGANIC:COPPER]
[PRODUCT:100:100:BOULDER:NO_SUBTYPE:INORGANIC:RUTILE]

i just wanted to know if there is any use for the NO_SUBTYPE token because the wiki only makes me more confused.
just is there any case where id need to put something in that 'slot'
Logged
Have a wonderful day

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modify reaction, need urgent help
« Reply #12 on: February 28, 2013, 10:28:21 pm »

NO_SUBTYPE is specifically for items and materials that don't have anything to put in that slot.