Modifier Maximizer: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Darzil
 
(3 intermediate revisions by 3 users not shown)
Line 11: Line 11:


Shorter forms are allowed for many commonly used modifiers. They can be abbreviated down to just the bold letters:
Shorter forms are allowed for many commonly used modifiers. They can be abbreviated down to just the bold letters:
<br>'''mus''', '''mys''', '''mox''', '''main'''stat, '''HP''', '''MP''', '''ML''', '''DA''', '''DR''', '''com'''bat rate, '''item''' drop, '''meat''' drop, '''exp'''erience, '''adv'''entures
<br>'''mus''', '''mys''', '''mox''', '''main'''stat, '''HP''', '''MP''', '''ML''', '''DA''', '''DR''', '''com'''bat rate, '''item''' drop, '''meat''' drop, '''exp'''erience, '''(spell) crit'''ical, '''adv'''entures, '''fites''' for "pvp fights"
<br>Also, resistance (of any type) can be abbreviated as '''res''', and damage can be abbreviated as '''dmg'''. '''all res'''istance is a shortcut for giving the same weight to all five basic elements. Likewise, '''elemental dmg''' is a shortcut for the five elemental damage types.
<br>Also, resistance (of any type) can be abbreviated as '''res''', and damage can be abbreviated as '''dmg'''. '''all res'''istance is a shortcut for giving the same weight to all five basic elements. Likewise, '''elemental dmg''' is a shortcut for the five elemental damage types. '''passive damage''' will look for both '''damage aura''' (every round) and '''thorns''' (when hit).  


Note that many modifiers come in pairs: a base value, plus a percentage boost (such as Moxie and Moxie Percent), or a penalty value. In general, you only need to specify the base modifier, and any related modifiers will automatically be taken into account.
Note that many modifiers come in pairs: a base value, plus a percentage boost (such as Moxie and Moxie Percent), or a penalty value. In general, you only need to specify the base modifier, and any related modifiers will automatically be taken into account.
'''ocrs''' will maximize gear that increases the number of monster modifiers.
Finally, '''prismatic''' (dmg or res) is a derived modifier that attempts to provide a balance of all elemental types. By contrast the '''elemental''' modifier will attempt to maximize all elements, even if it means that some of the elements will get no boost at all.


==Limits==
==Limits==
Line 30: Line 34:


String modifiers are not currently meaningful for maximization.
String modifiers are not currently meaningful for maximization.
The 'Bees Hate You' challenge path adds a '''beeosity''' keyword, which specifies the maximum number of 'B's allowed in the names of your equipment items (each of which causes 10% of your maximum HP in damage at the start of every combat). The default is 2 at the moment. The value you specify will automatically be increased if you use a +'''equip''' or +'''outfit''' keyword (described below) that requires more 'B's to satisfy.
Some extra provided keywords are useful in PvP minigames. '''number''' increases score by the number of numbers in a piece of equipment's name. '''letter''' increases score by the number of letters in the name, and '''letter X''' can be used to count the number of Xs.
==Equipment==
==Equipment==
Slot names can be used as keywords:
Slot names can be used as keywords:
Line 37: Line 45:
<br>'''hand'''ed&nbsp;&ndash; With a weight of 1, only 1-handed weapons will be considered. With a larger weight, only weapons with at least that handedness will be considered.
<br>'''hand'''ed&nbsp;&ndash; With a weight of 1, only 1-handed weapons will be considered. With a larger weight, only weapons with at least that handedness will be considered.
<br>'''melee'''&nbsp;&ndash; With positive weight, only melee weapons will be considered. With negative weight, only ranged weapons will be considered.
<br>'''melee'''&nbsp;&ndash; With positive weight, only melee weapons will be considered. With negative weight, only ranged weapons will be considered.
<br>'''effective'''&nbsp;&ndash; With positive weight, if muscle higher than moxie, only melee weapons are considered, if moxie higher or equal to muscle, ranged weapons (and knives with Tricky Knifework known) are considered.
<br>'''type ''text'''''&nbsp;&ndash; Only weapons with a type containing ''text'' are considered; for example, '''type club''' if you plan to do some Seal Clubbing.
<br>'''type ''text'''''&nbsp;&ndash; Only weapons with a type containing ''text'' are considered; for example, '''type club''' if you plan to do some Seal Clubbing.
<br>'''shield'''&nbsp;&ndash; With positive weight, only shields will be considered for your off-hand. Implies '''1 handed'''.
<br>'''shield'''&nbsp;&ndash; With positive weight, only shields will be considered for your off-hand. Implies '''1 handed'''.
<br>'''current''' - By default Maximizer considers your current equipment in Hardcore and Ronin. With -current keyword it does not, with +current keyword in aftercore it forces it to be considered. Not considering current equipment will reduce the number of combinations considered, but will sometimes mean changes of equipment are suggested even though they don't improve what you are wearing.
<br>'''club'''&nbsp;&ndash; With positive weight, only clubs will be considered for your main-hand.
<br>'''sword'''&nbsp;&ndash; With positive weight, only swords will be considered for your main-hand.
<br>'''shield'''&nbsp;&ndash; With positive weight, only shields will be considered for your off-hand. Implies 1 handed.
<br>'''utensil'''&nbsp;&ndash; With positive weight, only utensils will be considered for your main-hand.
<br>'''knife'''&nbsp;&ndash; With positive weight, only knives will be considered for your main-hand.
<br>'''accordion'''&nbsp;&ndash; With positive weight, only accordions will be considered for your main-hand.
<br>'''current'''&nbsp;&ndash; By default Maximizer considers your current equipment in Hardcore and Ronin. With -current keyword it does not, with +current keyword in aftercore it forces it to be considered. Not considering current equipment will reduce the number of combinations considered, but will sometimes mean changes of equipment are suggested even though they don't improve what you are wearing.
<br>'''equip ''item'''''&nbsp;&ndash; The specified item is required (positive weight) or forbidden (negative weight). Multiple uses of '''+equip''' require all of the items to be equipped.
<br>'''equip ''item'''''&nbsp;&ndash; The specified item is required (positive weight) or forbidden (negative weight). Multiple uses of '''+equip''' require all of the items to be equipped.
<br>'''bonus ''item'''''&nbsp;&ndash; The specified item is given a bonus to its score equivalent to weight.
<br>'''outfit ''name'''''&nbsp;&ndash; The specified standard outfit is required or forbidden. If the name is omitted, the currently equipped outfit is used. Multiple uses of '''+outfit''' are satisfied by any one of the outfits (since you can't be wearing more than one at a time).
<br>'''outfit ''name'''''&nbsp;&ndash; The specified standard outfit is required or forbidden. If the name is omitted, the currently equipped outfit is used. Multiple uses of '''+outfit''' are satisfied by any one of the outfits (since you can't be wearing more than one at a time).
<br>'''pirate'''&nbsp;&ndash; With positive weight, wear either Swashbuckling outfit or Pirate Fledges.
<br>'''plumber'''&nbsp;&ndash; If a plumber, require a plumber-specific weapon to be equipped (required to adventure).
<br>'''cold plumber'''&nbsp;&ndash; If a plumber, require a plumber-specific weapon that can deal cold damage to be equipped. Useful for getting Blech House.
<br>If both '''+equip''' and '''+outfit''' are used together, either one will satisfy the condition&nbsp;&ndash; all of the items, or one of the outfits. This special case is needed to be able to specify the conditions for adventuring in the Pirate Cove.
<br>If both '''+equip''' and '''+outfit''' are used together, either one will satisfy the condition&nbsp;&ndash; all of the items, or one of the outfits. This special case is needed to be able to specify the conditions for adventuring in the Pirate Cove.
<br>'''tie'''breaker&nbsp;&ndash; With negative weight, disables the use of a tiebreaker function that tries to choose equipment with generally beneficial attributes, even if not explicitly requested. There are only a few cases where this would be desirable: maximizing '''+combat''' or '''-combat''' (since there's usually only one item that can help), '''adv''' and/or '''PvP fights''' at rollover, and '''familiar weight''' when facing the Naughty Sorceress familiars.
<br>'''tie'''breaker&nbsp;&ndash; With negative weight, disables the use of a tiebreaker function that tries to choose equipment with generally beneficial attributes, even if not explicitly requested. There are only a few cases where this would be desirable: maximizing '''+combat''' or '''-combat''' (since there's usually only one item that can help), '''adv''' and/or '''PvP fights''' at rollover, and '''familiar weight''' when facing the Naughty Sorceress familiars.
Line 54: Line 73:
==GUI Use==
==GUI Use==
If the Max Price field is zero or blank, the limit will be the smaller of your available meat, or your autoBuyPriceLimit (default 20,000). The other options should be self-explanatory.
If the Max Price field is zero or blank, the limit will be the smaller of your available meat, or your autoBuyPriceLimit (default 20,000). The other options should be self-explanatory.
Prices are based on the mall price database, so if the price has been looked up in the last 7 days that value is used, otherwise the current mall price is queried. If preference '''maximizerCurrentMallPrices''' is set to true the current mall price is always queried, this will be much slower and cause many more server hits.


You can select multiple boosts, and the title of the list will indicate the net effect of applying them all&nbsp;&ndash; note that this isn't always just the sum of their individual effects.
You can select multiple boosts, and the title of the list will indicate the net effect of applying them all&nbsp;&ndash; note that this isn't always just the sum of their individual effects.

Latest revision as of 18:14, 10 March 2023

Usage

General

The specification of what attributes to maximize is made by a comma-separated list of keywords, each possibly preceded by a numeric weight. Commas can be omitted if the next item starts with a +, -, or digit. Using just a +, or omitting the weight entirely, is equivalent to a weight of 1. Likewise, using just a – is equivalent to a weight of -1. Non-integer weights can be used, but may not be meaningful with all keywords.

Numeric weights determine how much an individual keyword will be counted toward the score that Mafia assigns to each combination. For instance, "2 item drop" will force item drop to contribute four times as much as, say, ".5 meat drop" in the expression "maximize 2 item drop, .5 meat drop". The weights are simply multiplied with the corresponding modifier, so in the preceding expression, a natty blue ascot would contribute 20*.5 = 10 to your score, while a lucky rabbit's foot would contribute 2*7 + .5*7 = 17.5 to your score.

Numeric Modifiers

The full name of any numeric modifier (as shown by the modref CLI command) is a valid keyword, requesting that its value be maximized. If multiple modifiers are given, their weights specify their relative importance. Negative weights mean that smaller values are more desirable for that modifier.

Shorter forms are allowed for many commonly used modifiers. They can be abbreviated down to just the bold letters:
mus, mys, mox, mainstat, HP, MP, ML, DA, DR, combat rate, item drop, meat drop, experience, (spell) critical, adventures, fites for "pvp fights"
Also, resistance (of any type) can be abbreviated as res, and damage can be abbreviated as dmg. all resistance is a shortcut for giving the same weight to all five basic elements. Likewise, elemental dmg is a shortcut for the five elemental damage types. passive damage will look for both damage aura (every round) and thorns (when hit).

Note that many modifiers come in pairs: a base value, plus a percentage boost (such as Moxie and Moxie Percent), or a penalty value. In general, you only need to specify the base modifier, and any related modifiers will automatically be taken into account.

ocrs will maximize gear that increases the number of monster modifiers.

Finally, prismatic (dmg or res) is a derived modifier that attempts to provide a balance of all elemental types. By contrast the elemental modifier will attempt to maximize all elements, even if it means that some of the elements will get no boost at all.

Limits

Any numeric modifier keyword can be followed by one or both of these special keywords:
min – The weight specifies the minimum acceptable value for the preceding modifier. If the value is lower, the results will be flagged as a failure.
max – The weight specifies the largest useful value for the preceding modifier. Larger values will be ignored in the score calculation, allowing other specified modifiers to be boosted instead.
Note that the limit keywords won't quite work as expected for a modifier that you're trying to minimize.
If min or max is specified at the start of the expression, it applies to the total score (the sum of each modifier value times its weight). A global max may allow equipment maximization to finish faster, since no further combinations will be considered once the specified value is reached.+
The preference maximizerCombinationLimit (set with set maximizerCombinationLimit = 100000 in CLi) constrains the number of combinations Maximizer will consider. Depending where it is set, this may mean you don't get the best combination, but you may well get a good enough one faster. Depending which equipment you can use, you may find a higher value than 100000 is needed.

Other Modifiers

Boolean modifiers can also be used as keywords. With positive weight, the modifier is required to be true; with negative weight, it is required to be false. There is one shortcut available: sea requires both Adventure Underwater and Underwater Familiar to be true.

The only bitmap modifiers that currently appear useful for maximization are Clownosity and Raveosity, so they are allowed as a special case. The weight specifies the required minimum value; only one value is actually meaningful for each keyword, so 4 clownosity and 7 raveosity are the only useful forms.

String modifiers are not currently meaningful for maximization.

The 'Bees Hate You' challenge path adds a beeosity keyword, which specifies the maximum number of 'B's allowed in the names of your equipment items (each of which causes 10% of your maximum HP in damage at the start of every combat). The default is 2 at the moment. The value you specify will automatically be increased if you use a +equip or +outfit keyword (described below) that requires more 'B's to satisfy.

Some extra provided keywords are useful in PvP minigames. number increases score by the number of numbers in a piece of equipment's name. letter increases score by the number of letters in the name, and letter X can be used to count the number of Xs.

Equipment

Slot names can be used as keywords:
hat, weapon, offhand, shirt, pants, acc1, acc2, acc3, familiar (stickers and fake hands are not currently planned.)
With positive weights, only the specified slots will be considered for maximization. With negative weights, all but the specified slots will be considered.
empty – With positive weight, consider only slots that are currently empty; with negative weight, only those that aren't empty. Either way, +slot and -slot can be used to further refine the selected slots.
handed – With a weight of 1, only 1-handed weapons will be considered. With a larger weight, only weapons with at least that handedness will be considered.
melee – With positive weight, only melee weapons will be considered. With negative weight, only ranged weapons will be considered.
effective – With positive weight, if muscle higher than moxie, only melee weapons are considered, if moxie higher or equal to muscle, ranged weapons (and knives with Tricky Knifework known) are considered.
type text – Only weapons with a type containing text are considered; for example, type club if you plan to do some Seal Clubbing.
shield – With positive weight, only shields will be considered for your off-hand. Implies 1 handed.
club – With positive weight, only clubs will be considered for your main-hand.
sword – With positive weight, only swords will be considered for your main-hand.
shield – With positive weight, only shields will be considered for your off-hand. Implies 1 handed.
utensil – With positive weight, only utensils will be considered for your main-hand.
knife – With positive weight, only knives will be considered for your main-hand.
accordion – With positive weight, only accordions will be considered for your main-hand.
current – By default Maximizer considers your current equipment in Hardcore and Ronin. With -current keyword it does not, with +current keyword in aftercore it forces it to be considered. Not considering current equipment will reduce the number of combinations considered, but will sometimes mean changes of equipment are suggested even though they don't improve what you are wearing.
equip item – The specified item is required (positive weight) or forbidden (negative weight). Multiple uses of +equip require all of the items to be equipped.
bonus item – The specified item is given a bonus to its score equivalent to weight.
outfit name – The specified standard outfit is required or forbidden. If the name is omitted, the currently equipped outfit is used. Multiple uses of +outfit are satisfied by any one of the outfits (since you can't be wearing more than one at a time).
pirate – With positive weight, wear either Swashbuckling outfit or Pirate Fledges.
plumber – If a plumber, require a plumber-specific weapon to be equipped (required to adventure).
cold plumber – If a plumber, require a plumber-specific weapon that can deal cold damage to be equipped. Useful for getting Blech House.
If both +equip and +outfit are used together, either one will satisfy the condition – all of the items, or one of the outfits. This special case is needed to be able to specify the conditions for adventuring in the Pirate Cove.
tiebreaker – With negative weight, disables the use of a tiebreaker function that tries to choose equipment with generally beneficial attributes, even if not explicitly requested. There are only a few cases where this would be desirable: maximizing +combat or -combat (since there's usually only one item that can help), adv and/or PvP fights at rollover, and familiar weight when facing the Naughty Sorceress familiars.

Familiars

By default, the Modifier Maximizer does not recommend familiars, since there are many possible factors in choosing one beyond those that can be expressed via modifiers. However, you can request that specific familiars be compared with your current one:
switch familiar – With positive weight, the familiar is added to the list to be considered (unless the player lacks that familiar, or is already using it, in which case there is no effect). With negative weight, the familiar is added to the list only if the player lacks the previously specified familiar. For example, switch hobo monkey, -switch leprechaun will only consider the leprechaun if the player doesn't have the monkey.

Assumptions

All suggestions are based on the assumption that you will be adventuring in the currently selected location, with all your current effects, prior to the next rollover (since some things depend on the moon phases). For best results, make sure the proper location is selected before maximizing. This is especially true in The Sea and clan dungeons, which have many location-specific modifiers.

Among effects, stat equalizer potions have a major effect on the suggested boosts, since they change the relative importance of additive and percentage stat boosts. Likewise, elemental phials make certain resistance boosts pointless. If you plan to use an equalizer or phial while adventuring, please use them first so that the suggestions take them into account.

GUI Use

If the Max Price field is zero or blank, the limit will be the smaller of your available meat, or your autoBuyPriceLimit (default 20,000). The other options should be self-explanatory.

Prices are based on the mall price database, so if the price has been looked up in the last 7 days that value is used, otherwise the current mall price is queried. If preference maximizerCurrentMallPrices is set to true the current mall price is always queried, this will be much slower and cause many more server hits.

You can select multiple boosts, and the title of the list will indicate the net effect of applying them all – note that this isn't always just the sum of their individual effects.

CLI Use

The Modifier Maximizer can be invoked from the gCLI or a script via maximize expression, and will behave as if you'd selected Equipment: on-hand only, Max Price: don't check, and turned off the Include option. The best equipment will automatically be equipped (unless you invoked the command as maximize? expression), but you'll still need to visit the GUI to apply effect boosts – there are too many factors in choosing between the available boosts for that to be safely automated. An error will be generated if the equipment changes weren't sufficient to fulfill all min keywords in the expression.

Limitations & Bugs

This is still a work-in-progress, so don't expect everything to work perfectly at the moment. However, here are some details that are especially broken:

  • Items that can be installed at your campground for a bonus (such as Hobopolis bedding) aren't considered.
  • Your song limit isn't considered when recommending buffs, nor are any daily casting limits.
  • Mutually exclusive effects aren't handled properly.
  • Weapon Damage, Ranged Damage, and Spell Damage are calculated assuming 100 points of base damage – in other words, additive and percentage boosts are considered to have exactly equal worth. It's possible that Weapon and Ranged damage might use a better estimate of the base damage in the future, but for Spell Damage, the proper base depends on which spell you end up using.
  • Effects which vary in power based on how many turns are left (love songs, Mallowed Out, etc.) are handled poorly. If you don't have the effect, they'll be suggested based on the results you'd get from having a single turn of it. If you have the effect already, extending it to raise the power won't even be considered. Similar problems occur with effects that are based on how full or drunk you currently are.

Useful Expressions

MP regen: .5 mp regen max, .5 mp regen min

Pirates: mainstat, +outfit swashbuckling

War: mainstat, +outfit frat warrior

Shieldbutting: muscle, +shield

More Information

Here is the expression used as tiebreaker:

"1 familiar weight, 1 familiar experience, 1 initiative, 5 exp, 1 item, 1 meat, 0.1 DA 1000 max, 1 DR, 0.5 all res, -10 mana cost, 1.0 mus, 0.5 mys, 1.0 mox, 1.5 mainstat, 1 HP, 1 MP, 1 weapon damage, 1 ranged damage, 1 spell damage, 1 cold damage, 1 hot damage, 1 sleaze damage, 1 spooky damage, 1 stench damage, 1 cold spell damage, 1 hot spell damage, 1 sleaze spell damage, 1 spooky spell damage, 1 stench spell damage, 1 critical, -1 fumble, 1 HP regen max, 3 MP regen max, 1 critical hit percent, 0.1 food drop, 0.1 booze drop, 0.1 hat drop, 0.1 weapon drop, 0.1 offhand drop, 0.1 shirt drop, 0.1 pants drop, 0.1 accessory drop, 1 DB combat damage";

See this thread for details.

See Also

Modifiers