Page 4 of 19 FirstFirst ... 2 3 4 5 6 14 ... LastLast
Results 31 to 40 of 185

Thread: Two Crazy Random Summer

  1. #31

    Default

    There's a few ways you can reduce file size without compression
    Originally Posted by Ezandora View Post
    if you want 600K of data but not the other 26M, why not check it out from SVN once at the begining of the run?

  2. #32
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,706

    Default

    if you want 600K of data but not the other 26M, why not check it out from SVN once at the begining of the run?
    Originally Posted by MCroft View Post
    Strikes me that we don't actually have to build in all the 54 data files. They could go perfectly well into a package you can load via the Script Manager, since such can put things in the "data" directory and don't actually need a script in the "scripts" folder. Files in the "data" directory will act as overrides for scripts built-in to KoLmafia's data directory. Both a loaded package and the "tcrs derive" command will put files in the local data directory where they will be found when referenced.
    Originally Posted by Veracity View Post
    Uh huh.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  3. #33
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,706

    Default

    (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.

  4. #34
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,706

    Default

    Revision 10226 adds an ASH proxy field to get the TCRS name of an item.

    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
    With this, you should be able to write an ASH script to figure out what all the new descriptors do.
    For that example:

    red is cosmetic
    sizzling is Hot Damage: +10
    Jim Carey's is Monster Level: +25

    Perhaps something like this:

    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.
    Something like that.

    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.

  5. #35

    Default

    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.

  6. #36
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,706

    Default

    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.

  7. #37
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,706

    Default

    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 #

  8. #38
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,706

    Default

    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.

  9. #39
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,706

    Default

    I did some work on a TCRS desriptor parser. Here's what I get so far:

    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
    I have not started working on figuring out which descriptors provide which modifier.
    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:

    removed_adjectives.txt
    cosmetic_descriptors.txt
    food_descriptors.txt
    booze_descriptors.txt
    spleen_descriptors.txt
    Attached Files

  10. #40
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,706

    Default

    And guess what: the forum allows only 5 attachments per post. So here is spleen_descriptors.txt
    Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •