Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Is recreating the "Make Large wooden Gem" REACTION at the CRAFTSMAN impossible?  (Read 2306 times)

Mechanixm

  • Bay Watcher
    • View Profile

I am losing my friggin' mind over this.

I was working on creating a different post (to a completely unrelated problem) when I stumbled across something that I had been taking for granted for years.  I just assumed that I knew how to create a REACTION to create Large Gems...well, it turns out I was wrong.  Way wrong.

Like some hairless elven monkey, I foolishly thought it would be as simple as this:
Spoiler (click to show/hide)

Looks straightforward enough, right?  Take a wood, make a "Large"GEM out of wood.  Easy peasy.  I mean, this is custom REACTION 101 right here...

Wrong!

Here is what my REACTION Produces:
Spoiler (click to show/hide)

"Woah woah woah, there Urist.", I says.  Where in the HFS is my Round Cabochon descriptor?

I KNOW it should be creating a Round Cabochon because that is the only STONE_SHAPE I currently have allowed for my ENTITY.

[STONE_SHAPE:ROUND_CABOCHON].
Spoiler (click to show/hide)

I think this means that whenever I create a "Large"GEM at the CRAFTSMAN, using either Wood, Stone, Bone, etc., it will always produce a "Large"GEM that will be a Round Cabochon.

Back at the CRAFTSMAN, here is what the existing "Make Large wooden Gem" REACTION Produces:
Spoiler (click to show/hide)

And to confirm my theory on the STONE_SHAPE:ROUND_CABOCHON CRAFTSMAN output:
Round Cabochons for days...
Spoiler (click to show/hide)

So I says to myself, "Huh...  What did I do wrong?"

It was at this point that I spent about 30 hours over the past week trying to get this stupid thing to work.

I was under the impression that the REACTION would look something like what I have listed above.  This was due, in part, to the "carve bone cabochon" REACTION that is present in the reaction_other.txt file:

Make Large Bone Gem from reaction_other.txt
Spoiler (click to show/hide)

It follows the same format right?  Take a bone, make a "Large"GEM out of bone.

Additionally, there aren't any unfamiliar TAGS, or REACTION_CLASS stuff, or anything like that.

[USE_BODY_COMPONENT][ANY_BONE_MATERIAL][UNROTTEN] - This is totally normal for creating stuff out of BONE.

[REAGENT:tool:1:NONE:NONE:NONE:NONE][PRESERVE_REAGENT][HAS_EDGE] - This is unnecessary for the REACTION we're trying to recreate.  The other Large Gem REACTIONs at the CRAFTSMAN don't require additional TOOLs.  It's just additional Adventure mode "flavor."

[PRODUCT_TOKEN:gem] - This is the only piece I'm not 100% sure about.  I'm assuming it's not necessary because "gem" is not being immediately referenced in this REACTION to create an IMPROVEMENT.

From the "carve bone cabochon" REACTION there, you should be able to safely assume that the REACTION for creating a Large "BoneType" bone cabochon at the CRAFTSMAN would also follow this same basic formula.  I mean, the damn thing has Cabochon in its name.  Surely it will make a Cabochon of SOME type, right?

Sadly, just like me, you are wrong.  This is not the case.

Here is what the [REACTION:CARVE_BONE_GEM] would look like in Fortress Mode and set to the CRAFTSMAN:
Spoiler (click to show/hide)

Here is what it produces (the donkey had it coming):
Spoiler (click to show/hide)

Here's what the actual "Make Large bone Gem" REACTION Produces:
Spoiler (click to show/hide)

I've had enough of your crap, Urist!  Give me my damn Round Cabochons!!!

...

I will save you all, my fellow modders, the hundreds and hundreds of variations of REACTIONs and other examples I've iterated and generated to come up with a solution for this basic REACTION to produce Round "material" Cabochons, and simply ask you this:

Does anyone know how to do this, or is it impossible?

Or...am I just too drunk to figure it out? (Never underestimate the potency of Whiskey.)




Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

I was a bit confused while reading your post, until I realized that you were using the term "REACTION" to refer to all jobs, not just custom ones (which are defined as "reactions").

The difference in behavior between "Cut Gem" jobs and custom reactions could be attributed to the fact that the former is only ever expected to work on Stones and Gems, so when it tries to determine the shape it just checks "If it's a gem, pick a gem shape, otherwise pick a stone shape". By comparison, custom reactions are expected to work with any material, so it would presumably only apply shapes to items made of Gem or Stone (of which Bone and Wood are neither).

It is also possible that Toady added extra logic for assigning shapes to Bone gems but only applied it to Adventurer mode, which would explain why it doesn't work when you change the reaction to be usable in Fortress mode.
« Last Edit: June 11, 2020, 04:59:38 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Mechanixm

  • Bay Watcher
    • View Profile

Thanks for the reply Quietust.  I kept using "REACTION" because the name of reaction objects start like this:  [REACTION:MAKE_A_THING]

Making Large Gems is already part of the vanilla game.  They can be made in the Craftsdwarf workshop out of the following materials:

rock, wood, bone, shell, ivory/tooth, and pearl
Spoiler (click to show/hide)

I'm trying to re-create the Make Large wooden Gem in particular, but I can't get it to actually produce a "Large Round (type of wood) wood Cabochon.  All of the products of the hundreds of "[PRODUCT:" tokens I've tried to make will NOT create the Large Gem item with the ROUND_CABOCHON descriptor.

E.G.  The best results of my testing will produce either "Large wood Gem", or "Large (wood type) wood Gem", or just plain old "Large Gem".  But never "Large Round (wood type) wood Cabochon", which is what the is produced at the CRAFTSMAN when you run the default "Make Large wooden Gem" reaction.

This is what I'm trying to figure out.

Spoiler (click to show/hide)



Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

I apparently forgot that a "Make Large Gem" job was added a while back - I typically only play older versions in which large gems can only be made (randomly) via the "Cut Gem" job (and when they didn't have any special shapes to begin with).

As I explained above, it's possible that custom reactions simply don't work for creating shaped gems with unusual materials. What happens if you change them to use Stone instead of Wood/Bone?
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Mechanixm

  • Bay Watcher
    • View Profile

It works the same way for stone, wood, and bone.

Make Large stone Gem
Spoiler (click to show/hide)

Make Large wooden Gem
Spoiler (click to show/hide)

Make Large bone Gem
Spoiler (click to show/hide)

I stumbled upon the [IS_GEM] tag that you can place as a Product Token, and this will change the products of my test reactions on the STONE materials to now say gem. 
I.E. "large orthoclase gem"

It's odd that it works that way for STONE seeing as how BONE and WOOD will slap on the "gem" at the end of the PRODUCT automatically.


This all leads to another question though: How do you specify the Descriptor Shape during a CUTGEM reaction?

If I wanted to take a Rough Diamond and CUT it into a Round Brilliant Cut Diamond, how would that work?

[REACTION:CUT_DIAMOND_ROUND_BRILLIANT]
[NAME:Cut Round Brilliant Clear Diamond]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:A:1:ROUGH:INORGANIC:DIAMOND_CLEAR:NONE]
[PRODUCT:100:1:SMALLGEM:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]

Where in there would I specify what Shape or Cut the PRODUCT is supposed to be?

...or for testing purposes, something like this:
[REACTION:CUT_DIAMOND_ROUND_BRILLIANT]
[NAME:Cut Round Brilliant Clear Diamond]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:A:1:WOOD:NONE:NONE:NONE]
[PRODUCT:100:1:SMALLGEM:NONE:INORGANIC:DIAMOND_CLEAR:NONE]
[SKILL:CUTGEM]


I swear, the longer I play around with this stupid thing the more questions I have.

FantasticDorf

  • Bay Watcher
    • View Profile

There are metal large gems too produced at forges in the 'other object' categories, which help tick boxes in terms of their value from precious metals and overlapping dwarf interests on form & texture for major benefits in display pieces. It may be something linked to material definition type.

This all leads to another question though: How do you specify the Descriptor Shape during a CUTGEM reaction?

Small-gems are subject to being modified by their civilization endorsed shapings which are randomly applied from the list within their entry on entity.txt pretty much, i don't really pay enough attention to notice whether large gems should even have a definable shape but ill lean back on my previous explanation of material type.

Stone has [IS_HARD] and [IS_STONE] seperately, metal large gems have their own thing but i've don't recollect them having shapes but due to the circumstance of [IS_METAL] they might possibly do so. Psuedo between inorganic material for your gem-wood or whatever might resolve the problem even if it makes it a bit more linear.

[ITEMS_DELICATE] might be a shot in a dark for a custom material if you don't want it appearing anywhere else.

Here's the broad list of known material definition tokens, which by means of elimination you can probably find some suitable compromise or solution.
http://dwarffortresswiki.org/index.php/DF2014:Material_definition_token
Logged

Mechanixm

  • Bay Watcher
    • View Profile

I feel like I have the wiki memorized at this point; I've been spending so much time going over and over and over the pages.

The only descriptor I have set for my civilization is "[STONE_SHAPE:ROUND_CABOCHON]".

And, we can tell that the game sees this by doing the vanilla Large Gem Cut reactions at the Craftsdwarf Shop.  Every product will be named Large round [material] Cabochon, regardless of the material used.  Yet, every custom reaction, that I believe is identical to the Vanilla Craftsdwarf Shop reaction, does not include that descriptor when I try to produce a product of either Large Or Small Gems.

I know for certain that I can produce the Large Gems with the descriptor text by creating a custom material or by adding in additional Reaction Class elements.  I find it incredibly strange, though, that I can't recreate the reaction without modifying the Vanilla Raws.

Where are you getting the [ITEMS_DELICATE] token from?  The only mention I can find to anything related to "Delicate" is in the item_instrument_example.txt.  I'll give it a shot though.



FantasticDorf

  • Bay Watcher
    • View Profile

Where are you getting the [ITEMS_DELICATE] token from?  The only mention I can find to anything related to "Delicate" is in the item_instrument_example.txt.  I'll give it a shot though.

Amber & Coral carry it, its on the wiki and you can see for yourself by trawling the files. Item_instrument_example text is a overcomplicated bottomless pit (it takes 2 hours of research to make a simple consistently replicated flute which automatically generates flute-forms for the civ it's given to even if they can't generate music themselves from the randomized music instrument token to generate types) but the reason the word delicate is there is just as a descriptor in the music, whether on its own or with others.

The only pre-existing function of item's delicate that i know of is to keep it out of typical reach of civilizations, but both materials are commonly used in modifications too.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

Amber & Coral carry it, its on the wiki and you can see for yourself by trawling the files.

Er, those materials are hardcoded, so you'll never find them by looking through the raws - the "raws" you see on the wiki were generated using DFHack by looking at the material structures in memory.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Mechanixm

  • Bay Watcher
    • View Profile

I think we're getting side-tracked.  :)

Does anyone know how to apply the Shape Descriptors to the Gem Cutting REACTIONs?