ZLib -- Zarqon's useful function library

Thanks a ton for getting on it so quickly. And for maintaining mafia in general too, of course.

Heh, and clearly I hadn't paid close enough attention to the update logs, or I may have guessed better at what the issue might be.
 
I got a "Bad monster value: "the clownlord beelzebozo" (zlib.ash, line 708)" today, I assume because Veracity fixed the names in mafia's data files. I can fix it for myself easily enough, but I assume it is something that it'd be good to put in order in the script proper too :)
this has showed me just how many scripts include zlib. New life, OCD inventory manager, ezandora's guide, ezandora's bastille battallion...
Well... it's because I changed monster names to be case sensitive in ASH. Just like items, effects, etc.
However, unlike those latter ones, there's no code, yet, to be case-tolerant and give "friendly warnings" rather than errors.
I'll do that, eventually.
This just reminded me...
I genuinely forgot that the daily build is just that. And that it is OK to actually use a version from 2 days ago while stuff is being worked on.
 
I'll stick this here. Batfactors, which I do not care to understand how to edit and upload, possibly has bad data. zLib complains and thus WHAM aborts. One of the Latte skills has "maxmp*0.5" which zlib does not understand. I don't know whether this is a batfactors error or there is a zlib upgrade that needs to be released.

:-)

Expression syntax errors for 'modifier_eval()':
Can't understand maxmp*0.5 (zlib.ash, line 194)
at eval (zlib.ash:194)
at to_event (BatBrain.ash:290)
at add_skill (BatBrain.ash:1426)
at build_skillz (BatBrain.ash:1462)
at build_options (BatBrain.ash:1501)
at act (BatBrain.ash:2223)
at main (wham.ash:1415)
 
I'll stick this here. Batfactors, which I do not care to understand how to edit and upload, possibly has bad data. zLib complains and thus WHAM aborts. One of the Latte skills has "maxmp*0.5" which zlib does not understand. I don't know whether this is a batfactors error or there is a zlib upgrade that needs to be released.

:-)

My up to date BatFactors.ash has a
Code:
fvars["maxhp"] = my_maxhp();
, but no equivalent line for MP. Also, batfactors.txt is messing right now:
Code:
skill	7302	Offer Latte to Opponent	0	0	once, custom attract, !! usable 1/refill
skill	7302	Offer Latte to Opponent	0	-maxhp*0.5	once, custom, mp maxmp*0.5, !! usable 1/refill
 
Ha, I updated batfactors and then started writing the commit notes for BatBrain r123 when I got distracted and ended up going to the gym. Note to self: don't allow partial updates to sit for more than a few hours, no matter how you think the time difference means no one will be playing now.
 
Getting this error tonight : Unexpected error, debug log printed.
Script execution aborted (java.lang.NullPointerException): (zlib.ash, line 316)
Unexpected error, debug log printed.

Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
at java.base/java.io.ByteArrayInputStream.<init>(Unknown Source)
at net.sourceforge.kolmafia.textui.DataFileCache.getReader(DataFileCache.java:193)
at net.sourceforge.kolmafia.textui.RuntimeLibrary.file_to_map(RuntimeLibrary.java:7341)
at net.sourceforge.kolmafia.textui.RuntimeLibrary.file_to_map(RuntimeLibrary.java:7332)
at jdk.internal.reflect.GeneratedMethodAccessor189.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/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:154)
at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:417)
at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:393)
at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:341)
at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:334)
at net.sourceforge.kolmafia.request.FightRequest.nextRound(FightRequest.java:1041)
at net.sourceforge.kolmafia.request.FightRequest.runOnce(FightRequest.java:1945)
at net.sourceforge.kolmafia.request.FightRequest.run(FightRequest.java:2007)
at net.sourceforge.kolmafia.request.FightRequest.run(FightRequest.java:1978)
at net.sourceforge.kolmafia.webui.RelayAutoCombatThread.run(RelayAutoCombatThread.java:76)

Current Mafia Build
 
Tried connecting from Minnesota and had the same error as yesterday. But connecting through my VPN through Iceland worked. I'll blame Comcast.
 
While UR, via zlib, was able to download recoveryScript_map_v2.txt today EatDrink is fails to consume anything declaring that nothing is good enough. No attempt was made to download the EatDrink map files. Bales OCD Inventory script is failing to recognize a perfectly good data file

All of these worked prior to whatever happened over the last day or so.

I still get a blank page when I visit "https://zachbardon.com/mafiatools/autoupdate.php?f="+fname+"&act=getver" while "https://zachbardon.com/mafiatools/autoupdate.php" loads just fine.

Any suggestions on what I should do to "reset" things?
 
Last edited:
zlib is passed "fname". The local file it tries to access is fname+".txt".

The visit URL parameter is "https://zachbardon.com/mafiatools/autoupdate.php?f="+fname+"&act=getver" so the server is going to append the ".txt".

It has successfully checked and updated several files for me already today so I maintain "works for me". I did have to remember to undo my script changes from yesterday that worked around this and I deleted the data file zversions.txt so that it would check and reload anything.
 
Back
Top