Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Regarding metal usage by civilization -- Important discovery for entity modders.  (Read 5223 times)

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile

Firstly, I apologize if these observations and research have been covered elsewhere. I did a quick search and didn't see this in the modding board, and that sort of embarassing mistake happens here from time to time. If not, I may have stumbled upon one of the most significant undocumented changes to the way the raws work yet. Anyway...


Shortly after 31_01 was released, I was disheartened by the fact that METAL_PREF no longer appears to help determine metal usage. At first glance, between this and the lack of MINOR_METAL, it appeared a portion of my upcoming megamod would be unimplementable.

However, when I was looking through some other threads (might have been on the bug tracker), someone mentioned that humans can only make use of bronze and a few minor alloys. One observant commenter noticed that humans lacked a permitted reaction tag for steel and whatnot. Another commenter, however, that dwarves can use iron while humans cannot, and unlike steel, iron smelting was defined from the iron ore raws rather than the reaction files, and PERMITTED_REACTION tags do not exist for native ores. Also, my own tests revealed that humans also cannot make things from tin or copper, the two components of bronze. This oddity, along with the rest of the previous two paragraphs, led me to a series of additional tests that led me to a rather startling conclusion or two.


  • Firstly, a race's access to alloys -- metals such as steel and rose gold, which are not found in ores -- are determined by a race's [PERMITTED_REACTION:x] tags in the entity file. I think this was implied already, by the information in the last paragraph.
  • Secondly, a race's access to ore metals -- metals such as iron and copper, which can be found by smelting ores such as hematite and native copper -- are determined by whether or not the race has the [STONE_PREF] tag.
  • The above two are independant of each other; if a race does not have access to the ore metals required for a reaction they can use (as is the case with humans and copper, tin, and bronze), they can still use the alloy. This may not be the case in all situations, but they can embark with bronze, their shops have bronze, and I think their soldiers have bronze too.

As I previously said, earlier this month I was worried that metal availability by race would be much more difficult. However, given the above conclusions. This is not the case; rather, the exact opposite is evident:


In the DF2010 generation, Dwarf Fortress modders have far more control which metals an individual race can use than we ever had before.


Use the information in this thread as you will. Mind you, if anyone can refute my findings, please do so.

One mystery I've yet to solve: when I play a dwarven adventurer, I generally start with bronze. More research may be needed.
« Last Edit: April 26, 2010, 08:43:38 pm by Untelligent »
Logged
The World Without Knifebear A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

Arkenstone

  • Bay Watcher
  • Perfect Clear Diamond
    • View Profile

I noticed this for the alloys, but not for the ores.
I had planned on using this by adding [ITEMS_BARRED] to ore metals, and giving kobalds etc. an 'impure copper' metal raw reaction.
I also planned on using this to block the worldgen creation of high-end materials without using the [DEEP] tag: the reaction used to create such materials would require something that was only made by a different civ as a catalyst; you could attain it in fortress mode, but your civ can't.
Logged

Quote from: Retro
Dwarven economics are still in the experimental stages. The humans have told them that they need to throw a lot of money around to get things going, but every time the dwarves try all they just end up with a bunch of coins lying all over the place.

The EPIC Dwarven Drinking Song of Many Names

Feel free to ask me any questions you have about logic/computing; I'm majoring in the topic.

D_E

  • Bay Watcher
    • View Profile

Awesome discovery!
Logged
Mods I've done:
Zelda mod-mod, Beta in the Wild DF 47.04
Illithid Empire mod DF 31.25 (update canceled)
Spotter's Guide to Illithids (Genesis mod-mod) genesis 3.19a4 (update canceled)

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile

So would this mean that by adding dummy reactions that make metals without use of any products, we could control EXACTLY what metals a race can use?

Acanthus117

  • Bay Watcher
  • Angry Writer
    • View Profile

This is interesting news... I'm gonna give it a shot.

Thanks, Unintelligent!
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."

Arkenstone

  • Bay Watcher
  • Perfect Clear Diamond
    • View Profile

So would this mean that by adding dummy reactions that make metals without use of any products, we could control EXACTLY what metals a race can use?
Well, it's probably best if you put some sort of ingredients; it helps keep "the feel of the game" intact.  I'd be all for a reagent-less reaction that produces wood for the elves at a custom "stone circle" workshop though.
Logged

Quote from: Retro
Dwarven economics are still in the experimental stages. The humans have told them that they need to throw a lot of money around to get things going, but every time the dwarves try all they just end up with a bunch of coins lying all over the place.

The EPIC Dwarven Drinking Song of Many Names

Feel free to ask me any questions you have about logic/computing; I'm majoring in the topic.

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile

Oh, that is handy to know!

Do we know if this restriction also applies to what merchants bring? Or only to what shows up equipped on soldiers? I'd assume they'd be the same, but with the current trade system one can never be sure.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

Arkenstone

  • Bay Watcher
  • Perfect Clear Diamond
    • View Profile

Oh, that is handy to know!

Do we know if this restriction also applies to what merchants bring? Or only to what shows up equipped on soldiers? I'd assume they'd be the same, but with the current trade system one can never be sure.
I think it just tells the game what's available to a given civ, not what they do with it.
Logged

Quote from: Retro
Dwarven economics are still in the experimental stages. The humans have told them that they need to throw a lot of money around to get things going, but every time the dwarves try all they just end up with a bunch of coins lying all over the place.

The EPIC Dwarven Drinking Song of Many Names

Feel free to ask me any questions you have about logic/computing; I'm majoring in the topic.