Bay 12 Games Forum

Please login or register.

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

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

Upright Path

  • Bay Watcher
    • View Profile
Reaction Tutorial/Information
« on: April 06, 2010, 01:24:32 am »

Instead of the information that was up here before, please view the Wiki page created off the information. For any corrections/additions, please post in this thread.

http://df.magmawiki.com/index.php/Reactions

Edit: Replaced with Wiki Page that is 'mostly' complete.
« Last Edit: April 08, 2010, 10:36:22 am by Upright Path »
Logged

Acanthus117

  • Bay Watcher
  • Angry Writer
    • View Profile
Re: Reaction Information
« Reply #1 on: April 06, 2010, 01:28:02 am »

This is good!
Logged
Is apparently a Lizardman. ಠ_ಠ
YOU DOUBLE PENIS
"The pessimist is either always right or pleasantly surprised; he cherishes that which is good because he knows it cannot last."

ZeroGravitas

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #2 on: April 06, 2010, 02:02:51 am »

Could you provide some examples  to help  clarify? It  looks  really useful, but I  was thinking of trying a reaction in the smelter (or  maybe the kitchen...) to  get rid of all those pesky vermin remains so  they don't  clog up my item list.  I'll try putting  that together,  unless you can tell  me it wouldn't work.
Logged

Upright Path

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #3 on: April 06, 2010, 02:08:51 am »

Vermin Reaction (Guess)

[REAGENT:DESTROY_VERMIN]
[REAGENT:A:VERMIN:NONE:NONE:NONE]
[PRODUCT:100:1:BONE:NONE:GET_MATERIAL_FROM_REAGENT:A:BONE]
[SKILL:BUTCHER]

Something like that. I'm making a lot of guesses in the product part. So don't trust me. Heh.
Logged

Lofn

  • Bay Watcher
  • There was a hole.
    • View Profile
    • Tumblr
Re: Reaction Tutorial/Information
« Reply #4 on: April 06, 2010, 05:44:59 am »

You should tidy this up a little and throw it on the wiki, there seem to be an impressive number of modding tutorials coming together.
Logged
Also known as Zuhayr.

BlazingDav

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #5 on: April 06, 2010, 05:53:32 am »

Now we just need to work out all the item tokens and we can enter the next age of DF reaction modding =P

I know PLANT changed to PLANT_MAT I think it was

Also on another note, the automatic tag looks promising, render fat being automatic, I presume the reaction automatically is put down as a job when the materials are available, if we apply this to a booze reaction on the still, life could be looking alot easier for managing the fort =P
Logged

Fox the Undead

  • Bay Watcher
  • Frozen Dwarf Gas
    • View Profile
Re: Reaction Tutorial/Information
« Reply #6 on: April 06, 2010, 06:22:11 am »

Well, actually, i think that reactions are modable for all buildings with not hardcoded reaction list (hardcoded is still and mechanic's workshop, not hardcoded is smelter and others). But this is still need some research.
Logged

Upright Path

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #7 on: April 06, 2010, 09:38:59 am »

Currently buildings such as the Mason's Workshop and Carpenter's Workshop cannot have custom reactions added to them. At least, no one on the forum has posted the secret of doing it.

This is because in the [BUILDING:TYPE:KEY] the TYPE isn't known for most of the hardcoded workshops. In the case of the Mason's Workshop, I've tried TYPE=MASON, MASONRY, MASONS, MASONS_WORKSHOP, MASON_WORKSHOP, MASONRY_WORKSHOP, WORKSHOP_MASON, etc.

I do need to add some other tags to the listing and I need to test others, but I'm using my Netbook which lags  horribly playing DF right now.
Logged

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Reaction Tutorial/Information
« Reply #8 on: April 06, 2010, 10:01:00 am »

I've done some testing with PRODUCT_DIMENSION; 150 is the size for Bars, 15000 is the size for Thread (see Adamantine) and 10000 is what I assume cloth is, since people have complained of a "need 10000 cloth" bug.
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

Upright Path

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #9 on: April 06, 2010, 11:39:46 am »

Alright! I just need to figure out how to put things in the Wiki-- learn the language and the templates and everything-- and I'll start putting this stuff up.
Logged

ZeroGravitas

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #10 on: April 08, 2010, 03:47:53 am »

Hmm so I tried

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

along with adding the appropriate "allowed reaction" entry to the entity raw:

[PERMITTED_REACTION:DESTROY_VERMIN]

it didn't work. (obviously i don't want actual adamantine, i just want to see if it works first). Any advice? Should it be VERMIN:NONE:REMAINS:NONE?

Or do I need to do an individual entry for every kind of vermin remains? The 40d wiki seems to indicate it needs a "creature id" but I'm not sure what that is, or if it's out of date.
« Last Edit: April 08, 2010, 03:49:37 am by ZeroGravitas »
Logged

Upright Path

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #11 on: April 08, 2010, 03:57:04 am »

I'm not sure, I honestly haven't tried a reaction with a vermin. I think it has to do with whether the vermin can be picked up and carried and the like.

I believe... That the only way to pick up a vermin is to use a Small Animal Trap, but I don't know if a trapped animal like that can be used since the game seems to have trouble finding items inside of containers (See stuff about sand and the need for the [CONTAINS_LYE] tag).

As for using REMAINS? You'd have to specify it for every creature type you want to be used, otherwise any remain could be used. Or, you could probably get away with adding a [REACTION_CLASS:VERMIN] tag to all of the vermin in the raws, then using something like [REAGENT:A:VERMIN:NONE:NONE:NONE][REACTION_CLASS:VERMIN].
Logged

ZeroGravitas

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #12 on: April 08, 2010, 04:01:41 am »

I'm not sure, I honestly haven't tried a reaction with a vermin. I think it has to do with whether the vermin can be picked up and carried and the like.

I believe... That the only way to pick up a vermin is to use a Small Animal Trap, but I don't know if a trapped animal like that can be used since the game seems to have trouble finding items inside of containers (See stuff about sand and the need for the [CONTAINS_LYE] tag).

As for using REMAINS? You'd have to specify it for every creature type you want to be used, otherwise any remain could be used. Or, you could probably get away with adding a [REACTION_CLASS:VERMIN] tag to all of the vermin in the raws, then using something like [REAGENT:A:VERMIN:NONE:NONE:NONE][REACTION_CLASS:VERMIN].

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.
« Last Edit: April 08, 2010, 04:09:00 am by ZeroGravitas »
Logged

Upright Path

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #13 on: April 08, 2010, 04:08:31 am »

Huh. Learn something new there every day. I'll admit that the only time I ever got far enough in a game to get sieged my whole military was slaughtered, which started a tantrum spiral-- Some of my military had spouses-- and I was left with like ten units who subsequently died of thirst due to the destruction during the tantrum. Heh.

Which is to say that by the time I could actually notice the corpse parts, it was too late for me to actually worry about them. xD
« Last Edit: April 08, 2010, 04:26:13 am by Upright Path »
Logged

Ampersand

  • Bay Watcher
    • View Profile
Re: Reaction Tutorial/Information
« Reply #14 on: April 08, 2010, 04:32:03 am »

I think ash, being bars, have dimension properties, which means you can set the dimension for vermin remains to be something like, 5, and have the reaction to be a slow but rather balanced method of generating ash if you don't care to use your precious wood.

I have another question, though. Do custom reactions show up in the manager?
Logged
!!&!!
Pages: [1] 2 3 ... 7