Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: elilla on April 17, 2024, 04:38:21 pm

Title: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 17, 2024, 04:38:21 pm
I'm trying to make my first mod.  My idea is to make some useless tree seeds less useless by letting them produce oil.  (I know there's a bunch of comprehensive plant mods but I wanted to try my hand at something minimal).

First I tried was almond, and by using SELECT_PLANT and copy-pasting some stuff from other plants, I did this:

Code: [Select]
[SELECT_PLANT:ALMOND] Prunus dulcis
        [USE_MATERIAL_TEMPLATE:OIL:PLANT_OIL_TEMPLATE]
                [STATE_NAME_ADJ:ALL_SOLID:frozen almond oil]
                [STATE_NAME_ADJ:LIQUID:almond oil]
                [STATE_NAME_ADJ:GAS:boiling almond oil]
                [PREFIX:NONE]
                [MATERIAL_VALUE:5]
                [EDIBLE_COOKED]
        [USE_MATERIAL_TEMPLATE:SOAP:PLANT_SOAP_TEMPLATE]
                [STATE_NAME_ADJ:ALL_SOLID:almond oil soap]
                [STATE_NAME_ADJ:LIQUID:melted almond oil soap]
                [STATE_NAME_ADJ:GAS:n/a]
                [PREFIX:NONE]
                [MATERIAL_VALUE:5]
        [USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE]
                [STATE_COLOR:ALL:BROWN]
                [DISPLAY_COLOR:6:0:0]
                [MATERIAL_VALUE:1]
                [EDIBLE_VERMIN]
                [EDIBLE_RAW]
                [EDIBLE_COOKED]
                [STATE_NAME_ADJ:ALL_SOLID:almond]
                [STATE_NAME_ADJ:SOLID_PASTE:almond paste]
                [STATE_NAME_ADJ:SOLID_PRESSED:almond press cake]
                [PREFIX:NONE]
                [MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT:LOCAL_PLANT_MAT:OIL]
                [STOCKPILE_GLOB_PASTE]
                [STOCKPILE_GLOB_PRESSED]

The PLANT_OIL_TEMPLATE and PLANT_SOAP_TEMPLATE are added to vanilla, while SEED_TEMPLATE replaces the original (so I duplicated all entries of the original SEED_TEMPLATE call, up to EDIBLE_COOKED, and added the extra stuff oil-related stuff.)

This worked! I tried avocados—from fruit, not seed—and even fooled around a bit by making avocado soap green.  All working.

Encouraged, I went down the alphabetical list for apricots:

Code: [Select]
[SELECT_PLANT:APRICOT] Prunus armeniaca
        [USE_MATERIAL_TEMPLATE:OIL:PLANT_OIL_TEMPLATE]
                [STATE_NAME_ADJ:ALL_SOLID:frozen apricot oil]
                [STATE_NAME_ADJ:LIQUID:apricot oil] called "oil of almond" in real life
                [STATE_NAME_ADJ:GAS:boiling apricot oil]
                [PREFIX:NONE]
                [MATERIAL_VALUE:5]
                [EDIBLE_COOKED]
        [USE_MATERIAL_TEMPLATE:SOAP:PLANT_SOAP_TEMPLATE]
                [STATE_NAME_ADJ:ALL_SOLID:apricot oil soap]
                [STATE_NAME_ADJ:LIQUID:apricot oil soap]
                [STATE_NAME_ADJ:GAS:n/a]
                [PREFIX:NONE]
                [MATERIAL_VALUE:5]
        [USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE]
                [MATERIAL_VALUE:1]
                [EDIBLE_VERMIN]
                [STATE_NAME_ADJ:ALL_SOLID:apricot pit]
                [STATE_NAME_ADJ:SOLID_PASTE:apricot kernel paste]
                [STATE_NAME_ADJ:SOLID_PRESSED:apricot kernel press cake]
                [PREFIX:NONE]
                [MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT:LOCAL_PLANT_MAT:OIL]
                [STOCKPILE_GLOB_PASTE]
                [STOCKPILE_GLOB_PRESSED]

abjection! failure!  I do on dfhack `createitem SEEDS APRICOT 10`, build a quern, the option to mill oil-bearing seeds doesn't come up.  If I use the `gui/create-item` interactive menu, I can see apricot oil and apricot oil soap now exist in the universe.  But I can't mill the seeds.

As you can see, I basically copy-pasted the working SELECT_PLANT from almonds, but it didn't work.  So I'm guessing it's something to do with the definitions of the vanilla plants?  Does it have to do with how, for almonds, seeds are edible "nuts"? or how they're plant growths?

The [REACTION:MILL_SEEDS_NUTS_TO_PASTE] entry has this:

Code: [Select]
        [REAGENT:seeds:1:SEEDS:NONE:NONE:NONE][UNROTTEN]
                [HAS_MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT] to ensure only worthwhile seeds get used

but we have the PRESS_LIQUID_MAT on the modded apricot seeds, and it's showing on the logs/current_entry.txt just like the working almonds.
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: aradar on April 18, 2024, 07:54:46 am
This is a silly question because I'm like mad confused at why it's not working everything you're doing looks like it should work you have empty containers for the oil right LOL???

For curiosity sake I added this quickly to one of my mods because I do a lot of work with plant stuff and it's showing up in the stockpiles, I don't have any apricots yet I don't have dfhack or whatever so I'm waiting for apricots to grow so I can see if I can get them in a mill

I have a group of goblins on standby standing next to an apricot tree waiting for it to make apricots if they don't kill each other before it makes apricots I'll have the answer for you here soon

Had a small setback myself your question led me to find out that I was missing important things in my own mod I couldn't't harvest fruit but I can now ♥️♥️ waiting on the apricots again have an answer soon
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: brewer bob on April 18, 2024, 08:32:06 am
The materials and such look correct, but I'm not at all familiar with how the new modding stuff with SELECT_PLANT etc works. Maybe try cutting the vanilla almond tree away with CUT_PLANT and make a new version of the whole almond tree and see if that works?
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: aradar on April 18, 2024, 10:18:54 am
Spoiler (click to show/hide)
Hey man I don't know what's wrong with your exact setup but what you're doing should work you have something wrong somewhere I've got paste and oil and everything I haven't made soap with it but I'm assuming I can make the soap as well if you want I'll make a soap industry real quick and do the soap too but I don't think I have to I've got the paste and I've got the press cake , it made the soap too 😁

I don't know what you did but you had to have done something something different fundamentally different between the almond tree and the apricot tree maybe there's a typo somewhere I don't know but I didn't copy your example exactly I just I just filled in the solid state names and the reaction stuff and it worked perfectly it looks goofy in the menus cuz it says apricot tree apricot oil

Good luck man your close 👍👍👍🔥🫠
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 18, 2024, 02:00:52 pm
Thanks everyone for your help! I just discovered something—if I use dfhack to create PLANT_GROWTH ALMOND:NUT, that stacks differently than if I create SEEDS ALMOND?! and I can mill the former but not the latter?!

which explain my problem with apricots, since apricot seeds aren't PLANT_GROWTH, the way almonds have  GROWTH:NUT and avocados GROWTH:FRUIT... except rock nuts aren't GROWTH:NUT like tree nuts, and indeed, if I create rock nuts via "createitem SEEDS BUSH_QUARRY", I can't mill them, much like my apricots. I'm confused >.>
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 18, 2024, 03:05:35 pm
Yup—confirmed I can press any seed that I can create via "createitem PLANT_GROWTH:NUT", and none created via "createitem SEEDS".  I'm tentatively chalking this to either some dfhack oddity, or something in how builtin objects are structured that prevents me from milling any non-PLANT_GROWTH seeds (except, for some reason, the plant_standard rock nut).

(https://transmom.love/system/media_attachments/files/112/294/010/058/566/328/original/5cfa4d77051f229d.png)

Guess I'll start a fortress in a tropical jungle and hope I come across a Prunus tree so I can check whether it's possible to mill the "natural" ones...

btw @aradar I think you can prevent it from showing like "apricot tree apricot oil" by putting [PREFIX:NONE]
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: aradar on April 18, 2024, 04:37:55 pm
Yup—confirmed I can press any seed that I can create via "createitem PLANT_GROWTH:NUT", and none created via "createitem SEEDS".  I'm tentatively chalking this to either some dfhack oddity, or something in how builtin objects are structured that prevents me from milling any non-PLANT_GROWTH seeds (except, for some reason, the plant_standard rock nut).



Guess I'll start a fortress in a tropical jungle and hope I come across a Prunus tree so I can check whether it's possible to mill the "natural" ones...

btw @aradar I think you can prevent it from showing like "apricot tree apricot oil" by putting [PREFIX:NONE]

It almost makes me want to think that it is DF hack related because when I did it I did everything with items that occurred naturally in the biome area that I embarked in if you're spawning things into existence with DF hack I don't I don't know enough about DF hack to know if it does anything differently to the objects when you make them
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 18, 2024, 07:09:16 pm
Just confirmed the same thing—I was able to produce cherry seed oil and soap from cherry trees that occur naturally, albeit it doesn't work with the "createitem SEED" command from dfhack.

There's something weird, though; the cherry pits are listed twice on the "seeds" section of a stockpile.  Maybe those "SELECT_PLANT" commands aren't working like I expected after all.  Later I'll try just copy-pasting the whole definition like most people do.
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: Eric Blank on April 18, 2024, 09:59:44 pm
I bet its because you used [USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE] again even though it already existed in the file. If you instead used SELECT_MATERIAL:SEED] it should allow you to edit the seed material already created by the vanilla file. And you wouldnt need to include any of the info already implemented by the previous USE_MATERIAL_TEMPLATE. Just add your stuff.
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 19, 2024, 11:09:14 am
@Eric thanks, that make sense! So I can just nest the SELECT tokens? Like

Code: [Select]
[SELECT_PLANT:APRICOT]
        [SELECT_MATERIAL:SEED]
                [MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT:LOCAL_PLANT_MAT:OIL]
                etc
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 19, 2024, 11:36:58 am
Ok so with nested SELECTs and SELECT_MATERIAL for seeds the problem of duplicate seeds really is fixed.  However, the behaviour I get now is that I can't mill any of them instantiated by dfhack, neither with "createitem SEEDS" nor with "createitem PLANT_GROWTH", so I can't even test anything in my mod this way. But as noted before, this is also true of vanilla rock nuts created by dfhack, so I'm reserving judgement until I test it with organic, locally sourced seeds.
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: aradar on April 20, 2024, 05:54:46 am
Ok so with nested SELECTs and SELECT_MATERIAL for seeds the problem of duplicate seeds really is fixed.  However, the behaviour I get now is that I can't mill any of them instantiated by dfhack, neither with "createitem SEEDS" nor with "createitem PLANT_GROWTH", so I can't even test anything in my mod this way. But as noted before, this is also true of vanilla rock nuts created by dfhack, so I'm reserving judgement until I test it with organic, locally sourced seeds.

To test this these types of mods you really don't need DF hack you can just add the plant part from prepared embark and embark with it.
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 21, 2024, 08:15:33 am
Can you add tree seeds from the detailed embark?
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: aradar on April 21, 2024, 12:18:10 pm
Can you add tree seeds from the detailed embark?

I think so but if not you should be able to take the fruit and the fruit will have the seed in it
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: Quietust on April 21, 2024, 04:44:14 pm
Ok so with nested SELECTs and SELECT_MATERIAL for seeds the problem of duplicate seeds really is fixed.  However, the behaviour I get now is that I can't mill any of them instantiated by dfhack, neither with "createitem SEEDS" nor with "createitem PLANT_GROWTH", so I can't even test anything in my mod this way. But as noted before, this is also true of vanilla rock nuts created by dfhack, so I'm reserving judgement until I test it with organic, locally sourced seeds.

What exact command are you using to create the seeds? There are multiple ways you can get it wrong which will result in items that "look" like seeds but won't actually work correctly.
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 22, 2024, 10:58:15 am
Ok so with nested SELECTs and SELECT_MATERIAL for seeds the problem of duplicate seeds really is fixed.  However, the behaviour I get now is that I can't mill any of them instantiated by dfhack, neither with "createitem SEEDS" nor with "createitem PLANT_GROWTH", so I can't even test anything in my mod this way. But as noted before, this is also true of vanilla rock nuts created by dfhack, so I'm reserving judgement until I test it with organic, locally sourced seeds.

What exact command are you using to create the seeds? There are multiple ways you can get it wrong which will result in items that "look" like seeds but won't actually work correctly.

Any command of the form

Code: [Select]
    createitem SEEDS BUSH_QUARRY 1
creates seeds I can't mill, no matter for which plant.

Any command of the form

Code: [Select]
    createitem PLANT_GROWTH ALMOND:NUT 1
creates functional seeds, but this is only usable for plants where the seeds are also plant growths (so no rock nuts or non-nut tree seeds).
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: Quietust on April 22, 2024, 11:19:06 am
Any command of the form

Code: [Select]
    createitem SEEDS BUSH_QUARRY 1
creates seeds I can't mill, no matter for which plant.

I'm surprised that works at all - I would've expected an "Unrecognized material!" error from that. Looking closer, there seems to be a special case in DFHack's Material parser which returns the STRUCTURAL material in that case, which is wrong here.

What you need to type is "createitem SEEDS PLANT_MAT:BUSH_QUARRY:SEED".
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: Ziusudra on April 22, 2024, 02:06:30 pm
It's one of the few DFHack tools to get it's own wiki page; https://dwarffortresswiki.org/index.php/Utility:DFHack/createitem#Seeds
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 23, 2024, 11:28:04 am
I'm surprised that works at all - I would've expected an "Unrecognized material!" error from that. Looking closer, there seems to be a special case in DFHack's Material parser which returns the STRUCTURAL material in that case, which is wrong here.

What you need to type is "createitem SEEDS PLANT_MAT:BUSH_QUARRY:SEED".

Thank you so much! I had seen the wiki page but somehow missed the example about seeds.  Yeah with this the rock nuts are "functional" and it will make testing my mod a lot easier.

Alas, I can't seem to make the SELECT_PLANT > SELECT_MATERIAL:SEED version of my oil-bearing seeds work.  I'll fiddle with it a bit more before giving up and reverting to copy-pasting the raws for the whole trees, which is how the other plant mods do things.
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 23, 2024, 11:51:46 am
Here's an example of a nonfunctional definition, in full:

Code: [Select]
[SELECT_PLANT:CHERRY] Prunus avium
        [USE_MATERIAL_TEMPLATE:OIL:PLANT_OIL_TEMPLATE]
                [STATE_NAME_ADJ:ALL_SOLID:frozen cherry seed oil]
                [STATE_NAME_ADJ:LIQUID:cherry seed oil]
                [STATE_NAME_ADJ:GAS:boiling cherry seed oil]
                [PREFIX:NONE]
                [MATERIAL_VALUE:5]
                [EDIBLE_COOKED]
        [USE_MATERIAL_TEMPLATE:SOAP:PLANT_SOAP_TEMPLATE]
                [STATE_NAME_ADJ:ALL_SOLID:cherry seed oil soap]
                [STATE_NAME_ADJ:LIQUID:melted cherry seed oil soap]
                [STATE_NAME_ADJ:GAS:n/a]
                [PREFIX:NONE]
                [MATERIAL_VALUE:5]
                [STATE_COLOR:ALL_SOLID:MOSS_GREEN]
                [STATE_COLOR:LIQUID:MOSS_GREEN]
                [STATE_COLOR:GAS:MOSS_GREEN]
                [DISPLAY_COLOR:2:0:1] light green
        [SELECT_MATERIAL:SEED]
                [STATE_NAME_ADJ:ALL_SOLID:cherry pit]
                [STATE_NAME_ADJ:SOLID_PASTE:cherry pit paste]
                [STATE_NAME_ADJ:SOLID_PRESSED:cherry pit press cake]
                [PREFIX:NONE]
                [MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT:LOCAL_PLANT_MAT:OIL]
                [STOCKPILE_GLOB_PASTE]
                [STOCKPILE_GLOB_PRESSED]
        [LOG_CURRENT_ENTRY]

I've added the oil and soap materials (not present in the raws) and I SELECT_MATERIAL'd the seed, modelling on other oil-bearing seeds.  This results in the following log:

Code: [Select]
--- Logging Plant CHERRY---
[NAME:cherry tree]
[NAME_PLURAL:cherry trees]
[ADJ:cherry tree]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
[USE_MATERIAL_TEMPLATE:WOOD:WOOD_TEMPLATE]
[STATE_NAME:ALL_SOLID:cherry wood]
[STATE_ADJ:ALL_SOLID:cherry wood]
[PREFIX:NONE]
[SOLID_DENSITY:425]
[STATE_COLOR:ALL_SOLID:GOLD]
[USE_MATERIAL_TEMPLATE:DRINK:PLANT_ALCOHOL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:frozen cherry wine]
[STATE_NAME_ADJ:LIQUID:cherry wine]
[STATE_NAME_ADJ:GAS:boiling cherry wine]
[STATE_COLOR:ALL:CARMINE]
[MATERIAL_VALUE:2]
[DISPLAY_COLOR:6:0:0]
[EDIBLE_RAW]
[EDIBLE_COOKED]
[PREFIX:NONE]
[DRINK:LOCAL_PLANT_MAT:DRINK]
[USE_MATERIAL_TEMPLATE:LEAF:LEAF_TEMPLATE]
[STATE_COLOR:ALL:DARK_OLIVE]
[DISPLAY_COLOR:2:0:0]
[USE_MATERIAL_TEMPLATE:FLOWER:FLOWER_TEMPLATE]
[STATE_COLOR:ALL:LAVENDER_BLUSH]
[DISPLAY_COLOR:7:0:1]
[USE_MATERIAL_TEMPLATE:FRUIT:FRUIT_TEMPLATE]
[STATE_COLOR:ALL:BURNT_UMBER]
[DISPLAY_COLOR:4:0:1]
[EDIBLE_VERMIN]
[EDIBLE_RAW]
[EDIBLE_COOKED]
[STOCKPILE_PLANT_GROWTH]
[MATERIAL_REACTION_PRODUCT:DRINK_MAT:LOCAL_PLANT_MAT:DRINK]
[MATERIAL_REACTION_PRODUCT:SEED_MAT:LOCAL_PLANT_MAT:SEED]
[USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE]
[MATERIAL_VALUE:1]
[EDIBLE_VERMIN]
[SEED:cherry pit:cherry pits:6:0:0:LOCAL_PLANT_MAT:SEED]
[TREE:LOCAL_PLANT_MAT:WOOD]
[TREE_TILE:5]
[TRUNK_PERIOD:10]
[HEAVY_BRANCH_DENSITY:25]
[BRANCH_DENSITY:50]
[MAX_TRUNK_HEIGHT:8]
[HEAVY_BRANCH_RADIUS:1]
[BRANCH_RADIUS:2]
[TRUNK_BRANCHING:2]
[MAX_TRUNK_DIAMETER:1]
[TRUNK_WIDTH_PERIOD:200]
[ROOT_DENSITY:5]
[ROOT_RADIUS:3]
[STANDARD_TILE_NAMES]
[PREFSTRING:fruit]
[PREFSTRING:blossoms]
[DRY]
[BIOME:ANY_TEMPERATE]
[SAPLING]
[GROWTH:LEAVES]
[GROWTH_NAME:cherry leaf:cherry leaves]
[GROWTH_ITEM:PLANT_GROWTH:NONE:LOCAL_PLANT_MAT:LEAF]
[GROWTH_DENSITY:1000]
[GROWTH_HOST_TILE:BRANCHES_AND_TWIGS]
[GROWTH_HOST_TILE:SAPLING]
[GROWTH_TIMING:0:300000]
[GROWTH_PRINT:0:6:2:0:0:0:209999:1]
[GROWTH_PRINT:0:6:6:0:1:210000:239999:1]
[GROWTH_PRINT:0:6:4:0:1:240000:269999:1]
[GROWTH_PRINT:0:6:4:0:0:270000:300000:1]
[GROWTH_DROPS_OFF]
[GROWTH:FLOWERS]
[GROWTH_NAME:cherry flower:STP]
[GROWTH_ITEM:PLANT_GROWTH:NONE:LOCAL_PLANT_MAT:FLOWER]
[GROWTH_DENSITY:1000]
[GROWTH_HOST_TILE:BRANCHES_AND_TWIGS]
[GROWTH_TIMING:60000:119999]
[GROWTH_PRINT:5:5:7:0:1:60000:119999:2]
[GROWTH_DROPS_OFF]
[GROWTH:FRUIT]
[GROWTH_NAME:cherry:cherries]
[GROWTH_ITEM:PLANT_GROWTH:NONE:LOCAL_PLANT_MAT:FRUIT]
[GROWTH_DENSITY:1000]
[GROWTH_HOST_TILE:BRANCHES_AND_TWIGS]
[GROWTH_TIMING:120000:200000]
[GROWTH_DROPS_OFF_NO_CLOUD]
[GROWTH_PRINT:'%':'%':4:0:1:120000:200000:3]
[GROWTH_HAS_SEED]
[USE_MATERIAL_TEMPLATE:OIL:PLANT_OIL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:frozen cherry seed oil]
[STATE_NAME_ADJ:LIQUID:cherry seed oil]
[STATE_NAME_ADJ:GAS:boiling cherry seed oil]
[PREFIX:NONE]
[MATERIAL_VALUE:5]
[EDIBLE_COOKED]
[USE_MATERIAL_TEMPLATE:SOAP:PLANT_SOAP_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:cherry seed oil soap]
[STATE_NAME_ADJ:LIQUID:melted cherry seed oil soap]
[STATE_NAME_ADJ:GAS:n/a]
[PREFIX:NONE]
[MATERIAL_VALUE:5]
[STATE_COLOR:ALL_SOLID:MOSS_GREEN]
[STATE_COLOR:LIQUID:MOSS_GREEN]
[STATE_COLOR:GAS:MOSS_GREEN]
[DISPLAY_COLOR:2:0:1]
[SELECT_MATERIAL:SEED]
[STATE_NAME_ADJ:ALL_SOLID:cherry pit]
[STATE_NAME_ADJ:SOLID_PASTE:cherry pit paste]
[STATE_NAME_ADJ:SOLID_PRESSED:cherry pit press cake]
[PREFIX:NONE]
[MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT:LOCAL_PLANT_MAT:OIL]
[STOCKPILE_GLOB_PASTE]
[STOCKPILE_GLOB_PRESSED]

So it seems like the SELECT_MATERIAL:SEED command is being read OK and tacked at the end of the builtin commands, but despite the LOCAL_PLANT_MAT:OIL entry, they still don't show up to me on a quern's "mill seed" reaction.

This goes both for cherry seeds created with "createitem SEEDS PLANT_MAT:CHERRY:SEED 1", and found "organically" through playing.  By contrast, the createitem command works for rock nuts or olive fruits.
Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 23, 2024, 12:09:18 pm
After a few more tests:

 - SELECT_PLANT: followed by SELECT_MATERIAL:SEED as in the example above didn't work.
 - [CUT_PLANT:CHERRY], copy-pasting the entire tree definition, adding the extra lines to [USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE], and adding the oil+soap materials works.
 - Without knowing what I'm doing, I then tried SELECT_PLANT:CHERRY, followed by CUT_MATERIAL:SEED, and then the entire  [USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE] (copied from the vanilla raws plus my new lines).  This also worked, and needs a lot less duplication than copying the entire tree.

Now I'm wondering if anything was wrong with my attempt to use SELECT_MATERIAL.


Title: Re: Producing oil from tree seeds: trouble with milling
Post by: elilla on April 24, 2024, 01:44:53 pm
On today's patch notes:

Quote
SELECT_GROWTH and SELECT_MATERIAL available in plant modding

holy frig did y'all add this because of this thread?? whether that's the case or not thank you :D

edit: it works! the examples below are all pure SELECTs, no CUTs used and no token duplication at all!

(https://files.transmom.love/screenshots/20240424_21h15m33s_grim.png)