Fork²~ UberPvPOptimizer - an updated PVPBestGear

TheUberFerret

New member
This script is an ongoing efforts to update zekaonar's script found at http://kolmafia.us/showthread.php?15347-Best-PVP-Gear-optimizes-balances-for-8-mini-games it is very much a work in progress but I'll be working on it semi regularly in the near future as I've received permission to use it for a University class project.

This script will help you optimize your gear for the PVP mini-games: Laconic Dresser, Verbosity Demonstration,
Showing Initiative, The Egg Hunt, Meat Lover, Broad Resistance Contest, Lightest Load, and Letter of the Moment. There
are options to buy cheap(configurable, default 1k) mall gear that is better than what you have, and give a comprehensive list of the best gear
in-game with wiki links to research how to acquire it. The script will check which mini-games are active and will
retrieve the letter of the moment on each run.

Inherited Features:
Auto determine current mini-games and letter of the moment
Configurable weighting to optimize for particular mini-games
Dual wielding 1-handers with Double-Fisted Skull Smashing
New features vs the Old PVPBestGear:
  • Update via SVN
  • Saved settings (because of SVN updates)
  • all current minis that gear can modify

I also optimized a number of things but if you were already using my previous modification to the script those won't be new.

REMOVED FEATURES
  • Crown of Thrones
  • Buddy Bjorn

For an indepth look at how the script works see Zekaonar's previous thread or this one if/when I get around to it.



Code:
svn checkout https://svn.code.sf.net/p/uberpvpoptimizer/svn/

Post Update 10/7/2016
Realized I somehow forgot to mention that digitrev has taken over for me and been given full access to the repository.
At some point in the recent (read 2 months) he added preliminary support for familiars.
Special thanks to Bale for some optimization code.


Update 11/7/2015 r??
Added Early Shopper

Update 7/1/2015 r:35
Season 20 implemented

Update 5/4/2015 r:32
Barely Dressed now added successfully
 
Last edited:

Darzil

Developer
Nice to take it on, hopefully you'll be able to read the current games from mafia soon with Veracity's work to support the new system.

Line 91 has a missing ";".
 

TheUberFerret

New member
Barely Dressed is now implemented and tested, the semicolon on line 91 is long fixed. I'm still trying to figure out a good default weight for Nudity vs equipment.
 

TheUberFerret

New member
Too lazy to actually update with my promised feature. I'm not playing KOL currently. I did log in long enough to ensure it works for PVP Season 20 though.
 

TheUberFerret

New member
Early Shopper for this season is copied from other show init it may display wrong but it should work the same.

Early Shopper has been added.
 

digitrev

Member
I've included a patch for Season 23.

Edit: new patch as of 2016 01 02 / 13:06 UTC-5

Added the actual file for folks.
 

Attachments

  • UberPvPOptimizer.ash
    30.5 KB · Views: 114
  • UberPvPOptimizer.ash.patch
    4.4 KB · Views: 84
Last edited:

TheUberFerret

New member
I've included a patch for Season 23.

Edit: new patch as of 2016 01 02 / 13:06 UTC-5

Added the actual file for folks.

Thanks for keeping it updated.
I've pushed your changes to the main branch.
You're now an admin to the project have fun :p
 
Last edited:

Bale

Minion
Bug report.

I've noticed that it decides my cap gun is best for main hand and off-hand (since I have the skill to be ambidextrous), but I only have one cap gun. It doesn't choose a second best off-hand to use as a result of quantity. This causes my off-hand to be empty.
 

digitrev

Member
I've done a few things:
  1. The script uses zlib instead of a raw data file. This will make it easier to users to edit existing settings, and for maintainers to add new settings. Caveat: this will ignore the settings you've set in data/pvpGearProperites.txt. If you want to copy them over, just type zlib PvP_propertyName = value, or use WOSSMAN to change them.
  2. As a result of this, the script should now properly account for dressed to the 9s.
  3. Similarly, it should properly evaluate the damage of your off-hand equipment in conjunction with your main-hand. This should fix the bug Bale posted above. If it doesn't, please let me know.
Just update & let me know if there are any problems.
 

Bale

Minion
Woooo!

Thanks for all of that. I actually had trouble with number 1 the other day and had to figure out how it worked.
 
Bug report:

1. It succesfully recognized that I can dual wield, but it will still recommends a 5-ball over a Carpathian Longsword
and more importantly, and confusingly:
2. It only recognizes capital versions of whatever the spirit letter of the day is. Currently the letter of the day is F, it counts wings of fire as having 0, Pendant of Fire as having 1, and the Pine-Fresh air freshener and tiny plastic Lord Flameface both as having only 1 'F' (because the other is an 'f' and thus not counted).

Oh, and it's currently not recommending a familiar (equipment), which won't matter for any actual enchantments (except for the disembodied hand), but can still help for things like the spirit day and last seasons numbers count. Massive thanks for this script though, it's making it so much easier to deal with the hassle of a daily changing mini, without having to search through my whole inventory for nicely lettered items every day.
 
Last edited:

Bale

Minion
2. It only recognizes capital versions of whatever the spirit letter of the day is. Currently the letter of the day is F, it counts wings of fire as having 0, Pendant of Fire as having 1, and the Pine-Fresh air freshener and tiny plastic Lord Flameface both as having only 1 'F' (because the other is an 'f' and thus not counted).

About half a year ago, there was a mafia change to improve string comparison. The upshot is that previously mafia evaluated ("F" == "f") as true. Now it is false. This script clearly needs to be updated with to_upper_case() on string comparisons to eliminate the capitalization error.

I think all that is needed is changing line 140 to
Code:
		if (char_at(output,i).to_upper_case()==letter) lettersCounted+=1;
 

Veracity

Developer
Staff member
Or you could use:

Code:
		if (char_at(output,i)≈letter) lettersCounted+=1;
Although I'm probably the only one who thinks that is cool.

Code:
[color=green]> ash ( "a" == "A" )[/color]

Returned: false

[color=green]> ash ( "a" ≈ "A" )[/color]

Returned: true
On my Mac, ≈ is option-x.
 
Yeah, this Bale's suggestion does indeed fix it. And it's now actually suggesting weaponry for my off-hand, but since it's trying really hard to equip any sort of chefstaff (after realizing I can't hold them in my mainhand), it gives up and decides to go with an empty off-hand.
 

Bale

Minion
Another suggestion for the author of this program, regarding chefstaves. Your function for isChefStaff is way too reliant on a hardcoded list and, it is missing many chefstaves. Fortunately this is easy to fix because mafia already possesses the information.

Code:
//Chefstaves require a skill to equip
boolean isChefStaff(item i) {
	return item_type(i) == "chefstaff";
}

Unfortunately there is no logic to ensure that your offhand will not be a chefstaff if you equip the second best weapon. The fix for that is rather more complicated so I won't venture there.
 
Top