New Content - Implemented Two Crazy Random Summer

Crowther

Active member
I'm getting some odd behavior today. My edge case is I started the day out of ronin in tcrs.
Code:
> supercheap

Searching for "magicalness-in-a-can"...
Search complete.
Purchasing magicalness-in-a-can (2 @ 200)...
Unexpected error, debug log printed.
Script execution aborted (java.lang.ExceptionInInitializerError): (supercheap.ash, line 39)

> supercheap

Searching for "magicalness-in-a-can"...
Search complete.
Purchasing magicalness-in-a-can (2 @ 200)...
Unexpected error, debug log printed.
Script execution aborted (java.lang.NoClassDefFoundError: Could not initialize class net.sourceforge.kolmafia.persistence.TCRSDatabase): (supercheap.ash, line 39)

> supercheap

Using cached search results for magicalness-in-a-can...
Purchasing magicalness-in-a-can (2 @ 200)...
Unexpected error, debug log printed.
Script execution aborted (java.lang.NoClassDefFoundError: Could not initialize class net.sourceforge.kolmafia.persistence.TCRSDatabase): (supercheap.ash, line 39)
All the tcrs commands seem to hang. They worked fine yesterday.
 
I noticed something weird today: on login, mafia checks the micromicrobrewery offer for the day (maybe only the first login of the day), which today happens to be bottles of whiskey. However, it seems to do so before realising you are in 2CRS and adjusting accordingly, so it found a new item:
Code:
--------------------
328	tolerable bottle of whiskey	789501042	bottle.gif	drink	t,d	35	bottles of whiskey
tolerable bottle of whiskey	4	1	good	0	0	0	0	Unspaded
# Item tolerable bottle of whiskey
--------------------
This wouldn't be too bad, but apparently the new item detection functions in such a way that it overrides the item that was already at that ID, so when I ran sl_ascend it started printing warnings about an unknown item: bottle of whiskey.
I'm not sure how or why this is happening, and I don't think it actually broke anything, but it does seem undesirable, so I figured I might as well point it out, since it might be a while until another booze commonly coded into scripts shows up in the microbrewery.

Oh yeah, and I remembered to grab the cafe info before I finished my run, so I included those.
 

Attachments

  • TCRS_Sauceror_Packrat_cafe_food.txt
    2.4 KB · Views: 12
  • TCRS_Sauceror_Packrat_cafe_booze.txt
    1.6 KB · Views: 11

Veracity

Developer
Staff member
Code:
> supercheap

Searching for "magicalness-in-a-can"...
Search complete.
Purchasing magicalness-in-a-can (2 @ 200)...
Unexpected error, debug log printed.
Script execution aborted (java.lang.ExceptionInInitializerError): (supercheap.ash, line 39)
.
I guess I'll make my own debug log.

I noticed something weird today: on login, mafia checks the micromicrobrewery offer for the day (maybe only the first login of the day), which today happens to be bottles of whiskey. However, it seems to do so before realising you are in 2CRS and adjusting accordingly, so it found a new item:
Perhaps the code which gets the special of the day is going by name, rather than by descid or item id or whataver else it can use.
I'll fix.

Thanks also for the cafe files!

I am also refactoring the code to fetch/load/derive/save to be two parts: regular items and cafe items. Had I included the cafe items when I first did this, we'd always have all three files, but now some people have only the non-cafe file, and will want to derive/save the cafe files.
 

Veracity

Developer
Staff member
Revision 19240 fixes the initialization error and adds "tcrs fetch CLASS, SIGN".
It also adds TCRS cafe files for Accordion Thief/Vole and Sauceror/Packrat.

It overwrites existing files. I' think I'mkae it not do that.
 

Veracity

Developer
Staff member
Ooooh. I like it.

I ascended aas a Sauceror/Blender.
KoLmafia went through the new ascension stuff until it was refreshing the session.

Code:
Local file TCRS_Sauceror_Blender.txt does not exist.
Fetched remote version of TCRS_Sauceror_Blender.txt from the repository.
File TCRS_Sauceror_Blender.txt is empty. Deleting.
Local file TCRS_Sauceror_Blender.txt does not exist.
It popped up a dialog box that said

"No TCRS data is available for Sauceror/Blender. Would you like to derive it? (This will take a long time, but you only have to do it once.)"

I clicked "Yes". It took a long time. Then:

Code:
Deriving TCRS item adjustments for all real items...
Done!
Wrote file TCRS_Sauceror_Blender.txt
Local file TCRS_Sauceror_Blender_cafe_booze.txt does not exist.
Local file TCRS_Sauceror_Blender_cafe_food.txt does not exist.
Fetched remote version of TCRS_Sauceror_Blender_cafe_booze.txt from the repository.
File TCRS_Sauceror_Blender_cafe_booze.txt is empty. Deleting.
Fetched remote version of TCRS_Sauceror_Blender_cafe_food.txt from the repository.
File TCRS_Sauceror_Blender_cafe_food.txt is empty. Deleting.
Local file TCRS_Sauceror_Blender_cafe_booze.txt does not exist.
Local file TCRS_Sauceror_Blender_cafe_food.txt does not exist.
It popped up a dialog box that said

"No TCRS cafe data is available for Sauceror/Blender. Would you like to derive it? (This will not take long, and you only have to do it once.)"

I clicked "Yes". It did not take long. Then:

Code:
Deriving TCRS item adjustments for all cafe booze items...
Done!
Deriving TCRS item adjustments for all cafe food items...
Done!
Wrote file TCRS_Sauceror_Blender_cafe_booze.txt
Wrote file TCRS_Sauceror_Blender_cafe_food.txt
And, Voila, I have

TCRS_Sauceror_Blendere.txt
TCRS_Sauceror_Blender_cafe_booze.txt
TCRS_Sauceror_Blender_cafe_food.txt

in my data directory.

I quit KoLmafia and restarted it. I logged in again. This time:

Code:
Local file TCRS_Sauceror_Blender.txt already exists.
Local file TCRS_Sauceror_Blender.txt already exists.
Using data override: data/TCRS_Sauceror_Blender.txt
Read file TCRS_Sauceror_Blender.txt
Local file TCRS_Sauceror_Blender_cafe_booze.txt already exists.
Local file TCRS_Sauceror_Blender_cafe_food.txt already exists.
Local file TCRS_Sauceror_Blender_cafe_booze.txt already exists.
Local file TCRS_Sauceror_Blender_cafe_food.txt already exists.
Using data override: data/TCRS_Sauceror_Blender_cafe_booze.txt
Read file TCRS_Sauceror_Blender_cafe_booze.txt
Using data override: data/TCRS_Sauceror_Blender_cafe_food.txt
Read file TCRS_Sauceror_Blender_cafe_food.txt
This looks like it's behaving exactly as I want it to behave.

Revision 19242
 

MCroft

Developer
Staff member
Got a debug log myself, due to errors.

Two things going on here:
1: load and derive didn't seem to work ("Wha?").
2: I put in "DB" instead of "Disco Bandit".

> help tcrs

tcrs fetch CLASS, SIGN | load | save | derive | check # | apply - handle item modifiers for Two Crazy Random Summer.

> tcrs load

Wha?

> tcrs load

Wha?

> tcrs derive

Wha?

> help tcrs

tcrs fetch CLASS, SIGN | load | save | derive | check # | apply - handle item modifiers for Two Crazy Random Summer.

> tcrs fetch DB, vole

Unexpected error, debug log printed.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
KoLmafia v18.11 r19244, Mac OS X, Java 10.0.1
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Timestamp: Sat Jun 01 23:10:02 CDT 2019
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
at java.base/java.io.File.<init>(File.java:359)
at net.sourceforge.kolmafia.persistence.TCRSDatabase.localFileExists(TCRSDatabase.java:557)
at net.sourceforge.kolmafia.persistence.TCRSDatabase.anyLocalFileExists(TCRSDatabase.java:549)
at net.sourceforge.kolmafia.textui.command.TCRSCommand.run(TCRSCommand.java:74)
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:199)
at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:168)
 

Veracity

Developer
Staff member
Fixed in revision 19245.

Code:
[color=green]> tcrs fetch DB, Vole[/color]

DB is not a valid class or Vole is not a valid sign.
I did not implememt abbreviations for classes or signs, but hopefully this is clearer than an Exception.

Also no more "Wha" for valid commands as documented...
 

Veracity

Developer
Staff member
I am out of time until next weekend. I see three important-ish things left to do:

1) We load up TCRS data for you at login (or ascension). So, what happens when KoL adds new items which are not in our saved data? Should be easy enough to handle: "derive" will only update items it does not already have stored. So, "load" + "derive" is essentially "update".

We should add an "update" (and "save" if necessary) step in part of our load sequence. We are certainly willing to update our data files if people keep sharing as new items are added. Regardless, an "update" step is not (for now) especially grievous. It will become more burdensome as hundreds and thousands of new items are added beyond our published data, but years from now, if you run TCRS out of Standard, you will wantt the new data.

2_ We need to implemt the "resetModifiers" method in TCRSDatabase. We call it when you free the king (to undo all the TCRS adjustments to items), but should probably do it .... somewhere .. when you log out (or when you log in without restarting KoLmafia, which I never do), so that the next character doesn't start out with munged items.

3) As part of "apply" (to be undone by "reset modifiers"), we need to replace all "gain_effect" methods for statuseffects that depend on "eat", "drink", "chew", or "use" to have exactly the methods which provide that grant that effect in TCRS. This is necessary for the maximizer to work with TCRS usable items.

As I said, I have no more time for this - but nothing is stopping others from looking at these issues. :)
 

MCroft

Developer
Staff member
Thanks for working on this. It's been a fun challenge path for me, since I have a ten-year+ hoarder's inventory of otherwise unusable items, drinks, etc. I'm not a super-fast ascender, but these have been some of the fastest I've done (because between EPIC size 10 beverages and 6 +7 ADV equipment pieces, I get a lot of turns at rollover).

Here's a TT, so there's at least one of each class.
View attachment TCRS_Turtle_Tamer_Mongoose_cafe_booze.txt
View attachment TCRS_Turtle_Tamer_Mongoose_cafe_food.txt
View attachment TCRS_Turtle_Tamer_Mongoose.txt
 

Crowther

Active member
It certainly worked much better for me today. Nice progress.

I had to log out and back in after freeing the king. I suspect this is unsurprising, but my disease rattled brain is having a hard time following everything here.
 

Veracity

Developer
Staff member
It certainly worked much better for me today. Nice progress.
Thanks. There are just a handful of NECESSARY things left to do. Biggest is probably using all the new Effects from eating/drinking/chewing/using items to adjust the status effect data so the Maximizer will work for non-equipment/non-spells.

I had to log out and back in after freeing the king. I suspect this is unsurprising, but my disease rattled brain is having a hard time following everything here.
2. We need to implemt the "resetModifiers" method in TCRSDatabase. We call it when you free the king (to undo all the TCRS adjustments to items), but should probably do it .... somewhere .. when you log out (or when you log in without restarting KoLmafia, which I never do), so that the next character doesn't start out with munged items.
As you can see, this is item #2 on my list of necessary things. :)
 

glx

New member

Veracity

Developer
Staff member
19232 was the last revision that had parsing fixes to get around buggy KoL HTML. Any "derive" done with that one (or later) has correct data. I have other "parsing" changes that affect how we get the special of the day in cafes or in how we parse the command line of the "tcrs" command, but those were not required to get good data from the item description.

Your data is planty new enough. Thanks!
 
Last edited:

fronobulax

Developer
Staff member
Started the run, generated the files and then committed them because I can. Someone tell me I wasn't supposed to do that :) Otherwise Disco Bandit, Mongoose is now available.
 
Last edited:

Crowther

Active member
Here's the data I generated with tcrs derive


Drat. I ascended yesterday into that same combination to help collect data. However, I ran "tcrs derive" and never came back until after rollover. I did nothing at all on day 1 of this run. :(
 

Veracity

Developer
Staff member
Revision 19251 removes all eat/drink/chew/use sources of status effects and replaces them with ones that are actually available in your TCRS class/sign.

This means that the maximizer should be fully functional, finally.
 
Top