OK, question then: what "string of the maximizer"?Well, you could directly replicate your desired behaviour without hacking the code by running your inventory into an array, capturing the string of the maximizer, and checking if an inventory item from the array exists in the maximizer string, and discarding it from the array if it doesn't. That should allow for any future code changes to happen without issue. The only issue you may have is cases where the best option is multiple of an item.
typedef item[slot]uniform; //A map of slots containing items
uniform current_gear(){ //Saves a snapshot of your current gear
uniform tempuni;
foreach place in $slots[acc1,acc2,acc3,weapon,offhand,hat,pants,shirt]{
tempuni[place]=equipped_item(place);
debug_print("Saving: "+place+" contains "+equipped_item(place));}
return tempuni;}
void wear_uniform(uniform oldschool){ //Wear a defined uniform
foreach place in $slots[acc1,acc2,acc3,weapon,offhand,hat,pants,shirt]{
if(equipped_item(place)!=oldschool[place]){
debug_print("Equipping: "+place+" with "+equipped_item(place));
equip(place,oldschool[place]);}}}
muscle, 2 hand, type club
Maximizing...
SLOT 0
[stainless steel skullcap (1,542)]
SLOT 1
[creepy-ass club (257)]
SLOT 2
[Brimstone Bunker (257)]
SLOT 3
[sea salt scrubs (257)]
SLOT 4
[Greatest American Pants (257)]
SLOT 5
[fossilized necklace (257), Slow Talkin' Elliot's dogtags (257), fancy black tie (257)]
SLOT 6
[]
SLOT 7
[]
SLOT 8
[sugar shield (257)]
SLOT 9
[]
SLOT 10
[glow-in-the-dark wristwatch (513)]
SLOT 11
[]
12 combinations checked, best score 362.0
> outfit birthday suit
Taking off everything...
Everything removed.
> maximize muscle, 2 hand, type club
Maximizing...
12 combinations checked, best score 362.0
Putting on stainless steel skullcap...
Equipment changed.
Putting on sea salt scrubs...
Equipment changed.
Putting on Greatest American Pants...
Equipment changed.
Putting on fossilized necklace...
Equipment changed.
Putting on Slow Talkin' Elliot's dogtags...
Equipment changed.
Putting on fancy black tie...
Equipment changed.
Putting on sugar shield...
Equipment changed.
> maximize muscle, 2 hand, type club, dump
Maximizing...
SLOT 0
[stainless steel skullcap (536,872,454)]
SLOT 1
[creepy-ass club (257)]
SLOT 2
[Brimstone Bunker (257)]
SLOT 3
[sea salt scrubs (536,871,169)]
SLOT 4
[Greatest American Pants (536,871,169)]
SLOT 5
[fossilized necklace (536,871,169), Slow Talkin' Elliot's dogtags (536,871,169), fancy black tie (536,871,169)]
SLOT 6
[]
SLOT 7
[]
SLOT 8
[sugar shield (536,871,169)]
SLOT 9
[]
SLOT 10
[glow-in-the-dark wristwatch (513)]
SLOT 11
[]
12 combinations checked, best score 362.0
Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
at net.sourceforge.kolmafia.swingui.MaximizerFrame.maximize(MaximizerFrame.java:330)
at net.sourceforge.kolmafia.textui.command.ModifierMaximizeCommand.run(ModifierMaximizeCommand.java:54)
at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:538)
at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:412)
at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:202)
at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:183)
> ashref maximize
boolean maximize( string, boolean )
boolean maximize( string, int, int, boolean )
int [effect] maximize_effect_array( string )
int [effect] maximize_effect_array( string, int, int )
item [slot] maximize_equipment_slots( string )
item [slot] maximize_equipment_slots( string, int, int )
> ash maximize_effect_array( "mp regen max" )
Maximizing (1st time may take a while)...
96 combinations checked, best score 81.0
Returned: aggregate int [item]
Antarctic Memories => 0
Black Tongue => 4
Chlorophyll Flavor => 10
Fiery Heart => 11
Fit To Be Tide => 7
Florid Cheeks => 1
Heart of Orange => 9
Mental A-cue-ity => 8
Purple Tongue => 2
Stimulated Brain => 5
The Real Deal => 3
Tiny Bubbles in the Cupcake => 6
> ash maximize_equipment_slots( "mp regen max" )
Maximizing...
96 combinations checked, best score 81.0
Returned: aggregate item [slot]
acc1 => vampire pearl earring
acc2 => vampire pearl ring
acc3 => Bling of the New Wave
familiar => Mayflower bouquet
hat => jewel-eyed wizard hat
off-hand => hilarious comedy prop
pants => plexiglass pants
shirt => snailmail hauberk
weapon => lawn dart
> ash maximize( "mp regen max", false )
Maximizing...
96 combinations checked, best score 81.0
Putting on jewel-eyed wizard hat...
Equipment changed.
Wielding lawn dart...
Equipment changed.
Holding hilarious comedy prop...
Equipment changed.
Putting on snailmail hauberk...
Equipment changed.
Putting on plexiglass pants...
Equipment changed.
Putting on vampire pearl earring...
Equipment changed.
Putting on vampire pearl ring...
Equipment changed.
Putting on Bling of the New Wave...
Equipment changed.
Putting on Mayflower bouquet...
Equipment changed.
Returned: true
> ash maximize_equipment_slots( "mp regen max" )
Maximizing...
128 combinations checked, best score 81.0
Returned: aggregate item [slot]