Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Inedible prepared meal  (Read 2198 times)

TruePikachu

  • Bay Watcher
  • Accomplished System Administrator
    • View Profile
    • cDusto (my personal server)
Re: Inedible prepared meal
« Reply #15 on: October 04, 2015, 07:09:02 pm »

That different inedible roast is made using the eggshell of the roc egg. Which is never edible
Code: [Select]
[lua]# ~ dfhack.matinfo.find("CREATURE:BIRD_ROC:EGGSHELL").material.flags
<BitArray<>: 0x167dfeb8>
BONE                     = false
MEAT                     = false
EDIBLE_VERMIN            = false
EDIBLE_RAW               = false
EDIBLE_COOKED            = false
Meanwhile, that giant olm kidney is edible when cooked
Code: [Select]
[lua]# ~ dfhack.matinfo.find("CREATURE:OLM_GIANT:KIDNEY").material.flags
<BitArray<>: 0x167fb050>
BONE                     = false
MEAT                     = true
EDIBLE_VERMIN            = true
EDIBLE_RAW               = false
EDIBLE_COOKED            = true
This shows that the material DF considers a roast to be made of is not necessairily the name that is displayed. Interesting.

What the view-item-info script does is check what material the roast is internally made of (which is the first ingredient, I'm guessing), then displays the information about that. Right now, my guess as to why it's the eggshell being used to make the meal is because it's listed first in the raws
Code: [Select]
[CASTE:FEMALE]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:201000]
[CLUTCH_SIZE:1:2]
The eggshell then gets passed to the function which says it's "Not edible". I'd bet that the ingredients list has the eggshells instead of the whole egg.
Code: [Select]
[lua]# ~ dfhack.gui.getCurViewscreen().item.ingredients[0]
((mat_type will probably be 42 and mat_index 497, going by the roc egg roast))

If this is the case, then dwarves must use just the eggshell and dispose of the yolk and white.
Logged
He likes Pokémon, composing ≡«☼characters☼»≡, Windows for its compatability, Linux for its security, and Pikachu for its electric capabilities. When possible, he prefers to consume pasta. He absolutely detests Apple.

Daris

  • Bay Watcher
    • View Profile
Re: Inedible prepared meal
« Reply #16 on: October 04, 2015, 07:49:48 pm »

Maybe I did it wrong - it returned this on the roc egg roast:

anon_1 = 0
item_type = 72
unk_4 = -1
mat_type = 20
mat_index = 190
maker = 3954
unk_10 = 4
unk_14 = 24
unk_18 = -1

I found a cave crocodile egg roast nearby (ingredients: cave croc egg, cave croc egg, giant cave swallow egg, cave croc egg) which returned material 41:498 CREATURE:CROCODILE_CAVE:EGGSHELL from the first command, and the second command returned mat_type 498 (but mat_index 0)
Logged

TruePikachu

  • Bay Watcher
  • Accomplished System Administrator
    • View Profile
    • cDusto (my personal server)
Re: Inedible prepared meal
« Reply #17 on: October 04, 2015, 08:12:50 pm »

So I guess I need to get an egg industry set up and mess around with it all...
Logged
He likes Pokémon, composing ≡«☼characters☼»≡, Windows for its compatability, Linux for its security, and Pikachu for its electric capabilities. When possible, he prefers to consume pasta. He absolutely detests Apple.

Daris

  • Bay Watcher
    • View Profile
Re: Inedible prepared meal
« Reply #18 on: October 04, 2015, 08:14:35 pm »

I can give you a save if you like.  I am breeding rocs and have about 150 cave crocs in cages.  Plenty of eggs potentially available.
Logged

TruePikachu

  • Bay Watcher
  • Accomplished System Administrator
    • View Profile
    • cDusto (my personal server)
Re: Inedible prepared meal
« Reply #19 on: October 04, 2015, 09:51:03 pm »

No need, just got some stew made.
  *duck egg stew [34]*   
This is a stack of 34 finely-prepared duck egg stew.  The ingredients are superiorly minced duck egg, finely minced hen egg and superiorly minced duck egg. 
 

Looking at the data structure in something more advanced than Lua tells me the following:
  • mat_type = 41
  • mat_index = 168
  • ingredients[0].{item_type,mat_type,mat_index} = {87(EGG),168,0}
  • ingredients[1].{item_type,mat_type,mat_index} = {87(EGG),166,0}
  • ingredients[2].{item_type,mat_type,mat_index} = {87(EGG),168,0}
The ingredients are all listed as being EGGs, and mat_type corresponds to whatever animal type laid the egg. Used up all my eggs, so I can't easily probe one right now...
EDIT: mat_type for item_type=EGG is the species of creature which the egg comes from, in raw order. So if I modify the ingredient list...
  *duck egg stew [34]*   
This is a stack of 34 finely-prepared duck egg stew.  The ingredients are superiorly minced elf egg, finely minced hen egg and superiorly minced duck egg. 
 

Note the first mentioned ingredient.
« Last Edit: October 04, 2015, 10:28:25 pm by TruePikachu »
Logged
He likes Pokémon, composing ≡«☼characters☼»≡, Windows for its compatability, Linux for its security, and Pikachu for its electric capabilities. When possible, he prefers to consume pasta. He absolutely detests Apple.

Daris

  • Bay Watcher
    • View Profile
Re: Inedible prepared meal
« Reply #20 on: October 06, 2015, 04:57:10 pm »

It seems that it IS just a display issue, because I just caught one of my dwarves eating a scrambled-egg roast.
Logged
Pages: 1 [2]