No secrets, I actually wasn't entirely sure how to display my code haha. It's also unlikely my recipes could be easily playtested since I went so far as to mod in whole new plants based on my extensive research of what would have actually been used, so most of the ingredients wouldn't be obtainable without a whole mess of ingredients I've modded in.
Anyway, worth a go to see if you can figure out any solutions. Here's the first recipe in Cookery for extracting a dye solution from a plant called bloodroot:
.Bloodroot extract. *COOKERY* /60/ \10d\ [effort:1] [phys:arms,hands]
{Bloodroot root} #3# [remove] [boil]
{Wood ash lye} #0.5# [remove] [boil]
{Water} #2.5# [remove] [boil]
{Knife} '+to chop roots'
{Stone} (2) [nearby] '+to grind the roots'
{[NEARBY_TILE:ground]} 'Ferment outside in a clay vat'
[SPOILAGE_DAYS:0]
So the selection of the pot is not coded in by me but is forced by whatever code goes on in cookery. No issues there.
The next part for the dyeing:
.Dye yarn red with bloodroot. *HIDEWORKING* "Cord" /1h/ \14d\ [effort:0] [phys:arms,hands]
{Wool yarn} #1# [remove]
{Bloodroot extract} #1# [remove]
{Water} #1# [remove]
{*lay pot*} 'Clay pot to ferment'
[TILEGFX:rc-yarnr]
[NAME:Wool yarn dyed red]
[LENGTH:250]
[WEIGHT:1]
[PRICE:4]
So the bit with the asterisks and the clay pot was me attempting a solution by having all of the cookery processes take place in a "Clay vat" object (which is coded as a pot) that still works as a pot but cannot be selected accidentally in the crafting step if I specify a pot with asterisks. However, the first step being cookery, I cannot force the player to choose the "Clay vat" object. When I run these two processes, it works exactly as intended, with 6 lbs of dye solution being created in the cookery step and 1 lb being used up in the second step. So I think I've confirmed that the issue is the pot selection in the dyeing/crafting step accidentally grabbing a full pot of out my inventory and emptying it.
Now, do I understand correctly that if I were to specify
{Clay pot} #6#
in the crafting step, it would force me to choose a specific pot, thereby avoiding the accidental selection problem?
EDIT: I just tested and confirmed that specifying a weight of Clay pot does force a selection. It looks pretty stupid but does prevent the game from emptying any other pots in my inventory. Does anyone know any other methods of forcing a selection? I've tried codign with and without the asterisks ({Clay pot} vs {*clay pot*}
and it doesn't seem to make a difference.