Vhaeraun's Glorious PVP Bookkeeper

Crowther

Active member
I'm missing a few minis on my tally this season. Specifically, "Garrrgle Blaster Collector", "Karrrmic Battle", "Moarrr Booze!", "Pirate Warrrs!", and "Searrrching for Booty". I tried updating from 1.4 to 1.8, but they are still missing. Skimming the code, I don't see any obvious reason for this. Are other people using this script successfully?
 

Crowther

Active member
Oh, right. I heard about this KoL "bug". The names above are from the info booth. In the PvP archives they are called, "Gargle Blaster Collector", "Karmic Battle", "Moar Booze!", "Pirate Wars!". That should be easy enough to deal with.
 

Crowther

Active member
As simple as removing the extra r's in the right place. Arrr!
Code:
***************
*** 56,61 ****
--- 56,64 ----
        int index=2;
        while(contestMatcher.find()){
                string roundText = group(contestMatcher,1);
+               if (roundText != "Purrrity") {
+                   roundText = replace_string(roundText, "rrr", "r");
+               }
                TitleIndex[index]=roundText;
                index=1+index;
        }
However, you'll want to delete your season 15 cache after making this change if you want to see accurate results.
 

Veracity

Developer
Staff member
This script has a few issues due to the change in case-sensitive equality in recent versions of KoLmafia. For example, there are various places in the code where it did things like:

Code:
	if(to_lower_case(attacker) == myName){
... which will no longer work if myName was not all lower case to start with. You either need to apply to_lower_case to BOTH sides or just use the new "approximately equal" operator. Thusly:

Code:
	if(attacker≈myName){

I attach a version of vgpb.ash with appropriate changes. You'll need to delete your season 21 cache and rerun it to see better results.
 

Attachments

  • vgpb.ash
    15 KB · Views: 135

antimarty

Member
This script doesn't work for me anymore (with mafia version 17185 that fixes the cookie issue) - I start it from the script menu in the relay browser and nothing happens except that mafia starts using up a lot of cpu.

I can continue on with other things in mafia, which works fine, but the cpu usage stays high until I exit.
 

Veracity

Developer
Staff member
Yeah. Something is odd. I see the same thing with the the fork of this that I use. Posting in the cookie thread...
 

jeff

Member
Hey guys, I can't seem to get season 28's Holiday Shopping to come up for me.

0ArvLk2.png

How can I make this work?

0ArvLk2.png


Cheers
 

Croft

Member
Hey guys, I can't seem to get season 28's Holiday Shopping to come up for me.

How can I make this work?

Cheers

I just installed it (relay_* from first post, vgpb.ash from some posts above by Veracity) and it runs without problems showing Holiday Shopping for me.
Which vgpb.ash did you use?

Code:
Displaying results from the last 1000 fights.
Name	Total	Offense	Defense
	Times
Occured	Ratio	%	Times
Occured	Ratio	%	Times
Occured	Ratio	%
All Bundled Up	887	671:216	75%	672	640:32	95%	215	31:184	14%
Biggest Fruitcake	549	191:358	34%	368	118:250	32%	181	73:108	40%
Checking It Twice	554	463:91	83%	363	319:44	87%	191	144:47	75%
Conservational Yule	572	252:320	44%	379	147:232	38%	193	105:88	54%
Creative Holiday Feasting	569	259:310	45%	375	177:198	47%	194	82:112	42%
Hibernation Preparation	559	202:357	36%	346	139:207	40%	213	63:150	29%
Holiday Shopping	551	304:247	55%	373	159:214	42%	178	145:33	81%
Holiday Spirit(s)!	571	388:183	67%	374	338:36	90%	197	50:147	25%
Nog Lover 	537	253:284	47%	376	182:194	48%	161	71:90	44%
Peace on Earth	543	184:359	33%	344	123:221	35%	199	61:138	30%
Spirit of Gnoel	544	267:277	49%	367	167:200	45%	177	100:77	56%
Spirit of Noel	564	355:209	62%	367	281:86	76%	197	74:123	37%
Whole Fights	1000	550:450	55%	672	409:263	60%	328	141:187	42%
 
Last edited:
I just ran into the same problem: after using the script for a week or 2, it just stopped showing Spirit of Gnoel for me.

Edit: with the relay version from the OP and the vgpb.ash from Veracity
 
Last edited:
Veracity's 2015-09-05 version is detecting Thirrrsty for Booze for me, but it's miscalculating my Whole Fights win:loss ratio, showing almost 100% losses, which isn't accurate. I haven't gone through to count whether it's miscalculating any minis. That's true even after deleting my fight cache (assuming that's data\[playername]_pvp_season_31.dat) and re-running the script.
 
Last edited:

drakono82

New member
Veracity's 2015-09-05 version is detecting Thirrrsty for Booze for me, but it's miscalculating my Whole Fights win:loss ratio, showing almost 100% losses, which isn't accurate. I haven't gone through to count whether it's miscalculating any minis. That's true even after deleting my fight cache (assuming that's data\[playername]_pvp_season_31.dat) and re-running the script.

I'm having the same issue. The reason is that it only counts a win if you win 4 or more minis, which hasn't been accurate for ages. I've added another regex to detect the reported winner for each fite, so the script doesn't have to track wins/losses/ties and do the math. Here's my version, which seems to be working right on non-compact mode.

However, Veracity's version was not detecting Thirsty for Booze for me. I added the 'rrr' to 'r' replacement in the lookup function, and that seems to fix it. I also made the script print summary lines for minis that did not occur/were not detected, which should make it more obvious when a mini breaks, rather than it just not appearing.

Compact mode is breaking the Scurvy Challenge mini for me, since the regex is looking for a bolded winner, and I'm seeing no bold text, with the loser's name. I don't know how to rectify this without a bigger overhaul of the script. Maybe one of the more experienced scripters can address this?
 

Attachments

  • vgpb.ash
    15.8 KB · Views: 50
Getting this with the newest version of mafia when running from the Relay browser

Detected that settings are marked for compact mode
0: Bilge Hunter
1: Death to Ninja!
2: Karmic Battle
3: Letter of the Moment
4: Liver of the Damned
5: Most Murderous
6: Pirate Wars!
7: Purrrity
8: Scurvy Challenge
9: Smellin' Like a Stinkin' Rose
10: Thirsty for Booze
Unexpected error, debug log printed.
Script execution aborted (java.lang.NullPointerException): (vgpb.ash, line 396)
 

Veracity

Developer
Staff member
"The newest version" means what, exactly? Version number, please?
For that matter, DEBUG log, please?
Thanks.
 
17.6 r18053 with the vgpb.ash from drakono82 from 4 posts earlier, I get the same message.
The script successfully searched for recent pvp fights not indexed yet, it breaks afterwards. (Running the relay script, the page stays blank, and running vgpb.ash directly it crashes, both times displaying the NPE in the cli as described by txrangersxx)

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Wed May 24 09:10:48 CEST 2017
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.textui.parsetree.RecordValue.dumpValue(RecordValue.java:196)
	at net.sourceforge.kolmafia.textui.parsetree.RecordValue.dump(RecordValue.java:181)
	at net.sourceforge.kolmafia.textui.parsetree.CompositeValue.dump(CompositeValue.java:119)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.map_to_file(RuntimeLibrary.java:7179)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.map_to_file(RuntimeLibrary.java:7167)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:104)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:151)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:417)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:142)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:151)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:417)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:142)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:151)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:417)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:142)
	at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:401)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:325)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:318)
	at net.sourceforge.kolmafia.textui.command.CallScriptCommand.call(CallScriptCommand.java:256)
	at net.sourceforge.kolmafia.textui.command.CallScriptCommand.run(CallScriptCommand.java:75)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:596)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:549)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:450)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:318)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:187)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:163)
 
Ah, yes, it's working in r18059. Sorry for the confusion. I had been in HC (with stone unbroken) for a few days, so hadn't been PvPing, and just assumed that you hadn't had a chance to implement a fix yet, since I didn't see an update in this thread. Thanks again!
 
Top