New Content - Implemented Two Crazy Random Summer

Veracity

Developer
Staff member
Lastly, here is the data file I am working with, in case you are a Sauceror Wallaby character...
 

Attachments

  • TCRS_Sauceror_Wallaby.txt
    601 KB · Views: 199

xmccx

New member
Thanks for this, much appreciated.

SC/Mongoose generated with this attached.
 

Attachments

  • TCRS_Seal_Clubber_Mongoose.txt
    610 KB · Views: 19

Veracity

Developer
Staff member
I think I finished my descriptor identifying script:

Code:
[color=green]> TCRS.ash[/color]

Using data override: data/TCRS_Sauceror_Wallaby.txt
Read file TCRS_Sauceror_Wallaby.txt
83 adjectives are removed from standard item names
2605 items are unmodified in TCRS and 1646 are consumables and 1863 are usable and 3933 are equipment.
29 descriptors provide only a cosmetic effect
1076 equipment items have only cosmetic descriptors in TCRS and 2857 have additional descriptors.
1803 equipment have additional non-cosmetic prefixes.
203 equipment have only suffixes.
851 have both non-cosmetic prefixes and suffuxes.
31 descriptors modify food size or quality
28 descriptors modify booze size or quality
14 descriptors modify spleen toxin size or quality
209 descriptors modify usable items
Iteration #1 over 2857 items.
Discoveries = 169 items eliminated = 2834
Iteration #2 over 23 items.
Discoveries = 0 items eliminated = 23
129 equipment prefix descriptors have been identified
40 equipment suffix descriptors have been identified
I now distinguish between "usable" items - which might provide an effect, but it doesn't seem to correlate with particular descriptors - and equipment.

I attach the (final?) version of the script and three more data files:
usable_descriptors.txt
equipment_prefixes.txt
equipment_suffixes.txt
 

Attachments

  • TCRS.ash
    16.8 KB · Views: 12
  • usable_descriptors.txt
    4 KB · Views: 15
  • equipment_prefixes.txt
    3.9 KB · Views: 12
  • equipment_suffixes.txt
    1.4 KB · Views: 10

fronobulax

Developer
Staff member
(That was not intended to be snarky.)

Haven't looked at our SVN code. How hard can it be to lookup a file in the Sourceforge repository and to download it into a local file?

...

I like it. Especially if somebody who already understands our SVN support does that part of it.

I've looked at it a little. I am also lazy and tend to go with the first solution I think of, not necessarily the best.

Our SVN code is real good at managing directories but much less so in dealing with specific individual files. So one option would be to add the data files to their own directory at SourceForge. Existing code already can pull all of the data files locally. To support the path KoLmafia would have to make sure the directory was initially created and then (while in the path) update the local files without regard to the user's preference about checking SVN repositories. The informed user could make local changes and use the merge capability but changes that generated during a run would need special handling to recover from the data directory otherwise they would be overwritten.

SVN won't download unless there are changes. Protect local changes from being overwritten would require at least a file copy to be executed. AFAIK if we want to download a single, specific file, we will need to write code.

There are several cases where we load a file from an external repository - prices and faxbot data come immediately to mind - but we do so unconditionally and clobber what is already there. We could use existing code as an example since it is all focused on a single file. We can read gzip files but whether we leave them zipped locally and read or decompress once and read needs to be decided. If the repository file is zipped then it is an extra step a developer has to do on check in (and out) but it might be acceptable. We could also just stay straight text all around and tell users that if they want support for the path they need to have disk space and a connection fast enough to grab a larger file.

I'm inclined to say let the files stay where they are (src/data) in the repository, as text, use the current path and sign to derive the name of the file to fetch, and move the fetched file to the Kolmafia data directory unconditionally clobbering what is there.

People with slow connections and/or a lack of disk space locally will want compression. If the devs are not updating the repository versions frequently enough then folks will be unhappy losing and regenerating local changes.

I'm not going to do this yet but can if there is agreement that it is reasonable.
 

MCroft

Developer
Staff member
Lastly, here is the data file I am working with, in case you are a Sauceror Wallaby character...

are there specific wanted class/sign combos? If we're looking to derive all 56 it might be nice to have a checklist. I'd guess matching signs first.

I keep thinking that I'll see a mathematical pattern of item numbers and modifiers (something ridiculously simple like "modulo 29"), but I keep failing. If that gets cracked, it would definitely make both new items and the file size problem go away. But I'm not the right analyst to reverse engineer that pattern...
 

MCroft

Developer
Staff member
are there specific wanted class/sign combos? If we're looking to derive all 56 it might be nice to have a checklist. I'd guess matching signs first.

I keep thinking that I'll see a mathematical pattern of item numbers and modifiers (something ridiculously simple like "modulo 29"), but I keep failing. If that gets cracked, it would definitely make both new items and the file size problem go away. But I'm not the right analyst to reverse engineer that pattern...

My DB/Vole data : View attachment TCRS_Disco_Bandit_Vole.txt
 

Veracity

Developer
Staff member
I am creating a new top-level directory "data", containing a "TCRS" subdirectory with the following files:

TCRS_Accordion_Thief_Vole.txt (mine)
TCRS_Disco_Bandit_Vole.txt (Mcroft)
TCRS_Sauceror_Wallaby.txt (mine)
TCRS_Seal_Clubber_Mongoose.txt (xmccx)

I moved the first one out of src/data, so it will not be built into the jar any more.

I was going to do DB/Vole next, but Mcroft beat me to it. Thanks!

Instead, I will redo AT/Vole, since the file I published is incomplete, because I had to make two additional commits to add code to get around bad HTML in the _desc file, added by KoL with the advent of TCRS. The desc file parsing seems to work now; I have done a full "checkitems" and did not see any new errors.

After that, I'll move to a Gnome or Canadia sign and figure out what to do about the Cafe items. I think Ezandora did that, and it is probably just as simple as looking up the special item descs for the pseudo items.

If Frono wants to experiment with reading a file from "data/TCRS" i(rather than "src/data") into your local "data" directory, there will shortly be four files there to experiment with.

Regarding other files:

I have the following files I could add to "src/data":

TCRS.removed_adjectives.txt
TCRS.cosmetic_prefixes.txt
TCRS.booze_prefixes.txt
TCRS.equipment_prefixes.txt
TCRS.equipment_suffixes.txt
TCRS.food_prefixes.txt
TCRS.potion_prefixes.txt
TCRS.spleen_prefixes.txt

I'm curious how the various food/booze/spleen prefixes correspont to change in size or quality.

lousy irresponsibly strong horizontal tango

has size 6 and quality decent

a regular horizontal tango has has size 4 and qualit good. So is "lousy" "quality -1" and "irresponsibly string "size + 2"?

No. irresponsibly strong tolerable bottle of rum is size 7 (+4) and quality "good" (+2)

And there are fixed modifiers, too: "practically non-alcoholic" boozes are size 1.

We probably have enough data to reverse engineer this, but who knows?
 
Should I rerun my SR/Packrat for the same reason, or can I put that up as is?

Edit: I ran tcrs derive again with no changes, so eh, here it is.
 

Attachments

  • TCRS_Sauceror_Packrat.txt
    608.7 KB · Views: 256
Last edited:

MCroft

Developer
Staff member
tcrs apply will apply TCRS adjustments to all items.

...
- the Maximizer works
-

This is probably all the time I have for at least a week. Looking forward to an easier life in Two Crazy Random Summer. :)

I'm still having trouble with the Maximizer. I tried to maximize stench Res (for the kitchen) and game description is correct for equipment (gray pulsating rosewater-soaked turtlemail coif of the empath: Stench Res +3) but spleen items give the unmodified effect, not the TCRS effect. Beefy Pill shows effect Beefy, not no effect. Item Manager shows the correct description. Ditto Pec Oil, wrong effect in the Maximizer only.






--Is everyone else referring to this path as "T-Cars", like Z-Cars or LCARS? No, just me? Alright then...
 

Veracity

Developer
Staff member
Yeah. Maimizer works for equipment, but any item which grants an effect does not work yet.

We need to look at all items which grant an effect (potions and consumables), and for those effects, list exactly those items as granting it, and for all other effects that list an item (not a skill) as granting it, remove the items.

I've been hoping somebody else would step up and take that on, since I am Way Busy, but if nobody does it before this weekend, I'll take a look.

tl;dr: maximizer works if you look only at equipment.
 

fronobulax

Developer
Staff member
I have code that copies the file from SourceForge to the data directory. It will silently override any file that is already there but hopefully people that are generating files to help spade will remember to save their results. My big issue right now is my code is not handling line endings the way I would hope. Programmer error, I'm sure, but my Gold Standard is that a diff utility that cares about white space believes the file SVN downloaded into my KoLmafia source and the one I downloaded to /data are identical. That's not happening.

Assuming I can resolve that before I go AFK for the weekend, I've added a couple of methods to TCRSDatabase.java because they seem to me to fit there. I can check it in when I think it works or I can post a patch for you to apply locally and submit when you are happy. I want to believe you might have a preference as to how you control the merge and possible conflicts.

My failure to post or commit means I'm still debugging.
 

fronobulax

Developer
Staff member
I'm afk for a bit so I'm going for a patch and not a commit.

Methods to fetch the remote file or fetch and then load. Parameterless versions only work if you are in TCRS.

Successfully fetched the five files that are in SVN now. Two of those files use MAC EOL and three use Windows. I decided that using the OS that was running to specify the EOL was better than requiring the checked in files to use one standard and forcing the local file to be byte by byte identical. Results are byte by byte identical on Windows when the checked in versions were committed from Windows (and identical, ignoring whitespace in all cases).

As written will only try and fetch a particular file once per session. Fetched file will silently overwrite what is there so players doing spading will need to be careful.

I did not write any code that calls to to load the files. I figured there might be feedback. If I do add such code then I would fetch and load during login (using the parameterless version) and find somewhere in the new path from ascension processing to do the same. I am wondering about exposing the fetch command in ash. Scripter can get file for class and sign of their choice and then use the existing load if that is what they want

View attachment TCRSDatabase.java.patch
 

Saklad5

Member
Successfully fetched the five files that are in SVN now. Two of those files use MAC EOL and three use Windows. I decided that using the OS that was running to specify the EOL was better than requiring the checked in files to use one standard and forcing the local file to be byte by byte identical. Results are byte by byte identical on Windows when the checked in versions were committed from Windows (and identical, ignoring whitespace in all cases).
View attachment 9330
When you say “MAC EOL”, are you referring to Unix line endings (LF)? That isn’t specific to macOS, though decades ago it used to use “CR” for line endings. When people say “Mac line endings”, they usually refer to that, but I have no idea why anyone would be creating files with them.

I just analyzed all the line endings for files with “.txt” or “.java” as an extension in KoLmafia’s source code. With the exception of “GMartRequest.java” and “SpantRequest.java”, absolutely everything uses Unix line endings.
 

Crowther

Active member
Thanks for the progress so far. This isn't very important, but I noticed an issue with clownosity. I started the nemesis quest in ronin, because I'm burning turns to get out of ronin and I noticed mafia does not see my clownosity. The normal equipment for clownosity works unchanged and it is listed in the descriptions. For example, the "polka-dot bow tie" aka "huge medical-grade bow tie" says "Makes you look 75% clowny", however mafia doesn't seem to see it
Code:
> tcrs check 2233

name = huge medical-grade bow tie
size = 0
quality =
modifiers = 'HP Regen Min: 7, HP Regen Max: 10'
 

Darzil

Developer
We should probably change our handling to recognise that message, and maybe have clowny rather than clownosity, if the game has it that way. So maybe have 25, 50, 75 clowny percent.

Would also stop us using bitmaps for it, which wouldn't hurt.
 

Veracity

Developer
Staff member
Revision 19238 handles all "cafe" consumables - food and booze that are immediately consumed when you buy them. These all have negative item numbers.
Speakeasy drinks should have been created like this, but were given real item numbers - unlike the other clan consumable, hot dogs.

Every such consumable has TCRS descriptors which modify its size and quality, although none except the the Gnome and Canadia purveyors of booze and food, respectively, will be usable in a Standard TCRS run.

Unfortunately, both of those cafes have items # -1, -2, and -3. All other food or booze consumables for not overlap in item # space. If they didn't overlap, I could simply add them to, for example, TCRS_CLASS_SIGN.txt files. Instead, I added two more files: TCRS_CLASS_SIGN_cafe_booze.txt and TCRS_CLASS_SIGN_cafe_food.txt
 

One Sided Die

New member
I noticed you did not have any pastamancers in your data set so I created a forum account and ascended into one. I'm not the fastest ascender but I will try to provide them as I am able.
 

Attachments

  • TCRS_Pastamancer_Wallaby.txt
    607.8 KB · Views: 24
  • TCRS_Pastamancer_Wallaby_cafe_booze.txt
    1.6 KB · Views: 7
  • TCRS_Pastamancer_Wallaby_cafe_food.txt
    2.2 KB · Views: 10

Veracity

Developer
Staff member
I'm afk for a bit so I'm going for a patch and not a commit.
Thanks! I pulled this in and adjusted it, now that we have three files per path to fetch and load.

I'll be ascending into a new TCRS run today, so will try to get the "new ascension" fetching in place. Since it will be a new class/sign combo, I'm thinking it will detect the failure to fetch and will offer to do a "derive + save + apply" right then.

The "fetch + load + apply" needs to happen at login time. And again, if the fetch fails, should offer to do "derive + save + apply".

I got rid of the combined "fetch + load" since as I mentioned, there is a choice to be made by the user after the "fetch" succceeds or fails.

And "reset" (which will undo "apply" needs to be written and done when you free the king or log in (in case you logged out and logged in without resetting KoLmafia).

I've ran TCRS derive for Sauceror-Marmot. I'm not sure if it has everything, the file has 10041 lines if that's correct? Anyway, here it is if that's useful to anyone. Happy to do more of these as I ascend into other classes if you're building up a store of them.
Thanks! We now have three files needed for each class:

TCRS_CLASS_SIGN.txt
TCRS_CLASS_SIGN_cafe_booe.txt
TCRS_CLASS_SIGN_cafe_food.txt

We can operate without the last two - although the Canadia or Gnome cafe items will not be adjusted correctly - but if you publish new data, get all three, please.

(If you are on a path which only has the first, "tcrs derive" will get just the new stuff and "tcrs save" will save them)
I noticed you did not have any pastamancers in your data set so I created a forum account and ascended into one. I'm not the fastest ascender but I will try to provide them as I am able.
Thanks!

Revision 19239 for all of the above
 
Top