Page 1 of 188 1 2 3 11 51 101 ... LastLast
Results 1 to 10 of 1880

Thread: SmartStasis -- a complex script for a simple CCS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,584

    Lightbulb SmartStasis -- a complex script for a simple CCS

    SmartStasis

    What is it?

    SmartStasis handles basically everything you might want to do in combat other than actually kill the monster (although in some special cases it will also do that). Once it's done with all that, it will hand the combat off to the next stage of your CCS in time for you to finish off the monster.

    The script assumes two categories for all actions available to you in combat:

    Custom actions. These are special actions, not necessarily profitable according to the script's logic, which should be done sometime before the end of combat, usually due to something situational or user-specified.
    Regular actions such as attacking, jiggling, spellcasting, itemslinging, etc.

    This script is designed to execute the first category smartly, and to prolong combat using actions from either category if it decides that prolonging the combat would be profitable (note the overlap).

    So, below is the nitty-gritty. All of the user-configurable script settings (mentioned in this teletype font) can be adjusted by typing "zlib settingname = value" in the CLI. Type "zlib vars" in the CLI to see the current values or to grab a convenient copypasta. These values will not change when updating the script (handy!), nor by editing it.

    Custom Actions Handled by SS

    • Pickpocketing if you're in the clear and/or if you could acquire a goal (twice if possible).
    • Stealing accordions where applicable.
    • Mug for the Audience: SS will generally try to keep you in Love rather than Hate, unless you still need to Incite a Riot for the day (and you've already Thrown a Party, if applicable). That means that although it will still pickpocket for goals, for other monsters it will Mug unless you are at full Love already.
    • Using Olfaction (or analogous skills) on the monsters you specify in BatMan_attract, as well as bounty monsters when you are on a bounty hunt, or New-You monsters if you have set the correct properties! In the event of multiple targets in the same zone, SS will not attract any targets until the number of targets goes back down to 1, though monsters specified in mafia's autoOlfact property will always be attracted. Certain monsters specified in BatMan_attract which are quest-specific may not be considered targets if the relevant quest step is complete. Puttying will also take place against bounty monsters for bounties requiring up to BatMan_puttybountiesupto items (default is 19). For puttying to be effective, you also need something that will fight your spooky putty monster after creating it. I recommend the Best Between Battle Script Ever!
    • Puttying bounty monsters (for bounties requiring at most BatMan_puttybountiesupto items). Also, both Olfaction and puttying are sensitive to mafia's one-time olfaction/putty combat settings, so including "special action" in your CCS is unnecessary. Note: any action that copies a monster (i.e. 4-d cameras) is considered when looking to putty.
    • Using Yellow Ray type actions against any monster specified in BatMan_yellow. Certain ascension-specific monsters will only trigger if they are in the setting and the ascension-relevant conditions are met.
    • Using Duplicate on any monster specified in BatMan_duplicate. Gaudy pirates and lobsterfrogmen (the default configuration) will only trigger if the duplication will help you ascend faster.
    • Using a banishing action (like Batter Up!, Creepy Grin, a tennis ball, etc.) on the monsters you specify in BatMan_banish.
    • Casting Summon Mayfly Swarm if the script determines it's desirable.
    • Casting Siphon Spirits if the resultant drink provides you with some mainstat and is an appropriate level.
    • Salving yourself for some safe HP gain if you need it or it's better than your out-of-combat restore options.
    • Using the Big Book of Pirate Insults (or Manual of Marauder Mockery) on pirates if you still need insults.
    • Using spooky putty (or analogue) on lobsterfrogmen if you haven't completed that sidequest yet.
    • Using specific items against the mini-bosses in the Cyrpt.
    • Throwing clumsiness bark at The Thorax and The Bat in the Spats.
    • Throwing jars full of wind at Thug 1 and Thug 2.
    • Throwing dangerous jerkcicles at Mammon the Elephant and The Large-Bellied Snitch.
    • Throwing flyers at everything you can if you have flyers (if BatMan_flyereverything is true).
    • Throwing a disposable instant camera at Bob Racecar (or Racecar Bob) to get your photograph of a dog.
    • Always throwing flyers and/or hand mirrors against the Guy Made of Bees.
    • Always throwing flyers and/or yet-unthrown base pairs at Cyrus the Virus.
    • Throwing meat vortices at thieving brigands.
    • Throwing opium grenades at pairs of burnouts.
    • Throwing skate decoys at groupers/urchins to get goal familiars.
    • Throwing cocktail napkins to drive away clingy pirates if clingfilm items are not goals.
    • Throwing the beehive and electric boning knife at the appropriate tower monsters.
    • Throwing useful punchcard combinations at monsters in the El Vibrato portal. It should be possible now to automate this zone.
    • Identifying unknown bang potions (transparent with the mafia setting).
    • Learning unknown Rave Combos.
    • Releasing the Boots! to get paste whenever your stomping boots are at full charge (and the monster doesn't give boring gooey paste).
    • Throwing quantum nanopolymer spider webs at bugbear scientists.
    • Throwing drone self-destruct chips at liquid metal bugbears.
    • Appropriately throw utensils in A Kitchen Drawer to gain the effect specified in BatMan_pretentioustarget (default is My Breakfast with Andrea).
    • Tunnel Upward or Downward in the case that your goal is a climate colada or digital underground potion.
    • Disco combos! SS will cast disco combos where profitable. It will also always cast Rave Steal if you're Outside the Club.
    • Using lassos in the Sea to improve your lasso skill.
    • Throwing killscrolls and healscrolls to get dreadscroll clues when appropriate.
    • Throwing sea cowbells and a lasso at the wild seahorse.
    • Throwing complimentary refreshments to feed tourists in Dinseylandfill.
    • Using fingernail clippers on Weirdeaux creations.
    • Using tin snips to collect blood for Walford.


    Stasis Situations

    Under normal conditions, SS will stasis (make combat take longer by using your most profitable low-damage action) if each round's expected profit meets or exceeds BatMan_profitforstasis (default 15.0). This profit is expressed as a meat value, but is really cumulative, including HP, MP, items gained, and other factors. Due to changes in your HP/MP, or familiars losing their ability to generate further meat/MP, the expected profit changes from round to round, and once it drops below the set value, the stasis loop is done. Unlike the pre-BatBrain version, SS does not check if you are in the clear before entering the stasis loop -- it simply considers your probable HP loss as a negative value.

    Some generally profitable situations which usually make SS decide to stasis:

    • Using a meat-producing familiar like the hobo monkey or NPZR.
    • Using an HP-restoring familiar such as the Cocoabo when you're low on HP.
    • Using an an MP-restoring familiar like the starfish.
    • Putting a familiar in your Crown of Thrones which restores HP/MP, produces meat, or drops an item.


    Additionally, there are some situations which will cause SS to attempt stasis regardless of profit:

    • If you have a molybdenum magnet and you are fighting gremlins, it will stasis until encountering the tool, then use the magnet (it will also exit stasis when encountering the "no tool" message).
    • If you have a Ruby Rod equipped and are fighting in the Seaside Megalopolis, it will stasis until the monster's elemental attack, then attack using the Ruby Rod, but only if you don't already have that particular disc.
    • If you have not learned the DB Nemesis dance skills, it will stasis the relevant monsters until they do their special move, then cast Gothy Handwave.
    • If you are fighting a hellseal pup and lack a seal tooth, it will stasis the pup until it cries out.
    • If you are fighting The Server, it will stasis until the panel falls off, then throw the strange goggles.
    • If you are fighting The Thorax, it will stasis until you defeat the monster.
    • If you are adventuring with a He-Boulder vs. a specified yellow ray target, it will stasis until the yellow eye is showing, then use your major yellow ray.


    Additional Features

    • For all custom actions, if preceding that action with a stunning action would be more profitable, SS will do so, accounting for the fact that it's possible to funksling a single-round stunner with that action.
    • SS uses macros where possible to save server hits. Presently, this looks like a strange hybrid of consult/macro play, with chunks of actions being executed at once.
    • SS will automatically convert consecutive single item uses into a single funkslinging action where possible.
    • SS treats any unknown monster stat as being unknown_ml, rather than 0, for tweakable and more realistic results.


    Installation/Configuration

    • You can simply install this script by copying
      Code:
      svn checkout https://svn.code.sf.net/p/smartstasis/code
      into your CLI. This script depends on BatBrain and ZLib, which will also be automatically installed if you don't already have them. Once these three scripts are installed, you may relocate them to a subfolder of your scripts directory if you like.
    • Since SS bases its decisions on overall profit, the value of HP and MP for your character is particularly important information. For this reason, I strongly recommend also configuring mafia to use Bale's Universal Recovery, since besides being the superior option for automatic HP/MP restoration, that script also calculates the value of HP and MP with far greater accuracy than this one. Bale and I have designed these scripts to play nicely together -- Bale's script outputs settings which are read by BatBrain to allow for much greater accuracy when calculating profit.
    • SS also needs to know accurate values for items, and since it can't search the mall in combat, it relies on the ASH function historical_price(). For best results, I also strongly recommend that you enable the "Share recent Mall price data with other users" option in mafia preferences. Leaving this unchecked may mean that you are using nonexistent (0) or very outdated prices for some items. Additionally, the aforementioned Best Between Battle Script will make sure your prices are up-to-date for all combat items in your possession before entering combat.
    • Include something like this in your custom combat script:

      [ default ]
      consult SmartStasis.ash
      attack

    • Make sure you have selected "custom combat script" for your battleAction.
    • ...
    • Profit!


    Changelog

    SmartStasis is on SourceForge and the changelog can be found here, though I will continue to post more detailed release notes in this thread. The pre-SourceForge changelog is in the following post.
    Last edited by zarqon; 10-04-2017 at 08:21 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!

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    OH! Another nice one from you zarqon. Small "bug" though:

    # Have a suggestion to improve this script? Visit
    # https://kolmafia.us/index.php/topic,1739.html

    Somebody is a fan of copy/paste.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


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

    Default

    Haha! Well, that link links to the main page now... so in a way it kind of links here.

    Okay, I changed it. There was also another bad wording in one of the comments which I changed. But I didn't change the version number. If you find any more bugs in the comments, please continue to report them.
    Last edited by Bale; 04-21-2011 at 06:47 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!

  4. #4
    Junior Member
    Join Date
    Mar 2009
    Posts
    23

    Default

    It doesn't appear to work if my hobo monkey steals the first round of combat. If this happens, it turtle-totems for 26 rounds, then starts attacking, instead of just attacking right away.

  5. #5
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,584

    Default

    @fuzzyevil: Good catch. The problem was that if the monkey stole while FTF was doing its thing, SmartStasis would have no idea about that. The fix involved editing both FTF and SmartStasis, so you'll have to download both of them again.

    A few other minor tweaks as well.
    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!

  6. #6
    Junior Member
    Join Date
    Mar 2009
    Posts
    23

    Default

    @fuzzyevil: Good catch. The problem was that if the monkey stole while FTF was doing its thing, SmartStasis would have no idea about that. The fix involved editing both FTF and SmartStasis, so you'll have to download both of them again.

    A few other minor tweaks as well.
    Originally Posted by zarqon View Post
    Ah, thank you. That works now.

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

    Default

    2.1 Update

    Fought gremlins today on a character with Lasagna Bandages, and discovered that it would enter into a loop of healing as long as I had MP, without checking to see if the gremlin had or lacked the desired tool. Fixed that.
    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. #8
    Junior Member
    Join Date
    Mar 2009
    Posts
    23

    Default

    I'm not sure if this is SmartStasis's doing, but I'm having a problem with lasagna bandages as well, and the new version of the script didn't fix it. When I win initiative, I'm automatically summoning a ghost (is that kolmafia or Smartstasis or FTF?). That isn't the problem though. After summoning the ghost, it automatically tries to use Lasagna Bandages, and it fails. The CLI says that it is redirected to a fight page, tells me I'm on my own, and puts up a Request Synch window.

    I think the problem is that some script or another is trying to use the "out-of-combat" version of Lasagna Bandages, but then can't, as I'm still fighting.

    EDIT: Another bit of relevant information: the error did not happen when my hobomonkey stole on the first round of combat.

    Scripts I am running:
    Bale's Universal Recovery
    FTF
    Smartstasis
    Kingdom of Loathing name: Goo Goo

  9. #9
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,584

    Default

    You are running an older version of First Things First. Re-download and your problem should be fixed.
    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!

  10. #10

    Default

    Would it make sense to handle free runaways in SmartStasis?

    I think you'd need two new variables:
    1) One to let SmartStasis know how many free runaways you want to attempt per day (for the navel ring, GAP or peppermint parasol)
    2) One to let SmartStasis know what zones you want to use them in.

    It would also be nice to be able to use the runaways if your active familiar is a bandersnatch with ode running or a stomping boots and you have runaways left.

Similar Threads

  1. Replies: 4
    Last Post: 09-18-2018, 11:16 PM
  2. Replies: 11
    Last Post: 01-25-2015, 12:27 PM
  3. Run a Complex Script for 'X' Turns - OCW, etc.
    By Raven434 in forum Community Support
    Replies: 5
    Last Post: 01-07-2010, 10:06 PM
  4. Help with Simple Script
    By skateboard34 in forum Community Support
    Replies: 6
    Last Post: 12-25-2008, 01:40 AM
  5. Simple (but trying to make it complex) breakfast script
    By Duffkiligan in forum Scripting Discussion
    Replies: 7
    Last Post: 02-08-2008, 08:09 PM

Posting Permissions

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