What is it?
SmartStasis handles basically everything you might want to do in combat other than actually kill the monster (although in a few 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 highly 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 stasising is called for (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! If you are on a hunt, Olfaction will ignore BatMan_attract monsters in the bounty location, only olfacting bounty monsters. Outside of the bounty location, specified monsters will still be olfacted. 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.
- 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, and it won't cast Rave combos off-volcano until after you've vanquished your Nemesis.
- 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.
Under normal conditions, SS will stasis (use 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 monster you have specified in BatMan_yellow, it will stasis until the yellow eye is showing, then use your major yellow ray.
- 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.
- You can simply install this script by copying
into your CLI. This script depends on BatBrain.ash 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.Code:svn checkout https://svn.code.sf.net/p/smartstasis/code
- 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 ]
- Make sure you have selected "custom combat script" for your battleAction.
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.