View Full Version : SmartStasis -- a complex script for a simple CCS
zarqon
02-08-2009, 05:44 AM
SmartStasis 3.15
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 three categories for all actions available to you in combat:
Jump actions. These must be done immediately, or the chance is lost.
Custom actions. These are special actions, otherwise unprofitable, 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 two categories smartly, and to prolong combat using actions from the last two categories 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.
Jump Actions Handled by SS
Pickpocketing if you're in the clear and/or if you could acquire a goal (twice if possible).
This category used to include summoning pasta guardians, before the KoL change that allowed summoning at any time. There's really only one jump action now.
Custom Actions Handled by SS
Using Olfaction on the monsters you specify in ftf_olfact, as well as bounty monsters when you are on a bounty hunt! If you are on a hunt, Olfaction will ignore ftf_olfact 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 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 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.
Appropriately summoning pasta guardians (http://kolmafia.us/showpost.php?p=15527&postcount=103) depending on type and experience level!
Casting Summon Mayfly Swarm if the script determines it's desirable.
Salving yourself 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 in the Cove/Barrr if you still need insults.
Using spooky putty on lobsterfrogmen if you haven't completed that sidequest yet.
Using specific items against the mini-bosses in the Cyrpt.
Throwing ghost traps at ghosts in the Haunted House.
Throwing clumsiness bark at The Thorax.
Throwing flyers at everything you can if you have flyers (if flyereverything is true).
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 skate decoys at groupers/urchins to get goal familiars.
Throwing cocktail napkins to drive away clingy pirates if clingfilm items are not goals.
Throwing useful punchcard combinations at monsters in the El Vibrato portal. It should be possible now to automate this zone.
Identifying unknown bang potions and hidden city spheres (transparent with mafia settings). In the case of bang potions, it will always ID potions if you have more than one.
Learning unknown Rave Combos.
Using your Major Yellow Ray on the monsters specified in ftf_yellow if you have a He-Boulder as your familiar.
Casting Creepy Grin or Stinkeye on the monsters you specify in ftf_grin if you're wearing the appropriate accessory.
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.
Stasis Situations
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 (once).
If you are adventuring with a He-Boulder vs. a monster you have specified in ftf_yellow, 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.
How to use it:
Download SmartStasis.ash and BatBrain.ash to your scripts directory, or a subdirectory thereof.
These scripts also require ZLib, so get that if you haven't yet.
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() (http://wiki.kolmafia.us/index.php?title=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.
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 (for post clarity, the pre-BatBrain changelog was moved one post down)
4.07.11 - 3.0 changes: the new BatBrain-powered SS goes online, to much fanfare and holladoodlin'. This version absorbs and thus obsoletes FTF. Far too many changes to list here (or remember, for that matter). It's a completely different kind of combat script altogether.
4.17.11 - 3.1 changes: add familiar spentness detections to the repeat conditions of the stasis macro. Move all jump actions to custom actions -- stealing is now part of the custom actions macro. Initial support for post-SS noodling.
4.24.11 - 3.2 changes: abort stasis properly for life-threatening huckleberries. Avoid Teleportitis. Use m rather than last_monster().
5.02.11 - 3.3 changes: completely refactor DB combos to use BB's features. Additional combos besides the farming/stasis ones will be easy to add now as well. Yet again, BB drastically reduces the amount of code needed. Realized I hadn't gotten around to normalizing the ZLib settings which are lists of monsters, even though that functionality has been in ZLib for a long time.
6.02.11 - 3.4 changes: don't stasis yourself to death. Prefer Marauder Manuals over Big Books. Solve annoying and seemingly inexplicable automation-stopping error (and added a few more high-verbosity debug statements in the process). Initial support for Summon Mayfly Swarm.
6.15.11 - 3.5 changes: adjust to BatBrain round number changes.
7.02.11 - 3.6 changes: don't try to Olfact in birdform. Be more permissive about HP/MP gain during the stasis macro (far fewer server hits for high-level farmers). Only try to Entangle if it will actually stun. Use BatBrain's new happenings tracking.
10.21.11 - 3.7 changes: Haunted House changes! Use ghost trap vs. sexy sorority ghosts. Use mayfly bait and always try to steal in the Haunted House. Don't use bounty.txt anymore -- proxy records supply all our funky needs.
11.30.11 - 3.8 changes: use BB's new attack_action() to determine your survivability rather than simply your attack, which should help in huckleberry situations where your regular attack is insufficient. The page variable is now global -- remove from parameters where necessary.
12.01.11 - 3.9 changes: Fix to the last update: moved detection of unknown bang potions/spheres from BB into SS.
12.09.11 - 3.10 changes: always try to steal in Lollipop Forest.
1.15.12 - 3.11 changes: Re-add the check for the Unstoppable Banjo before trying Rave combos off-volcano. Make use of Release the Boots. Add stasis macro repeat conditions for Crown of Thrones. Speed: recognize when combat has ended and stop thinking.
3.12.12 - 3.12 changes: Adapt to BatBrain's new format for advevents. Improved stomping logic. Avoid ID-ing bubbly potions in Beecore.
3.31.12 - 3.14 changes: Where applicable, don't include custom actions that have already happened. Don't ID more than ceil(die_rounds/10) bang potions per fight. Properly add base pair event when fighting Cyrus. Refactor gremlin huckleberry detection a bit. Split the try_events() functions into enqueue_events() and try_events() functions. Use this to cast custom actions and combos in one server hit when not pickpocketing. Fix residual error detecting Gothy Handwave.
4.29.12 - 3.15 changes: Important fixes to the server-hit-saving parts to fix a bug and keep you out of trouble. Move stasis loop conditions into separate function to allow access to other macro-building scripts. After calling sort functions, use the new global caches rather than declaring local variables.
zarqon
02-08-2009, 05:44 AM
Pre-BatBrain SS Changelog
2.08.09 - ver. 1.0 posted, followed shortly by a couple fixes to the COMMENTS.
3.12.09 - 1.1 changes: detect hobo monkey theft in FTF, not SmartStasis. This will ensure theft is always detected. Do not stasis Naughty Sorority Nurses. Only stasis gremlins if a tool is needed. For NPZR's and Cocoabos you can start attacking on the 9th round.
4.07.09 - 1.2 changes: fix issue vs. gremlins where using combat healing skills caused endless loop.
4.26.09 - 1.3 changes: added initial support for ghosts/hobos. FTF now has putty separate from use_special_item().
4.30.09 - 1.4 changes: fix gremlins not being properly stasis'd when you are not in the clear.
5.06.09 - 1.5 changes: works with latest FTF to provide proper support for hobo spirits, and poison removal that follows your combat setting. Detecting a used-up ghost still needs help -- so as of this version ghosts are permanently on for stasis. If you are weilding any haiku katana, cast Spring Raindrop Attack as part of stasis before trying restore skills.
5.20.09 - 1.6 changes: works with the latest FTF to provide proper support for GGG's.
6.09.09 - 1.7 changes: only stasis gremlins that may actually drop tools (untested). Keep up with changes to FTF.
6.11.09 - 1.8 changes: handle stasising Seaside Megalopolis monsters. Added Consume Burrowgrub to restore skills used, but only if you will make full use of it.
6.14.09 - 1.9 changes: moved a few things out -- now requires ZLib. Now has once-daily version checking. Improved stasis loop logic (no more loop-in-loop), removing several possible bug situations. Reorganized a bit to hopefully be independent from FTF changes, at least for a while.
8.25.09 - 1.9.1 changes: added midget clownfish to MP-producing familiars.
9.01.09 - 1.9.2 changes: added rock lobster to MP-producing familiars. Fixed bug with detecting 7-foot Dwarf Replicant's elemental attack/miss (after fighting about 10 of them without getting the dang essence disc).
11.28.09 - 2.0 changes: fix a bug detecting stasis cutoff for MP. Move detection of gremlins/megalopolis monsters to FTF so they will be handled without fail. Add support for Disco Concentration, and fix formula for Disco Nirvana. Prefer dictionaries as they do 0 damage.
12.06.09 - 2.1 changes: improved familiar support: added support for Stocking Mimic. Consider monster element for rock lobster and midget clownfish.
12.30.09 - 2.2 changes: completely refactored familiar calculation to use formulas, thus improving speed and greatly improving accuracy AND reducing memory use! Add Snow Angels. Uses values of HP/MP set by Bale's Universal Recovery script to further increase accuracy, especially when calculating whether to cast disco combos. This also allowed me to add a "profitforstasis" variable. Use ZLib's new vprint().
1.08.10 - 2.3 changes: adjust combo calculations based on refactored familiar calculations. Olfact if FTF determined you were supposed to but you didn't have enough MP. Include Static Shock as a restore option. Consider possible Bandersnatch bonus damage when calculating whether to cast disco combos.
4.01.10 - 2.4 changes: add Rave combos. In fact, rework disco combos significantly.
4.19.10 - 2.5 changes: slightly refactor DB combos to avoid an evil foreach error. Better DB combo profit calculations using item_drops_array(). Add support for more stasis familiars: Slimelings, Animated Macaroni Ducks, Adorable Seal Larvae, and Autonomous Disco Balls.
4.25.10 - 2.6 changes: has_goal() now returns a float. Use better guestimates for Nemesis familiar weight.
OH! Another nice one from you zarqon. Small "bug" though:
# Have a suggestion to improve this script? Visit
# http://kolmafia.us/index.php/topic,1739.html
Somebody is a fan of copy/paste. ;)
zarqon
02-09-2009, 03:56 AM
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. ;)
fuzzyevil
03-12-2009, 01:34 AM
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.
zarqon
03-12-2009, 06:38 AM
@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.
fuzzyevil
03-12-2009, 10:57 PM
@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.
Ah, thank you. That works now.
zarqon
04-07-2009, 03:04 PM
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.
fuzzyevil
04-17-2009, 07:48 PM
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
zarqon
04-18-2009, 05:11 AM
You are running an older version of First Things First. Re-download and your problem should be fixed.
Braska
04-18-2009, 03:37 PM
I posted this in the FirstThingsFirst thread, but I might as well put it here too since this thread is looked at more often. The FirstThingFirst script is not maintaining my moods when I set up my automation. The mood is still saved, but it will not activate if I have FTF running. I have the most up to date version of all my scripts.
Current Scripts = UniversalRecovery
AutoMCD
FirstThingsFirst
Also running the latest .exe version of mafia, always.
zarqon
04-18-2009, 06:39 PM
I'm not sure what you mean. Moods and custom combat scripts are two entirely separate things. CCS's happen during combat, whereas moods happen between combat. I'm sure that FTF could not possibly interfere with your mood, since FTF has nothing to do with moods.
Braska
04-18-2009, 06:54 PM
I know it doesn't make sense, but I'll try and explain this... slightly... differently.
When I run mafia normally, just attack with weapon, I am having no problems (besides an occasional freeze). If I set mafia to run a ccs, it runs just fine, everything works the way it is supposed to.
For some reason though, if I set my FTF ccs to run, mafia quits auto-buffing me. The only permanent mood I have set during my runs is Leash and Butt-Rock Hair. But if I set my CCS to the FTF script, mafia quits buffing me. I only noticed it happened when I went in the castle, with barely enough moxie to make it through, thanks to butt-rock hair. The effect ran out, mafia never attempted to use hairspray, it just kept adventuring. Thus, I started getting my rear handed to me.
I know it doesn't make sense for a CCS to mess with moods... but somehow it is. I would say it was a bug in mafia itself, but that doesn't explain why it only triggers when I use the FTF CCS.
zarqon
04-22-2009, 05:21 AM
I have no idea what to tell you. I am unable to duplicate this behavior. I use FTF and SmartStasis, and they do not interfere with my moods.
Are you sure you didn't just run out of hairspray? :)
Braska
04-22-2009, 02:21 PM
I never actually buy the hairspray myself... I just let Mafia's self automation do it. I know, I'm lazy... but hey, if mafia will buy it and use it for me, why buy it beforehand? :p
It's possible I ran out of hairspray, and for some reason mafia quit buying it automatically. But that would not explain why Mafia quit casting Leash as well. (Yes, I had plenty of Meat)
Oh well, I'll try it again soon. New ascension, new moon, another mafia update, who knows, maybe it will correct itself.
StormCrow42
04-22-2009, 09:58 PM
Is there a reason that this script isn't configured to stasis with a GGG or Spirit Hobo?
zarqon
04-23-2009, 05:50 AM
I suppose because I don't know of a way to know whether your ghost/hobo is properly sated. Would you rather the script assume ghosts and hobos are fed and able to restore? That's very simple to add -- 1 line each under the mpfams category.
I suppose because I don't know of a way to know whether your ghost/hobo is properly sated. Would you rather the script assume ghosts and hobos are fed and able to restore? That's very simple to add -- 1 line each under the mpfams category.
The simplest way to find out if a ghost or hobo is lacking nourishment is to parse the combat results. If a hobo or ghost could possibly give another blast, there will be some sort of message about it doing something random that round. If the ghost/hobo isn't mentioned at all, then it will not have any chance of firing off a blast in the next round.
zarqon
04-23-2009, 07:30 AM
I meant besides that. I want hobofullness(), not (contains_text(page,"blah blah") || contains_text(page,"chogochochogo") || contains_text(page,"nantoko kantoko"))...
So do sated ghosts and hobos act every round (i.e. we can simply test for absence), or do we need to detect inability by looking for hunger/sobriety messages? The wiki has all the strings but doesn't give me frequency.
I don't have a hobo and never use my ghost so I completely lack motivation to figure this out. I would be glad to incorporate this functionality if someone else can fill me in on ghost/hobo behavior (or just writes the detection coding), however.
By the way, those bits all mean "blah blah" but in different languages. Fun!
Sated ghosts and hobos will do something every round, even if it is only a text about hunting through garbage cans. I rely on that cue to know when my hobo/ghost has run out of charges. No comment about the vagrant = no more charges. Also, the stat gaining message after the fight will change based on the hobo/ghost being charged, but that isn't helpful for a consult script.
PS. What languages are chogochochogo and nantoko kantoko?
zarqon
04-26-2009, 06:47 AM
1.3 Updates:
Okay, I've kind of added ghosts and hobos. I could not check for absense of action, because in certain rounds the familiar may not act, no matter how full (for example, when casting Saucy Salve for the first time).
So currently SmartStasis simply checks at the beginning to see if your ghost/hobo is completely out of sustenance. This is less than ideal, but it's the best I could manage at the moment. I tested this very briefly using my ghost. It is untested with hobos (anyone want to give me a spirit hobo so I can test?). :)
I have one further question before implementing a "real" solution: the ghost's "stomach growls loudly" message and the hobo's "Oh, Helvetica" message appear to happen every time the familiar completely runs out of starfish capability. Is that a correct assumption? If so, it would be easy to add that to the act() function and detect when the ghost/hobo runs out.
@Bale: "chogochochogo" is Korean and "nantoko kantoko" is Japanese.
I have one further question before implementing a "real" solution: the ghost's "stomach growls loudly" message and the hobo's "Oh, Helvetica" message appear to happen every time the familiar completely runs out of starfish capability. Is that a correct assumption? If so, it would be easy to add that to the act() function and detect when the ghost/hobo runs out.
Oh yeah. That's a good point although I often miss the moment the message happens since it will only occur once. You're just a little wrong. The hobo has two messages that trigger when she runs out of booze. The other is the "millennium hands and shrimp" message. The ghost has a bunch of messages when he runs out of food. Check the wiki for the list.
If they've run out of stock in a previous round, there is no message at all.
boohya! Problem fixed!
[1132] Next to that Barrel with Something Burning in it
Encounter: batwinged gremlin
Strategy: C:\Documents and Settings\E073933\My Documents\KM\ccs\solomonster.ccs [default]
Round 0: solomonster wins initiative!
true
Round 1: solomonster casts ENTANGLING NOODLES!
Round 1: Senor Senor ties its shoelaces together. It trips and takes 27 damage as it lands on its face.
Round 1: batwinged gremlin takes 27 damage.
Now running round 2
true
Round 2: solomonster uses the turtle totem!
Round 2: batwinged gremlin takes 1 damage.
Now running round 3
true
Round 3: solomonster uses the turtle totem!
Round 3: batwinged gremlin takes 1 damage.
You lose 3 hit points
Now running round 4
true
This gremlin does not have a molybdenum item!
Round 4: solomonster casts SHIELDBUTT!
Round 4: Senor Senor holds out the plastic pumpkin bucket, hoping for extra goodies.
Round 4: Senor Senor bends its brim into an approximation of a smile.
Round 4: batwinged gremlin takes 148 damage.
You gain 59 Meat
You gain 27 Strengthliness
You gain 11 Magicalness
You gain 18 Sarcasm
Requests complete.
Raven434
05-02-2009, 12:35 AM
I have looked at the code and don't really see an easy way to set a MIN and MAX % for my MP stasising.
Meaning I am ok with it bleeding down to say 30% before I would like to stasis it back up to say 90%.
Is there an easy way to do that or am I just being blind tonight?
Thanks!
zarqon
05-02-2009, 03:42 AM
At the top of the stasis loop you could put something like
if (to_float(my_mp()) / to_float(my_maxmp()) > 0.3)
inmp = 0;
I'm pretty sure that would work like you want. It would not enter the stasis loop for +mp unless your MP was 30% or less of your max MP. The check for a maximum would have to be done somewhere else within the stasis loop, again setting inmp to 0 if you had reached your desired MP percent.
zarqon
05-04-2009, 02:48 PM
News Flash
Updates coming shortly to the FTF/SmartStasis suite! To be included:
Properly intelligent support for ghosts and hobos.
Snappy integration with your poison-removal combat setting.
This is due to two unequally amazing facts:
1) I have finally popped out of HC and will be able to test, using
2) the spirit hobo that someone sent me.
Holy crap! I was more than half-joking about that.
This mysterious someone, whose name may or may not rhyme with "Dorm's Row Shorty's Crew," shall remain unnamed. But know that this anonymous donor, whose parcel arrived despite inclement weather as though carried by a mighty airborne messenger, though he be shrouded in mystery (akin to the very answer of Life, the Universe, and Everything), has my undying gratitude.
zarqon
05-06-2009, 04:38 PM
Looks like I'm triple-posting in my own thread. Someone please flame me.
1.5 Updates!
Recent updates to FTF and SmartStasis:
They now operate transparently with your poison-removal combat setting. If you have it set to remove poison at Really Quite Poisoned or worse, that's what SmartStasis will do.
Thanks to the mysteriously anonymous unnamed donor, I now have SS working perfectly with hobos. It's lovely.
Someone suggested that FTF always cast Spring Raindrop Attack if you have a haiku katana equipped. I thought it too limiting to include in FTF (it would prevent you from using any of the other katana-granted combat skills), but in the case of stasis, it's a perfect restore option. SmartStasis will now cast Spring Raindrop Attack as part of its stasis restore loop.
Evil, evil GGG's
The dratted things have completely useless messages. There is no way to detect when a ghost runs out of MP-restoring ability, since the "hungry" messages show even when the ghost has restores remaining. The only way to be sure that a ghost has run out is if it has no message at all, but even that might be inaccurate due to Salve or some later-introduced something-or-other. The only thing that will work is a huge mash of contains_text() comparisons against every possible ghost message (checking for absense) and making sure it's not a Salve round, which is very ungainly and easily breakable by the smallest server-side change. Needless to say, that is not in this update. This version will stasis using ghosts regardless of their restore ability.
You could also have it cast consume burrowgrub 3 times a day.
Looks like I'm triple-posting in my own thread. Someone please flame me.You're a bat-loving bastard son of a batty burrowgrub! Anyone who'd triple-post in his own thread probably plays with bits of bats in the belfry. You're the absolute lowest form of life, even lower than bat blade breeders, bedders of bat hat begeters and stuffed stab bat stuffers.
Okay, I'm not great at flaming, but I at least I tried!
asturia
05-07-2009, 06:53 AM
error message in this version:
Unknown variable 'famspent' (SmartStasis.ash, line 93)
zarqon
05-07-2009, 07:15 AM
@rinn: that's another thing that I don't think a CCS should necessarily automate since its uses are limited. As always, I'm open to being convinced.
Would people be happy with SmartStasis casting Consume Burrowgrub during stasis if you were sure to make full use of its restoration?
@asturia: You also need to update FTF.
@Bale: Nice! You have me dead to rights.
Speaking of bats... friggin' Cheshire bats! I've been on a crusade for one since I joined the game. When I checked long ago they were at 18M, when I decided I needed one for my bat-loving character they were at 36M, and now that I'm getting close to 36M they're over twice that. What is the deal. What. Is. The. Deal. Guess I should give up and learn how to be happy with my stab bat.
I think I just needed to get that off my chest.
asturia
05-07-2009, 10:15 AM
thanks for the hin zarqon.
Works fine now.
asturia
05-08-2009, 09:12 AM
Quick question:
I have a spirit hobo as my familiar.
and have configured SmartStasis like this:
int mpforstasis = 100;
My current mp is 58.
and when I go to fight a monster it doesn't stasis.
Even with my NPZR it doesn't stasis:
[426] F'c'le
Encounter: creamy pirate
Round 0: Asturia wins initiative!
Round 0: edding produces a tubular red firecracker labeled M-39, lights the long fuse, and tosses it behind your opponent.
Round 1: Asturia attacks!
Round 1: creamy pirate takes 103 damage.
You lose 1 hit point
Round 2: Asturia attacks!
Round 2: edding does a pelvic thrust at your opponent. A piece of toast ricochets off his head, momentarily stunning him (and/or driving him insa-a-a-a-ane.)
Round 2: edding lights a miniature Catherine wheel and dances in the shower of sparks. How cute!
Round 2: creamy pirate takes 103 damage.
You acquire an item: toast
You gain 91 Meat
You acquire an item: cream stout
You gain 22 Beefiness
You gain 12 Wizardliness
You gain 10 Cheek
zarqon
05-08-2009, 09:32 AM
The mpforstasis variable has nothing to do with your character's MP. It is the amount of inmp required for the script to stasis. You can see a little lower down that the starfish is worth 15, hobo is worth 13, NPZR is worth 10, etc. If you set this value to 100, the script requires an impossible amount of inmp and will never stasis.
asturia
05-08-2009, 09:50 AM
ah, good to know :)
psly4mne
05-09-2009, 10:32 PM
I haven't used this script yet, but it looks useful.
When fighting a gremlin that might have the right tool, I like to attack until 1 more hit will kill the gremlin, then start stasising. This minimizes wasted HP if it turns out to not have the tool. Does the script do that?
zarqon
05-10-2009, 02:16 AM
This script does not detect whether or not you have a combat familiar (which you might on a 100% run). Therefore, no -- it stasises gremlins from the beginning of the combat.
psly4mne
05-10-2009, 04:22 AM
On a quick look through the code, it appears that you stasis any gremlin, even if you're fighting the wrong one. Is there a nice way to check whether you're fighting the right gremlin?
On a quick look through the code, it appears that you stasis any gremlin, even if you're fighting the wrong one. Is there a nice way to check whether you're fighting the right gremlin?
starting on line 108:
if (contains_text(to_string(nowfightingonstageone),"Gremlin") && // gremlins lack tool
(contains_text(page,"A.M.C. gremlin") || contains_text(page,"does a bombing run") ||
contains_text(page,"picks a beet") || contains_text(page,"picks a radish") ||
contains_text(page,"bites you in the fibula") || contains_text(page,"make an automatic eyeball"))) {
print("This gremlin does not have a molybdenum item!","olive"); return page;
tebee
05-10-2009, 11:38 AM
I got errors trying to run this, the first one was
Unknown variable 'famspent' (SmartStasis.ash, line 93)
Consult script 'SmartStasis.ash' not found.
You're on your own, partner.
eventually realized that, though I had downloaded the latest version of FirstThingsFirst.ash it was picking up an earlier one (2.2) removing this cured the problem.
zarqon
05-11-2009, 05:24 AM
Evil GGG Update
I've been thinking and thinking about how to make this work, and I finally have a solution, which I will put in the next update. I just need to somehow get the name of your ghost. If charpane.php is accessible during combat, then problem solved. Otherwise, it will involve user input and a character setting, and will be breakable if you rename your ghost. This is not a foolproof solution (especially if your ghost is named something like "damage" or "Combat"), but it's the best I can do.
@psyl4mne: As far as I know, any gremlin (other than an A.M.C.) may drop a tool until their i-don't-has-tool attack message shows up, so they are stasis'd until they drop a tool or let you know they can't. If this is a wrong assumption, I would be happy to hear why.
@tebee: Glad you got it figured out.
StormCrow42
05-11-2009, 06:33 AM
@psyl4mne: As far as I know, any gremlin (other than an A.M.C.) may drop a tool until their i-don't-has-tool attack message shows up, so they are stasis'd until they drop a tool or let you know they can't. If this is a wrong assumption, I would be happy to hear why.
Each gremlin has a specific tool that it drops. Yossarian (http://kol.coldfront.net/thekolwiki/index.php/Retrieve_Yossarian%27s_Tools) tells you both which tool to look for and where to find it. So in the zone you adventure in, you'll find several different gremlins, an AMC gremlin, the gremlin that has the tool, his clone that doesn't have the tool, and other gremlins who also won't have the tool you're looking for here. The variable "currentJunkyardTool" contains which tool you're looking for (and by extension, which gremlin has it).
zarqon
05-18-2009, 05:45 AM
So, to clarify: ONLY the tool Yossarian has mentioned will drop, ever? Will the right gremlin drop a tool in the wrong area? If this can be confirmed, I'll change the gremlin detection logic.
My session logs did not help me figure anything out... the last handful of times I've finished this sidequest in under 7 adventures.
StormCrow42
05-18-2009, 06:01 AM
So, to clarify: ONLY the tool Yossarian has mentioned will drop, ever? Will the right gremlin drop a tool in the wrong area? If this can be confirmed, I'll change the gremlin detection logic.
My session logs did not help me figure anything out... the last handful of times I've finished this sidequest in under 7 adventures.
From what I've gathered, both from the wiki and from my personal observations when I've done the quest by hand, the tools only drop in the locations that Yossarian tells you. OTOH, I'm not absolutely positive that you have to visit him before they start dropping tools. I haven't tested the case of adventuring in all 4 areas looking for tools without talking to him first (or in between). I have one account coming up on the quest tomorrow, perhaps I'll try to spade that then.
StormCrow42
05-19-2009, 10:25 PM
Ok, I've tested the case of not visiting Yossarian between visits to various areas. Mafia clears currentJunkyardTool after you find one, but when I reset it to a nonsense value so that SmartStasis would still stasis gremlins, I found the other 3 tools without going back to visit Yossarian. So currentJunkyardTool isn't the only tool that will drop (although it is probably the only tool that will drop in currentJunkyardLocation). I'm not certain that it's worth writing the logic of avoiding stasising the wrong gremlin only in currentJunkyardLocation.
zarqon
05-20-2009, 01:54 PM
@StormCrow: Thanks for the spading. In light of your data, it would appear that the current gremlin-stasising algorithm does not require changing. At least, not just yet -- the next question is, can more than one tool drop at once, or is only one tool ever available at any given time?
I was holding off on releasing the next update to see if I needed to redo the gremlin logic. Since we're still not sure, I've released 1.6.
1.6 Update: Now works with GGG's. Finally.
IMPORTANT! The detection algorithm for GGG's uses the name of your ghost. If the ghost's name does not appear in the page text, it means your ghost didn't act and is therefore out of charges. And to get your ghost's name, the script has to hit charpane.php every combat. This is sub-ideal, so I've also written a workaround into the script. If you set the name of your ghost (there's a variable named ghostname at the top of the script), then the script will use that as your ghost's name and will not bother with the extra server hit.
I highly recommend if you intend to use this script with a GGG that you
1) Set your ghost's name in the script.
2) Don't name your ghost something like "damage", or other text that may appear in combat.
Not sure what you mean by "can more than one tool drop at once". Each zone is only capable of dropping a specific tool from a specific type of gremlin. No matter how many times you adventure over by that rusted out car, there is only a single specific tool that can be found there, regardless of whether Yossarian has told you what it is.
If that isn't what you were asking... well... dunno.
StormCrow42
05-21-2009, 12:23 AM
I think that the optimum solution to gremlin stasising would be:
If we're adventuring in currentJunkyardLocation, stasis only the gremlin that drops currentJunkyardTool
If we're adventuring elsewhere in the junkyard AND we have the magnet, stasis everything but the AMC gremlin
If we don't have the magnet, don't stasis gremlins ever
Case 1 is going to be the most common case (visiting Yossarian after every tool drop, like OCW does), but case 2 might be interesting for someone who doesn't bother to go back to Yossarian for whatever reason.
zarqon
05-21-2009, 12:51 PM
Bale -- that pretty much answers my question, yes. I wanted to know if multiple tools were available after Yossarian told you to get Tool X, or if only Tool X was available. In other words, are the tools available in some sort of random-per-ascension sequence, or are they all available depending on zone? According to your information, tool availablility is tied only to zone, not to sequence, so all tools are available upon beginning the quest, one per zone.
Which means StormCrow's recommended behavior is basically right on -- although if currentJunkyardLocation and currentJunkyardTool are known and we are in one of the other locations, we don't need to stasis the gremlin that drops currentJunkyardTool.
I'll add this in to the next update.
Found a painful bug. Wossname fought GMOB, won, but couldn't compete the quest! If you check out the wiki entry for GMOB, you'll see that if you use ambidextrous funkslinging, the order of mirror/flyers matters. I think SS got the order backwards and killed him before it flyered him (this was my first ascension with ambi-funk).
StormCrow42
05-25-2009, 08:09 AM
Found a painful bug. Wossname fought GMOB, won, but couldn't compete the quest! If you check out the wiki entry for GMOB, you'll see that if you use ambidextrous funkslinging, the order of mirror/flyers matters. I think SS got the order backwards and killed him before it flyered him (this was my first ascension with ambi-funk).
Were you using at least version 2.4 of FTF? The order was changed in that version.
Wait, let me guess... FTF doesn't check its own version. Doh! No, I wasn't.
zarqon
05-25-2009, 05:33 PM
I don't do version-checking in CCS's, because that would be a ridiculous amount of server hits. But, unlike my other scripts that have version-checking, I make sure to post update posts in the related threads, so that anyone who is subscribed to the thread will immediately be aware of new updates.
jasonharper
05-25-2009, 10:25 PM
I don't do version-checking in CCS's, because that would be a ridiculous amount of server hits.
So, do your version check if a preference named something like "_FTFVersionChecked" is false, then set it to true. Prefs starting with an underscore now get cleared every day.
So, do your version check if a preference named something like "_FTFVersionChecked" is false, then set it to true. Prefs starting with an underscore now get cleared every day.
I cannot begin to enumerate all the wonderful ways that feature might be used... Finally a foolproof and VERY simple way to check that you've done something once every day.
mredge73
05-26-2009, 05:51 PM
can someone explain this new idea/concept?
so there is a way to not check the version everyday?
my scripts (not released yet) do a version check every time I call them, how would I fix that.
can someone explain this new idea/concept?
so there is a way to not check the version everyday?
my scripts (not released yet) do a version check every time I call them, how would I fix that.
The basic concept is this;
if(get_property("_checkedToday") == "") {
check_version();
set_property("_checkedToday" = "true");
}
Every single day, the first time mafia logs on it will set _checkedToday to an empty string. If it is "", then you know you haven't checked yet.
jasonharper
05-26-2009, 11:59 PM
if(get_property("_checkedToday") == "")
Except, of course, that "_checkedToday" is a horrible choice for the name - there is only one namespace for preferences, shared by ALL scripts and KoLmafia itself, so user-created ones need to take some care to avoid duplication. Including your name, or the script's name, would be a good idea.
mredge73
05-27-2009, 04:09 AM
thanks, with a little syntax correction it worked perfectly
if(get_property("_"+file) != "true")
{
set_property("_"+file , "true");
CheckVersion();
}
another question
Is there a secret list somewhere of these properties?
I know that it won't have user created properties on it but it would help to know what properties mafia uses.
StormCrow42
05-27-2009, 04:12 AM
another question
Is there a secret list somewhere of these properties?
I know that it won't have user created properties on it but it would help to know what properties mafia uses.
Simply go do your settings subfolder and open one of the prefs files.
therealtahu
05-27-2009, 04:14 AM
Is there a secret list somewhere of these properties?
I know that it won't have user created properties on it but it would help to know what properties mafia uses.
The closest that you can come to the secret list would be in settings\name_prefs.txt
As a bonus, and user created properties also show up in that.
Not a very secret list at all. All user created properties and mafia properties cuddled together as equals. I've sometimes wished that there was some way to differentiate between mafia's properties and the properties that somebody's script snuck into the list, but alas no.
Except, of course, that "_checkedToday" is a horrible choice for the name.Well, of course. I was just making the example obvious about the meaning of the variable. Perhaps I should have anticipated that someone might actually copy the example word-for-word?
mredge73
05-27-2009, 01:51 PM
Bonus indeed!
This will help big time, and to think I was writing entire functions to find out some of those little fun facts that are in the property list.
Very happy about the "once per day" thing - just so I don't jump to conclusions, is "day" defined by rollover, or by the clock, or by something else?
Very happy about the "once per day" thing - just so I don't jump to conclusions, is "day" defined by rollover, or by the clock, or by something else?
It is determined by mafia, just like it performs breakfast only once per day. In other words, once per rollover.
zarqon
05-28-2009, 05:35 AM
This was always doable with today_to_string() -- which depends on KoL date, not local time (just like the new properties, dj_d). But the new way is a bit easier since it does half of it for you.
Perhaps I'll add version checking to FTF and SS only on Tuesdays when you get a critical hit against a monster that starts with 'P'.
@Z: I'd do it on evenly-numbered turns. That would halve the server load!
:)
zarqon
06-08-2009, 05:28 PM
1.7 Update!
I went on a bit of a coding spree lately. Updates to OCW, FTF, and SS, in addition to getting the CanAdv project underway. Whee!
In this update: SS required some changes to keep up with the changes I also made to FTF, but the most notable change is that I've added gremlin detection logic as previously discussed. So, it will only stasis gremlins that actually have a chance of dropping a tool. I haven't tested this yet, but I'm pretty sure it ought to work. Enjoy the extra HP!
Veracity
06-08-2009, 09:56 PM
You need to stasis monsters in the Seaside Megalopolis that drop elemental disks. Do you handle that? I was pleased when I (finally) figured out how that works; KoLmafia now color-codes the messages to let you know when to claim your disks...
You need to stasis monsters in the Seaside Megalopolis that drop elemental disks. Do you handle that? I was pleased when I (finally) figured out how that works; KoLmafia now color-codes the messages to let you know when to claim your disks...
Did you code it for elemental miss messages as well as hit messages?
Veracity
06-09-2009, 03:54 AM
Yes.
zarqon
06-09-2009, 01:18 PM
@V: Not enough information in the wiki for me to figure out how to handle that yet. I do see that the relevant monsters including quest drops have been added to mafia though.
If anyone cares to volunteer further information (why do they need stasising, what are the messages SS should look for) I can add that in, otherwise you'll have to wait until I get around to doing that quest myself, which could be a while.
EDIT: That'll learn me to upload untested updates. My update would ONLY stasis gremlins that might have tools... and NOTHING ELSE. Yeah. Updated in the first post.
Veracity
06-09-2009, 04:55 PM
@V: Not enough information in the wiki for me to figure out how to handle that yet. I do see that the relevant monsters including quest drops have been added to mafia though.
Given the monster data I added, there is enough info on the wiki. Look for the exact messages there.
- The monster which drops the heat item has both hit and a miss messages that refer to a "lit match".
- cold, "liquid nitrogen"
- stench, "vile-smelling blood"
- sleaze, "tubular appendage"
- spooky, "freaky alien thing"
You need to stasis the monster until it does its elemental thing and then, as your next attack, use the Ruby Rod to claim the disk. Completely analogous to the gremlins.
zarqon
06-10-2009, 02:54 PM
Just one further question and it's good as done: does getting the disc end combat, as with gremlins?
Veracity
06-10-2009, 03:14 PM
It does not end the combat.
Edit: one comment, which I'm sure will be obvious, once you look at this: the Ruby Rod is a weapon, not a combat item like the molybdenum magnet. Therefore, it's pointless to stasis the megalopolis unless you have it equipped.
zarqon
06-10-2009, 03:29 PM
1.8 Update
Close on the heels of 1.7, another update! Stasising Megalopolis monsters has now been added. It will stasis them only if you have the Ruby Rod equipped and lack the elemental disc that monster drops. Otherwise, regular rules for stasis apply. Thanks Veracity for providing the necessary info!
Also, I finally got around to adding Consume Burrowgrub to the restore skills section, but you will only use it if you will make full use of its restore ability (both HP and MP). I felt that was safe enough to prevent anyone being annoyed at using a daily-limited skill.
Is there any reason you basically have the main() function copied between ftf and SmartStasis? Wouldn't it be a bit cleaner and less prone to missing a change that needs to go into both by separating out the common functionality into a different function? I'm not saying it's broken, but as a programmer I've always noticed trends where if code is written twice there's twice as many chances of bugs to appear because of it.
If a character has saucy salve and lasagna bandages, is it better to only cast salve until you get the quickly cast 3 times? I'm actually not sure about this and I'm curious.
zarqon
06-10-2009, 05:05 PM
Is there any reason you basically have the main() function copied between ftf and SmartStasis?
Yes; I wrote FTF first. :) I did give some thought to moving most of that up to a separate function in FTF and just calling that function from SS, but it didn't make its way into any of the recent updates, because I still haven't strategized what the eventual combat branch of the CCS suite will work like.
If a character has saucy salve and lasagna bandages, is it better to only cast salve until you get the quickly cast 3 times? I'm actually not sure about this and I'm curious.
Given that this is almost always happening when "in the clear," it's kind of a nonissue for the purposes of the script. Or do you see another possible advantage besides avoiding the monster's action?
True, but typically the only thing I stasis with your script are gremlins which are going to hit me. Thinking about it more though, maybe the opposite is true and it should only be using bandages, we wouldn't really ever want to block a combat action from a gremlin that might drop a tool because it's really just causing more server hits to get to the same outcome and those stasis fights typically aren't being used for healing anyway.
Ignoring that, I am confused by two checks you're doing:
if (my_class() == $class[accordion thief] || my_class() == $class[disco bandit]) {
if (get_property("autoSteal") != true) return act(steal());
if (get_property("autoEntangle") == "false" || (flyereverything && flyers != $item[none]) ||
(my_location() == $location[barrr] && item_amount($item[the big book of pirate insults]) > 0))
url = try_skill(url,$skill[entangling noodles]);Shouldn't you be checking if autoSteal and autoEntangle are "true", and additionally that you're not in the clear before entangling? Stealing also isn't supported in form of bird.
Braska
06-11-2009, 10:42 AM
Don't know if this is an expected action or not... but the script seems to be casting Entangling Noodles on... everything. If I don't get the jump, EN is cast... and yet my moxie has been triple what is needed to be in the clear. For example:
Fighting a white knight in whitey's grove during MacG quest. EN is cast... when my moxie is at 120 buffed as a muscle class. Using latest daily build, and latest version of this.
Not sure if this is the fault of FTF or SS...
zarqon
06-11-2009, 06:56 PM
@Rinn: Disjointed responses: I explained the "false" property checks recently in the FTF thread. See my response to dj_d's question. But I do notice that I forgot to put quotes around "true". It's been that way for quite a while without causing any problems, but it would be nice if it worked as intended. Ugh, I hate sloppy coding, especially when it's mine.
Thanks for the heads up about Form of Bird. I'll work that into the next update.
And yes about the in the clear check. MORAL: a rewrite done hastily often leads to further rewrites. See below.
@Braska: Oops, stupid mistake. Change this line
if (get_property("autoEntangle") == "false" || (flyereverything && flyers != $item[none]) ||
which is somewhere near line 200 I think, to this:
if ((!intheclear() && get_property("autoEntangle") == "false") || (flyereverything && flyers != $item[none]) ||
I have a pretty significant update to my entire family of scripts to release this weekend (I'm finally consolidating a "common functions" library) so I don't have a releasable version of this which I can fix and upload at the moment. But I'll make releasing working versions of the CCS combo a priority.
Braska
06-12-2009, 10:32 PM
Thanks for the quick fix Zarqon, working great now. :)
Raven434
06-16-2009, 09:03 PM
Bad item value: "ruby rod" (SmartStasis.ash, line 99)
Consult script 'SmartStasis.ash' not found.
You're on your own, partner.
ccs:
[default]
consult SmartStasis.ash
attack
I don't have a ruby rod. I was meat farming at the giant's castle. Pet is hobo monkey.
Newest version of zlib, FTF and SS, updated yesterday.
StormCrow42
06-16-2009, 09:15 PM
Best guess, you need a newer version of Mafia. The ruby rod is a recent addition from the new areas provided by the new June familiar.
Raven434
06-16-2009, 09:18 PM
DOH!
Running 7354 on accident - *NOT* the 7384 I have been using.
Nice catch!
/me buys StormCrow a beer
:-)
StormCrow42
07-23-2009, 08:00 AM
I just had an idea for a feature to add. What about setting a preference when we detect when our spirit hobo or GGG (and eventually slimeling) needs fed? Something like "_gggHungry" or "_hoboHungry". That would eventually allow scripts to either feed your ghost, or at least abort and prompt you.
Sputnik1
07-25-2009, 06:35 AM
I need help guys
Unknown variable 'threshold' (FirstThingsFirst.ash, line 77)
Consult script 'SmartStasis.ash' not found.
I have no idea what's wrong, I have both scripts in the script folder and I havent done anything with FTF to get this result
Changes afoot - see here for a quick fix.
http://kolmafia.us/showthread.php?p=15169#post15169
zarqon
07-25-2009, 01:54 PM
@Sputty: Just download the latest FTF and you should be fine. SmartStasis appears to have been untouched by my latest flurry of updates.
Tarko
08-12-2009, 05:29 AM
great script, thanks!
Was wondering: how about support for the essence monster in the Seaside Megapolis?
That would be neat.
Cheers.
zarqon
08-12-2009, 06:52 AM
Not sure what you mean... if you have equipped the Ruby Rod, this script will already stasis monsters in the Megalopolis that may drop needed discs.
Tarko
08-12-2009, 10:17 AM
*faceplam*
you're right.
Sorry for the post.
zarqon
08-13-2009, 06:23 AM
Haha, no problem. Glad you enjoy the script.
Deathman_Elf
08-13-2009, 09:22 AM
How do I set to use skill stuffed mortar shell instead of attack ?
I even put it after smart stasis in default css but it sill do not work
Edit: Hmm it seems it cast it ocassionaly but I am doing now mysterious island of mystery war now and I need to cast it away to monsters which could few hits kill me :)
Zarqon, it seems your script has gotten a little bit out of date. You don't support the midget clownfish. I added the line to my version so I'm good, but others might like a fix.
The midget clownfish is a starfish-type familiar that does sleaze elemental damage instead of physical damage. Other than that it is exactly the same on land. (The sleazy damage means it utterly destroys monsters in the Friar's Grove and has no problems beating up physically resistant monsters like chalk dust wraiths.)
In the Sea it is even more powerful, so it's just an all around improvement over the Star Starfish.
zarqon
08-25-2009, 10:57 AM
*waves hands*
I don't know what you're talking about. SS totally supports the midget clownfish.
StormCrow42
08-25-2009, 05:35 PM
Also, the Rock Lobster. And although perhaps more difficult, the Slimeling.
zarqon
09-01-2009, 02:16 PM
1.9.2 Updates
Added the rock lobster. Also, I was getting essence discs from Seaside Megalopolis today and noticed that I fought and stasised about 10 dwarf replicants without getting the item. It turns out that the check for the elemental attack/miss message was wrong. Fixed that and then got the disc the next time a replicant came along (by that time I'd olfacted them, ha).
Slimelings look like another project similar to adding ghost support, but I suppose this script would be pretty awesome if it could support them. I haven't spent more than a handful of adventures in the Slime Tube, and doubt I will for a good long while (I'm about to start a kittycore run), but if anyone has ideas for how to detect when the Slimeling runs out of charges, I'm all ears.
These little "adding one line of code" updates haven't seemed to merit a bump to version 2.0, so I went to a third version number. But I think adding Slimeling support would justify a bump to 2.0. :)
Next time I'm in aftercore Z, I'll assist you in getting a slimeling if you don't have one already. (it'll be a couple of runs from now)
zarqon
09-07-2009, 07:22 AM
Thanks kain, gentleman and scholar! I'm about to descend into kittycore with several clannies (also my first BM run... foolish, perhaps, but certainly exciting, and my clannies are in the same situation so we can whine to each other to keep things interesting), so by the time I finish that you may well be done with your several runs!
shinomory
10-25-2009, 10:38 AM
2 things!
1) Thanks for the awesome script. It's saved me tons of time and meat, and in general works perfectly.
2) In regard to the latter, the script as it is now continues to stasis until the automatic cutoff at turn 27 if you can cast disco nirvana, regardless of whether or not it has been cast.
This is because the check to see if it has been cast is performed when disco nirvana is attempted, instead of as part of can_nirvana. Rather than move stuff around and make it more confusing, just change line 163 to
if ((my_mp() == my_maxmp()) && (!can_nirvana || (can_nirvana && have_effect($effect[disco nirvana]) > 0))) inmp = 0;
Hope this helps (and I'm not overlooking something crazy)!
edit: I also have a version of your script I've tweaked to include Disco Concentration, if you (or anyone else) is interested. I haven't attached it because it doesn't regard the additional MP drain, and as such combined with Disco Nirvana will drain your MP reserves (and therefore possibly your meat) rather quickly unless you are using an MP familiar. I'm also thinking of integrating it with libram costs, in order to avoid casting any combos (and therefore possibly regaining/regenerating MP) until the cost for the next libram is higher than your maximum MP. Oh, ambition.
2nd edit: I also forgot to mention one niggling problem, in that the Rock Lobster (can you tell I've been using it a lot?) has MP regain tied to its fire element damage, which means that it only gains 1MP per regain when facing any fire-elemented creature. This is (along with the issue of librams) kind of going outside the scope of the script, but it has been noticable. Just something to think about.
Batrachomyomachia
11-04-2009, 12:50 PM
I also modified it for disco concentration (with simple logic to only cast concentration if a 20% improvement in drops * autosell value for drop is bigger than the meat cost of the mp used)
BTW it looks to me like you're assuming disco nirvana only improves meat drops by 20%, I think it actually increases them by 30%. I changed the constant in my version.
Also rearranged the stasis item logic to prefer dictionaries (in non-orc chasm areas) just because I like the fact that it does 0 damage. Could you also use a molybdenum magnet as a statis item if you're not in the junkyard?
Also, I was getting essence discs from Seaside Megalopolis today and noticed that I fought and stasised about 10 dwarf replicants without getting the item.
I've been getting essence discs today; the script (v1.9.2) successfully gathered cold, fright, and stench, but somehow missed kink twice and heat once (even though I saw the purple and red elemental attack messages).
Possible factor (or red herring) - the script seemed to be casting saucy salve - perhaps that was overriding the ruby attack.
-Th3y
zarqon
11-13-2009, 04:02 AM
@Batrach: Awesome changes/fixes. The check for Concentration profit also needs to realize that item drop rates are capped at 100% -- if the drop is already at 100%, there will be no additional profit. It can also check for goals! I will add all these changes in the next update.
I've already written most of the above, but I'd like to add one more thing before releasing it. To be thorough, SS should also consider sources of bonus damage to DB skills. Otherwise, if you are wearing the Tawdry Tramp Togs (+20 to DB skills), you could easily kill the monster before finishing your combo. Does anyone know where to find a list of items/effects/etc that grant bonus damage to DB skills? My initial searches of the Wiki aren't showing me anything remotely comprehensive.
EDIT: This is what I have so far. Anyone know of anything I've missed?
int bonus_db = to_int(have_equipped($item[disco banjo]))*3 + to_int(have_equipped($item[shagadelic disco banjo]))*7 +
to_int(have_equipped($item[makeshift castanets]))*10 + to_int(have_equipped($item[Chester's moustache]))*20 +
to_int(string_modifier("Outfit") == "Tawdry Tramp Togs")*20;
hello
11-14-2009, 09:47 AM
I think this is a dmb question but I was fighting a gremlin using this and it only lasted 2 rounds. The gremlin I was fighting in mafia has the item to drop, but the adventure lasts just for 2 rounds. Help? Sorry, I'm still kind of a noob to scripting.
Heffed
11-14-2009, 06:34 PM
Did you have a combat familiar equipped, or some passive damage items?
zarqon
11-16-2009, 06:15 AM
@hello: Show me what happens in the CLI when you auto-adventure (most helpful if you also have the logging options turned on for showing monster health and familiar actions).
Just about ready to go with the SS updates!
Just about ready to go with the SS updates!
Really?! Does that I'll be able to take "special action" out of my CCS and auto-olfaction will still work? If so, "YAY!"
zarqon
11-16-2009, 06:28 AM
@Bale: You can already do that as far as I know. That was in the last FTF update.
Really? Because I tried with SmartStasis just today and it didn't work. (I tested it twice actually, since I was farming instead of ascending today.) And with your scripts it is impossible for me to not have the latest version or they get all whiney at me, so I know that is not an issue. ;)
If I'm using SmartStasis, I don't need FTF in my CCS, right?
zarqon
11-16-2009, 07:30 AM
SS calls FTF first so you don't need it in your CCS.
Did you have enough MP to Olfact? That's a difference between my scripts and mafia -- if you had insufficient MP then casting Olfaction would have been skipped.
Yes, I had plenty of MP. As soon as I put the "special action" line in, it cast olfaction like I wanted, without needing to restore. If it matters, I was choosing to olfact by the name of the monster, not an item.
Going over your code, I think I found the bug. Here's the relevant line:
if (get_property("autoOlfact").contains_text("monster "+to_string(nowfightingonstageone))) should_olfact = true;
What you weren't considering is that my auto-olfaction was all in lower case, while the monster had capital letters in its name. Also, sometimes I only use part of a monster's name. For instance, olfact monster dairy, should olfact a dairy goat since auto-olfaction normally works that way so it is habit to use it like that.
if(substring(get_property("autoOlfact"), 0, 7) == monster && to_string(nowfightingonstageone).to_lower_case().c ontains_text(substring(get_property("autoOlfact"),8).to_lower_case())
should_olfact = true;
Edit: Just realized it might be more interesting to substring(get_property("autoOlfact"),8).to_monster() and make use of mafia's built in fuzzy matching.
if(substring(get_property("autoOlfact"), 0, 7) == monster && nowfightingonstageone == to_monster(get_property("autoOlfact").substring(8))
should_olfact = true;
zarqon
11-16-2009, 10:45 AM
Aha, good catch. I was under the impression that mafia normalized the input for that setting.
But even if that were so, it would be better for cases where a user might manually specify something for the setting using other means than the GUI. I'll fix that in the next update (the same time as SS, since some things ended up moving from FTF to SS).
I note one potential problem with my second code. What happens if the user enters a faulty partial monster name and kolMafia can't match it to an actual monster? Would that cause an error?
What happens if the user enters a faulty partial monster name and kolMafia can't match it to an actual monster? Would that cause an error?
Incidentally I did some testing of this and I'm surprised to say that it does not cause an error. I've modded FTF and am quite happy with the results. This is what that line looks like now:
if(get_property("autoOlfact").length() >7 && substring(get_property("autoOlfact"), 0, 7) == "monster"
&& nowfightingonstageone == to_monster(get_property("autoOlfact").substring(8))) should_olfact = true;
zarqon
11-23-2009, 10:14 AM
Thanks for saving me some time. I'll put this in the next update, which will be pretty cool in the way it handles Disco Combos, if I do say so myself.
I'm quite looking forward to it.
zarqon
11-28-2009, 03:29 AM
2.0 Updates!
Fixed the issue th3y reported. If the special message happened while FTF was doing its thing, the magnet/Ruby Rod attack would not happen. Moved detection and response from SS to the action filter of FTF, since we want those actions to happen without fail.
Fixed the issue shinomory reported. The script should now stop stasising for MP if your MP is full and you have already cast possible disco combos.
Fixed the erroneous formula for Disco Nirvana. You'll probably see it cast more often now.
SS now prefers dictionaries as stasis items since they actually do 0 damage.
And the big one:
Support for Disco Concentration!
It will perform this combo if it's possible without killing the monster and either of the following are true:
it will help you acquire a goal.
the difference in value between casting vs. not casting is greater than the value of your MP cost to cast it. (In other words, if it's profitable.) Note that if you use an MP-restoring familiar you will be much more likely to cast it, since possible future restoration is taken into consideration when determining the cost of the combo.
Since some code was moved from SS to FTF, you will need to update both.
Enjoy!
Hmmm,
I seem to be getting Disco Concentration cast permanently, possibly this is because I have free disco rests which mean that my cost to restore MP is 0, but it would be nice to be able to turn this off, as I don't always want to be casting Disco concentration, but rather want to use less turns restoring MP for instance, or want to save those disco rests for another time... Also, it seems to run Disco concentration preferentially to Disco Nirvana? In the castle I've only ever got concentration, and I would have thought Nirvana would be more profitable...
zarqon
11-28-2009, 02:48 PM
This script does not consider restoring MP outside of combat, so the availablility of disco rests has nothing to do with this script's decision to cast Concentration.
More pertinent info: What familiar are you using? Do you have any goals specified? Can you show some CLI output where the script casts Concentration but not Nirvana?
bigevildan
11-28-2009, 06:18 PM
The script doesn't seem to be checking if you are a Disco Bandit before trying to use disco combos. The combos don't do anything for other classes.
Heffed
11-28-2009, 09:18 PM
The script doesn't seem to be checking if you are a Disco Bandit before trying to use disco combos. The combos don't do anything for other classes.
I didn't see it trying to use the combos on my muscle characters.
bigevildan
11-28-2009, 11:53 PM
I didn't see it trying to use the combos on my muscle characters.
It was certainly trying to do so today with my Accordion Thief.
zarqon
11-29-2009, 02:47 AM
The combos don't do anything for other classes.
Really?? Learn something new every day. I guess some of my perming order plans need a bit of reworking then, too.
Fixed.
Now let's see. There's turtle taming in BBB, seal clubbing in AutoClub, combat ghost summoning in FTF, and disco combos in SS. I guess AT's and S's have the least special content, eh?
S's get to make triple potions and get +5 turns from potions.
Meanwhile AT's just get to sneak into other guild stores which means that they get MMJ. They sorta got shafted, but they're so otherwise awesome that I cannot feel sorry for them.
S's get to make triple potions and get +5 turns from potions.
And splashback. Which just *might* warrant *some* kind of automation *somewhere*.
But I wouldn't know. I play mostly by hand.
True. Sauceror spell splashback is awesome. As soon as monsters can survive my wave of sauce, I spellcast like mad.
zarqon
11-30-2009, 02:41 AM
I suppose some kind of support for splashback should make its way into the combat branch of the someday eventually CCS suite. But that's just a class ability during combat, not really class-specific content. And AT's don't have anything, poor guys. The generous class gets the short straw.
Heffed
11-30-2009, 06:17 AM
I don't know why, but this script interferes with the completion of the Orc Chasm quest.
This is the first ascension I've tried with SmartStatis. I spent an abnormal amount of turns trying to complete the chasm. At first I just assumed it was bad RNG luck. Then I noticed that my 64067 scrolls would get created, then they would disappear and I wouldn't have a 64735 scroll to show for it...
Looking at the log, with SmartStasis running I see things like:
[635] Orc Chasm
Encounter: rampaging adding machine
Round 0: HappyHead wins initiative!
Round 1: HappyHead uses the 30669 scroll!
You lose 12 hit points
Round 2: HappyHead uses the 33398 scroll!
Adjusted combat item count: 64067 scroll
You acquire an item: 64067 scroll
Round 3: HappyHead uses the 668 scroll!
Adjusted combat item count: 64067 scroll (-1)
You gain 7 Fortitude
You gain 2 Wizardliness
You gain 17 Cheek
Hmmm... I'm not sure what it's telling me here. It's not showing that the 64067 scroll was used, but apparently it has been removed from the combat item count, so was it used? Is it somehow using the scroll as a combat item instead of feeding it into the machine to get my desired quest scroll? Is that even possible? :confused:
And again:
[711] Orc Chasm
Encounter: rampaging adding machine
Round 0: HappyHead wins initiative!
Round 1: HappyHead uses the 30669 scroll!
Round 2: HappyHead uses the 33398 scroll!
Adjusted combat item count: 64067 scroll
You acquire an item: 64067 scroll
Round 3: HappyHead uses the 668 scroll!
Adjusted combat item count: 64067 scroll (-1)
You gain 5 Fortitude
You gain 9 Wizardliness
You gain 12 Smarm
When I noticed the 64067's disappearing, my first thought was a code change in KoLmafia itself was causing odd things to be happening. Then I remembered I haven't used this script in this area before, perhaps it's SmartStasising them away for some bizarre reason. So I swapped consult scripts to FirstThingsFirst.
Sure enough, success:
[719] Orc Chasm
Encounter: rampaging adding machine
Round 0: HappyHead wins initiative!
Round 1: HappyHead uses the 334 scroll!
Round 2: HappyHead uses the 334 scroll!
Adjusted combat item count: 668 scroll
You acquire an item: 668 scroll
Round 3: HappyHead uses the 668 scroll!
Round 4: HappyHead uses the 64067 scroll!
You acquire an item: 64735 scroll
Round 5: HappyHead uses the 30669 scroll!
Round 6: HappyHead uses the 668 scroll!
Round 7: HappyHead attacks!
Round 8: HappyHead attacks!
You gain 22 hit points
You gain 23 Mojo Points
You gain 3 Strengthliness
You gain 10 Enchantedness
You gain 12 Smarm
You gain a Moxie point!
Any way to stop it from nuking the 64067 scrolls? As that is a bit counter productive towards quest completion.
Is it somehow using the scroll as a combat item instead of feeding it into the machine to get my desired quest scroll? Is that even possible? :confused:
No, that isn't possible. You feed scrolls to the machine by using them as combat items. The two things are synonymous. You cannot do one without the other.
Can you verify that you really don't have any extra 64735 scrolls lying around? I find it more likely that mafia failed to recognize the scroll creation.
zarqon
11-30-2009, 06:46 AM
This is not SmartStasis's doing, since it has zero handling for scrolls. It doesn't even consider them.
Those "adjusted combat item count" messages come from mafia verifying its internal inventory count against the items KoL shows in your combat item drop-down menu. Are there any other instances where you saw a 64067 (-1) message?
I'm almost certain you're not actually losing any scrolls (note that it never said you threw the 64067 scroll), there just might be an issue with the way mafia keeps track of them during combat. What I suspect is that mafia might actually be double-counting them in the round you get them, causing it to correct its mistake in the following round.
I also saw this oddness:
Round 5: HappyHead uses the 30669 scroll!
Round 6: HappyHead uses the 668 scroll!
Round 7: HappyHead attacks!
No acquisition of a 31337 scroll.
Heffed
11-30-2009, 04:23 PM
No, that isn't possible. You feed scrolls to the machine by using them as combat items. The two things are synonymous. You cannot do one without the other.
Can you verify that you really don't have any extra 64735 scrolls lying around? I find it more likely that mafia failed to recognize the scroll creation.
I didn't think there was a difference either, but I couldn't account for what was happening otherwise.
No, I have no other 64735 scrolls in my inventory. Unless can you possibly only have one at a time?
This is not SmartStasis's doing, since it has zero handling for scrolls. It doesn't even consider them.
OK, then I guess I'm at a loss to explain why switching to FTF allowed me to finally create the scroll. (However, as noted below, it still failed to create at least one 31337)
Those "adjusted combat item count" messages come from mafia verifying its internal inventory count against the items KoL shows in your combat item drop-down menu. Are there any other instances where you saw a 64067 (-1) message?
Yes.
[596] Orc Chasm
Encounter: rampaging adding machine
Round 0: HappyHead wins initiative!
Round 1: HappyHead uses the 30669 scroll!
Round 2: HappyHead uses the 33398 scroll!
Adjusted combat item count: 64067 scroll
You acquire an item: 64067 scroll
Round 3: HappyHead attacks!
Adjusted combat item count: 64067 scroll (-1)
Round 4: HappyHead attacks!
Round 5: HappyHead attacks!
Round 6: HappyHead attacks!
Round 7: HappyHead attacks!
You gain 8 Muscleboundness
You gain 5 Magicalness
You gain 13 Cheek
I also see things like:
[612] Orc Chasm
Encounter: rampaging adding machine
Round 0: HappyHead wins initiative!
Round 1: HappyHead uses the 668 scroll!
Round 2: HappyHead uses the 64067 scroll!
Round 3: HappyHead attacks!
Round 4: HappyHead attacks!
You gain 3 Strengthliness
You gain 6 Wizardliness
You gain 16 Smarm
[695] Orc Chasm
Encounter: rampaging adding machine
Round 0: HappyHead wins initiative!
Round 1: HappyHead uses the 668 scroll!
Round 2: HappyHead uses the 64067 scroll!
Round 3: HappyHead uses the 334 scroll!
You gain 8 Beefiness
You gain 7 Mysteriousness
You gain 10 Roguishness
I'm almost certain you're not actually losing any scrolls (note that it never said you threw the 64067 scroll), there just might be an issue with the way mafia keeps track of them during combat. What I suspect is that mafia might actually be double-counting them in the round you get them, causing it to correct its mistake in the following round.
All I know is that my 334 and 668 scrolls kept getting used, and a 64067 scroll would appear in the session results tab, then disappear again after meeting a rampaging adding machine. I had mafia set to stop on the default goals of a 64735 scroll and a lowercase N, with the addition of a 31337 scroll. I did stop to check my inventory after this happened once to see if mafia was just not registering the 64735 scroll, but there wasn't one. I checked again when I switched my CCS to consult FTF instead of SS.
I also saw this oddness:
No acquisition of a 31337 scroll.
Yes that is odd, and that is after switching to FTF. There are also cases of using 668's and 64067's with no 64735's (without the -1 message) as I showed above, but those were when using SS.
I'm going to attach my chasm'ing so you guys can look at it if you wish. I don't know what to think at this point...
The point that I create the Vesper in the log is when I switched to FTF.
Hmmm... Looking a little closer at the log, I'm also seeing:
Adjusted combat item count: meat vortex (-1)
jasonharper
11-30-2009, 06:32 PM
Short answer: Perm Funkslinging as soon as possible!
Long answer: There are two separate problems happening here:
1. Mafia is wasting a LOT of scrolls due to the fact that your RAMs are surviving for an average of 3 scroll insertions - the 3rd scroll used will likely kill the RAM and thus be wasted. I'm not sure what could reasonably be done about this - there appears to be a huge variance in the amount of damage a scroll insertion does, so limiting scroll uses to a number that's guaranteed to be safe would waste lots of opportunities.
2. The combat item count adjustment isn't dealing very well with combat items acquired during the combat - they're being double-counted at first, and then adjusted back down (usually) during the next round. However, if the acquired item is immediately used, ending the combat, the opportunity to correct the count is lost. Example: use two 334s, get a 668, mafia momentarily thinks you have two 668s. Use the 668, killing the RAM (and wasting the scroll), and mafia still thinks you have another 668. In the instances in your log where two scrolls were apparently used with no result, you in fact didn't have one of the scrolls being used. This is mostly fixable, although there's always going to be a bit of uncertainty about combat items used on the final round, due to lack of parseable feedback as to whether they were actually used.
Heffed
11-30-2009, 07:23 PM
Thanks Jason, that makes sense.
Is the counting issue something recently introduced? I guess I'm wondering why I've never seen this before. Or has it been happening all along and the RNG has been more kind so I never noticed?
Well you just made me even more happy that I've already permed funkslinging.
Tipmon
12-01-2009, 08:56 PM
hey i got the new december familar and i wanted to know if this would support that yet because it said like and improved chocabo and this has it for chocabos so i wanted to asked before it started to practically wasting my stocking's ability to steal meat
Heffed
12-01-2009, 09:56 PM
hey i got the new december familar and i wanted to know if this would support that yet because it said like and improved chocabo and this has it for chocabos so i wanted to asked before it started to practically wasting my stocking's ability to steal meat
I think it's safe to say it isn't supported yet. ;)
Once SmartStasis supports the stocking I'm gonna do a fun tour guide run with it. :D
halfvoid
12-05-2009, 10:05 PM
i myself would also enjoy this script supporting the stocking.
Information for zarqon: So far spading shows that the stocking seems to follow the exact same formulas as the coacoabo, so it should be handled the same way. It does everything the coacoabo does and it does it in the same way. It just has a few extra things that your script doesn't need to support.
zarqon
12-06-2009, 08:01 AM
2.1
Stocking support, everyone.
Also, it now considers the monster element when deciding to stasis with a rock lobster or midget clownfish.
I'm envisioning a reworking of this eventually where I actually use formulas. The code will be bigger but run faster and more accurately. But it will be annoying to write so I don't expect that to happen soon. :)
Just a little note to say I ascended as a DB for crimbo and started playing with with SmartStasis and the disco combos. I found that using a meat per mp of 8 (cost of in-combat mp) is a little high. I changed it to 2.9 (that's what Bale's Universal Recovery is buying mp for, with magi-wipes).
Maybe I'll play around with Bale's script and make it output a meat per mp as a Mafia/zlib property that SmartStasis can use. I guess this kind of knowledge (the cost of mp or hp) could have other uses, although I can't find any right now.
I'm just throwing this idea in here in case it gets Zarqon or Bale interested. We have all seen what happens when a problem needs solving and you two start to tango around each :D
zarqon
12-06-2009, 02:27 PM
Interesting. I suppose we could do a
if (can_interact() && contains_text(get_property("recoveryScript"), "Universal_recovery")) meatpermp = 2.9;
Because unless someone is using Bale's script there's no guarantee they will get that value.
I'm very happy to know that my script is helping people get 2.9 meat/mp instead of 8. ;)
zarqon, obviously in the middle of combat you cannot check mall prices, but if the character is a mysticality class or a level 9 AT, you can obviously check the price of mmj and assume that as a good basis for meatpermp. Average restoration is 100 meat/ (my_level() * 1.5 + 5.0), so for a level 8 character that's already 5.9 meat/mp. For higher levels it continues to plummet. That should effect hardcore stassising.
zarqon
12-06-2009, 04:17 PM
Already does that.
Then please ignore my redundancy.
I started thinking... what if there was a preference, _meatpermp that my script sets. If the value isn't blank, then you'd know that someone was running my recovery script, and that is the current value of an mp.
zarqon
12-07-2009, 02:41 AM
That would be great, actually. Let's do it!
I think you should make your script set it every time, and then SS will set it only if it's blank. (Because other scripts may want to access this setting.)
That works for me. I think I should only set it if the character is in mallmode since restorative prices in hardcore are kinda obvious and irrelevant. Then you can do what you want with that. I think it should be a daily setting since we wouldn't want it to be too persistent.
I want to work out all the details here before I add the feature. It would be bad to implement it thoughtlessly.
zarqon
12-07-2009, 09:16 AM
I can dig that. Ideally you should set it, whether mallmode or no, to the actual value that your script is providing. If your script also calculates a meatperhp value, that would be useful as well for my still-in-development combat script.
It wouldn't be at all hard to do _meatperhp at the same time.
Ideally you should set it, whether mallmode or no, to the actual value that your script is providing.If the script isn't in mallmode, what would the value of hp or mp be based on? My script is not providing any answers to that question. Obviously mall price is irrelvant, so I don't know how to calculate it.
zarqon
12-07-2009, 10:13 AM
In HC/Ronin, calculations should be based on the cheapest renewable restores, not dropped restore items, since acquiring such an item also requires farming or pulling from storage, which increases the cost by an indeterminable amount. Calculation of renewable restores is probably mostly the same as what's already in SS.
But once acquiring an item does not require farming/pulling (i.e. you have mall access), mall price is completely relevant, since the cost of replacing those items is no more than mall price -- whether your script is set to buy those items from the mall or not.
So probably the best option for can_interact() is to set it to the restore value that the script actually gets when it runs, calculated based on mall price. For example, if someone with mall access had turned off buying items, and the script chose to use a restore item from inventory rather than buying a more efficient restore item, the restore cost value would still be based on the mall price for the item used.
Your script already needs to have that logic. So there's no point to adding it to my script just so that your script can use it instead of its own copy. I'd just be copying your efforts for no advantage to either script.
As for the rest, I've already added it to my script to automatically calculate _meatperhp and _meatpermp on first run of the day regardless of actually purchasing anything. (It also sets them any time it needs to recalc them.) Took only 9 lines of code to add that.
If you find those variables unused, it means the user isn't using my script or else he's in hardcore so you can go with your script's internal logic for figuring out those variables and set them yourself to improve efficiency on successive runs. My own script will gladly reset them even if you're using them.
How's that sound?
zarqon
12-07-2009, 11:43 PM
Excellent. Those will be floats, naturally. I'll write some handling for this into the next SS update.
Floats? Well, actually they'll be strings consisting of the characters 0-9 with a decimal point in it. However the value would be useful if converted to a float. ;)
float cost;
if(best_item == $item[magical mystery juice] || best_item == $item[Medicinal Herb's medicinal herbs])
cost = 100.0;
else cost = historical_price(best_item);
if(type == "MP")
set_property("_meatpermp", to_string(cost/ heal[best_item].avemp));
else set_property("_meatperhp", to_string(cost/ heal[best_item].avehp));
That should be fine. It gets set on first run of the day and every time it becomes relevant for healing.
zarqon
12-08-2009, 05:50 AM
Does that consider the cost of healing skills?
Umm... no. Silly me. That'd make it a bit more complicated to figure out meatperhp. I'll work on that.
Anyway, I already noticed a little problem with this.
> ash get_property("_meatpermp").to_float()
Returned: 2.9636364
> ash get_property("_meatperhp")
Returned: 7.000001E-5
> ash get_property("_meatperhp").to_float()
Unexpected error, debug log printed.
Returned: void
meatperhp can get very low when curing a lot of hp with a scroll of drastic healing. What should be the solution?
zarqon
12-08-2009, 06:00 AM
How about max(0.01, whatever)? At that point, it's not much different.
I guess I got you two interested :D
Deciding if using a disco combo is worth it is one use of _meatpermp, but I still can't find any good use, especially in-combat. Maybe deciding if pickpocketing is worth getting hit once, or deciding if casting a buff is worth spending the mp when farming... but those are pretty niche I guess.
Anyway, seems like it wasn't such a difficult thing to add to those two already excellent scripts.
Thanks !
zarqon
12-08-2009, 05:14 PM
Calculating the cost of attack skills (in meat) is one very significant use. Calculating income from restoring familiars is another.
But these are just pieces of the puzzle -- endgame for me is calculating the profit/cost of one round of combat given a particular action, which becomes much easier once everything is converted to a meat value.
Charles Haynes
12-09-2009, 02:16 AM
> ash get_property("_meatperhp")
Returned: 7.000001E-5
> ash get_property("_meatperhp").to_float()
Unexpected error, debug log printed.
Returned: void
meatperhp can get very low when curing a lot of hp with a scroll of drastic healing. What should be the solution?
float.to_string().to_float() should be an identity. IMO this is a mafia bug. I could re-write to_string(float) but that seems wrong. In the mean time I'd suggest using max(0.001, n) Mafia starts using scientific notation at 1E-4.
zarqon
12-09-2009, 02:41 AM
aqualectrix has recently submitted a bug report about this very issue, after encountering the same problem using the Map Manager.
Thanks for improving the max() workaround CH.
I'm going to kill myself for getting into this collaboration because now I'm overthinking it.
It occurred to me that if a player is restoring his hp with skills in hardcore, then that changes the meatperhp calculation that you need for your combat script. That means I need to set meatperhp and meatpermp in hardcore also. It seems I really am duplicating that part of your script regardless of my previously stated desire. After all, your script cannot figure meatperhp based on use of healing skills.
I've managed to make this rather non-trivial. Now I'm calculating meatperhp every time I cast a healing spell. AAAARRRRGGGHHHH!
zarqon
12-09-2009, 10:30 AM
Schematic to assist you. Hopefully. Rather than complicate matters further.
MP base value: cheapest renewable restore
HP base value: whichever is cheaper: cheapest renewable restore or cheapest healing skill (based on meatpermp)
Then,
For MP:
!can_interact(): base value
using consumable items: value based on mall price
using nuns/non-consumables: base value / unchanged
For HP:
using skills: amount healed * mp_cost() * meatpermp
!can_interact(): base value
using consumable items: value based on mall price
using nuns/VIP/nonconsumables: base value / unchanged
For HP using skills: amount healed * mp_cost() * meatpermpI think you mean: mp_cost() * meatpermp / amount healed.
I've got the gist of it. It's just tough integrating it into my script reasonably.
zarqon
12-09-2009, 10:38 AM
I threw that mistake in there so you could feel good about correcting it. Yeah, that's the ticket.
Snow Angel (http://kol.coldfront.net/thekolwiki/index.php/Snow_Angel): Will this be supported soon?
Universal Recovery (http://kolmafia.us/showthread.php?t=1780) now calculates _meatperhp and _meatpermp and keeps them updated for current values so that SmartStasis can know exactly how much restoration costs. Awesomely, these figures will be accurate, even if the the character is healed with skills.
Also, I think that releasing a script that directly helps a fellow scripter's work should automatically counter the Spiteful Curse of Bale (http://kolmafia.us/showthread.php?t=3056) if they have such an effect. Please spade if that is true. I guess if you don't post a reply, then it doesn't counter the curse. :(
zarqon
12-29-2009, 08:35 PM
Thanks Bale! Unfortunately I was in HC and unable to be affected by your cure. But your curse has finally expired so I'm able to post again. So I updated ALL my scripts which I was able to work on while cursed.
Updates!
SmartStasis is now friggin' awesome. I painstakingly rewrote it to use familiar formulas rather than arbitrary values, so now inmeat, inmp, and inhp are actually calculated as the average amount you will make per round. This combined with Universal Recovery's more accurate values for HP and MP will make SS much more accurate in its decisions, particularly with disco combos.
It was a pain to write. But here's why it's worth it. The script now switches on my_familiar() rather than building maps of all familiars that affect the given factor. This runs faster and consumes less memory. In addition, by using formulas and the recovery script's provided values, we can calculate very accurate value per round from a given familiar. So I added a "profitforstasis" variable, which operates in addition to the "meatforstasis", "hpforstasis", and "mpforstasis" variables. This may be useful in cases where the input on any one of those would be too small for stasis, but the overall profit from all of them combined is enough to justify stasis.
I also added familiars that damage the player, so inmeat can be negative, which will effect the value of a round. I foresee all this new more accurate data being very valuable to consult scripts that import SS.
I'm not sure yet how this will play out in SS. Perhaps I'll discard the other three variables and use exclusively profitforstasis. I'm still not exactly sure what a good number for it is. Help in figuring that out (with examples) would be appreciated.
If you set your verbosity high (new ZLib setting) you can see at the start of combat how much profit your current familiar generates.
Enjoy!
I love script synergy. Now, SS + UR is better than either by themselves.
After New Year, I'm ascending into a 95%+ Snow Angel run, so I'll get lots of chances to test the script synergy.
zarqon
12-29-2009, 09:22 PM
How does SS help UR? Or do you just mean the in-combat restoring that the script does?
Exactly that.
Your script is able to figure out if it wants to do the restoration, or let my script do the restoration, based on information my script passes to it. That means a character gets the benefit of having our scripts collaborate to figure out if it is cheaper for him to restore in or out of combat.
Win/Win.
zarqon
12-29-2009, 09:57 PM
Yay us! We are totally awesome.
adeyke
12-30-2009, 05:22 AM
Perhaps for a future version, it could factor in the Frumious Bandersnatch for determining whether to use a disco combo. Right now, it checks to make sure that the damage from the disco combos won't kill the monster before the combo finishes. However, if the familiar is a Bandersnatch (without Ode), each of the relevant DB skills will also cause it to deal 1/2 to 1 times its weight in hot damage. So it'll often think it can do a combo but end up killing the monster prematurely.
zarqon
12-31-2009, 03:34 PM
Yay, someone answered my question (http://kolmafia.us/showpost.php?p=19792&postcount=103). I'll be adding Bandersnatch DB bonus damage in shortly, as well as a check for missed Olfaction as discussed in the FTF thread.
I also realized I didn't fully convert the disco combo calculations over to the new system. Once I publish the update, I anticipate that for those using UR (and especially those with mall access), combos will be cast much more frequently, since UR's provided actual cost per MP will be significantly lower than the script previously supposed.
There is only one problem with the calculations: the script assumes an average amount of MP gained per round from your familiar. When deciding to cast disco combos, it offsets the casting cost by the possible MP restoration you will get from the rest of the combat. If you are using a Cocoabo-type, you may or may not actually get this restoration. Further, if you began the combat without enough MP to cast the combo, your familiar may kill the monster before you finish your combo. But these are unlikely cases -- since combos will most likely be autocast against higher-level monsters, we can pretty much count on higher monster HP and the player's larger MP reservoir making this undesirable outcome improbable. Just wanted to mention that.
I'll wait until mafia supports Static Shock (http://kol.coldfront.net/thekolwiki/index.php/Static_Shock) before making this update, since that is a skill SS should take advantage of if it's available.
Bazaaretw
01-02-2010, 05:06 AM
I believe this is a bug for Smartstasis, but might be first things first, but I don't think it has the basement monster values, I was using the autobasement.ash and it breaks at every monster saying just after smartstasis giving a bad monster value error.
zarqon
01-02-2010, 04:34 PM
Totally guessing here, but I think mafia includes the floor of the monster in the monster name, making canonical names impossible for the basement.
Luckily, there's no reason to stasis in the basement! I'd recommend not using SS (or FTF) in the basement.
Iaoth
01-08-2010, 04:34 AM
Function 'vprint( string, int )' undefined (FirstThingsFirst.ash, line 46)
Consult script 'SmartStasis.ash' not found.
You're on your own, partner.
What does this mean? I read the whole thread, albeit not very carefully, before asking...
zarqon
01-08-2010, 04:43 AM
You must have ignored the gigantic, red "New Version of ZLib Available: 12" message.
Iaoth
01-08-2010, 04:47 AM
Ahh, thanks!
Actually, if zlib is called by another script that script will fail due to the lack of vprint(), before getting to check for updates. :D
zarqon
01-08-2010, 06:46 AM
Oh... I guess I can't assume everyone else ends up using ZLib several times before they enter a combat for the day. (In my case, it's used by my login script and of course BBB, both of which fire before this.)
I'm adding in Bandersnatch bonus damage right now. Might finish before I have to go back to work, might not. Wish me luck.
Wish me luck.zarqon acquires an effect: Bale's Lucky Blessing
Get spading!
I think for every action SmartStasis is taking it's skipping entries in my CCS. Take this CCS for example:
[ default ]
1: consult SmartStasis.ash
2: item spices
3: item turtle totem
4: item seal tooth
5: item spectre scepter
6: attack with weapon
Now look at this combat log
[1837] Haunted Ballroom
Encounter: zombie waltzers
Round 0: Epicgamer loses initiative!
Round 1: Epicgamer casts DISCO EYE-POKE!
Round 1: zombie waltzers takes 1 damage.
Round 2: Epicgamer casts DISCO DANCE OF DOOM!
Round 2: zombie waltzers takes 7 damage.
Round 3: Epicgamer casts DISCO DANCE II: ELECTRIC BOOGALOO!
Round 3: zombie waltzers takes 9 damage.
You lose 4 hit points
Round 4: Epicgamer uses the seal tooth and uses the seal tooth!
Round 4: zombie waltzers takes 2 damage.
Round 5: Epicgamer uses the spectre scepter and uses the spectre scepter!
Round 5: zombie waltzers takes 19 damage.
Round 6: Epicgamer attacks!
Round 6: zombie waltzers takes 170 damage.
Round 7: Epicgamer attacks!
Round 7: Spicy gives them a good ol' fashion Indian Rugburn. Which is probably a Native American Rugburn, these days. They take 48 damage from the friction-induced heat.
Round 7: Spicy holds out the plastic pumpkin bucket, hoping for extra goodies.
Round 7: Spicy smiles a three-lipped smile from beneath the shade of his little sombrero.
Round 7: zombie waltzers takes 204 damage.
You gain 141 Meat
You acquire an item: dance card
You gain 20 Strongness
You gain 21 Mysteriousness
You gain 31 Cheek
It's jumping to step 4 in my CCS after spending 3 rounds on the Disco Combo. Is this a mafia thing? Have I just not noticed this happening before? I was able to get around it by adding a bunch of rounds worth of notes as a buffer between SmartStasis and the rest of my CSS.
zarqon
01-09-2010, 02:42 AM
I'm pretty sure that's normal; I've never seen mafia handle it differently than that. Might want to double check older session logs if you think otherwise, but I doubt you'll find anything being handled differently. This is one reason I prefer ASH CCS's, because you can make actions sequential rather than tied to round number (you could probably whip up a consult script that solves this problem pretty quickly).
zarqon
01-09-2010, 04:22 AM
Can anyone with the DB Crimbo skill confirm whether or not familiars act when using that skill? (Ideally, confirm whether or not your GGG's usual message shows up when using it.) If not, the new DB skill probably breaks GGG hunger detection and needs attention.
Well, I'm in a snow angel run right now, and I get the usual snow angel activation message, right after the bells. Like this:
Shirayuki's bells jingle merrily
Shirayuki rises into the air and spreads her wings, bathing your opponent in cold light and dealing 28 damage. It's inspiring.
You gain 28 Mojo Points.I imagine all others will be similar. It should not break hunger detection.
zarqon
01-09-2010, 05:10 AM
I was talking about the DB skill, not the TT skill. As far as I know, Stealth Mistletoe does not consume a round and may therefore have the same mechanic as a "quick" Saucy Salve.
Oh. Stealth Missletoe. Sorry, it's really easy to get mixed up associating them with classes since you don't need to be that class to learn it. That's why I'm glad you need to be a Sauceror to learn Storm of Cheese Sauce. (Excuse my inability to remember its German name.) I just went with the first one I could think of to have a familiar interaction.
I don't have that skill (or plans to learn it soon), but I'm given to understand that it completely ignores the round where it is case. It won't even remove a chance to pick pockets, unless it auto-attacks. I can see how that might break hunger detection.
Try asking in /hardcore if nobody swiftly answers here -- I'm sure someone there will know.
Wow, looking at my logs from the past couple months it does look like it's always worked this way. I'm really not sure how I never noticed this behavior before considering it really screws me over.
zarqon
01-09-2010, 05:58 AM
Hmmm, I'm assuming you're not just using random stasis items after SS then. :) In that case, if your "notes" workaround isn't livable I'd suggest whipping up a quick and dirty consult script as a slightly better workaround. I'll get you started:
import <SmartStasis.ash>
void main(int initround, monster foe, string url) {
round = initround - 1; act(url);
nowfightingonstageone = foe;
url = ftf(url);
if (can_nirvana || can_concentrate) url = try_combos(url);
if (intheclear() || is_our_huckleberry()) url = stasis(url);
// put the commands you want to use post-SS here:
// end of post-SS commands
}
Sorry but I don't have anything better to suggest.
I know how to solve the issue, it's just that I can't understand how I failed to notice this for so long in the first place. Honestly it feels like a bug to me.
zarqon acquires an effect: Bale's Lucky Blessing
Get spading!
I think it attracts bats!
zarqon
01-09-2010, 03:54 PM
That would be awesome! So far I haven't had much time to spade, and there's nothing about it on the Wiki. I'm trying to be careful not to spend too many turns so that I can spade it before I lose it.
I also tried calling some girls that I know (just in case) but evidently the blessing doesn't have that kind of real-world effect. :)
Loving the automatic disco combos (they are such a hassle to remember and perform manually).
Does SmartStasis automatically go for nirvana (instead of concentration) in the Nuns?
Here is an advanced scenario that may or may not be of interest:
I was fighting a Procrastination Giant, and on turn zero pickpocketed his only drop (a procrastination potion). SmartStasis proceeded to perform the disco combo for Concentration. However, since no further drops were possible for this combat (after the successful pickpocket), there was no benefit to getting Concentration.
-Th3Y
zarqon
01-10-2010, 03:39 AM
Some excellent feedback.
For some reason, right now the script is set to skip Nirvana on brigands. I think the logic here was that it is not profitable, since the meat doesn't go to you. However, this does help speed up your quest. Perhaps I should make skipping brigands dependent on your ocw_nunspeed setting? But that only works for OCW users.
About the second issue -- yes. There is an upcoming update to FTF which detects which item, if any, was pickpocketed. Which means it would be possible to detect this scenario and avoid needlessly casting Concentration. Unfortunately, although we can access which item types drop from a monster in ASH, we can't easily access how many of each item drop from a monster. So then it becomes a performance issue -- figuring out the necessary information would require loading a (large) data file and parsing item types and amounts from it, which would make the script notably clunkier. If I were you, I wouldn't expect a solution to this issue for a while.
aqualectrix
01-10-2010, 04:15 AM
I suspect this is the work of SS:
[1542] Fantasy Airship
Encounter: MagiMechTech MechaMech
Strategy: /Users/blwalker/Library/Application Support/KoLmafia/ccs/aqualectrix.ccs [default]
Round 0: aqualectrix loses initiative!
Modifier syntax error: expected end, found + zone(sea)*0.5
(emphasis mine)
Battle then proceeds normally. I found "+ zone(sea)*.05" in SmartStasis, and indeed my current familiar is the rock lobster. (SS does stasis -- nothing seems to be wrong per se except for the error message being printed.)
My CCS is currently very simple:
[default]
1: consult SmartStasis.ash
2: attack
For some reason, right now the script is set to skip Nirvana on brigands. I think the logic here was that it is not profitable, since the meat doesn't go to you. However, this does help speed up your quest.
Saving turns is always profitable.
zarqon
01-10-2010, 05:43 AM
@aqualectrix: Oh that's right, modifier_eval() formulas shouldn't have spaces. Ok, I uploaded a spaces-less version, but didn't bump version number.
About brigands: I think I'll make it so it only skips brigands if ocw_nunspeed is false. Basically, this means it will only prevent Nirvana for brigands if you have instructed OCW to take its time completing the nuns sidequest.
So, if I don't use OCW at all, then it will use Nirvana?
zarqon
01-10-2010, 06:42 AM
Yes. Once the update is made.
If I may, I would like to request a new feature.
Please support autoSphereID and autoPotionID. I just discovered (the troublesome way) that it wouldn't ID my spheres. Though, for automatically identifying potions in combat, it would be good if you'd add a setting to only throw a potion if you have a spare. (Only do it if there are 2.)
zarqon
01-11-2010, 11:22 PM
Other than the two potions idea, you have requested an existing feature of FTF. What you may have discovered is that it only detects unknown spheres/potions if you're in the clear, since otherwise taking the time to ID potions might get you kilt.
Veracity
01-12-2010, 12:28 AM
I'd like the two potions feature, too, since that is exactly how I deal with potions.
I know that I will end up needing one of the potions, so I make sure that I have one of each when I have identified all of them - and not throwing a lone potion at a monster guarantees I will not have to back farm that potion later, if it happens to be the one the gate needs and I end up IDing all the potions without having gotten another one.
I don't like back farming.
zarqon
01-12-2010, 02:21 AM
Using them when you only have one has the added benefit of being able to skip non-gate potions once they are identified (thus only needing one). Thus, I find the current behavior preferable.
That said, setting conditions for one of each potion (with them being used as you get unknown ones) is pretty much functionally identical to getting two of each to ID later.
Veracity
01-12-2010, 02:50 AM
Using them when you only have one has the added benefit of being able to skip non-gate potions once they are identified (thus only needing one). Thus, I find the current behavior preferable.
Can you elaborate, please? I am willing to change my behavior if somebody can demonstrate that a different, equally easy, behavior is better.
What do you mean by "skip non-gate potions once they are identified"? When you look through your telescope, you can see the first gate - but the bang potion and the south-of-the-border item are hidden from you. Therefore, you can only see what the "gate potion" is once you reach level 13 and have been given the final quest.
The Dungeon of Doom is available halfway through level 7. It's not a horrible place to adventure at that level; unlike the Enormous Greater-Than Sign, which you have to go through first, you don't get completely ridiculous stats if you adventure there at level 7.5 - unlike going there at level 13, after you have been given the quest, when you don't need stats. Plus, it is advantageous to get a zapping wand as early as possible, so if you happen to get non-keys from the Daily Dungeon, you can zap them early.
Therefore, I go to the DoD midway through level 7 to get my zapping wand and my bang potions. Therefore, I simply cannot understand what you mean when you talk about "being able to skip non-gate potions", since, at the time I am in the DoD, I have no idea what a "non-gate potion" might be.
Unless...and now I see that the only "gate potions" are blessing, teleportitis, giant strength, mental acuity, and detection, you mean that you can skip inebriety, healing, confusion, and sleepiness.
I'll have to consider. If I throw away my only inebriety and never see another, well and good. But if I throw away my only mental acuity and never see another, I have a 40% chance of being forced to back farm.
Did I say that I hate back farming?
zarqon
01-12-2010, 04:12 AM
That's exactly what I meant -- if you're getting !potions when the DoD opens up (using unknown ones as you get them to detect them) and you use a potion which turns out to be a potion of confusion, you don't need to get another one since that is never used as a gate potion. Since there are four such "skippable" potions, it could potentially shave some turns off your run.
If you have auto-detect !potions on and BBB using your boxes between combats, you can simply set only the gate potions as conditions, instead of 1 of each.
This way, not only do I never need to backfarm, I don't need to farm 2 of each to begin with.
lostcalpolydude
01-12-2010, 04:33 AM
On the other hand, if you use a potion and find that it's blessing, and you don't get another blessing before you get the wand, and you need blessing, you've just added turns to your run. Maybe you would add those turns at level 7 by farming a second blessing potion just in case you need it. If you really don't want to back farm, getting one of all 9 potions seems faster than getting two of the 5 that you might need.
zarqon
01-12-2010, 04:36 AM
You forgot that you need to use potions to detect them. If you only get one and never use them, how do you know which is which? You'd have to use/detect every potion except the right one to be able to only get one of each. Highly improbable.
I do see something helpful I could add though -- when auto-detecting potions, detect the unknown potion that you have the most of, rather than just the first unknown potion in the list that you have.
lostcalpolydude
01-12-2010, 04:44 AM
If you have all 9 potions, you can just use them at the lair. The worst thing that can happen is you get 3 drunk in the process.
zarqon
01-12-2010, 04:54 AM
Aha -- so it's a difference of needing one more potion (and having extra potions, like healing potions, available during my run) vs. possibly wasting 3 drunkenness -- and if I forgot to keep that drunkenness available on my last day, I could be screwed.
I prefer the first option myself, since it's trouble-free. Although I can see where speedy speed runners may prefer the second since it is one less potion needed! I'll think about a solution that allows both.
lostcalpolydude
01-12-2010, 05:11 AM
Identifying duplicates is always a good idea, at the very least until you find the drunkenness potion. I usually play softcore and pull large boxes, though the timing of using those pulls, how many potions to identify to begin with, and so on is interesting in its own way there.
What you may have discovered is that it only detects unknown spheres/potions if you're in the clear, since otherwise taking the time to ID potions might get you kilt.
Thank you. It seems that's why I didn't get my sphere identified.
I'd like the two potions feature, too, since that is exactly how I deal with potions.
Well, you could always add that feature directly into mafia and I'd be very happy indeed. When I suggested that modification previously Jason thought it was quite unnecessary. Perhaps for zarqon's reason, though he didn't explain it in as much detail.
I prefer not to use up my only potion of a type. If I have only 1 of an unidentified potion, I can just guzzle it and get the effect to use at the gate as long as I have IDed the drunkeness or have 3 spare drunkeness.I try to make sure I have one of those two conditions if I haven't ID'd enough potions.
zarqon
01-13-2010, 11:25 PM
How about this: only autoID potions if you have at least 5 different potions. Always throw the unknown potion you have the most of. Stop IDing when you a) identify all gate potions, or b) identify the drunkenness potion.
There would be an in-script switch between this behavior and the current behavior.
It's still good to ID them. The healing potion is nice to know, even if you ID all gate potions. Even if the drunkeness potion is discovered, there's no reason to give up IDing other gate potions.
zarqon
01-14-2010, 02:06 AM
Ok, then here's what I will do. Always ID unknown potions if you have more than one, regardless of autoPotionID. IDing potions even if you have only one (current behavior) will be toggled by the mafia combat setting. This means FTF won't be strictly transparent with the setting (it'll be better), so I will make sure to document this in the first post.
Why did this discussion happen in the SS thread?
That sounds awesome!
It happened in SS because I got confused about the dividing line between SS and FTF. Blame me, or better yet: send me a Red Balloon!
redwulf25_ci
01-16-2010, 04:00 AM
Never mind I was misunderstanding the output
zarqon
01-16-2010, 04:19 AM
You evidently figured it out, but for the record, the combat you originally posted was being handled by an old (and no longer supported by me) hidden city script. Ascend has not yet been updated with the current version of the MacGuffin script.
redwulf25_ci
01-16-2010, 05:21 PM
You evidently figured it out, but for the record, the combat you originally posted was being handled by an old (and no longer supported by me) hidden city script. Ascend has not yet been updated with the current version of the MacGuffin script.
Thanks for the info. It looks like it was being handled correctly though, just without any output to let me know it was doing more than letting me take damage.
This says my ghost is hungry. A few lines later the fight makes it clear that my ghost still has charges. Is this because I won initiative and your script expected my ghost to take action? (ghostname is set correctly and usually works.) Do I get a bugfinder blade for this? ;)
[831] The Middle Chamber
Encounter: tomb bat
Strategy: H:\KolMafia\ccs\default.ccs [default]
Round 0: bale wins initiative!
Your ghost is hongry.
Round 1: bale tries to steal an item!
You acquire an item: leathery bat skin
Round 2: Chohoshi floats over to a nearby trash can and rifles through it looking for food. Guess he's not picky.
Round 2: bale casts ENTANGLING NOODLES!
Round 3: Chohoshi swoops through your opponent, somehow transferring 25 points of its lifeforce into Mojo Points for you. You feel slightly skeeved out.
Round 3: tomb bat takes 25 damage.
You gain 25 Mojo Points.
Round 3: Chohoshi's stomach growls loudly.
Round 3: bale uses the rock band flyers!
Round 4: Chohoshi swoops through your opponent, somehow transferring 30 points of its lifeforce into Mojo Points for you. You feel slightly skeeved out.
Round 4: tomb bat takes 30 damage.
You gain 30 Mojo Points.
Round 4: Chohoshi's stomach growls loudly.
Round 4: bale attacks!
Round 5: tomb bat takes 62 damage.
Round 5: Chohoshi slimes your opponent thoroughly, dealing 20 damage. The resulting ectoplasmic shock wave gives you a mystical jolt.
Round 5: tomb bat takes 20 damage.
You gain 20 Mojo Points.
Round 5: Chohoshi's stomach growls loudly.
Round 5: bale attacks!
Round 6: tomb bat takes 58 damage.
Round 6: Chohoshi floats over to a nearby trash can and rifles through it looking for food. Guess he's not picky.
Round 6: bale attacks!
Round 7: tomb bat takes 75 damage.
Round 7: Chohoshi ransacks a nearby dessert cart looking for treats, but comes back empty-handed (and empty-mouthed).
You gain 70 Meat
After Battle: Chohoshi gives you a saucy smile. You really wish he'd wipe the sauce off every now and again.
You gain 15 Strongness
You gain 22 Enchantedness
You gain 30 Cheek
heeheehee
02-13-2010, 06:35 AM
Do I get a slap on the wrist for pointing out that "hungry" is spelled wrong in the output that Bale provided?
zarqon
02-17-2010, 02:25 AM
Actually, Bale spelled it incorrectly (not "wrong") in his post. The correct spelling is "hongry". If Bale wishes to slap your wrist, I suppose he may.
And yes, Bale, you have found an error! Here is your bugfinder blade, since I can't give you one in game:
<==||===========-
This will be fixed in the next update, which will happen at the same time I release a prototype BatMan for debugging purposes.
You're very generous! If I had tried to ask Jick for a bugfinder blade for such a bug, he'd have told me that the error isn't serious enough for him to give me one. :(
Do I get a slap on the wrist for pointing out that "hungry" is spelled wrong in the output that Bale provided?Actually, "hongry" the correct spelling for a word in the Gullah language (http://en.wikipedia.org/wiki/Gullah_language), a creole spoken by a subculture in SE America which actually does mean hungry (http://www.gullahtours.com/gullah_dictionary.html). Therefore we can deduce that zarqon only pretends to be Korean.
This will be fixed in the next update, which will happen at the same time I release a prototype BatMan for debugging purposes.OooooHOooh! You're such a tease!
zarqon
02-17-2010, 02:43 AM
아니요, 종말한국사람이에요.
Damn web translators suck.
yahoo: Is not, the end Korean hereupon.
babylon: No, end Korea Republic.
google: No, the end of Korea's people.
wordlingo: Is not, the end Korean hereupon the bedspread.
I have no way to know if your Korean actually means anything!
heeheehee
02-17-2010, 03:17 AM
/me points out that "wrong" can be used as an adverb. =P
And to save others a bit of translator-searching: "No, the end of Korea's people", according to Google Translate, I think. It doesn't seem to make too much sense in this context, but I might be going crazy. The second part probably isn't relevant, either.
Edit: Totally ninja'd... probably has something to do with me not clicking submit for like twenty minutes, forgetting about it, then remembering.
zarqon
02-17-2010, 05:21 AM
'Wrong' is only an adverb in informal English, but is approaching common use in America. But, since 'hongry' is only a word in informal English, I'll let it slide.
Also, in my haste I wrongly typed a vowel. Should be 정말, not 종말. My Korean spelling isn't so great yet -- but at least I didn't have to consult a dictionary!
Also, something about SmartStasis blah blah blah.
Alhifar
02-17-2010, 05:30 AM
"Is not, the end Korean hereupon the bedspread."
That's what wordlingo gives as a translation with that replaced >.>
zarqon
02-17-2010, 05:37 AM
Don't think so -- "the end" was the old word. The new word is 정 (true) 말 (talk/speak), basically meaning "really" or "honestly".
Since evidently these translators suck, here's a different sentence with the same meaning, just informal.
아니, 진짜한국사람야.
And hahahaha, wordlingo gives this as "It knows, the real Korean Oh!." wtf.
Fluxxdog
02-18-2010, 11:34 AM
Something new for SS:
The Nemesis quest update includes new skills for the Disco Bandit. These skills combo for new effects. The moves can only be perform off the secret lair AFTER you've defeated you Nemesis once and for all. The combos also seem different for each person and may change each ascension.
Rave Concentration: +30% item drops
Rave Nirvana: %50 to meat drops
One combo causes you to gain 3 substat (2 Cheek, 1 Wizardliness)
One combo causes the enemy to drop treasure. Don't know if it can get PP only. It seems to only cause regular treasure to drop. Always steals from a Grass Elemental, but never a spectral jellyfish.
One combo will stun them for two turns and deal damage.
One combo will deal more damage than the one above.
I don't know if these skills also delevel (doubtful given they do more damage than regular DB moves) or if you can perm them yet. Sadly, as of this post, KoLmafia doesn't seem to recognize them at all. The CLI keeps saying I'm casting CHANCE.
Edit: Might help if I named the skills:
Pop and Lock It
Run Like the Wind
Break It On Down
And these skills are affected by any bonuses that augment DB skill damage, like certain legendary weapons. Each skill costs 2 MP each.
halfvoid
02-20-2010, 04:51 AM
As a perpetual Disco Bandit, i can confirm that the way these combos fire off is different for each character, and randomizes upon ascension. (the wiki agrees) Also, there are several new familiars with this update, including the autonomous disco ball which acts like a star starfish, damaging or damaging and returning mp every combat round.
As a quick fix, if you want those disco combos, you can always add them manually to your ccs. I've done so. I'm a big fan of two pick pockets. and the very nice amount of +% to meat and item drops.
zarqon
02-20-2010, 07:18 AM
This is very poor timing on the part of TPTB -- release a major content update while I'm in the midst of a huge, intended-to-be-comprehensive combat script. I mean seriously guys, what were you thinking? Don't you pay attention?
Ha. Anyway, all the new skills / familiars will be added... sometime. It's nice that I already have a "famspecgear" variable for use by the formulas, since all of the new familiars seem to get new functionality when they're wearing their equipment.
If anyone cares to share formulas (for HP / MP / meat / damage) for familiars that act during combat (not only the beginning or end) I'd be appreciative. Keep the formula for rate separate, since it's affected by Jingle Jangle Jingle.
Glazius
02-20-2010, 05:28 PM
In non-Rave combo-related news I've been noticing a problem for a while with SS recognizing monsters. While I'm cupcaking in the great trip it expects monsters called "the Angels of Avalon" and "the Elders of the Gentle Race", both of which create invalid monster values.
It's nothing major, but since these are the blue and purple cupcakes I'd rather have the pickpocket and/or in-combat +item effects go off.
lostcalpolydude
02-20-2010, 08:05 PM
That's something to fix in mafia and was reported http://kolmafia.us/project.php?issueid=636 .
Veracity
02-20-2010, 08:55 PM
Revision 8166 fixes it.
zarqon
02-22-2010, 04:28 AM
This Nemesis stuff is pretty cool -- seems like non-permable "epic rules" for each class. Nice, especially for buffbots and other non-ascender types.
Once mafia supports DB combos better (looks like Veracity has some very cool things in the works), SS should be able to access mafia's settings to support these new combos.
xbadmitonx
02-25-2010, 01:31 AM
Is there an option that must be set to true to have it use spring raindrop attack? I have the katana equipped but it is not casting the skill.
zarqon
02-25-2010, 04:47 AM
It only casts the raindrop attack if you're stasising for some reason. If you don't have a stasis familiar -- or you don't have a reason to stasis (could happen if your HP is above your recovery target and your MP is full) -- then it will skip the whole stasis loop, including the restore section.
BatMan will consider all options, including whatever haiku skills you may have available.
Mixie
02-28-2010, 12:02 AM
As a quick fix, if you want those disco combos, you can always add them manually to your ccs. I've done so. I'm a big fan of two pick pockets. and the very nice amount of +% to meat and item drops.
Hey, new to mafia, and scripting in general, but I thought I'd get this script running while in DB aftercore... and the new rave combos aren't supported. Not a complaint at all, but I'm curious how I could do what halfvoid has done.
I think I understand how to build my own CCS, but the according to the wiki, the "extra pickpocket" combo only dislodges something if pickpocket failed. How would I check whether that's true or not?
Veracity
02-28-2010, 12:17 AM
You should be able to put "steal" into your CCS twice and it will only do the second one if the first one failed.
halfvoid
02-28-2010, 06:42 AM
Hey, new to mafia, and scripting in general, but I thought I'd get this script running while in DB aftercore... and the new rave combos aren't supported. Not a complaint at all, but I'm curious how I could do what halfvoid has done.
I think I understand how to build my own CCS, but the according to the wiki, the "extra pickpocket" combo only dislodges something if pickpocket failed. How would I check whether that's true or not?
not true. The New Wave bling gives you a second pickpocket that only works if the first failed. the combo dislodges something so long as the monster has drops that are non conditional and you haven't already pickpocketed it.
Braska
02-28-2010, 06:14 PM
So, will this handle the gu-goning of slimes, or is that a feature we will see in BatMan when it is finally released? :D
zarqon
02-28-2010, 07:33 PM
Depends what you mean by gu-goning. If you mean automatic removal of the Slime effect when necessary, then no, that's already handled quite nicely by several other scripts (I use Bale's chamois.ash). If you mean handling the combat after one of your rusty items gets slimed (particularly if it's your weapon, when normal automation can fail), then yes, BatMan will cope with this intelligently. If you mean something else, then please clarify.
lostcalpolydude
02-28-2010, 07:37 PM
I believe Braska means farming slime vials, where you have to use gu-gone to kill the monsters.
heeheehee
02-28-2010, 07:43 PM
Would BatMan's to-be-implemented strategy for those be "1: Get monster as close to death as possible without killing it, 2: repeatedly use bottle of Gü-gone"?
Edit: Ironic -- the first step seems to be very much like what Batman would do.
Mixie
03-01-2010, 12:07 AM
You should be able to put "steal" into your CCS twice and it will only do the second one if the first one failed.
I see, thanks! I'll have to get a newer daily build, as I'm still running the official 13.9 release. However, there are still some situations, using the SmartStasis script, where I'd like to be able to check if a pick-pocket has failed or not. Because, for example, SmartStasis uses the "Disco Concentration" combo.
But, suppose I'm farming a monster with only one item drop. Then, if the pick-pocket succeeded, disco concentration is simply a waste of mp, so I only want to call SmartStasis if the pick-pocket failed.
Of course, I see there's another thread about whether pickpocketing was successful, so I'll check that out.
zarqon
03-01-2010, 03:43 AM
Aha, gu-gone is more Nemesis stuff. Eventually this and the new DB combos will all be part of SmartStasis and/or BatMan. Unfortunately, I've had about 5 free hours total in the last week and haven't even had time to play KoL, much less work on scripts.
Monsters that require particular amounts of damage to be dealt to them will not be handled in the first release of BatMan. The primary goal of the first release will be debugging and achieving stability. After that, special algorthms can be added in. I'm thinking of hobos (overkilling for hobo parts vs. not), Mother Slime trophy, minesweeper crabs, and combat actions that give special benefit if they kill the monster (like using your Gnomish Hyper-whatever it is, to get the handy effect).
forgot my password
03-04-2010, 03:57 AM
Can the script check if an item use (big book of pirate insults, stone spheres) was successful, and continnuously retry until it is? black cat, good times
plus rollover is slow as molasses
the quote is "Just as you're about to use that item, Kitty bats it out of your hand, and you have to spend the next couple of minutes fishing it out from underneath a couch. It's as adorable as it is annoying."
Gosh, that really is adorable.
Yep, that'd be a nice feature for FTF/SS. On the other hand, I think BadKitty runs shouldn't be easily automated. I guess we'll have to find out how zarqon feels.
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.