Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Plump helmet edibility tag duplication?  (Read 581 times)

Khym Chanur

  • Bay Watcher
    • View Profile
Plump helmet edibility tag duplication?
« on: July 22, 2014, 03:32:04 am »

The raws for plump helmets have this:

Quote
    [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]

        We also modify it a bit to make the plant edible.  Any token material can be used here to modify the material that was created from the template.
        [EDIBLE_VERMIN]
        [EDIBLE_RAW]
        [EDIBLE_COOKED]
    [USE_MATERIAL_TEMPLATE:MUSHROOM:STRUCTURAL_PLANT_TEMPLATE]
        [EDIBLE_VERMIN]
        [EDIBLE_RAW]
        [EDIBLE_COOKED]

Why are the edibility tags used for both BASIC_MAT and USE_MATERIAL_TEMPLATE?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Plump helmet edibility tag duplication?
« Reply #1 on: July 22, 2014, 08:20:25 am »

Because those are two separate materials - one is STRUCTURAL (which is actually defined by [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE], not BASIC_MAT), and the other is MUSHROOM ([USE_MATERIAL_TEMPLATE:MUSHROOM:STRUCTURAL_PLANT_TEMPLATE]).
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.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Plump helmet edibility tag duplication?
« Reply #2 on: July 22, 2014, 08:53:13 am »

I see it too, it seems to be extra. Perhaps Toady just let it slip? something that he wanted to add but couldn't yet? because:

Code: (PLANT:MUSHROOM_HELMET_PLUMP) [Select]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[MATERIAL_VALUE:2]
[MATERIAL_REACTION_PRODUCT:DRINK_MAT:LOCAL_PLANT_MAT:DRINK]
[MATERIAL_REACTION_PRODUCT:SEED_MAT:LOCAL_PLANT_MAT:SEED]

Here the material is marked as the structural material (this could be below the edible tags which come next).  In general, you can use LOCAL_PLANT_MAT|<token>, PLANT_MAT|<plant>|<token>, CREATURE_MAT|<creature>|<token> or INORGANIC|IRON (though the game might hiccup for a while specifically on plants that aren't structurally plants).
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]

We also modify it a bit to make the plant edible.  Any token material can be used here to modify the material that was created from the template.
[EDIBLE_VERMIN]
[EDIBLE_RAW]
[EDIBLE_COOKED]
[USE_MATERIAL_TEMPLATE:MUSHROOM:STRUCTURAL_PLANT_TEMPLATE]
[EDIBLE_VERMIN]
[EDIBLE_RAW]
[EDIBLE_COOKED]

STRUCTURAL is defined as normal, then the [BASIC_MAT:STRUCTURAL] call is made, then the edible tags are tossed in. Wouldn't DF just ignore those since now there is a break in sequence of tags? And then the MUSHROOM material is defined but nothing is done with it, it's just an edible material (which I think may be the only edible part, just going by the structure of the raws so far) that is sitting there doing nothing and cannot be reached.

now other plants that can be eaten as is (which plump helmets are) have:
Code: (PLANT:TUBER_BLOATED) [Select]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[MATERIAL_VALUE:1]
[EDIBLE_VERMIN]
[EDIBLE_RAW]
[EDIBLE_COOKED]
[MATERIAL_REACTION_PRODUCT:DRINK_MAT:LOCAL_PLANT_MAT:DRINK]
[MATERIAL_REACTION_PRODUCT:SEED_MAT:LOCAL_PLANT_MAT:SEED]
--- I am also looking over the fact that bloated tubers don't have a seed material which makes me overly concerned on how this will work in custom reactions that may call upon SEED_MAT and find nothing.

Snippets taken from "40.04" vanilla (no modifications made on my end)
« Last Edit: July 22, 2014, 08:54:53 am by Hugo_The_Dwarf »
Logged

dree12

  • Bay Watcher
    • View Profile
Re: Plump helmet edibility tag duplication?
« Reply #3 on: July 22, 2014, 09:06:58 am »

Because those are two separate materials - one is STRUCTURAL (which is actually defined by [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE], not BASIC_MAT), and the other is MUSHROOM ([USE_MATERIAL_TEMPLATE:MUSHROOM:STRUCTURAL_PLANT_TEMPLATE]).
Does this mean both the plump helmet stipe and the cap are edible? In-game, is there a way to separate the two?
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Plump helmet edibility tag duplication?
« Reply #4 on: July 22, 2014, 10:10:31 am »

I imagine that the MUSHROOM material came about because Toady started to move the original plants over to the new raw format, then realized that the plant gathering jobs take the whole plant, rather than plant growths, and he didn't have the time to update those jobs accordingly, as the release had been dragging on too long already. So, the MUSHROOM material would have been the material for the growth that represents the actual plump helmet.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Plump helmet edibility tag duplication?
« Reply #5 on: July 22, 2014, 11:56:33 am »

I thought the same, and I was confused as much as you are. It looks like MUSHROOM material is not used for anything else. Perhaps for further things to come.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Plump helmet edibility tag duplication?
« Reply #6 on: July 23, 2014, 07:39:04 am »

STRUCTURAL is defined as normal, then the [BASIC_MAT:STRUCTURAL] call is made, then the edible tags are tossed in. Wouldn't DF just ignore those since now there is a break in sequence of tags?
Some quick memory analysis indicates that it does not - it looks like the raw parser simply keeps around a pointer to the last material referenced and always tries to parse the raws for that material before falling back to the plant itself (and the same for growths).
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.