Bug - Not A Bug r26560 - Scripts menu missing user scripts

Malibu Stacey

Active member
I think the case is that many people have grown very fond of their workarounds for a bad feature and what I'd like to hear is what people's problems are not what they'd like the solutions to be.
Problem #1 - Scripts I'm not running are showing up in the list.
Screenshot 2022-07-14 220007.png
That's from bean's Cargo pants relay script. I never manually ran that, I clicked on the cargo pants daily reminder that KoL gives and yet it's in my MRU. Relay overrides should be excluded unless manually run.

Also my BetweenBattleScript is showing up there too. I've never clicked on that either, it's run automatically whenever I adventure somewhere. Anything in the Preferences -> Automation tab should probably be excluded unless manually run.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Problem #1 - Scripts I'm not running are showing up in the list.
View attachment 10753
That's from bean's Cargo pants relay script. I never manually ran that, I clicked on the cargo pants daily reminder that KoL gives and yet it's in my MRU. Relay overrides should be excluded unless manually run.

Also my BetweenBattleScript is showing up there too. I've never clicked on that either, it's run automatically whenever I adventure somewhere. Anything in the Preferences -> Automation tab should probably be excluded unless manually run.
Is this is the thing that veracity has just changed?
 

matt.chugg

Moderator
Problem #1 - Scripts I'm not running are showing up in the list.
View attachment 10753
That's from bean's Cargo pants relay script. I never manually ran that, I clicked on the cargo pants daily reminder that KoL gives and yet it's in my MRU. Relay overrides should be excluded unless manually run.

Also my BetweenBattleScript is showing up there too. I've never clicked on that either, it's run automatically whenever I adventure somewhere. Anything in the Preferences -> Automation tab should probably be excluded unless manually run.
I'm also seeing this behaviour in latest build 26566

Running autoscend.ash has added 2 items to the MRU list which I am 100% certain I haven't directly run at any point

1657885312107.png
 
I think the case is that many people have grown very fond of their workarounds for a bad feature and what I'd like to hear is what people's problems are not what they'd like the solutions to be.

I liked @katyarn's suggestion of being able to organise bookmarks into folders, and I can imagine reflecting this heirarchy in the ctrl+k "command palette" to great effect.
My problem is that my workaround was working perfectly, but someone decided it was all wrong, apparently without even knowing it was an option.
And as a result, it's being undone for being 'wrong' and I'm forced to the same work to reorganize my scripts again.
Sliding through cascading menus is slow and error prone. My experience. YMMV, obviously.
Sliding menus reuire less mouseclicks, and I much prefer moving my mouse over clicking my mouse, as far as wrist-strain goes. Also, it is much quicker to find a file this way when you aren't quite sure in which folder you left it, because you only have to hover over the list to see all the others, rather than opening a folder, checking it and then clicking back, and then moving to the next folder.

And I honestly don't see the point of an MRU menu for this. It's great for something like the maximizer, where you might try a few close variations and want to remember your last few attempts.
But for this it just means your list constantly changes despite all the items on them staying the same: that means I can't just click the same script in the same place, which means I actually have to pay attention to not click the wrong one, rather than just clicking away by muscle memory.

So yeah, the 'solution' for me is going to be to ignore all your 'cool' new features, and go through the load script button every time. Because these new features don't have anything good that actually appeals to me, and you guys haven't convinced me why they are better.
Sure, I could favorite some scripts into my bookmarks, but why would I, I have already favorited them by putting them on my script bar. You guys remember that feature? Or is that another one that was apparently all forgotten about and now retroactively deemed bad and wrong to make your new feature that's basically your old feature look all cool.
For people still in the dark, I'm talking about this one: So, why do we need 'new' bookmarks when this has been a thing for years too.

I guess my point is, this 'upgrade' feels like someone decided their script menu was getting too cluttered, and decided to fix it. Admirable. But they dd it by just assuming everyone was having the same problem, and writing something new to make it 'better' for everyone without considering what everyone else had already come up with, and previously implemented into mafia previously to deal with that same problem.
 
Last edited:

matt.chugg

Moderator
Apologies if the following is redundant, but In case it is useful information and not already noted, in r26566

autoscend.ash now appears twice and another instance of a script dependency is showing in the list, I didn't run Garden Harvester manually, I believe it was run by VeractiyMeatFarm.ash

For the item appearing twice, I definitely did run it multiple times AND I have run it after ascending which is when I think it appeared a second time, I had previously run it multiple times and not had it appear in the list twice.

1657891237460.png
 

fronobulax

Developer
Staff member
Is this is the thing that veracity has just changed?

The MRU has been around for at least a decade. People besides me using it is what is new.

The general idea was that a user initiated a script on some way, after which they could run the script by selecting it from the MRU. Over the years there are several issues bugs or feature requests that have not been acted upon.
  • Some, but not all, scripts called from relay scripts show up on the list even though running them directly makes no sense.
  • Scripts that are invoked by "call" in other scripts show up. Many of those can be called directly and so being on the list is by design but a couple are not and could be filtered out.
  • Scripts that are in a subdirectory of scripts/ may or may not be runnable from the MRU because it is not explicit in managing full paths and so it sometimes cannot find something.
  • It was recently observed that scripts with a semi-colon in the file name will "break" the feature.
There are probably a couple more. Some of these I will almost certainly look at if other people are actually continuing to use the MRU. Some of these would better be considered in a larger context such as a reconsideration of the script install/update/run infrastructure.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
So yeah, the 'solution' for me is going to be to ignore all your 'cool' new features, and go through the load script button every time.

If you really think this is better than adding bookmarks, ok.
 

fronobulax

Developer
Staff member
A couple of comments on perspective.

First consider the tone of posts. At some point anger perceived as being directed at members of the dev team by the dev team will almost certainly not result in desired changes. I regret using the word "complain" when discussing how to bring about changes.

Second, there was previously a default cascading menu built from the file system that was a default display. You could opt in to using a script MRU instead. The recent change removed the cascading menu as an option. I personally was not bothered by that because I could not identify any capability that was lost. Users could run the same script via the file chooser. I now understand that the key issue is how a script was run and that there are strong opinions, pro and con, about file choosers and cascading menus.

Third, the recent change was initiated by hola, the Creator of KoLmafia. The fact that hola considered it a good idea certainly colored my assessment of the idea.

Finally, veracity is working on restoring the cascading menu option. So, with patience, those who preferred the cascading menu will have it back.
 
If you really think this is better than adding bookmarks, ok.
I do.
There's no point in keeping just my favorites there, because kolmafia already has a perfectly good feature for favored scripts, and it already has mine.

And if I want it to replace my script menu, I would have to add literally everything to my bookmarks, which means I either end up forgetting half my scripts or I end up with the huge list this change is suppposed to avoid, since the bookmarks don't do folders. So I'd be better going through the load script menu anyway.

So tell me, what am I supposed to use and like these bookmarks for? I'm not just hating on this change because I don't like change. I genuinely don't see the point.
 

Veracity

Developer
Staff member
Sure, I could favorite some scripts into my bookmarks, but why would I, I have already favorited them by putting them on my script bar. You guys remember that feature? Or is that another one that was apparently all forgotten about and now retroactively deemed bad and wrong to make your new feature that's basically your old feature look all cool..
I have 10 script buttons, myself. My multis enjoy being able to log in, hit button #3, and then log out when it finishes.

Hola did want to eliminate those. I didn’t let him. :)

I am happy to have my 1st tier be script buttons, my 2nd tier be bookmarks, and everything else be Load Script.
 

Veracity

Developer
Staff member
Finally, veracity is working on restoring the cascading menu option. So, with patience, those who preferred the cascading menu will have it back.
It’s coded and ready to go - in a Draft PR. To be blunt, one reason it’s not out for review yet is my demotivation from angry tone…
 

Veracity

Developer
Staff member
The screenshot is from using the Load script... Option. All my scripts are there and my carefully constructed subdirectories are there and at the top. So the ability to keep scripts in subdirectories of your choice and run from there still exists. The "GUI" to access it has changed.
Putting the subfolders first is an OS/LAF thing. Swing’s ChooseFileDialog lets you select Files Only, Directories Only, or Both Files and Directories. There is no API to choose how the display the files: alphabetically by nane, by date, folders first, whatever. You get what you get.

I did a lot of googling last night about this. I’d have to construct my own dialog, presumably around a JList, just like ChooseFileDialog. I don’t see that happening.

Cascading menus put directories first because we craft those with our own code and make it so.
 
It’s coded and ready to go - in a Draft PR. To be blunt, one reason it’s not out for review yet is my demotivation from angry tone…
Sorry about that, I tried to be clear that I'm not actually angry, more, eh, confused. I guess I didn't do a very good job.

The thing is, 'everyone' seems hyped about this new feature and all the cool things it can do, but to me, it just seems like it doesn't do any new things mafia couldn't do already. And it does so by replacing a feature that feels almost unrelated, and that I was using. So all in all, it left me confused, and felt like change for the sake of change.
 

Ryo_Sangnoir

Developer
Staff member
So tell me, what am I supposed to use and like these bookmarks for? I'm not just hating on this change because I don't like change. I genuinely don't see the point.
One thing that the bookmarks do, but the script buttons don't, is that if you click on two bookmarks / script buttons in close succession, the bookmarks will queue, while the script buttons will run both things at the same time. Likely the script buttons should have worked that way, but they don't. If somebody knows how to fix that, I think it should be applied to other things (e.g. breakfast / leaflet solver).

Plus the bookmarks show you in text what each thing is, without having to hover over it first, and you can customize the text.

Plus if you're a keyboard user, you can hit Ctrl-K and search a list of items, including your bookmarks.

I didn't personally know about the buttons. From checking the code, to see them you have to set the "scriptButtonPosition" preference to a non-zero value. I don't think there's a GUI for that. The bookmarks appear if you have more than zero.
 

hamofmight

New member
On r26561, I think I'm seeing something similar to Malibu Stacey. I set scriptMRULength to 20 to try it out. Scripts I manually selected showed up once. Then I ran the garbage-collector script. I ended up with 2 copies of scripts like combo/combo.js, choice.1313.ash, gain.ash, volcanomine.ash, garbage-collector/garbo.js, etc. I signed out and now have 4 copies of those scripts listed, but still only 1 of the ones I manually ran. The list is way over 20 entries. Logged out and in again, and list increased again, with over 25 entries off screen. Logged out and in a 4th time and the list went back to 2x of everthing garbo called, and 1 of the scripts I ran. There were no error logs generated.

I will now switch over to bookmarks, which is fine with me. But if I can make a suggestion- somebody put a tutorial/message somewhere easy to find so users know how to use it. The bookmarks drop down menu is hidden by default (even under r26569), and I had no idea that was what y'all were talking about until a few minutes ago when I saw the picture in the dictators post above showing there was a bookmarks setting in preferences. This entire time until now when I read the various posts and change logs I thought the Ctrl+K popup was what was being suggested as the replacement.

Hope this helps.
 

PeKaJe

Member
So about those gCLI Toolbar Buttons ... uh, where in the mafia GUI do they show up? Because I've never seen them other than in the relay browser which I liked very much, but which has now been removed for some reason. I mostly stay in the relay browser, and it was very convenient to be able to put a few key CLI commands in there. I've patched it back into my own build, so for now I'm good, but please consider letting people keep the functionality they specifically went in and enabled.
 

Veracity

Developer
Staff member
Ha! On the other hand, I never used them in the Relay Browser. They will be easy enough to put back.

Preferences/Look & Feel has Scripts: which lets you select "Show script bar along right of panel".
Here is a screen shot of that panel - with my script buttons visible on the right edge.

Screen Shot 2022-07-15 at 5.59.59 PM.png
 

fronobulax

Developer
Staff member
On r26561, I think I'm seeing something similar to Malibu Stacey. I set scriptMRULength to 20 to try it out. Scripts I manually selected showed up once. Then I ran the garbage-collector script. I ended up with 2 copies of scripts like combo/combo.js, choice.1313.ash, gain.ash, volcanomine.ash, garbage-collector/garbo.js, etc. I signed out and now have 4 copies of those scripts listed, but still only 1 of the ones I manually ran. The list is way over 20 entries. Logged out and in again, and list increased again, with over 25 entries off screen. Logged out and in a 4th time and the list went back to 2x of everthing garbo called, and 1 of the scripts I ran. There were no error logs generated.

The presence of scripts you think you didn't "call" is expected or, if you prefer a bug that has not bothered people for several years but should be looked at.

The duplicates bother me. Two questions - did you just sign out or actually shut down mafia completely? What does scriptMRUList look like, ideally with a text editor. Are the duplicates duplicated there?
 

hamofmight

New member
I believe I just signed out, at least the first few times. It's very possible I shut down mafia and restarted that 4th time, which is why it reverted back to just 2x, but I don't fully remember.

From my prefs.txt:
scriptMRUList=epicMall.ash;gain.ash;combo.js;minevolcano.ash;garbo.js;choice.1316.ash;choice.1315.ash;choice.1319.ash;choice.1314.ash;choice.1313.ash;Detective Solver.ash;gain.ash;combo.js;minevolcano.ash;garbo.js;choice.1316.ash;choice.1315.ash;choice.1319.ash;choice.1314.ash;choice.1313.ash

Detective Solver.ash and epicMall.ash are the ones I ran manually, everything else should be from garbo.
 

Veracity

Developer
Staff member
One thing we need to pay attention to: .ash .txt and .js are all good extensions for scripts. I keep forgetting that last one.
 
Top