New to modding, question about making a timed item transmutation.
I want to be able to make an item A become an item B (preferably with some random chance for how many item Bs come out) after it sits around for some time. Like hatching, but without involving creatures. So that after the dwarves make A they have to wait a while before they can use B.
Where would I start out?
Not possible, items can't transmute.
I could see a potential workaround, but it's so complicated that even more advanced modders would probably have a hard time getting it to work.
The basic idea would be to use a creature in place of the item for the duration that it is "incubating". So the steps would be something like this:
1)Dwarf uses item A (fuel or whatever) in reaction and it is destroyed.
2)Reaction creates a boiling syndrome that transforms dwarf into a part dropping creature (a creature that instantly has one of its limbs fall off) and then transform back, creating a raisable limb.
3)Reaction enables a "raise and transform" reaction on the dwarf, allowing it to instantly raise and then transform the dead limb into an [IMMOBILE] living "item A creature". This interaction would also place a second "suppressed" transformation with a longer end time then the first (taking advantage of the fact that a creature can't be under more then one transformation at a time to simplify two steps into one).
4)First transformation ends at the end of the incubation period, causing the creature to transform into the second creature, which instantly dies (due to temperatures or something).
5)Second creature has an [ITEMCORPSE:item B].
As I said, highly complicated, involving no less then 3 transformations, 1 reaction, 1 syndrome, 3 custom creatures, and a highly complicated single interaction, but it does work. Though of course it could potentially result in multiple "item B"s if more then one dwarf were standing near the smelter, but that would be a small price to pay.
Alternatively if you didn't mind pretending that a dwarf was "carrying" item A the whole time you could do something like this:
1)Item A is used in reaction and places a delayed transformation on nearby dwarves with a boiling syndrome.
2)After the incubation period dwarf undergoes the drop limb/raise/transform process outlined in #2/3 above.
3)Raise/transform process creates second creature from #4 with [ITEMCORPSE:item B]
Which would make the workaround slightly less complicated at the expense of making it vulnerable to dwarven deaths during the incubation period.
What you can do fairly easily (even as a beginner) to slow any process down is to make a reaction take multiple steps. So for example instead of having your dwarves put "holy water" and "ash wood" together in a reaction and getting "sacred wood" you could have something like:
(holy water)+(ash wood)->(sacred wood 10%)
(sacred wood 10%)->(sacred wood 20%)
(sacred wood 20%)->(sacred wood 30%)
etc.
(sacred wood 90%)->(sacred wood)
with only the actual "sacred wood" being able to be used. Of course as your dwarves got more skilled with whatever skill the reaction used they would be able to perform it much faster, but it would slow them down quite a bit and require more work to get a single product, placing a sort of sudo-time limit on how fast they could make the product.