Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Elf questions  (Read 1334 times)

someone12345

  • Bay Watcher
    • View Profile
Elf questions
« on: July 08, 2015, 07:23:50 am »

What is the tag for elves that makes them come with grown wooden items? Also, if I remove the wood weapons and wood armor tags, give the elves a reaction for metal bars, then enable furnace operating and weapon/armor smithing for them, will they come with metal gear?
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

Propman

  • Bay Watcher
  • Eh.
    • View Profile
Re: Elf questions
« Reply #1 on: July 08, 2015, 12:44:01 pm »

From what I've seen, it's not so much a tag as it is a sub-proerty of the wood harvesting ethic: any civilization that finds the destruction of trees misguided or worse will never use wagons, and will always use grown wooden objects if wood use is enabled in their entity.

A specific internal value is applied to item IDs in order to signify them as "grown" when it's first created, but I don't think there's any way to enable production of grown items with raw editing at the moment; as it's possible to change an object into grown via the gm-editor however, it should be possible to make a DF-hack script that does so.

As for the latter, yes.
Logged
Quote from: from Pathos on April 07, 2010, 08:29:05 pm »
( It was inevitable, really. )

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Elf questions
« Reply #2 on: July 08, 2015, 02:08:32 pm »

I could make a Lua hook for DFHack that would allow production of grown wood items in reactions if there is much demand for such.

Look for a script (in a thread of it's own, in this subforum) in a week or two.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

someone12345

  • Bay Watcher
    • View Profile
Re: Elf questions
« Reply #3 on: July 09, 2015, 01:11:37 am »

Will this work in an ongoing game (change an existing reaction to give bars, give it to the elves, enable the labors, and disable wood gear)?
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Elf questions
« Reply #4 on: July 09, 2015, 06:01:34 am »

Will this work in an ongoing game (change an existing reaction to give bars, give it to the elves, enable the labors, and disable wood gear)?
Most changes can take effect mid-game, though a few will cause crashes like giving a creature another appearance modifier then looking at a historical figure who was around before that appearance modifiers was added. However, any change to entities won't. So you would be able to change an existing reaction in an existing game to do something else, and if say, the dwarves already had access to it then if you went into fortress mode you could do the reaction. However if they didn't have it, adding it to their entity would be a change to the entity, which don't affect already existing worlds. Then enabling the labors and disabling the wood gear would definitely not work.

I am quite interested in how changing an existing reaction changes a civilization's access to resources. Like if you added a free adamantine reaction to dwarves, they would then have adamantine you could buy from them, but then you change it to giving some worthless metal you added in to the game for free. Would they still have adamantine? Would they have the new metal? I think this could be worthy of testing.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Elf questions
« Reply #5 on: July 10, 2015, 01:34:30 pm »

Not being able to use adamantine is a property of the metal, basically any "wafer" metal will not be available to your civ. If you make adamantine use normal bars instead of wafers it will be available (but you will need to generate a new world).

Material availability in general is stored in the save, but it is possible to add or remove materials after world generation if you are willing to do some DFHacking.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Elf questions
« Reply #6 on: July 18, 2015, 10:35:15 am »

I have a possible grown item reaction script.

You need to use "modtools/reaction-product-trigger" (which I have never used before) to run this script every time your reaction finishes.
What the script does is set the "grown" flag on every product of the reaction.

Code: [Select]
-- Command to register a reaction to use this script:
-- modtools/reaction-product-trigger -reactionName MY_REACTION -command [ thisscript \\OUTPUT_ITEMS ]
-- Replace "MY_REACTION" with your reaction name, and "thisscript" with whatever you end up naming this script.

for _, id in ipairs({...}) do
local item = df.item.find(id)
if item ~= nil then
item.flags2.grown
end
end
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS