Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: (solved) pls help with my bug: EXTRACT dissection produces "none"  (Read 1764 times)

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website

I made a vermin that appears at beaches and can be dissected.  Its extract is a dye powder.  (It is Tyrian Purple.)

The creature and the dye work as expected, and the dye even shows up in coastal civ clothing.

But dissecting the creature produces "none" eversince I switched from local mat to plant material.  The item cannot be used in any way.  Any ideas what could be wrong?

Spoiler: creature file (click to show/hide)


EDIT: solved
« Last Edit: October 18, 2021, 01:35:55 pm by Mobbstar »
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: pls help with my bug: EXTRACT dissection produces "none"
« Reply #1 on: October 15, 2021, 01:27:18 pm »

Slap a "reagent does not determine amount" to bypass realistic equations and just generate the product if there's a problem sizing it up.

On another note, you could just attribute it to vermin directly without a middle plant workaround by just using a material definition with [POWDER_DYE] to POWDER_MISC item type, POWDER_MISC_CREATURE, prefix none and add whatever you need there.

edit: Oh i half read and skewed my reply, good save Quietust.
« Last Edit: October 15, 2021, 05:38:32 pm by FantasticDorf »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: pls help with my bug: EXTRACT dissection produces "none"
« Reply #2 on: October 15, 2021, 04:36:40 pm »

The problem is most likely that creature extracts are being explicitly created as LIQUID_MISC items, and your MILL material doesn't have a liquid state name (since PLANT_POWDER_TEMPLATE defines the liquid state name as "none").

You'll probably also need to add an extra reaction to convert it into a POWDER_MISC (and place it into a bag instead of a vial) before you'll be able to actually use it.
« Last Edit: October 15, 2021, 04:43:08 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.

Thisfox

  • Bay Watcher
  • Vixen.
    • View Profile
Re: pls help with my bug: EXTRACT dissection produces "none"
« Reply #3 on: October 16, 2021, 02:55:22 pm »

This is... wonderful. We could get Cochineal this way too, I think?

Can you post the finished product when you get it to work? I'm intrigued.
Logged
Mules gotta spleen. Dwarfs gotta eat.
Thisfox likes aquifers, olivine, Forgotten Beasts for their imagination, & dorfs for their stupidity. She prefers to consume gin & tonic. She absolutely detests Facebook.
"Urist McMason died out of pure spite to make you wonder why he was suddenly dead"
Oh god... Plump Helmet Man Mimes!

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: solved my bug: EXTRACT dissection produces "none"
« Reply #4 on: October 18, 2021, 12:18:12 pm »

Sorry to have left you waiting.  It has been a wild weekend.

The problem is most likely that creature extracts are being explicitly created as LIQUID_MISC items, and your MILL material doesn't have a liquid state name (since PLANT_POWDER_TEMPLATE defines the liquid state name as "none").

You'll probably also need to add an extra reaction to convert it into a POWDER_MISC (and place it into a bag instead of a vial) before you'll be able to actually use it.

This was the solution.  The extract was indeed a liquid despite using the dye powder template.  I tried reactions that only convert the material to POWDER_MISC and reactions that only put it in a bag, but neither makes the dye usable.  Turning it into a powder and putting it in a bag successfully lets the dye be used (despite still using the same material).

It works now.  Thank you for the explanation!

This is... wonderful. We could get Cochineal this way too, I think?

Can you post the finished product when you get it to work? I'm intrigued.

I didn't mean to make this a proper mod.  Surely there is something like this out there already?  If not, I'll post it, possibly after adding cochineal and sepia, and only once the reaction stops trying to made lye dye.  :D



Here's another curious issue I couldn't find an apparent answer for:  In the default colour scheme, "PURPLE" (#660099) gets mapped to Dark Magenta, but in my custom colour scheme, it gets mapped to Dark Blue.

RGBMagentaBlue
Default#00 00 80#80 00 80
Custom#00 30 80#80 30 80

Since this is a "just me" issue, I'll happily ignore it, but it struck me as odd because the only difference between the schemes is the Green value, which is the same in Blue and Magenta regardless of scheme.



EDIT:  Apparently, cochineal are typically gathered off cacti en masse.  Is there any neat way to approximate that in DF?  I'm currently torn between simply letting individual specimen get gathered like any other vermin, or instead treat it like bees with the whole hive process.
« Last Edit: October 18, 2021, 01:36:55 pm by Mobbstar »
Logged

brewer bob

  • Bay Watcher
  • euphoric due to inebriation
    • View Profile
Re: solved my bug: EXTRACT dissection produces "none"
« Reply #5 on: October 18, 2021, 12:46:44 pm »

Surely there is something like this out there already?

There's at least the Agricultural Revolution mod. I believe there were a couple others too, but can't remember which ones or whether they're compatible with the latest version of DF.

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: solved my bug: EXTRACT dissection produces "none"
« Reply #6 on: October 18, 2021, 01:57:16 pm »

There's at least the Agricultural Revolution mod. I believe there were a couple others too, but can't remember which ones or whether they're compatible with the latest version of DF.

Yes, Agricultural Revolution has tyrian purple and essentially the same code, except the snails are milkable (i.e. they survive the extraction) and different tuning and naming.  It also seems to confuse carmine dye (from cochineal) with crimson dye (from kermes).  But all of those are relatively easy tweaks, so I won't bother posting my redundant code.

Regardless, as said before, this was fun.  Thank you all!

Thisfox

  • Bay Watcher
  • Vixen.
    • View Profile
Re: (solved) pls help with my bug: EXTRACT dissection produces "none"
« Reply #7 on: October 18, 2021, 11:13:27 pm »

I have no use for most of "the agricultural revolution" mod, just for cochineal. Anyhow, lovely bit of work, thankyou for showing it to us.
Logged
Mules gotta spleen. Dwarfs gotta eat.
Thisfox likes aquifers, olivine, Forgotten Beasts for their imagination, & dorfs for their stupidity. She prefers to consume gin & tonic. She absolutely detests Facebook.
"Urist McMason died out of pure spite to make you wonder why he was suddenly dead"
Oh god... Plump Helmet Man Mimes!