Feature - Implemented Customizable options in the Maximizer drop-down

Bale

Minion
Would it be possible for the user to add custom choices to the drop-down in the maximizer? Even if it just remembered the last 5 non-standard options typed by the user, it would be helpful. There are always a couple I use each run that aren't in the drop-down and I use these again and again. Examples:

mainstat +outfit frat war
mainstat +outfit swashbuck +equip fledges
mainstat, .71 ml
mp regen min, mp regen min, .5 hp regen min, .5 hp regen max

Those are all options I'd like to be able to choose from the drop-down if I could customize it. However, I don't think they should be standard for everyone since each person has their own preferences.
 
Last edited:

Theraze

Active member
I just use aliases for mine like that... Here's my alias mymax, which does the following:
1) 4 item, 3 meat.
2a) If moxie class, 2 moxie, (1) ranged damage, .1 initiative, -melee
2b) If muscle/mysticality, 2 muscle, (1) weapon damage, .1 moxie, +melee
3) Anything else I want as a modifier.

mymax ashq string maxstring; if (my_primestat() == $stat[Moxie]) maxstring = "2 moxie, ranged damage, .1 initiative, -melee, %%"; else maxstring = "2 muscle, weapon damage, .1 moxie, melee, %%"; CLI_Execute("maximize 4 item, 3 meat, " + maxstring);

Long as your aliases get the %% in there properly, you can leave them flexible. Easier than saving contents of dropdowns to a file as well.

Edit: New version of mymax:
mymax => ashq string maxstring = "4 item, 3 meat, " + (my_primestat() == $stat[Moxie] ? "2 moxie, ranged damage, weapon damage, .1 initiative, -melee, " : my_primestat() == $stat[Muscle] ? "2 muscle, weapon damage, .1 moxie, melee, " : "2 mysticality, spell damage, .1 moxie, ") + "%%"; maximize(maxstring, false);
 
Last edited:

Bale

Minion
That would require me to be more careful in the maximizer options rather that just being able to pick and choose what I like from the maximizer tab. I never just use everything without consideration which is different from the function of the CLI command. Your alias is a decent place to start, but there are some other things I'd need to add in to make it work perfectly for me. Your solution might be workable with some effort.

It would really just be easier to have the maximizer tab's drop-down keep track of my last 5 non-standard uses as the first 5 options.
 

Theraze

Active member
Well, I have no clue how to make that part of it save... it's always been a bane in working with computers and people wanting to keep their email dropdown addresses and the like (not that the file for that is tremendously difficult to save... it's just more of a bother than it's usually worth). Aliases? That I can do. :) Though I do keep wanting to abbreviate "familiar weight" to "weight" or "fam weight" or "fam" when I'm in a rush.
 

Bale

Minion
Heh. Obviously the word "easier" has a very different meaning for the user and the implementer with regards to this.
 

fronobulax

Developer
Staff member
Heh. Obviously the word "easier" has a very different meaning for the user and the implementer with regards to this.

I'm curious - what sort of persistence is desired? Do you want the settings preserved across KoLmafia sessions or merely have what was previously used be available for the duration of the session?
 
Or, perhaps, allow us to make an override file with each line just containing the exact text of each drop down option.

Wouldn't be able to change in-session, but I don't see why that'd be a problem if you've already defined all the ones you'd use commonly (and removed the ones you don't)
 

StDoodle

Minion
Heck, even a preference; just separate each 'line' with a semicolon as per normal. Standard setting is blank. Easy-peasy? ;)
 
Blank means I can't remove the ones I don't use.
And it also makes removing custom items a hassle.
*glares at the unix PATH command*
 

slyz

Developer
Editable list of expressions for the Maximizer GUI

can we please have a way to edit the pull down list for maximizer. There are a lot of things in it I never use, and multiple ones that I use all the time. I already have scripts, logon, logoff, and just other that adjust all t his for me, but if I'm just manually adventuring and want to go to the maximizer for MP regeneration, I don't want to have to look up the complicated string I can never remember on the forums here to do that. If I could edit the list that would already be saved and I wouldn't need to look it up on the forums once a week or so.

I agree that it would be nice to allow people to modify the default expressions that appear in the drop-down of the Maximizer GUI.

What would be the best way to do this? A simple global maximizerExpressions preference that contains a semi-colon delimited list? Is letting the user change it via the "get" CLI command enough?
 

Bale

Minion
Threads merged.

What would be the best way to do this? A simple global maximizerExpressions preference that contains a semi-colon delimited list? Is letting the user change it via the "get" CLI command enough?

My suggestion for a simple user method is in the first post. I like your idea also even though it is less approachable for a novice.
 

roippi

Developer
Hm. I like both options. Though I'm leaning towards keep-the-last-5-nonstandard method, since the ability to remove built-in options from the list doesn't seem super important. They're not much in the way.

Maybe an opt-in implementation like the MRU preference where it remembers the last n nonstandard entries?
 

Hyppy

New member
Here's a really cheap setup for allowing custom dropdowns at the end of the list in the Maximizer. The customMaximizerCommand1 through customMaximizerCommand5 options can be set in the playername_prefs.txt file (defaults to Mainstat here).
View attachment customMaximizer.patch
 
Last edited:

fronobulax

Developer
Staff member
I looked at Hyppy's patch. What it does is defines 5 new preferences and then appends them to the bottom of the mazimizer's dropdown list. The good news is that you can set up to five "custom" maximizer expressions. The bad news is that you will have to set them yourself - nothing is learned, they will always be the last five choices and, as far as I can tell you will have to restart mafia to get changes to take effect. And these will be "hidden" mafia preferences. As implemented all five default to mainstat and if you set a preference to something that is not a valid mazimizer string you will get what you deserve because there is no error checking.

Should I commit it?

What people really want is something that could "learn" whatever they entered and remember it but that looks like it means that the default list will have to be moved from a list of constants in code to some other data structure, and that is a bit more work.

Is this patch better than the current state? if so then how about five new strings to use as the defaults so no one complains about mainstat appearing 6 times in default mafia. Suggestions?
 

Veracity

Developer
Staff member
Should I commit it?
I'd like to spin a new release after we put in support for the new KoLCon item. I believe that our support for Fistcore and the Clip Art tome are good enough and KoLmafia seems pretty stable, otherwise.

I'd prefer that we not add experimental features at this time.
 

Theraze

Active member
I don't think it's especially better than current... it doesn't autolearn, so you get the same basic result with maximize1-5 aliases. Run the alias, it shows up on the line in the modifier maximizer tab and you can tweak it if you like, run item acquisition, etc...
 

roippi

Developer
I'd prefer something more.. dynamic, or intelligent, or whatever you want to call it. And implementation-wise, I'd prefer a single something-delimited preference if we're going that route.
 

fronobulax

Developer
Staff member
The crowd has spoken. I'm not interested in being the person who commits something, just before a release, that turns out to have the bug that requires the next release to happen immediately ;-) My gut feel is that if the feature does not "learn" then it is of limited utility. That said, if I don't get distracted by something shiny I will look at doing this "right". In this case that means modeling it after the Script MRU.

@Hyppy - thanks for your work even if it won't survive into a commit.
 
Top