Page 36 of 37 FirstFirst ... 26 34 35 36 37 LastLast
Results 351 to 360 of 367

Thread: My personal Meat farming script

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

    Default

    Revision 109 has an experimental feature: semirare farming using Lucky Lindys.

    Looks to me like there are a variety of semirares which are cost effective to farm. Probably not if you are using fortune cookies; that is a crappy food that yields a single adventure and it could give you up to 3 numbers to test. Lucky Lindys, perhaps. You have to be in a clan whose VIP room has a speakeasy with that drink.

    I might be persuadable to add fortune cookie support, although I wouldn't use it; the new code goes after the "first Fortune Cookie Counter" and only consumes something if there is no longer a "first Fortune Cookie counter" active, so it should just work even if there are multiple counters.

    Code:
    // *** Semirare hunting ***
    //
    // There are two ways to predict when a semirare is available:
    // - eating a fortune cookie (a crappy 1-fullness food) will give you 3 lucky numbers. One of them will be the semirare number
    // - drinking a Lucky Lindy (a good 1-drunk booze) will burp out the exact number of adventures to the next semirare
    //
    // It is not cost-effective to use fortune cookies; their adventure yield is too low and they are not guaranteed to give exactly one valid number
    // Lucky Lindy may or may not be cost-effective; they give from 2-4 turns and give the required number.
    //
    // This script will optionally farm semirares using Lucky Lindys
    
    boolean should_hunt_semirares = define_property( "VMF.HuntSemirares", "boolean", "false" ).to_boolean();
    
    // In order to hunt semirares, you must specify at least two locations
    // to visit; since you cannot collect the same semirare twice in a row,
    // we must alternate.
    //
    // There are a many locations to choose from. This script is very
    // simple-minded in how it handles them: it assumes that you have access
    // to all configured locations, that there are no special requirements
    // to adventure there (such as visiting The Sea, for example), and if
    // the semirare leads to a choice adventure, you have configured the
    // desired choice.
    
    location_list semirare_locations = define_property( "VMF.SemirareLocations", "location", "", "list" ).to_list_of_location();
    So, this would work:

    Code:
    set VMF.HuntSemirares=true
    set VMF.SemirareLocations="The Sleazy Back Alley|The Outskirts of Cobb's Knob|Cobb's Knob Harem"
    to cycle through those three locations collecting semirares.

    As noted in the comment, the script will not suit up to go to The Sea or the 8-Bit-Realm, nor will it verify that you even have access to a location. I could easily enough do the former, but am not interested in writing (or even importing) code to do the latter.

    I tested this today and it collected 2 semirares (and got the counter for the first one tomorrow) as well as busting every ghost, so my code to have multiple timed things going on seems to work.

    Let me know if you see glitches, whether or not you using this feature.

  2. #352
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,574

    Default

    You did it! Thank you!

    Note the new commit where, if we bulk-update 1000 items of mall prices via mall_prices(), it writes mallprices.txt once, rather than 1000 times.
    Originally Posted by Veracity View Post
    Yes! I had previously noticed a pause after the mall search, but even with the pause it was a marked speed improvement. Now it's lightning-fast! The time could be halved again for my case by somehow sharing the price cache across mafia instances (I usually run two at once), but that years-old feature wish of mine would no longer save the hundreds of server hits that it once would have, thanks to this latest reduction.

    Things I could do:

    - do it with fortune cookies (not too hard)
    - suit up appropriately for The Sea, The 8-bit Realm, etc. (easy)
    - full "can adventure" type stuff for semirare locations. (annoying, medium hardness)
    - full support for "which choice to take for semirares" (annoying, not necessary, since you can specify that in KoLmafia GUI)

    Let me know which things are critical for your use cases.
    Originally Posted by Veracity View Post
    • Fortune cookies are not necessary for my case since I don't automate consumption during a run.
    • Though it is outside your scriptcosm, CanAdv is pretty comprehensive these days! It could handle steps 2 and 3 for you without excessive annoyance on your part.
    • Speaking of outside your scriptcosm, I (and probably many others who want to farm/have been farming semirares in aftercore) are already using a counterScript that handles things like location selection, gearing up, etc. Perhaps you could check if counterScript is already set, and if so, let that script assume responsibility for farming semirares.

    Thanks for this nifty new feature.
    Last edited by zarqon; 10-01-2018 at 10:19 AM.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  3. #353
    Senior Member
    Join Date
    Feb 2010
    Posts
    972

    Default

    First off: I very much appreciate the work you're putting in to this script and it's ancillary parts. They've been a huge improvement in "quality of life" for aftercore meat farming.

    I realize that what I'm about to mention may be an edge-case and I can work around it but...

    When the script adventures in the Gingerbread City, if a Hallowiener Dog choice adventure hits, the script errors out.

    Code:
    [13964] Gingerbread Upscale Retail District
    Encounter: Your Dog Found Something Again
    > Expected choice/option 1209/2 is unavailable; submitting 1108/0
    choice.php?pwd&whichchoice=1108&option=0
    Encounter: Your Dog Found Something Again
    > Expected choice/option 0/0 is unavailable; submitting 1108/0
    choice.php?pwd&whichchoice=1108&option=0
    Encounter: Your Dog Found Something Again
    > Gained 1,574 sprinkles in 18 turns. Sprinkles/Adventure = 87
    > Cumulative = 480,317 sprinkles in 6,886 turns. Sprinkles/Adventure = 69
    > Spent 0 sprinkles. Cumulative = 0
    > Net income = 350 Meat in 21 turns. Meat/Adventure = 16
    > Cumulative income = 278,452,585 Meat in 79,471 turns. Meat/Adventure = 3,503
    I've only seen this happen in Gingerbread City and it's happened more than once. Even though the choiceAdventure in question has a default set. It's almost as if the script is confused about which choiceAdventure is the current one.

    Any thoughts?

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

    Default

    I could have sworn that it used to handle it because, if I recall, the Hallowiener Dog used to be excluded from the Gingerbread City.
    I'll take another look.

    Edit:

    Maybe not. If it encounters a choice when it wasn't expecting one, it will tame turtles for you (and understand that a KoL bug makes that advance time in the city, even though it don't take a turn). For any other unexpected it will take what you have configured, so it should do the Hallowiener Dog choices - and will not advance the City clock.

    However, if it expects Noon or Midnight, it does not handle either turtles of the Hallowiener Dog.
    Since turtle taming advances time, I sure hope it never interrupts Noon or Midnight.
    But a Hallowiener Dog adventure SHOULD be safe.

    I'll see what I can do.

    (According to the Wiki, the dog will appear 5, 20, and 50 turns in a zone, and then every 50 turns. It will take a number of days to be able to force the dog adventure to be Noon or Midnight. But I will optimistically code for it, and perhaps you'll test it for me. )
    Last edited by Veracity; 10-04-2018 at 12:05 AM.

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

    Default

    Revision 111 of Gingerbread City.ash should do that.

    I ran the script and used my daily turns in the Gingerbread City. The dog showed up - not at Noon or Midnight - it took the configured choice, which did not use a turn nor advance the clock., and then proceeded to get the Midnight choice a few turns later.

    Obviously, did not test the dog appearing at Noon or Midnight because he didn't.

    You tell me how it works next time it happens to you. It SHOULD take the dog choice and then try again to do your Noon or Midnight choice - and succeed at it.

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

    Default

    And, by the way, Revision 110 of VeracityMeatFarm should work correctly if you need to look for paranormal activity exactly when the choice adventure in Barf Mountain appears. I broke that when I introduced semirare hunting, but it works again now.

  7. #357
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,574

    Default

    The current revision of VMF just overdrank a Lucky Lindy with 238 turns left and then aborted due to being too drunk to continue. Ouch! Nothing a cuppa Sobrie tea can't fix, but probably not intended behavior.

    Also, did you see my edit above?
    Last edited by zarqon; 10-04-2018 at 03:51 PM.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

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

    Default

    The current revision of VMF just overdrank a Lucky Lindy with 238 turns left and then aborted due to being too drunk to continue. Ouch! Nothing a cuppa Sobrie tea can't fix, but probably not intended behavior.
    Originally Posted by zarqon View Post
    Oops. Sorry!

    Hard to understand why; I thought I coded it to reserve enough inebriety for all (up to 3) available Lucky Lindys.

    I assume it did this after finding a semi-rare? What-all did it drink, in order, before doing that? I'll compare that to the drink_up logic and see if I can discern the error.

    Also, did you see my edit above?
    I did. I'll think more on it, by and by.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  9. #359
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,410

    Default

    Revision 112 will not drink Lucky Lindys if you have no inebriety left. It is also less stringent at validating speakeasy availability if you've already drunk 3 drinks - which will show Lucky Lindy as unavailable - since you won't be drinking them anyway.

    I'm still wondering how my "leave enough space to buy and consume 3 speakeasy drinks" code got fooled, such that it drank to max inebriety while there was still another Lindy expected to be drunk. So, I'm still curious about when and what was drunk in the case when it overdrank.

  10. #360
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,574

    Default

    Ah, the initial consumption was performed by my login script, so your code remains unfooled. I don't run VMF on all characters, and I like to do other things (at the moment, Neverending Party quests) before using VMF as a "finish out my turns" sort of thing, so I haven't switched over to using VMF as my food-eater and drink-drinker yet. I'm going to have to import your script and call the necessary consumption functions (heh) in my login script, I think.


    EDIT: Ran into another issue due to handling consumption separately beforehand. VMF will enter an infinite loop if you just got a semirare and need a new counter, but are already at your inebriety limit. My understanding of the cause is tentative, but I appear to have solved it by changing line 1853 to:

    Code:
     	will_hunt_semirares = speakeasy_drinks_available && my_inebriety() < inebriety_limit();
    Remaining suggestions:

    if (get_property("betweenBattleScript") == "BestBetweenBattle.ash"), skip hunting for ghosts. Presently BBB's code will fire first anyway, killstealing the ghost from under VMF's nose.

    if (get_property("counterScript") != ""), let that script actually go get the semirares when the counters come up. Unlike the previous, in this case VMF goes first (or rather, the counterScript goes first but is then interrupted by VMF...?), and then it seems that if you don't get a semirare from your counter the counterScript jumps in and also tries to get your semirare after VMF does, wasting a turn somewhere.

    If you want to keep VMF more self-contained, the above two could just be validation issues, but I'd love if VMF could recognize the existence of my other scripts and politely allow them to keep their jobs.
    Last edited by zarqon; 10-05-2018 at 05:54 PM.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

Posting Permissions

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