Page 5 of 6 FirstFirst ... 3 4 5 6 LastLast
Results 41 to 50 of 53

Thread: BeachComber - fast and efficient beach combing

  1. #41
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,497

    Default

    Currently, this will go to a random beach section every turn. I'm considering a mode of operation which will repeatedly go to the same section to collect 't' squares, until there are none left, before moving on to a different section.

    Pro: Every time you go to a different section of beach, there is a chance that it will be cleaned out of 't' squares. Collecting in the same section until it is fully collected will alleviate some of that chance, since we'll be changing sections less often..
    Pro: We don't know about the distribution of 't' squares within a beach. I don't find sand dollars or fish scales to be as interesting as equipment, say. Is there always a "higher quality" drop in a beach section, or is it purely random? I suspect the latter, but if the former, fully harvesting 't' squares in a beach section will potentially give you a better haul
    Con: Cleaning out all the 't' squares is exactly how the next person to randomly visit the square doesn't find any 't' squares. Which is to say, it is selfish, rather than cooperative.

    I may or may not do anything like this, but be aware that I can and do make commits for any reason. For example, the last one also fixed a typo in a message, and even if the new discovery hadn't been announced, I might have submitted that change alone, and your local mods would be discarded for something you probably wouldn't have cared about.

  2. #42
    Senior Member
    Join Date
    Apr 2019
    Posts
    230

    Default

    in /scripts... didn't expect an update of the script after 4+ months...
    Originally Posted by fredg1 View Post
    If you know about the feature that would protect you and choose not to use it then OK. My comment was for those who did not know.

    See Revision Merging at https://wiki.kolmafia.us/index.php?title=SVN_Primer
    Originally Posted by fronobulax View Post
    The way I was saying it, I actually meant it as "why I didn't keep a backup of my changes". I DID NOT know about the merging feature, and should keep this in mind in the future!

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

    Default

    Is it possible to add a feature to let you only use a certain amount of your free combings? (For if you plan to comb some beach heads later on)
    Originally Posted by fredg1 View Post
    The argument parsing is super primitive currently.

    Code:
        int turns =
    	command == "free" ? 0 :
    	command == "all" ? my_adventures() :
    	command.is_integer() ? command.to_int() :
    	-1;
    
        if ( turns < 0 ) {
    	print_help();
    	exit;
        }
    To allow

    BeachComber 3
    BeachComber free
    BeachComber all

    It wouldn't be too complicated to allow something like

    BeachComber 5 free

    Or, to enable new options:

    BeachComber specific 842

    (to go to 842 minutes)

    BeachComber 5 free twinkles

    (to use 5 free turns focusing on rough sand with a twinkle)

    Right now, I'm working on the "go to the same square multiple times to get twinkles" feature.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

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

    Default

    Revision 214 does this:

    set VBC.PickStrategy=twinkle

    ... will behave as described above.

    start by going to a random beach section
    while there are twinkles, pick them
    rinse and repeat

    I'll look into making the command parsing more capable, by and by.

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

    Default

    Since KoLmafia now automatically marks the square you just combed with a 'c', this script doesn't need to do that any more.
    This eliminates KoLmafia's logging that the _beachLayout property has changed.
    It only does that if a script changes a built-in property, not if KoLmafia itself changes a property.

  6. #46

    Default

    It seems that every tile has a permanent set rarity (see https://kol.coldfront.net/thekolwiki...Comb_the_Beach), and is re-combable after a certain amount of time (more rare, more time to reset). It might be a good feature to at least build a map of which tiles have which rarity. In the future it might also be cool to have a strategy that revisits certain tiles after they have probably reset, or at the very least farms them if it notices they've reset while happening to visit the same part of beach.

  7. #47
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,497

    Default

    I'll think about that. It's especially appealing considering what I encountered today. I'm glad I made this script save the HTML for "special" combings.
    I can now confirm that "whale.png" is titled "a beached whale".

    Screen Shot 2020-08-18 at 5.23.37 PM.png

  8. #48
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    223

    Default

    The past few days, I've been running into a little issue. Using the script menu to call beachcomber and entering 0 in the little thing that pops up to put a number in, on the first time it's done per day: it gives this error message: e1dfe7566837ed32319aaf977a4aaed0.png
    However, doing the exact same thing a second time after that, it combs the free comb limit just fine.

  9. #49
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    223

    Post

    Update: Now with Debug Log. It actually didn't do it last night, but did it tonight.
    Attached Files

  10. #50
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,497

    Default

    Fascinating.

    Code:
    Starting ASH script: BeachComber.ash
    All is well!
    
    Requesting: https://www.kingdomofloathing.com/main.php?comb=1
    Retrieved: https://www.kingdomofloathing.com/main.php?comb=1
    Field: Location = [choice.php?forceoption=0]
    Requesting: https://www.kingdomofloathing.com/choice.php?forceoption=0
    Retrieved: https://www.kingdomofloathing.com/choice.php?forceoption=0
    ResponseText has 17012 characters.
    (whichchoice=1388)
    
    Starting spading script: excavator.ash
    Connecting to https://zachbardon.com/mafiatools/autoupdate.php...
    Requesting: https://zachbardon.com/mafiatools/autoupdate.php?f=use_for_items&act=getver
    Retrieved: https://zachbardon.com/mafiatools/autoupdate.php?f=use_for_items&act=getver
    ResponseText has 25 characters.
    <font color="black">You have the latest use_for_items.txt.  Will not check again today.</font>
    Finished spading script: excavator.ash
    
    Requesting: https://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
    Retrieved: https://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
    ResponseText has 2722 characters.
    
    Items combed:
    Offset 0 out of bounds (BeachComber.ash, line 287)
      at square_at (BeachComber.ash:287)
      at comb_beach (BeachComber.ash:457)
      at comb_random_beach (BeachComber.ash:535)
      at comb_next_beach (BeachComber.ash:566)
      at beach_comb_free (BeachComber.ash:585)
      at beach_comb_free_only (BeachComber.ash:608)
      at main (BeachComber.ash:694)
    Finished ASH script: BeachComber.ash
    We used the Beach Comb.
    -> That left us sitting in choice #1388
    KoLmafia started a spading script
    The script called an external URL - something on zarqon's server
    KoLmafia finished the spading script
    BeachComer tries to do this:

    Code:
    buffer comb_random_beach()
    {
        // Wander to a random spot
        buffer page = run_choice( 2 );
        return comb_beach( page );
    }
    Which should have submitted: choice.php?whichchoice=1388&option=2
    But that is not in the DEBUG log.

    I conclude that the call/response of that external URL left KoLmafia thining we were no longer in a choice.
    That's a bug.

    Funny that this was a result of a spading script.

    I'll look at this later today.

Posting Permissions

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