Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 35

Thread: Veracity's Gingerbread City.ash

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

    Default

    Revision 61 does that.

    Code:
    // There are several once-per ascension "quests" available in the
    // Gingerbread City.
    //
    // "blackmail"				(7 days) gain a briefcase full of sprinkles
    // "raygun"				(10 days) gain a sugar raygun
    // "blackmail+raygun"			(14 days) both of the above
    //
    // You specify what you want to do at Noon and Midnight, using the
    // appropriate properties, and if you also specify a quest, this script
    // will detect where you are in your progress and will override one or
    // both of those properties in order to progress in your chosen quest.
    //
    // On days when only one of the Noon or Midnight choices is needed to
    // advance the quest, the other will use your configured setting.
    //
    // When you complete the quest, this script will recognize that and no
    // longer override your Noon or Midnight choices.
    
    string vgc_quest = define_property( "VGC.Quest", "string", "" );
    I set VGC.Quest to "blackmail+raygun". When I ran the script, it validated the plan and printed this:

    Code:
    Day 5 of quest "blackmail+raygun"
    Overriding noon choice: "robbery" -> "photo counter"
    Overriding midnight choice: "high-end ginger wine" -> "Mysticality"
    Adventure for 9 turns in Gingerbread Upscale Retail District
    Looking for photo counter in the Gingerbread Upscale Retail District at noon.
    Adventure for 9 turns in Gingerbread Upscale Retail District
    Looking for Mysticality in the Gingerbread Civic Center at midnight.
    Adventure for 10 turns in Gingerbread Upscale Retail District
    After I ran the script, I no longer had fruit-leather negatives and gingerNegativesDropped was true. I ran configureVGC to have it display the current state of my settings and it printed this:

    Code:
    Day 6 of quest "blackmail+raygun"
    Overriding noon choice: "robbery" -> "photo counter"
    Overriding midnight choice: "high-end ginger wine" -> "Mysticality"
    Adventure for 9 turns in Gingerbread Upscale Retail District
    Looking for photo counter in the Gingerbread Upscale Retail District at noon.
    Adventure for 9 turns in Gingerbread Upscale Retail District
    Looking for Mysticality in the Gingerbread Civic Center at midnight.
    Adventure for 10 turns in Gingerbread Upscale Retail District
    So far, so good.

    Note that this depends on various KoLmafia settings:

    Code:
    set gingerMuscleChoice=0
    set gingerSubwayLineUnlocked=false
    set gingerNegativesDropped=false
    set gingerBlackmailAccomplished	false
    For the blackmail quest

    Code:
    set gingerLawChoice=0
    set gingerDigCount=0
    For the raygun quest.

    The first group only recently was set to reset on ascension. The second set does not reset on ascension, yet. I'll do that, by and by.

    But, if you have run these quests and since ascended, you should reset them to the initial values, as shown, so that the script will understand where you are in the quests.
    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
    11,112

    Default

    And that brings the current To-Do list to this:

    Code:
    // ***************************
    //          To Do            *
    // ***************************
    
    // Bug: Handle running out of turns before completing the plan.
    // Test: Setting clock ahead
    //
    // Allow script to start at the right time even after having spent turns
    // in the Gingerbread City today
    //
    // Make Mood configurable
    Suggestions welcome.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  3. #23
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,112

    Default

    After running today's Gingerbread City plan, I get this for my current set of properties:

    Code:
    Day 7 of quest "blackmail+raygun"
    Overriding noon choice: "robbery" -> "briefcase full of sprinkles"
    Overriding midnight choice: "high-end ginger wine" -> "Mysticality"
    Adventure for 9 turns in Gingerbread Upscale Retail District
    Looking for briefcase full of sprinkles in the Gingerbread Civic Center at noon.
    Adventure for 9 turns in Gingerbread Upscale Retail District
    Looking for Mysticality in the Gingerbread Civic Center at midnight.
    Adventure for 10 turns in Gingerbread Upscale Retail District
    So far so good.

    In other news, I decided to unboard my haunted doghouse and release my spooky wiener dog. His choice adventures came up twice during my Gingerbread City run and, since I'd configured the choices to my taste, the script ran the choices using their defaults and continued and was not disrupted at all by the unexpected choice adventures.

    This script is looking pretty solid. I look forward to having it detect how many turns you have spent in the city today prior to running the script and carrying on at the appropriate place in the daily plan.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  4. #24
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,112

    Default

    Revision 63 fixes a bug in the "blackmail+raygun" quest: a "min" was needed instead of a "max".

    Today I got a teethpick and went to dig. This confirms that the raygun quest DOES reset on ascension. I recently submitted a KoLmafia revision to reset the tracking variables pn ascension - before confirming this - but now that I have confirmed it, I'm happy.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  5. #25
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,112

    Default

    Malibu Stacey says that turtle taming adventures in the Gingerbread City take no adventures (as usual) but advance time. That sure seems like a KoL bug, since other similar adventures (Violet Fog, Ghostly Wiener Dog) do not advance time. But, this script has to account for that, in order to recognize when it is Noon and Midnight.

    Revision 65 should recognize turtle taming adventures - assuming they are "generic" turtles, rather than special turtles crafted specifically for this zone. Malibu Stacey says that she got a turtle-shaped rock in the Retail District, so that seems likely.

    (One would hope that the Sewers would have the irradiated turtle but, alas, that is not generic for "underground" zones.)

    This revision requires at least revision 17981 of KoLmafia, since it requires my patch allowing plural constants to have comments in them.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  6. #26
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,112

    Default

    Revision 67 lets you execute this script even after spending some turns today in the Gingerbread City. It will validate & execute your plan starting right after the last turn you spent there. Note that we can only determine what that turn is if you did your previous adventuring while KoLmafia was watching - either via executing a script (like this one) or in the Relay Browser.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  7. #27
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,112

    Default

    Revision 69 has a few tweaks.

    - We calculate the number of turns your plan will take and if you don't have enough turns left, we tell you and don't execute the plan. You can change your plan or gain more turns and rerun.
    - If you get the upscale retail district, sewers, or extra turns city upgrade at noon, the script will allow you to use those features later in the same plan. This seems incredibly minor, since you get a city upgrade exactly once per character, and you can rerun this script even with some of your plan already executed (and it will pick up where you left off), but, whatever.
    - I added a "candy" place to configureVGC. This advances the clock, spends 3 turns in the retail district, and then gets candy at the train station.
    - (I tested advancing the clock in a plan. It works as intended.)

    I also noted a bug. Yesterday I go the tattoo via this script. At the end of the run, it said:

    Gained -97,059 sprinkles in 28 turns. Sprinkles/Adventure = -3,466
    Cumulative = -20,752 sprinkles in 796 turns. Sprinkles/Adventure = -26

    That's a little irritating. I manually added 100,000 sprinkles to VGC.TotalSprinkles and now my cumulative totals and SPA value are correct.

    I think I will make the script not count the cost of things you buy. Maybe.

    Here is the current To Do list.

    Code:
    // Bug: When you purchase things with sprinkles, we subtract the price
    //     from the sprinkles you found, which makes your sprinkles/turn
    //     figure misleading.
    // Optionally allow executing partial plan if insufficient adventures.
    //     If so, handle running out of turns before completing the plan.
    // Make Mood configurable
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  8. #28
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,112

    Default

    Revision 70 tracks # of sprinkles spent in setting VGC.TotalSpent and does not dock your sprinkle earnings by sprinkles spent.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  9. #29

    Default

    FYI the script won't stop when your semi-rare counter is up.

    Code:
    [11425] Gingerbread Sewers
    Encounter: gingerbread alligator
    Round 0: Malibu Stacey wins initiative!
    Round 0: Malibu Stacey tries to steal an item! (auto-attack)
    Round 1: You lose 69 hit points
    Round 1: Malibu Stacey executes a macro!
    Round 1: Malibu Stacey casts ACCORDION BASH!
    Round 2: Malibu Stacey casts EXTRACT!
    You acquire an item: Source essence (2)
    Round 3: Malibu Stacey casts CONE OF ZYDECO!
    Round 4: gingerbread alligator takes 450 damage.
    Round 4: Malibu Stacey casts CONE OF ZYDECO!
    Round 5: gingerbread alligator takes 448 damage.
    Round 5: Malibu Stacey wins the fight!
    You acquire an item: sprinkles (96)
    After Battle: You pull out your smartphone to see what time it is. It's late afternoon.
    After Battle: Benji Toblerone frolics about chaotically, yipping and yapping.
    You acquire an item: lucky cat's paw
    After Battle: You gain 67 Beefiness
    After Battle: You gain 73 Magicalness
    After Battle: You gain 212 Smarm
    Fortune Cookie counter expired. Last semirare found 176 turns ago (on turn 11249) in The Castle in the Clouds in the Sky (Top Floor)
    
    [11426] Gingerbread Sewers
    Encounter: gingerbread alligator
    Round 0: Malibu Stacey wins initiative!
    Round 0: Malibu Stacey tries to steal an item! (auto-attack)
    Round 1: Malibu Stacey executes a macro!
    Round 1: Malibu Stacey casts ACCORDION BASH!
    Round 2: Malibu Stacey casts EXTRACT!
    You acquire an item: Source essence (2)
    Round 3: Malibu Stacey casts CONE OF ZYDECO!
    Round 4: gingerbread alligator takes 448 damage.
    Round 4: Malibu Stacey casts CONE OF ZYDECO!
    Round 5: gingerbread alligator takes 450 damage.
    Round 5: Malibu Stacey wins the fight!
    You acquire an item: sprinkles (95)
    After Battle: You pull out your smartphone to see what time it is. It's late afternoon.
    After Battle: Benji Toblerone frolics about chaotically, yipping and yapping.
    After Battle: You gain 61 Muscleboundness
    You gain a Muscle point!
    After Battle: You gain 78 Wizardliness
    After Battle: You gain 215 Chutzpah
    Which also screws the counter as I didn't get the second non-combat.

    Code:
    > call scripts\Gingerbread City.ash
    
    Adventure for 9 turns in Gingerbread Sewers
    Look for "candy" in the Gingerbread Train Station on turn 10
    Adventure for 9 turns in Gingerbread Sewers
    Look for "fancy chocolate sculpture" in the Gingerbread Upscale Retail District on turn 20
    Adventuring in The Gingerbread City stops.
    Farming sprinkles
    It ran 9 in Sewers, 1 in Train Station (Candy NC) then 8 in Sewers when the Fortune Cookie confirmation would've shown up (it was at 12 when I started the script) and then fought one Gingerbread Tech Bro in the Upscale Retail District. I then manually clicked through the Midnight NC at Upscale Retail District.
    Last edited by Malibu Stacey; 05-10-2017 at 05:58 AM.

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

    Default

    Apparently you don't have a Counter Script to handle your semirare.

    Personally, I would be annoyed if it stopped for a semirare and I had to restart it - especially since another script that calls this one wouldn't know that it didn't actually complete. I'm inclined to say that if you don't set a Counter Script, this script SHOULD ignore any and all counter warnings.

    I don't understand your statement that "then 8 in Sewers when the Fortune Cookie confirmation would've shown up (it was at 12 when I started the script) and then fought one Gingerbread Tech Bro in the Upscale Retail District" since the session log fragment you showed was alligator, fortune cookie warning, alligator.

    In any case, it looks like a red "counter expired" message will punt before actually submitting an adventure. Presumably, the visit_url() returned a blank page - and the script counts that as taking a turn. It should not do that.
    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
  •