Page 3 of 8 FirstFirst 1 2 3 4 5 ... LastLast
Results 21 to 30 of 78

Thread: Rethinking Candy

  1. #21
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,532

    Default

    Revision 17613 does some of Phase 2 and the rest of Phase 3. It also corrects the candy types for a couple of candies; I was wondering why my generated candy pairings were not identical to those shown by Ezandora's tool, and it turns out we had a candy1 listed as a candy2 and a candy2 listed as a candy1. There might be other data errors.

    1) ASH function:

    effect sweet_synthesis_result( item candy1, item candy2 )

    Code:
    > ash sweet_synthesis_result( $item[ Yummy tummy bean], $item[ Yummy tummy bean ] )
    
    Returned: Synthesis: Hot
    default =>
    note =>
    all => aggregate boolean [string]
    image => https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/molecule1.gif
    descid => 70c1f50c4b1f77c7a6b2770d368a8392
    candy_tier => 1
    2) ASH function:

    item [int] sweet_synthesis_pairing( effect result, item candy1 )

    Code:
    > ash sweet_synthesis_pairing( $effect[ Synthesis: Hot ], $item[ Yummy Tummy bean ] )
    
    Returned: aggregate item [11]
    0 => pink candy heart
    1 => Piddles
    2 => Yummy Tummy bean
    3 => delicious candy
    4 => cotton candy pinch
    5 => fudgecule
    6 => Tasty Fun Good rice candy
    7 => jabaņero-flavored chewing gum
    8 => Comet Pop
    9 => green gummi ingot
    10 => cotton candy bale
    3) ASH function:

    boolean sweet_synthesis( item candy1, item candy2 )

    Code:
    > ash sweet_synthesis( $item[ Yummy tummy bean], $item[ Yummy tummy bean ] )
    
    Encounter: Sweet Sythesis
    synthesize Yummy Tummy bean, Yummy Tummy bean
    You acquire an effect: Synthesis: Hot (30)
    Returned: true
    Here's what the session log shows for that last one:

    Code:
    cast 1 Sweet Synthesis
    Encounter: Sweet Sythesis
    synthesize Yummy Tummy bean, Yummy Tummy bean
    You acquire an effect: Synthesis: Hot (30)
    Yes, KoL's name for that choice page is "Sweet Sythesis".

    It successfully deducted the two candies from inventory and added one to spleen. Of course, considering it immediately followed up with a call to api.php to get status, it would have gotten that anyway.

    Work remaining:

    Data:

    None known

    ASH:

    None, modulo suggestions, etc. Perhaps we will want "boolean sweet_synthesis( effect result )", as part of Phase 5, to obviate "cli_execute( "synthesize EFFECT" )".

    GUI:

    Synthesize pane in the Item Manager as previously described

    CLI:

    synthesize CANDY1, CANDY2
    synthesize? CANDY1, CANDY2
    synthesize EFFECT
    synthesize? EFFECT

    I'll probably do the GUI next.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  2. #22
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,532

    Default

    Revision 17614 adds the GUI. The Synthesize! is not hooked up yet, but I wanted to get this out so that people could try out and comment on the User Interface. You can find it on the "Tools" menu.

    You select a desired effect and are given a list of Candy A candidates.
    You select one and are given a set of Candy B candidates.
    You select one and the Synthesize! button is enabled.

    Sorting rule for the candy lists:

    In Ronin or Hardcore, from most to least available to acquire.
    Otherwise, from cheapest to most expensive mall price, most to least available, if equal, alphabetical otherwise.

    Some candy is not mallsellable. Some is not autosellable. For now, I just sort all those to the end.

    Comments welcome & desired.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  3. #23

    Default

    I really like the proposed synthesis UI, Veracity. I'd love to give constructive feedback, but I can't yet think of anything I'd want done differently. It looks great.

    EDIT: OK, one tiny thing: Muscle memory says the Modifier Maximizer is the last thing in the Tools menu. I could get used to the change, but I'd have less adjusting to do if Sweet Synthesis was moved up a spot or two.
    Last edited by Xande1; 01-02-2017 at 12:56 AM.

  4. #24
    Senior Member
    Join Date
    May 2008
    Posts
    579

    Default

    I like it ! Well done, as usual !

  5. #25
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    12,968

    Default

    Revision 17614 adds the GUI. The Synthesize! is not hooked up yet, but I wanted to get this out so that people could try out and comment on the User Interface. You can find it on the "Tools" menu.
    Originally Posted by Veracity View Post
    Nice! Friendly!

    The only thing I could suggest is to add an "automatic" button to automatically find a cheapest combination of candy.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  6. #26

    Default

    Minor display bug: Selecting a candy from the Sweet Synthesis UI in the left pane and then trying to sort by either "have" or "price" makes both panes blank. Right pane works normally.

  7. #27
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,640

    Default

    I like it. Trying to sort resulted in blank columns for me as well. I'm trying to make a case that I want some filters but if I actually learn the criteria used to include something in either list then I suspect that I can accomplish the same things with a good sort. I'm not completely sure I understand the new candy mechanics but to the extent that they generate effects that last a variable number of turns some kind of cost per turn display would be useful.

    Thank you.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

  8. #28
    Developer
    Join Date
    Aug 2009
    Posts
    2,565

    Default

    Looks neat / potentially useful, at a glance. I especially like how the sort order for each candy panel is preserved as you move around (although I'd guess without having looked closely at the code that's an artifact of how you're reusing the same Swing panels). Couple of display bugs I noticed:

    - If you click around on the sections up top that determine the target effect, buttons remain depressed -- you change focus, but that's it. I'm not sure if this is some quirk with my display manager, or if other people are also seeing this.

    - To elaborate on Boesbert's comment -- it's actually any header, including the candy name. Sorting the left column before selecting a candy works fine.

    No DEBUG logs were generated for either of these.

    In-run, I imagine I'd like to filter based on items in inventory, as opposed to all items, although I'm not sure if there's room in the UI for checkboxes (or however else you might want to implement it). Quantity sort is probably a decent proxy, but here's an edge case for you: suppose I have 30 different items that have ID % 5 == 0 and two of one item with ID % 5 == 2 (let's say... angry farmer candy), and I'd like to see how I can get the sleaze resistance effect (i.e. (A + B) % 5 == 4). It'd be great if only the relevant item showed up, so I wouldn't have to click through each of the items until I found the one I wanted.

    Follow-on to that: would be nice if effects I can't currently obtain were greyed out (maybe if the suggested "only use available" checkbox were checked).

    I noticed that non-mallsellable (which includes gift) items show up as Integer.MAX_INT.

  9. #29
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    630

    Default

    EDIT: OK, one tiny thing: Muscle memory says the Modifier Maximizer is the last thing in the Tools menu. I could get used to the change, but I'd have less adjusting to do if Sweet Synthesis was moved up a spot or two.
    Originally Posted by Xande1 View Post
    I thought this was a weird request, until I did the same thing three times today. So +1 for moving it up a spot.

  10. #30
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,532

    Default

    1) The problem with clearing windows clearing when you sorted a column in Candy A was a result of two issues:

    - I got multiple ListSelectionEvents, one of which was "no selection" - and I erroneously cleared Candy A and Candy B.
    - All but the first event were getValueIsAdjusting() == true, and I only should process on the final event.

    Apparently, sorting clears the selection, sorts, and then reselects the same item in its new spot. This is fixed by only looking at events where the value is no longer adjusting. And clearing Candy A when deselecting an item in it is not correct, anyway.

    2) I am happy to move the Sweet Synthesis tool up one in the tools menu.

    3) The intended behavior of the top buttons was this:

    - If you press one, the background goes dark as an indication that the button is pressed.
    - If you then press another one, the first one is restored and the second one is pressed.
    - If you press the same button again, the background is restored and none is pressed.

    Ideally, I wanted the button color and text color to reverse when the button was pressed, but on a Mac, apparently, only the part outside the border will be colored. Googling revealed a solution, but it was not clear if it works on Windows. I have attempted an implementation which might work for both.

    Here is how my frame looks with no effect selected:

    Screen Shot 2017-01-02 at 4.46.00 PM.png

    And here is how it looks with an effect selected:

    Screen Shot 2017-01-02 at 4.46.45 PM.png

    Revision 17615 has all of those.

    I'm going to go hook up the Synthesize! button and then come back to respond to your other comments.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

Posting Permissions

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