Feature - Rejected Don't create Backup outfit unnecessarily

Veracity

Developer
Staff member
Creating the Backup outfit takes two page loads: a call to inv_equip to create the outfit, which returns with a redirect to inventory.php to show you the new outfit ID. We can create the outfit with ajax=1 and eliminate the redirect, but by doing so, we don't learn the outfit ID and cannot switch to it.

When you switch to an outfit, KoL automatically creates "Your Last Outfit". Each time it does so, it makes a new outfit ID, but you can switch to it by using "inv_equip.php?action=outfit&whichoutfit=last".

We should stop creating the Backup outfit for a lot of cases when we want to put on a particular outfit, purchase something at an NPC store, and restore our original outfit. For example, to buy fruit at the Hippy Store, we should put on the hippy disguise, buy the item, and put on whichoutfit=last. Ditto for restoring MP by buying Knob seltzers.

(We still need to create a Backup outfit when we put on special Mana Cost reduction items before casting, since we are not putting on an "outfit" by equipping individual items, and KoL will not create "Your Previous Outfit" for us.)
 

xKiv

Active member
What will happen if I adventure in the relay browser, and while mafia goes to buy something in the background (say, inside a HP recovery script), I change my outfit manually? This would overwrite KoL's idea of what "Your Last Outfit" is, I think. So it would then change back to the wrong outfit.
This can happen - I have already been temporarily confused by not having something equipped that I was sure I equipped - until I noticed that mafia was changing my outfits to buy something (then switched back to Backup which, of course, didn't have that something equipped).
 

xKiv

Active member
Whose mistake? There is no indication in the relay browser that mafia triggered something in the background. Are you saying I should be wasting several seconds after each adventure in relay browser just to check mafia's window?
 

Veracity

Developer
Staff member
You've convinced me. I will not attempt to speed up page loads or make mafia's operation faster.
 

slyz

Developer
When you do something in the Relay Browser, isn't it simply queued if Mafia is already in the middle of doing something?
 

xKiv

Active member
Only if you do it through the /cli pseudo-chatcommand.
In fact, trying to recover HP (by clicking on the HP symbol) while recovery script is already running (but not finished) due to automatic HP maintenance seems to run that script again in parallel ... which then seems to freeze adventuring in relay browser (any adventure.php (1) location just waits ... and waits ... while minibrowser works). So I *have* already learned not to do that and do all my restoration in mafia proper.

Blocking/delaying relay actions while the command queue is not empty - that would solve several problems, I think. But it could also be very tedious work, depending on what (and how) is already intercepted - you want to stop anything that changes game state (adventuring, equipment/inventory actions, buying/selling in NPS stores/mall, familiars, ...) but not anything that doesn't (chat, messages, looking at profiles/stores/..., ...).
And you probably want to do it in a manner that makes it obvious to the player where the delay is coming from (which means different responses to different ways of initiating actions - normal links, ajax links, right clickmenu, chat commands, .. anything else?), or you will get repeated clicks and "it's not working for me!" posts.


Or you can say "do this at your own risk" and prioritize speed and efficiency for everyone (and often) over safety in some edge cases. It *is* a valid approach. Just don't call those edge cases "a mistake", please.

You've convinced me. I will not attempt to speed up page loads or make mafia's operation faster.

I hope I read that correctly as sarcasm.
 

Theraze

Active member
Based on that this has been marked as Feature - Rejected, no, I think you killed this update. :(

My preference is that we implement this. Whether we lock things in relay browser or not, you can already screw yourself up by typing something into the Graphical CLI while using the Adventure tab, and we don't block that out, even though it's much more similar to the CLI queueing system.

If you screw things up because you're too lazy to display the CLI, too lazy to click the HP restore yourself (using automated HP/MP restore during relay), and too impatient to wait the 5 seconds for it to finish healing when you were already supposed to wait 5 seconds so your healing could finish, that's your own fault...
 

Grotfang

Developer
Not sure whether it is worth anything, but I would like add myself as a "would like this feature". I think the benefits hugely outweigh the slight potential for error, and I think it's an elegant way of reducing server hits, saving time and allowing mafia to take advantage of a sensible set up in KoL.

EDIT:

In fact, trying to recover HP (by clicking on the HP symbol) while recovery script is already running [...] seems to run that script again in parallel

Well, what do you expect it to do? Look at it this way. As far as mafia is concerned, each time a condition triggers a script you have told it to do that. And that's because you have. Why would you tell it to restore your HP using your recovery script twice? Seriously, I don't understand. You must know you have that script (hint: you put it there), you must also know what settings you have for recovery (since you set them). So why tell it to do the same thing twice? You seem to say we should track a static boolean condition "x is happening" that means features are disabled so as to avoid conflicts. I understand your sentiment but this would be a huge undertaking for limited gain. There would have to be multiple conditions, since some things are fine interacting at certain times, and we would have to be seriously careful not to bork anything. I don't like the idea of accidentally stopping someone doing something that would be perfectly sane.

I'm really sorry if this comes across as a rant. It is not intended to be read this way. But to reject this sort of beneficial feature for such a minor issue would be a shame.
 
Last edited:

Theraze

Active member
If this remains unimplemented... I've found that non-seltzers don't currently properly restore the backup outfit from the shop for KGO. It's done some painful things on BC BM moxie runs when I realize that I've burned all my meat because I'm still wearing bits of the KGO from an obtain that ran 5 minutes ago... If we implement this, no need for bugfixing that, the outfit-last works even better. If we don't, we'll need to work this out...
 

lostcalpolydude

Developer
Staff member
If this remains unimplemented... I've found that non-seltzers don't currently properly restore the backup outfit from the shop for KGO.

I buy everything *except* seltzer from the lab and I never have that issue. I would notice very quickly if I wasn't getting MP regen from the crown, or if I couldn't shieldbutt, so I'm sure it isn't an issue that I have.
 

Theraze

Active member
Not sure why exactly, but retrieve_item wasn't returning to my gear... Seltzer and Mafia Arias have special explicit checkpoint creation and restoration. Zarqon's Wossname has consistently failed to return to my equipment after purchasing the "Knob Goblin eyedrops" and "Knob Goblin nasal spray" though it works fine with the seltzer...

If we switch to a "switch/buy/last" system, it should fix these sorts of issues...
 

Winterbay

Active member
Well, what do you expect it to do? Look at it this way. As far as mafia is concerned, each time a condition triggers a script you have told it to do that. And that's because you have. Why would you tell it to restore your HP using your recovery script twice? Seriously, I don't understand. You must know you have that script (hint: you put it there), you must also know what settings you have for recovery (since you set them). So why tell it to do the same thing twice? You seem to say we should track a static boolean condition "x is happening" that means features are disabled so as to avoid conflicts. I understand your sentiment but this would be a huge undertaking for limited gain. There would have to be multiple conditions, since some things are fine interacting at certain times, and we would have to be seriously careful not to bork anything. I don't like the idea of accidentally stopping someone doing something that would be perfectly sane.

Because even though I'm an engineer I can't do fractions that fast and so I do not know if the settings I have for the recovery script in Mafia are the same as I'm seeing on screen at the moment, also I have a huge tendency to forget what my current restore settings are. This means that when I look at the HP/MP numbers and see a number I feel is too low this may or may not be true for the recovery script as well but without switching between the relay browser and mafia's main window I have no way of telling if it is running or not and thus I sometime manage to click the restore link even while the recovery script is running.
 

xKiv

Active member
In my relay browser, the numbers go red when they are below my settings.

Is there actually any indication anywhere that this is what the red color means, or do I have to infer that?
Think even of the users who are ... less smart.

Anyway, I am cool with running the recovery script twice when I click surplussly. Just do not run it concurrently. Or maybe that's not the problem too.
My end expectation is that mafia doesn't prevent me from adventuring in the relay browser no matter how many times I click for the restoration (and no matter when).
 

Theraze

Active member
Except that your end expectation has nothing to do with not creating a backup outfit... the real fix you want to do is disable the automatic healing, and click the heal button between combats. Then you know that it's healed, and it never locks you up. Solution found.
 

xKiv

Active member
Except that your end expectation has nothing to do with not creating a backup outfit...

I am aware that it is a separate issue. I originally used it to illustrate to point that mafia doesn't prevent all relay-adventuring-triggered actions from happening immediately while a CLI action would be queued and delayed.

the real fix you want to do is disable the automatic healing, and click the heal button between combats. Then you know that it's healed, and it never locks you up. Solution found.

I want automatic healing below X% and then to be able to heal myself in some other one-shot situations too.
 

Theraze

Active member
My issue is that your complaint about this which doesn't actually stop the issue from happening by your manually triggering it again; overwriting the backup outfit/implicit checkpoint with the KGO and restoring back to it when done instead of the outfit you want as well as locking up your client. But it stopped those of us who actually pay attention to whether or not it's autohealing us before we kill our clients from getting this feature, in the process stopping the KoLmafia servers from relief from multiple extra hits per outfit-required purchases.

It's an unrelated issue that killed this for us. :)
 

Winterbay

Active member
In my relay browser, the numbers go red when they are below my settings.

Possibly, but since that is not explained anywhere I thought that the red colour changing thing was the same as KoL's own and as such had nothing to do with my recovery settings.

That said, I think the feature should be implemented but thought should be given towards people playing in the relay browser. I know quite a lot of times that I've clicked something and wondered why nothing is happening and realised upon switching to Mafia's main window that it is doing a lot of things to prepare me for the fight I was planning to do or casting buffs (mode management) and so on. It would be nice if there could be an indicator somewhere in the relay browser to indicate that Mafia is doing something in the background other than just taking much longer to actually perform the request.
 

fronobulax

Developer
Staff member
It would be nice if there could be an indicator somewhere in the relay browser to indicate that Mafia is doing something in the background other than just taking much longer to actually perform the request.
I use the Relay Browser a lot and I have found keeping the gCLI window open and visible goes a long towards letting me know what is happening, or not. There are much better solutions, of course, but this workaround is available now.
 
Top