Feature Make KoLmafia upeffect arrows work like KoL's new upeffect

Bale

Minion
This is a feature request based on today's KoL effect interface update.

Can KoLmafia's uparrows be made consistent with the method used by KoL? The tricky part is if right-clicking on the arrow can call up a little text entry box asking "How many times?" so that KoLmafia can multi-use the item or multi-cast the spell? Can someone whip up a variant javascript that will look the same, but work through KoLmafia?

Since KoLmafia will add arrows for effects that vanilla KoL will not add, this would be useful.

It will also allow us to homogenize the interface and require only one set of arrows instead of two different ones making the interface simpler. Obviously KoL should still only add its own upeffect arrows if they are enabled in preferences.
 
Last edited:

Veracity

Developer
Staff member
Regardless of how we choose to unify the interfaces, we need to recognize the new page which is called by KoL's uparrow.

For Leash of Linguini:
upeffect.php?efid=16&qty=1&pwd

For Aspect of the Twinklefairy:
upeffect.php?efid=199&qty=1&pwd

I haven't tried this yet, so I don't know if upeffect does everything needed, or if it redirects to skills.php or inv_use.php or whatever as appropriate. If the latter, we will parse the redirected request successfully. If the former, we have work to do...
 

Erich

Member
The logic for this is interesting. I fooled around testing it with sugar rush. If I got the effect from an item, it uses the last item you used to get that effect when you want to up it. If you switch, up arrow switches with you. If you consume food or booze that ups the effect, it wont count and will still go for the last non food / booze item you used to up it. If you use up all the items that the up arrow links back to, the arrow disappears, even if you have another item that grants the same effect.

Its similar with buffs. I cast inigo, and the up goes to recast it. I then use my 1 record of inigo, and the arrow goes away, even though I still have a few casts left.
 

roippi

Developer
I have a feeling the kol-provided arrow is going to be generally inferior to mafia's, in terms of figuring out how to up a thing. I doubt kol's will ever know what to do with trivia master, for example.
 

Bale

Minion
Urgh. Sounds like mafia's arrows put a lot more thought into the player's wellbeing than KoL's arrows. If KoL's arrows can be adjusted to use upeffect.php then we could simply filter out the inferior KoL arrows.

The only tough decision is if Mafia should retain KoL's "look and feel" by having their arrows in the front. Sadly I think front arrows detract from the important information.
 

Erich

Member
Another question for the testin': How does KoL handle random effects, like the hookah?

I got Dance Interpreter from the hookah, no arrow at all. Granted, it's an effect from an adventure, but I honestly think that it won't have an arrow regardless. Chaos popcorn is food, so it doesnt get linked back to the upping. I tried with that too.

But here's a bit of fun: bugged love potions get linked back to in the arrow, regardless what effect it gives you. Not the best implementation of this feature, though I'm grateful to have it native.
 

Orbrisa

Member
I noticed the other day that using an upeffect.php arrow to recast a skill or buff is noticeably faster than Mafia's arrows. Also I prefer the appearance of KoL's arrows but that's just aesthetic and can be ignored.

For circumstances when an item gives a buff though, Mafia's arrows are definitely better, especially if you're like me and you closet almost everything that can be stolen. I'm seriously thinking of just leaving them both on and using whichever one is preferable, at least for the time being. Just throwing that out there as an example of user preference ... though I realize I am probably an ignorable outlier in this regard.
 

Bale

Minion
Mafia's arrows are definitely better, especially if you're like me and you closet almost everything that can be stolen.

Or, more importantly, they are better if you need to purchase items from the mall to increase that buff.
 

Veracity

Developer
Staff member
Or if you need to restore MP, I assume. Does KoL let you do that - and if so, how do you control which sources of MP restoration it uses?

I'm not liking what I'm hearing about KoL's arrows. I haven't actually tried them yet, because they seem scary. :)
 

Bale

Minion
Yeah. KoLmafia's arrows are clearly better. Using upeffect seems risky since we don't really know what that will do. If a given effect can be granted from multiple sources, it will simply use the most recent. That seems way too uncertain.

Perhaps the best solution to this would be to allow KoLmafia to enable right-click to multi-use/multi-cast from the effects pane. That would absorb the one piece of functionality we lack.
 

heeheehee

Developer
Staff member
Yeah. KoLmafia's arrows are clearly better. Using upeffect seems risky since we don't really know what that will do. If a given effect can be granted from multiple sources, it will simply use the most recent. That seems way too uncertain.

Perhaps the best solution to this would be to allow KoLmafia to enable right-click to multi-use/multi-cast from the effects pane. That would absorb the one piece of functionality we lack.

Hmm. I imagine that clicking Mafia's up-arrow runs the "When I am low on X, do Y" trigger. Would Mafia simply run the trigger Z times? You can't just take all the numbers and multiply by Z, since effects like Trivia Master (with nontrivial mechanisms for upping) exist, and triggers can be arbitrary CLI commands (which, naturally, includes the entirety of ASH, so...).
 

Erich

Member
Ok, this may be more work than needed, but tell me what you think...

The majority of item based effects come from one item, right? These exclusive effects can be pooled to work with KOLs default upping, since theres no need for it to be smarter than that. The rest of the effects can be handled more betterer smartest.
 

Veracity

Developer
Staff member
What benefit is there is submitting a request to upeffect.php rather than to use_skill.php or use_item.php or whatever?

Other than the fact that we currently can't figure out what happens when upeffect.php is submitted and deduct items from inventory and such. Oh, wait - that would be a DISadvantage. :)
 

lostcalpolydude

Developer
Staff member
It looks like upeffect.php redirects to an appropriate page (skills.php in my brief testing), so mafia should be able to parse things properly. It's still an unnecessary redirect though.
 

Veracity

Developer
Staff member
Whew! Thanks for testing. I asked about that, upthread, but nobody answered - and I didn't test myself.

It's beginning to seem that if we add our own (or steal KoL's) right click menu to let you specify a count, and use the result in the sidecommand we ship to KoLmafia to interpret and submit, we will have a superset of KoL's uparrow. That's all Javascripty stuff that I'm not experienced with, though.
 

Winterbay

Active member
For effects that'll use a green echo thinge there is a popup first saying "this will use a echo thingie, are you sure". Not that I know if that is in any way detectable or whatnot, or even interesting information.
 
Top