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:
[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:
[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:
[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.