(That was not intended to be snarky.)
So, a possible solution:
- KoLmafia adds a new directory in Sourceforge under the SVN tree which is NOT included when building the JAR file
- This directory contains 54 TCRS data files
- When you start up (or ascend into) a TCRS run, KoLmafia looks in your "data" directory to see if you have an appropriate data file for your class/sign
- If not, we check if the file is available in the SVN directory.
--- Yes, we download it into "data"
--- No, we ask if you want to create the data file by reading up 10,000 item descriptions. This takes a long time.
- (Even if the file exists, we should "derive" to get new items that KoL added since we last created the file. This should be relatively fast)
- (If there is new data found via "derive", we "write" the file to update your local file in "data")
- We "apply" the data to modifiers, consumables, concoctions, effects...
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?
This would also work even with incomplete data. For example, I have exactly one of the 54 files to check in, at the moment.
We can add others as we (or you guys) supply them.
I like it. Especially if somebody who already understands our SVN support does that part of it.
Last edited by Veracity; 05-24-2019 at 03:55 PM.
Revision 10226 adds an ASH proxy field to get the TCRS name of an item.
With this, you should be able to write an ASH script to figure out what all the new descriptors do.Code:> tcrs load Read file TCRS_Accordion_Thief_Vole.txt > tcrs apply > ash $item[ El Sombrero de Lopez ].tcrs_name Returned: red sizzling Jim Carey's El Sombrero De Lopez > ash string_modifier( $item[ El Sombrero de Lopez ], "Modifiers" ) Returned: Monster Level: +25, Hot Damage: +10
For that example:
red is cosmetic
sizzling is Hot Damage: +10
Jim Carey's is Monster Level: +25
Perhaps something like this:
Something like that.Code:for all items in $items if it.name != it.tcrs_name if modifers are empty all descriptors are cosmetic else save item for all items in saved items strip off cosmetic descriptors if single modifer remaining descriptor grants that modifier else if two modifiers and single remaining descriptor that descriptor grants both modifiers (HP Regen Min and HP Regen Max, for example) else save item repeat, stripping off all known descriptors and corresponding modifier(s) until nothing else saved.
Trickiness if a single item has two otherwise unseen descriptors.
Trickiness identifying what is a "descriptor".
Trickiness handling which adjectives are removed from standard item names. For example "lucky rabbit's foot" in my file is "huge Usain Bolt's rabbit's foot of Flo-Jo". "Usain Bolt's" is Initiative + 80 and "of Flo-Jo" is Initiative +100
Not a trivial program, but doable.
I played with this a little bit in TCRS and it seems to work very well, thank you for your work.
One small thing I noticed is that doing "tcrs apply" seems to strip familiar items with TCRS modifiers of their "equips on" string modifier, causing one to be unable to equip them, other than using the relay browser (li'l unicorn costume is an example item where this happens). There might be other string modifiers where this is relevant, but I'm not sure.
Also, the help string for the "tcrs" command has a unnecessary "list or manipulate your closet." at the end.
Yeah, I'll make tcrs apply skip familiar items.
I have also discovered some new forms of bogus HTML in some item descriptions, which results in not parsing correctly.
"of the cougar" is "Moxie: +20"
"gray dark baconstone ring of the cougar" has bad HTML in the description which prevents the enchantment from being picked up.
"tumbling red Xlyinia's notebook of the cougar" does not have the bad HTML.
I'm regenerating my Accordion Thief Vole file now. I'm curious to see how wide-spread the problem is.
I'll submit a fix - and the corrected file - soon. I'll look into including the familiar item and help string. Could have sworn I removed the extra text when I copied it from the "closet" command.
Revision 19229 does all of that.
- Work around the bad HTML which got incorrect modifiers from literally scores of items
- Regenerated TCRS_Accordion_Thief_Vole.txt
- Do not apply modifiers to familiar equipment
- fix usage string for tcrs command
- Add "tcrs check ###" command to do a "derive" on the specifies item #
By the way - I notice that the Item Manager lists the correct sizes for food and booze, but when you try queuing one, it lists the wrong size for total amount queued.
I just freed the King in TCRS so cannot test this now, but I'll ascend again tomorrow and sort this out.
I did some work on a TCRS desriptor parser. Here's what I get so far:
I have not started working on figuring out which descriptors provide which modifier.Code:> TCRS.ash 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 5796 are modified non-consumables. 29 descriptors provide only a cosmetic effect 1813 non-consumable items have only cosmetic descriptors in TCRS and 3983 have additional descriptors. 2929 non-consumables have additional non-cosmetic prefixes. 203 non-consumables 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
Nor have I figured out exactly how the various consumable descriptors modify size or quality.
But, I present the script as it exists so far, as well as the five data files I have calculated:
And guess what: the forum allows only 5 attachments per post. So here is spleen_descriptors.txt