(I might be wrong about unpoisoning via skill. Removing Beaten Up, sure.)
(I might be wrong about unpoisoning via skill. Removing Beaten Up, sure.)
2. My suggestion actually avoids beaten up loops better than the current implementation actually. Even if I was wrong about point 1 and it does not abort mid combat with "no antidote found" (and CCS is not fixed so it works that way)Your solution of only skipping the purchase when they can't be bought doesn't prevent them from getting beaten up repeatedly.
There are two use scenarios, in a path where you can't buy antidote the odds are exactly the same to enter a beaten up loop.
Because aborting automation when unable to buy antidote doesn't prevent such a loop at all, all it does is make it impossible to use a CCS that has "use antidote" enabled. So the user must disable antidote use in their CCS for such a path, at which point they get caught in the loop exactly the same.
Once you leave that path though, you need to remember to reenable antidote use in your "hardcore" script before switching to another path to avoid beaten up loops. So in that scenario my suggestion actually improves avoiding of beaten up loops.
3. Personally I use that setting myself and I find it convenient when playing as a muscle class.
4. I have always said that mafia needs an "abort on beaten up" option that people can toggle. The only way to do it right now is via mood, but that requires adding that right line into every single mood you use.
Last edited by taltamir; 11-13-2019 at 01:26 AM.
If I have a CCS that says to use an item and there are no such items to use then the CCS aborts. I'm not convinced a special case for antidotes is needed in KoLmafia for KoE and others paths where it can't be retrieved.
If a CCS is implicitly trying to use an antidote - that is not explicitly specified by the user in the CCS - then that is something to be investigated and is probably a mafia problem.
So, I would like to see an example of a CCS that aborts during combat but does not explicitly use an antidote.
This could be a good example of why consult scripts are sometimes preferred.
The autoAntidote preference is not well documented but it could be set so that mafia would never use an antidote. The preference contains an integer. Poison effects have a integer level and if the effect level is greater (or >= ?) that the preference then antidote will be used. So I'm thinking something like 99 is the equivalent of "don't use an antidote".
Note that moods can be extended so if a scripter develops some processes for building moods from little pieces it should be possible to toggle abort on beaten up for every mood by editing one line in one file.
I have done some testing and apparently special action is different from item usage, so my statement that it already would have auto aborted in that stage is incorrect. If you put in CCS "item anti-anti-antidote"
and you have none on hand, it will abort saying it cannot find the item.
However, if you specify special action to remove poisoned, and do not have an antidote on hand, it will just ignore it.
If you enable the special CCS functionality of remove poison (which incidentally is not specific to a script, so you can't have 1 script with it and 1 without, it is a mafia setting not a part of the CCS)
If you have that enabled then mafia will automatically try to buy antidotes between adventures. This will break automation in paths where antidote cannot be bought.
The only way to make use of mafia automation in those paths is to disable the special action of removing poison. The problem with disabling it are:
1. You could actually acquire one (pulls or drops) and now it will not be used.
2. It is a mafia setting not specific to that CCS, so it will remain off until you turn it back on. Even when you are not in that path anymore, switching CCS from "exploathing" to "standard" will not enable that functionality again, you have to manually turn it on specifically.
The concern was that if mafia will not try and fail to buy antidotes in paths where you can't buy them it will allow a user to get stuck in a loop of losing due to poison. But there is equal chance of being stuck in such a loop either way. If anything the current state has a higher chance of getting stuck in such a loop since you need to disable special action usage of antidotes.
Oh and to clarify, I am talking about this
Last edited by taltamir; 11-24-2019 at 07:57 AM.
I ran into this during my KoE runs. Took me ages of poking around in my various scripts (mood, recovery, etc) before I discovered the issue was actually not script-related. I hadn't changed that setting in so many years I'd forgotten it existed. I disabled it and was fine for the rest of my runs, though now I realize I've since forgotten to turn it back on. I agree with taltamir that mafia automatically forgoing the "purchase" step in specific paths would be a nice feature. Since the setting exists for situations where antidotes are accessible, not preventing automation when they are inaccessible would make things less fiddly.
Sig by JakAtk
My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!
I understood the general problem, that mafia will try and acquire antidotes under circumstances when a) the action was not directly triggered by a user and b) mafia should know, because of path, that the antidote is not available from a NPC.
When I last looked at the code this did not seem as straightforward as it does for other paths. In my confusion it looked like the other path exceptions would prevent antidotes from being used and acquired in that path. That is not correct if there are non-NPC ways to acquire an antidote. I suppose I should look at this more carefully or just overcome my aversion to a fix that perpetuates a minor bug.
I posted an apparently redundant report on this.
To me, this seems pretty clear-cut. There are two uses for the autoAntidote setting. One is for during combat, via Macrofier.java and FightRequest.java. Those tell Mafia to use the anti-anti-antidote in combat if one is available and if the poison level is above the threshold defined by autoAntidote, with exceptions only for being unable to use it due to Birdform or G-Lover path. The other use is for preparing to adventure, via KoLAdventure.java. That tells Mafia to automatically acquire anti-anti-antidote when adventuring in a zone that has poison above the threshold defined by autoAntidote. This is skipped for the path G-Lover (where the anti-anti-antidote couldn't be used) and for those paths where Doc Galaktik's Medicine Show is unavailable and thus the anti-anti-antidotes can't be automatically acquired. Right now, that's Zombie Slayer and Nuclear Autumn, but Kingdom of Exploathing applies just as much and should get the same treatment.
So the fix, to me, is just adding the line "!KoLCharacter.isKingdomOfExploathing() &&" after line 1376 of KoLAdventure.java.
1. Feature: Custom combat script - this is used in combat, no problems here
-2. Sub feature: Special Action - if you include the line "special action" at the start of your CCS (automatically included in a new CCS file), then calling CCS will also apply and integrate various special actions as defined by the special action rules. Special action rules are tracked per account, not per CCS.
--3. Sub-sub feature: One of the (off by default) special action rules, is "minimum poison level for antidote use", setting it to anything other than "no automatic use" will make it so that CCS with special action enabled will automatically use antidotes intelligently in combat which are resolved via CCS
---4. companion functionality: General mafia pre-adventure script will automatically perform the CLI command "acquire anti-anti-antidote" before each adventure if you enabled feature number 3 explained in the line above. Which causes mafia to error out of whatever it was doing.
As such whenever I tried to click "begin" to do multi adventure in a zone in exploathing, or run any script that does not disable CCS, the result was that that mafia immediately errored out and I could not use it.
It took me quite a while to track down the source of the problem to being caused by this companion functionality (number 4) of the sub feature (number 3) of the CCS.
Once I found it I realized that if this feature is enabled, I cannot use core mafia functionality in exploathing.
I have to manually disable that feature at the start of every exploathing run, and manually enable it after breaking prism. Because leaving it enabled just makes mafia error out.
I was suggesting that this companion functionality (4) automatically exclude paths in which it does not work instead of users needing to first track down the cause of mafia not working, and then disable the feature at the begining of the run and enable it after breaking prism.
However I did not realize at the time that mafia already disabled this functionality automatically for paths in which galactic is unavailable (nuclear autumn and zombie slayer), making this an exploathing specific issue.
edit: well, I also at some point suggested completely doing away with number 4 in all paths but that was a bad suggestion. My bad there.
Last edited by taltamir; 11-26-2019 at 08:22 AM.