Results 1 to 7 of 7

Thread: synthesize: Greed fails if selected item is not in mall

  1. #1
    Senior Member
    Join Date
    Dec 2008
    Posts
    277

    Default synthesize: Greed fails if selected item is not in mall

    There is no Shrubble Bubble available in the mall, but instead of choosing an available item the function fails

    Code:
    > synthesize Synthesis: Greed
    
    Searching for "Shrubble Bubble"...
    Search complete.
    Searching for "Shrubble Bubble"...
    Search complete.
    You need 1 more Shrubble Bubble to continue.

  2. #2
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,495

    Default

    I noticed that myself last night.

  3. #3
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,495

    Default

    Similarly, it wanted to buy 24 of an item today, bought 5, and the 6th one was 27,000 Meat so it failed.

    I changed the algorithm a while ago to do all N syntheses in one go, rather than doing it one at a time, but it needs something fancier, since "mall_price" finds the price for the 5th item, and the 6th could be drastically higher. Since this is built-in to KoLmafia, it should be able to look at actual mall prices, rather than the price of the 5th item...

  4. #4
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,495

    Default

    This looks like a non-trivial project - especially if I want synthesis to take the desired castings into account when deciding which pairs of items to use, potentially switching to a different pair if the first one gets too expensive. Barring easier or more pressing bug fixes, I'll probably take this as my next project.

    Bumping to page 1.

  5. #5
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,495

    Default

    Not only that, Sweet Synthesis depends on accurate Mall Prices for candies.

    The Synthesis Frame lets you "check" prices - and I encourage you to do that - but scripts don't have that ability.

    My script did this:

    Code:
    buy 10 Now and Earlier for 17111 each from shop #341946 on 20200912
    
    buy 3 Now and Earlier for 18000 each from shop #1588794 on 20200912
    
    buy 11 Now and Earlier for 19600 each from shop #102069 on 20200912
    
    cast 1 Sweet Synthesis
    Encounter: Sweet Synthesis
    
    synthesize 12 Now and Earlier, Now and Earlier
    You acquire an effect: Synthesis: Greed (360)
    Isn't that special. It bought 24 candies for a WAY higher price than expected because the registered mall price was out of date.

    Had I been synthesizing one at a time, the price calculation would have auto-corrected after the first purchase.
    Or if there is a way to tell KoLmafia to "update prices", just as is done in the GUI, it would have spent about 30,000 less Meat per synthesis, buying cheap sugar sheets instead.

    Pondering.

  6. #6
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,495

    Default

    One way to do this is for the scripted synthesize() to specify the maximum price to pay - based on cached mall price - and as soon as the actual price would exceed that, stop purchasing, cast however many synthesis turns you can, and then recalculate.

    Yeah, this is getting more and more important to me. My (never ascended, no IOTM) multi got 90K profit today, rather than 600K+ profit.

  7. #7
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,767

    Default

    Isn't that special. It bought 24 candies for a WAY higher price than expected because the registered mall price was out of date.
    Originally Posted by Veracity View Post
    As an aside there are historical prices in the file that have not been updated for a couple of years. My digging suggested that there was no mechanism for sharing that an item was no longer in the mall. My work around was to explicitly do a mall search, instead of using the historical price, if the historical price was older than 7 days.

    My only solution to a similar problem was to buy in a loop and recalculate what to buy and how much after each purchase. I also used special buy functions that would not buy if a price was exceeded and used the failure to purchase within budget to trigger a recalculation.

    I await the chance to learn from your solution :-)
    Well, thank you.
    Originally Posted by Veracity View Post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •