Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 17 18 [19] 20 21 ... 247

Author Topic: [MODDING] 0.40.x QUESTIONS THREAD  (Read 331782 times)

Darkweave

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #270 on: July 11, 2014, 04:53:37 am »

I've been wanting to learn how to mod Dwarf Fortress, beyond playing a tiny bit with creature tags, for quite a while. A few days ago I started playing with reactions and came up with the following to encrust weapons with gems:

Code: [Select]
[REACTION:ENCRUST]
   [NAME:encrust a weapon with gems]
   [BUILDING:CRAFTSMAN:CUSTOM_SHIFT_D]
   [REAGENT:gem:1:SMALLGEM:NONE:NONE:NONE]
   [REAGENT:weapon:1:WEAPON:NONE:NONE:NONE]
      [PRESERVE_REAGENT]
   [IMPROVEMENT:100:weapon:COVERED:GET_MATERIAL_FROM_REAGENT:gem:NONE]
   [SKILL:ENCRUSTGEM]

It worked great, so following that I wanted to make another reaction to encrust armour with gems. I discovered that armour pieces for different slots (legs, helms etc.) have different item tokens and I am unsure how to proceed. I'd like to avoid creating separate reactions for helms, gloves, feet etc. Is it possible create a single reaction that can take any armour piece and apply an improvement to it?
« Last Edit: July 11, 2014, 05:52:38 am by Darkweave »
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #271 on: July 11, 2014, 05:18:34 am »

How do item reaction products and material reaction products differ?

The item reaction product can declare the item token, too.

For an example, the brewing reaction uses GET_MATERIAL_FROM_REAGENT to turn the resulting booze into the right material of booze, depending on what was thrown into the vat, but it only ever makes DRINK.

However, with the appropriate ITEM_REACTION_PRODUCT tags added to different materials, we could have a reaction make a product like this:
Code: [Select]
[PRODUCT:100:2:GET_ITEM_DATA_FROM_REAGENT:raw material:TOURIST_TRASH]...which would put out whatever item of whatever material the main reagent's ITEM_REACTION_PRODUCT:TOURIST_TRASH token said in the material definition. Gold turns into rings, cloth into dolls, wood into puzzleboxes, beeswax into figurines, tin into bronze mini-forges...
« Last Edit: July 11, 2014, 05:21:33 am by scamtank »
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #272 on: July 11, 2014, 06:19:43 am »

I'd like to avoid creating separate reactions for helms, gloves, feet etc. Is it possible create a single reaction that can take any armour piece and apply an improvement to it?

I pored through the token lists, but it seems the reagent tokens don't have a [STUFF_YOU_PUT_ON] qualifier yet. Unfortunately, it seems you have to make a separate reaction for every armor type you want to decorate.

As an aside, it'd be plausible if you stuck to just encrusting chestpieces and helmets. That's where the real bling action always is.
Logged

siegebot

  • Escaped Lunatic
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #273 on: July 11, 2014, 12:31:55 pm »

Can one make adventurer start with specific gear(steel 2h sword for example)? I was thinking about making myself black swordsman/berserk mod so I could roleplay Gats while slaying monsters all around but getting specific equipment can be quite time consuming.
Logged

TheDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #274 on: July 11, 2014, 03:02:22 pm »

When modding armor, does the same values for [LAYER_SIZE:X] always affect weight the same amount, no matter the item type? Like, do iron gauntlets with [LAYER_SIZE:20] weigh the same as an iron breatsplate with [LAYER_SIZE:20]?
Logged
I love this community. Somebody asks "hay guise how do i tame shark", and then everybody is like "why don't we fling sharks at things with complex mechanical devices?".

WJLIII3

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #275 on: July 11, 2014, 03:08:24 pm »

It appears that the more complex [GAIT] is now used.
That's a little odd, since speed used to do other things unrelated to walking, such as determining how quickly you completed jobs...

That was one of Toady's stated goals, wasn't it? To separate movement and action speed?
Logged

Mictlantecuhtli

  • Bay Watcher
  • Grinning God of Death
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #276 on: July 11, 2014, 03:15:17 pm »

It appears that the more complex [GAIT] is now used.
That's a little odd, since speed used to do other things unrelated to walking, such as determining how quickly you completed jobs...

That was one of Toady's stated goals, wasn't it? To separate movement and action speed?

Yeah.
Logged
I am surrounded by flesh and bone, I am a temple of living. Maybe I'll maybe my life away.

Santorum leaves a bad taste in my mouth,
Card-carrying Liberaltarian

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #277 on: July 11, 2014, 03:39:15 pm »

In 0.34.x I used a reaction to make sure most entities had access to metals. The same reaction throws an error in 0.40.x. Is there an elegant way around this?

Code: (Reaction) [Select]
[REACTION:BASE_METAL]
[NAME:base metal]
[BUILDING:NONE:NONE]
[PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:SILVER][PRODUCT_DIMENSION:150]
[PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:TIN][PRODUCT_DIMENSION:150]
[PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:COPPER][PRODUCT_DIMENSION:150]
[PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:GOLD][PRODUCT_DIMENSION:150]
[PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:IRON][PRODUCT_DIMENSION:150]

Code: (Error) [Select]
*** Error(s) finalizing the reaction BASE_METAL
BASE_METAL: Unrecognized Building Token: NONE
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

FallenAngel

  • Bay Watcher
  • !!x(oᴥo)x!!
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #278 on: July 11, 2014, 03:42:28 pm »

Hmm...
I'm sure you want it to not be cheaty and have it assigned to a workshop...
I have no idea.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #279 on: July 11, 2014, 03:57:08 pm »

Hmm...
I'm sure you want it to not be cheaty and have it assigned to a workshop...
I have no idea.
If you want to prevent it from being used in fort mode, create a custom workshop that all entities can build, but make sure that workshop is more or less impossible to build (requires a slade sock or something).
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

stolide

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #280 on: July 11, 2014, 04:18:37 pm »

Forgive me if this has been asked already, but is it possible to modify the dialogue options, or change the things people say? Like, could I change the default greeting text to "Ahoy thar matey!"?
Logged
Under the somber sleep of stones, a star is snuffed by a candle.

As Urist McKant Said, "I must act according to the maxim such that I can will that maxim to destroy everything beloved to me at the flip of a lever."

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #281 on: July 11, 2014, 04:25:40 pm »

Forgive me if this has been asked already, but is it possible to modify the dialogue options, or change the things people say? Like, could I change the default greeting text to "Ahoy thar matey!"?

I haven't checked the differences between this version and the last one, but there are still speech files in the data/speech folder directory.
Logged

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #282 on: July 11, 2014, 04:30:19 pm »

Hmm...
I'm sure you want it to not be cheaty and have it assigned to a workshop...
I have no idea.
If you want to prevent it from being used in fort mode, create a custom workshop that all entities can build, but make sure that workshop is more or less impossible to build (requires a slade sock or something).
Was hoping to avoid that. The other option is to add it to a workshop, but have an impossible reagent.

Cheers.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Grey Goo

  • Bay Watcher
    • View Profile
    • The Metallic
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #283 on: July 11, 2014, 04:32:30 pm »

Or just create workshop and do not give access for entity to it? Just access to reaction..
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.40.x QUESTIONS THREAD
« Reply #284 on: July 11, 2014, 04:33:17 pm »

Hmm...
I'm sure you want it to not be cheaty and have it assigned to a workshop...
I have no idea.
If you want to prevent it from being used in fort mode, create a custom workshop that all entities can build, but make sure that workshop is more or less impossible to build (requires a slade sock or something).
Was hoping to avoid that. The other option is to add it to a workshop, but have an impossible reagent.

Cheers.

In the previous version you could assign it to a building and then just not give the entity the PERMITTED_BUILDING, and they would still have the metals. You could try that.
Logged
Pages: 1 ... 17 18 [19] 20 21 ... 247