Maximize.ash, maximize equipment in one command.

Status
Not open for further replies.

Paragon

Member
Please note that this script is now depreciated. Users are encouraged to use equipt, written by DerDrongo.

NEW IMPROVED VERSION 3.0!
script: maximize.ash:
files: 5 ash scripts, 1 folder - (Creates 3 text files.)
[current version: 3.0]
KolMafia ver: Daily build 28Feb08 (or later? or earlier?)
Known bugs: 5th post down
Functionality or improvment requests: 6th post down

Overview:
One Command to maximize the potential in your equipment. Maximize.ash can equip you with the BEST set of equipment you own for almost any type of modifier available to kingdom of loathing. Muscle, moxie, inititive, overall elemental resistance, specific elemental resistance, melee damage, etc.

Some where along the way intrisic effects and outfits got fubared.This should work with the latest daily build 28Feb08.

FEATURES:
Supports items with percentage increases (such as stainless steel slacks).
Supports intrinsic effects (such as 1337 trousers)
Supports Shirts when available.
Supports Two fisted turtle bashing when available.
Supports Class specific items (such as bjorn's hammer)
Supports Talisman of baio and the jeklinhide belt.
Supports single equip items. (such ash the bejewled pledge pin)
Supports updates via over ridden data files.

New in ver 2.0:
Three new modes of maximizing to work around you custom equipment needs.
Automaticlly alerts user to updates in the script via degrassi's versioning script.

New in ver 2.3:
items drop increase is re-enabled
Verbose mode switch added. -v0, -v1, -v2, and -v3: 0 is quiet, 1 is default, 2 is verbose, 3 is super verbose.
Run time *should* be quicker.

New in ver 3.0
using "all" as the attribute to maximize will maximimze your resistence to all elements (using resiste all items).

No Overwrite mode: The new no overwrite mode will only put equipment on slots that do not already have anything equipped. No overwrite mode is entered with the "-no" or "-no overwrite" switch. Example: "call maximize.ash muscle -no" Result: only unequiped slots will be equipped.

Include mode: Maximize.ash will only replace equipment listed as included. Maximize will not consider outfits that require a particular item in an unlisted slot, but it will utilize any outfits that can be worn without modifying unlisted equipment slots. Include Mode is entered with the -i or -include switch followed by a space deliminated list of included slots. Available slots are hat, pants, shirt, weapon, off-hand, acc1, acc2 and acc3. Example: "call maximize.ash muscle -i hat pants acc1" Result: Only the hat, pants, and acc1 slots will be modified.

Exclude mode: Maximize.ash will replace all equipment except for equipment in slots listed as excluded. Maximize will not consider outfits that require an item in an excluded slot, but will utilize any outfits that can be worn without modifiying the excluded slots. Exclude mode is entered with the -e or -exlclude switch followed by a space deliminated list of exlucded slots. Available slots are hat, pants, shirt, weapon, off-hand, acc1, acc2, and acc3. Example: "call maximize.ash muscle -e weapon off-hand" Result: Everything but the weapon and off-hand item will be replaced.

Please note that if the weapon slot is set to be left unmodified and it is a two handed weapon then the off-hand slot will not be modified either, for obvious reasons. Similarly if the off-hand item is set to be left unmodified then maximize will not select a two-handed weapon.


Doesn't yet support Grimicite items.
Doesn't yet support tuesday's ruby.
Both these items should be supported in the next release.

INSTALLATION:
Simply unzip the attached zip into your script directory. The directory structure is already in place.

UPDATES:
There are two types of updates, script updates and data updates. Data updates occur when new items are introduced into the kingdom of loathing. To implement this type of update simply download the newest data files for kolmafia and use the command "call maximize.ash update". It may be required that you remove the first line from modifiers.txt, outfits.txt, and/or equipment.txt (These three files will be in your kolmafia data directory after using the kolmafia cli command "update".

Script udates occur when I create a new version of the maximize.ash script. Generally I will only update to introduce new features or fix bugs. If you are not having any trouble with your version of maximize.ash and are not interested in new features then these are not required. To complete this type of update simply redownload the attached zip file and overwrite all the old files.


Please alert me to any bugs that you find with this ver. of maximize.ash
 

Attachments

  • Maximize.zip
    29.4 KB · Views: 648
Last edited:

dangerpin

Member
Wow!

Thank you for all your work, your modifiers.txt looks extremely complete and I know personally how much work it can be to enter in that amount of information. I look forward to getting my main past the NS so I can test this out on a basement run in the very near future.

Ooooh! It has plus monster level!!!
 

dangerpin

Member
Thanks again for this script, I have noticed a few small issues with it. When you try to maximize HP it will try to equip multiple of some items that you can only use one of at a time, like the bejeweled pledge pin. Also I often end up with the bejeweled accordion strap equipped instead. Also, it will attempt to equip Bjorn's Hammer to maximize muscle even when not a muscle class, where you will get no bonus, instead of the pygmy spear where you have no stainless steel shillelagh. (Yeah, I know. This is my wife's character that has never ascended as anything but Myst class.)

Lastly, it seems to abort if you don't have the ability to wear shirts.

Even with these minor issues, it has helped me knock out a few of the more difficult Basement gauntlet adventures. Thank you!
 

Rinn

Developer
It tried to equip a bottle rocket crossbow and a duck on a string when I maximized items.

> maximize item

Finding best outfit for item
Equipping:
__________
Hat: miner's helmet(0)
Shirt: flaming pink shirt(0)
Pants: plexiglass pants(0)
Weapon: bottle-rocket crossbow(0)
OffHand: duck-on-a-string(0)
ACC1: Order of the Silver Wossname(0)
Acc2: Red Balloon of Valor(0)
Acc3: Baron Von Ratsworth's monocle(0)
Mod:
__________
 

dangerpin

Member
Sounds like a perfectly good combination, bummer that you can't use ranged and melee weapons simultaneously.
 

Paragon

Member
Thank you for the feed back, i had been unable to fully test the script myself as of yet and this is all very helpful to make it more functional.

No bugs currently reported with ver. 2.0
 

Paragon

Member
Current list of requested improvments and functionality:

1) Show a list of all potential attributes that can be maximized.
Example: typing "maximize list" to list moxie, muscle, adventures, stench resistence, etc.
Status: Not started.
Comments: I want to finish fixing the bugs before I work on this.
Requested: Paragon99
 
Excellent work. I'd written my own script along these lines, but this seems to do everything mine does and more.

[quote author=Paragon link=topic=1410.msg6540#msg6540 date=1199521395]
6) Items that dependent on time are not used.
Example: Grimicite items, tuesday's ruby
Status: Semi-bug; Implementation was not supported on original release (but i hope to eventully fix that.)
Progress: Talisman of Baio and Jekyllin hide belt have been implemented.
Further information requested: None in the way of bug information, scripting information could be useful though if anyone knows how to determine the grimicite light information or the current day of the week.
[/quote]

I believe Mafia's internal numeric_modifier() functions take these things into account already. Testing it out, a Tuesday's ruby shows 3 min regen and no item drop, and a Grimacite garter shows +20% mysticality, which match today's values. You can use this to get the modifier directly rather than calculate it from the date/moons.
 

Veracity

Developer
Staff member
That's correct.

It appears that you created modifiers.txt out of KoLmafia's own version, reformatting according to your needs.
That's fine; I have no problem with that.

But, another approach might have been this: rather than having your own files, parallel to KoLmafia's equipment.txt and modifiers.txt, which contain data for all items - including ones not in inventory, which you therefore can't equip, anyway - and which can get out of date, perhaps you could query KoLmafia for the data you need for specifically the equipment you have in inventory. Something like "foreach item in inventory get_modifiers(item)", where "get_modifiers" would create a record, query KoLmafia for each modifier of interest, and store the record in a map, indexed by the item.

Although, come to think of it, ASH doesn't currently give you such easy access to your inventory, does it?

Well, regardless: you can get the current modifiers for Tuesday's ruby, Grimacite, Baios, Jekyllin Hide belt, etc. right from KoLmafia without needing to know anything about the moons or actual day of the week.
 

Paragon

Member
Oh man... Lol, well, with that knowledge... i guess about... 75-80 percent of my code is reinventing the wheel... I had seen those numeric modifier functions but I couldn't figure out how they were supposed to work.

Oh well... it was definitly good for getting me used to ash. Time for a rewrite i guess. Hehe

Anyway could someone please help me out with the usage of numeric_modifier the only thing it returns for me is 0.0, I can't seem to figure out what the string is supposed to be. and i can't seem to find any documentation on it either.
 

Paragon

Member
Thanks for the info on numeric modifiers and such. Due to the fact that no matter what I would still need something along the lines of the extra files I have and that I have already written the code I have decided to not rewrite the script. The only way to get rid of those extra files would be to create a similar map file every time the script ran, and because there are over 4000 items which you can't determine which ones are hats, which ones are pants, which ones are combat items, which ones are booze, etc... it would be alot faster just to leave the extra files as they are. I could probably use numeric modifiers to make the part that looks up the modifers work diffrently, but i already have it written this way... and I kind of like the fuzzy matching it does rather that forcing the user to enter the exact phrase to look for... there are some trade offs either way, my way makes a few of the modifiers harder to access while using numeric modifer makes some modifiers impossible to achieve (such as maximizing resistance in general rather then against a particular element.)
 

dangerpin

Member
Though there are times when maximizing vs elemental in general would be more beneficial than maximizing vs a specific element. I love using this script in my Basement runs, but wish it would allow an overall choice of best overall elemental against say...Lord Spookyraven.
 

Crowther

Active member
Pretty cool. It was great fun to see what my best stat outfits looked like. They've changed much since the days when I used to PvP at the end of every run.

Item drop didn't seem to work for me. It didn't find any accessories. Meat drop worked fine, so I think I'm using the script right. On a more minor note, the output uses both "Acc" and "ACC" (yes, I nuts that things like that bother me).

I'm confused about why it's so slow. It doesn't seem to be doing anything.

It could be truly amazing if you followed Veracity's suggestions and used the data built into mafia.

Anyway, great script!
 

Paragon

Member
Wow, you are right... it is working amazingly slow for some reason... i guess I had been working on it so much that I didn't even notice... I can probably fix that up something quick. Anyway, about following veracities suggestion... Her(?) suggestion was to use the data built in directly rather then reformatting the built in data and using it through other files. Those files are built using the built in data which means that technically the data is redundant, however since the built in data is not formatted in a way that allows me to use it the way that I need it, creating my own version of the data allows the script to run faster (if it were running the way that it should). Also, using the built in functions to use the data directly would not return the correct modifiers for items with intrinsic effects.

Thanks for bringing up the running slow thing... I will have to look into that, there is no reason that i can think of that it should run slowly like that, however if you run the program without any of the data files that it creates it will take a bit of time to build them the first time you run it.
 

Crowther

Active member
I thought the slow part was pretty strange, since it's not using any CPU or any other resource as far as I can tell. I didn't realize the built in mafia calls for item effects had problems. Oh well. One of these weekends I'll probably basement dive and this script will help lots. Thanks again.
 

dangerpin

Member
[quote author=Paragon link=topic=1410.msg7218#msg7218 date=1203143832]
... Her(?) [/quote]

Yes, Her.

And also, Yay, new version!
 

dangerpin

Member
And pardon the double post but, thank you for the updated version. For some reason I didn't see that the thread had been updated, but I did get the notice from the program itself. Yay!
 

kain

Member
I'm not seeing an attached zip file? I thought I saw it a couple of days ago, but I'm not seeing it today ...
 
Status
Not open for further replies.
Top