Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Produce divine metal via reaction, in fortress mode?  (Read 2029 times)

Walkaboutout

  • Bay Watcher
    • View Profile
Produce divine metal via reaction, in fortress mode?
« on: January 23, 2022, 05:21:42 pm »

Is it possible to mod an existing reaction (or create a new one, in the case of generating a new world), to output the divine metals/materials?

I know how they're named, I've seen them in the uncompressed saves; usually INORGANIC and DIVINE_1, DIVINE_2, etc.

But, since they're not in the raws (instead defined in the world .dat area), is it even possible to force them to be the output of a reaction, without using something like DFHack? The error log just always returns an unknown token when I try this, and in game it just produces magma (standard broken reaction I think, right?).

So as an example, I was simply altering an existing reaction. In this case, I tried hijacking brass making. Note the product is METAL:DIVINE_1. I also tried using INORGANIC:DIVINE_1. I have also, of course, tried additional numbers on the DIVINE part. But, as mentioned, I end up with magma as the output, and an error in the error log about an unrecognized token. So, something like this is what I tried:

Code: [Select]
[REACTION:BRASS_MAKING]
[NAME:make brass bars (use ore)]
[BUILDING:SMELTER:NONE]
[REAGENT:A:1:METAL_ORE:ZINC]
[REAGENT:B:1:METAL_ORE:COPPER]
[PRODUCT:100:8:BAR:NO_SUBTYPE:METAL:DIVINE_1][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:SMELT]

Am I missing something I should be doing? Is there a way this works that I don't understand, or is it just not possible, because of the way the divine metals are generated? I understand that I could just create them in the raw files, and define them by hand as a work around, but I was hoping to just utilize what is generated for the world itself.
Logged

Urlance Woolsbane

  • Bay Watcher
    • View Profile
Re: Produce divine metal via reaction, in fortress mode?
« Reply #1 on: January 24, 2022, 11:03:25 pm »

Most of the procedurally generated raws are created after the normal raws are loaded, this being necessitated by the reliance of the former on elements of the latter; the one exception, as far as I can tell, is languages, as I have been able to assign the divine tongue to predefined entities (though I can't say if this works in the latest version). Thus, when your altered reaction is loaded, no metal with the ID of DIVINE_1 yet exists, which naturally causes an error.
Logged
"Hey papa, your dandruff is melting my skin. Is that normal?"
"SKREEEONK!!!"
"Yes, daddy."

dikbutdagrate

  • Bay Watcher
    • View Profile
Re: Produce divine metal via reaction, in fortress mode?
« Reply #2 on: January 28, 2022, 05:49:12 pm »

Most of the procedurally generated raws are created after the normal raws are loaded, this being necessitated by the reliance of the former on elements of the latter; the one exception, as far as I can tell, is languages, as I have been able to assign the divine tongue to predefined entities (though I can't say if this works in the latest version). Thus, when your altered reaction is loaded, no metal with the ID of DIVINE_1 yet exists, which naturally causes an error.

Right, what Woolsbane said. So if you're interested in tossing divine metal into a fort you can use DFhack, if you want to cheat in. But if you're looking to open up gameplay that allows you to acquire divine metal, without having to send troops or adventures down into vaults, you'll have to hardcode a metal into the inorganic metal raws prior to world gen, in which you'll have to specify the exact properties of divine metal, and just call it "divine metal" or whatever name you want to go with.

That being said, I know most of the properties of divine metal, but I've never seen a working raw file example that is 100% demonstrably the same as the divine metals that are actually generated in game. I'd love for one to be added to the wiki.
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: Produce divine metal via reaction, in fortress mode?
« Reply #3 on: January 29, 2022, 11:43:33 am »

Here's a compilation of the hardcoded (inside the EXE file) materials. Divine metals not here cos they're generated.
http://www.dfwk.ru/Hardcoded_materials.txt
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Produce divine metal via reaction, in fortress mode?
« Reply #4 on: January 29, 2022, 05:31:36 pm »

I added some extracted divine metal (and fabric) raws to the wiki at the bottom of the corresponding article. It won't solve any of the original problem, but hopefully they are useful/interesting to look at nonetheless.

dikbutdagrate

  • Bay Watcher
    • View Profile
Re: Produce divine metal via reaction, in fortress mode?
« Reply #5 on: January 31, 2022, 02:57:27 pm »

I added some extracted divine metal (and fabric) raws to the wiki at the bottom of the corresponding article. It won't solve any of the original problem, but hopefully they are useful/interesting to look at nonetheless.

Thanks Voliol!
Logged

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Produce divine metal via reaction, in fortress mode?
« Reply #6 on: January 31, 2022, 04:00:29 pm »

Much obliged. Digging up the raws was also an experience, as after I noticed the different metals/fabric had different colors I just felt complied to find them all out. But as they are generated materials, and the save file raw extractors I know of (and certainly the half-measure I made myself) are only able to extract raws that are actually put in the save files, just a single file (the one I used for the examples) wouldn't do for getting all the colors. So I started genning worlds, hoping to eventually get the complete set of divine materials and thus their colors. It took 11 large worlds, and some python scripting to see whether the extracted raws actually contained the yet-to-be-found materials (and auto-format it to mediawiki tables), to reach the results now on the wiki.

Now, I am quite confident I found all the materials since I'd expect to have found at least one other "unknown" material if there were more to be found, and also the extant material names are all found in one place (well, two, one for the metals and one for the fabrics) in the string dump, but this is still strange. Both the metals and the fabrics have fewer sphere-aligned types than there are sphere in totals, some spheres having no metal or fabric associated, such as JEALOUSY and FISH. So what happens when the relevant deity has no spheres with usable spheres? Do the angels have to go naked? Or do they get some other material to use, like an already genned divine material? Or is a usable sphere pulled from somewhere? It's a mystery until someone !science!s it up.

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: Produce divine metal via reaction, in fortress mode?
« Reply #7 on: January 31, 2022, 05:42:30 pm »

So what happens when the relevant deity has no spheres with usable spheres? Do the angels have to go naked? Or do they get some other material to use, like an already genned divine material? Or is a usable sphere pulled from somewhere? It's a mystery until someone !science!s it up.

!Science! has been conducted:

World with only elves and goblins.  First thing of note: the demons thrust their spires themselves, without divine aid.  Slabs and vaults spawned as normal.  Legends dump reveals there are no angels at all.  Couldn't find any slabs in the vaults, either, but that may be an unlucky repetition of the known vault generation bugs.  Legends mode insists the slabs are stored normally.  Uncompressed savefile revealed divine materials: "singing metal", "sonorous lines", "multicoloured metal", "blazing cloth", "pock-marked metal", "clear-blue cloth", etc. with 20 total materials, as well as the Divine language, but no angels.

Spheres involved were Jealousy, Torture, and Dawn.

Feel free to cite this on the wiki.

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Produce divine metal via reaction, in fortress mode?
« Reply #8 on: February 01, 2022, 09:14:07 am »

So what happens when the relevant deity has no spheres with usable spheres? Do the angels have to go naked? Or do they get some other material to use, like an already genned divine material? Or is a usable sphere pulled from somewhere? It's a mystery until someone !science!s it up.

!Science! has been conducted:

World with only elves and goblins.  First thing of note: the demons thrust their spires themselves, without divine aid.  Slabs and vaults spawned as normal.  Legends dump reveals there are no angels at all.  Couldn't find any slabs in the vaults, either, but that may be an unlucky repetition of the known vault generation bugs.  Legends mode insists the slabs are stored normally.  Uncompressed savefile revealed divine materials: "singing metal", "sonorous lines", "multicoloured metal", "blazing cloth", "pock-marked metal", "clear-blue cloth", etc. with 20 total materials, as well as the Divine language, but no angels.

Spheres involved were Jealousy, Torture, and Dawn.

Feel free to cite this on the wiki.

Interesting. What do you mean the spheres involved "Jealousy, Torture, and Dawn"? Are those the spheres of the demon(s)?

It seems all of my genned worlds have the same amount of divine materials, or at least genned materials (also including evil weather), 72 in total. Maybe the materials are generated first, and then any angels make a selection from the available materials somehow relying on the sphere of their deity.

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: Produce divine metal via reaction, in fortress mode?
« Reply #9 on: February 01, 2022, 03:23:38 pm »

Interesting. What do you mean the spheres involved "Jealousy, Torture, and Dawn"? Are those the spheres of the demon(s)?

Yes.  Though now it occurs to me that the Megabeast spheres (dragon -> fire, wealth) and the elven force speheres (river, forests?) also exist in the world.