New Content - Implemented Sweet Synthesis - Multi-casting

lostcalpolydude

Developer
Staff member
Multi-casting Sweet Synthesis is now a thing. It's properly parsed now (18214), if done manually. But there are a lot of ways to automate it, and each one possibly needs its own way of specifying a quantity if that will be supported.

The syntax for adding to the CLI command would be straightforward, but the case of running out of one type of candy needs handling at least.

There are several ASH functions. Adding another parameter looks like it gets confusing quickly enough, and that's ignoring the code changes to handle it.

The GUI would need a qty box, and some code to know what the maximum allowed is.

I haven't started looking at any of the code yet.
 

Veracity

Developer
Staff member
This has been open for a year. Since I have just removed the "allowed" checkbox from the GUI, perhaps it is time to thin about this again.
 
Sweet Synthesis functions with quantity specified

Currently, there are ash functions to synthesize for you. You can specify an effect or 2 candies. Since synthesis supports a quantity, I would like to see a plural versions, so that I don't have to do my synthesizing one by one.
 
Last edited:

Veracity

Developer
Staff member
I think KoL added the quantity after I implemented our support for Sweet Synthesis.
This is a good idea, but it's a fair amount of work.

whichchoice=1217
option=1
a=ITEMID
b=ITEMID
q=NUM

SweetSynthesisRequest needs constructors that include a quantity. Maximum is available spleen
SweetSynthesis.run() needs to acquire (quantity) of each candy
(Upon success, we already deduct quantity of each candy and add quantity to spleen)
SweetSynthesis.registerRequest() needs to log the quantity

The "synthesize" CLI command needs to accept an optional quantity:

synthesize [#] CANDY1, CANDY2
synthesize [#] EFFECT

The several ASH functions need to have additional versions with an int parameter for quantity.
Question: one function form takes itemid1 and itemid2. If you want 5 castings, we need to acquire 5 of each. What if we can't?
Question: one function form takes an "effect" and "flags" - which can include "available". If you want 5 casts using "available" candies, I assume we iterate: first cast uses 2 of one candy pair, second uses 2 of a different candy pair, and the last cast uses 1 of yet another candy pair.

And the Sweet Synthesis frame (GUI) should have a way to specify quantity, limited by available spleen - and, if you have the "available" checkbox selected, by quantity on hand.
 
Question: one function form takes itemid1 and itemid2. If you want 5 castings, we need to acquire 5 of each. What if we can't?

Ideally it does whatever it does now if you request a synthesis with a (single) candy you don't have.
As for the other question, that's not actually a question :) But yeah, a loop does make the most sense.
 

Veracity

Developer
Staff member
Bumping to page 1 since I think this is my next project, what with Plumber and Mushroom Garden support being essentially done.
 

Veracity

Developer
Staff member
Revision 19872 does this:

CandyDatabase "flags" are (incompatibly) jiggered: available=1, chocolate=2, noblacklist=4
Default for hardcore/Ronin is 1 (available), for out of Ronin = 0

Add three more ASH functions for Sweet Synthesis:

boolean sweet_synthesis( int count, effect )
boolean sweet_synthesis( int count, effect, int flags )

Those two will loop, as required, if you want - or must use - "available" candies; they will fetch a pair of candies, use as many as are required/available, and then loop to get another pair if you asked for more castings.

boolean sweet_synthesis( int count, item candy1, item candy2 )

This will not loop: it will try to "acquire" enough candies for "count" castings and will fail if it can't get enough.

load_sweet_synthesis_blacklist() is removed; other ASH Sweet Synthesis functions will load the blacklist, as needed

Next up:

Make the "synthesize" command multi-cast, if desired.
Make the Sweet Synthesis GUI have an option to multi-cast.
 

Veracity

Developer
Staff member
Revision 19873 lets the "synthesize" command take a "count":

synthesize 5 Synthesis: Greed
synthesize 5 licorice boa, PEEZ dispenser

Revision 19874 updates the Sweet Synthesis GUI to prompt you, if appropriate, for how many times to cast:

Always capped by available spleen.
If using only available items, capped by quantity of candy1 and candy2

If the capped value is > 1, pops up a dialog box asking how many times to cast. Default is 1, max is the cap.

I think this feature is done.
 
Top