Page 2 of 20 FirstFirst 1 2 3 4 12 ... LastLast
Results 11 to 20 of 199

Thread: Two Crazy Random Summer

  1. #11
    Developer
    Join Date
    Apr 2010
    Posts
    5,107

    Default

    So, thinking about it, I think what we'd need is:

    modifiers file containing:
    class, moonsign, item id, item name, modifier/effect (if present)
    We'd use item name to populate the item -> canonical item, so we recognise everything, and modifier to be parsed and then override modifiers.txt. Ideally we'd handle plurals also, but there is no way for a script to get those for items you don't have.

    consumption files containing:
    class, moonsign, item name, size, potency
    Presumably there is a simple equation in path for size x potency expected adventures and stats. We'd use the files to override the normal consumables data.

    Is that 'it' ?

  2. #12

    Default

    We use statuseffects.txt to identify how to get an effect, particularly important when there are multiple sources. Some handling of that is probably important for the maximizer functioning as expected.

  3. #13
    Developer
    Join Date
    Apr 2010
    Posts
    5,107

    Default

    True, but I THINK we could build it with that data?

  4. #14
    Senior Member Crowther's Avatar
    Join Date
    Nov 2006
    Posts
    1,468

    Default

    I'm not sure if this is helpful, but I scraped then entire item description for one class/sign combo. It is just pure HTML. The directory is 62 for Accordion Thief/Vole. The numbers in the file name are the item number. I was going to do more with this before posting, but I've run out of time before a camping trip. I wanted to make code to use this as a cache.

    https://www.dropbox.com/s/p60pv57l88...TC.tar.gz?dl=0

    Here's the code I used to create this. WARNING: lots of server hits.

    Code:
    int [string] sign;
    sign["Mongoose"] = 0;
    sign["Wallaby"] = 1;
    sign["Vole"] = 2;
    sign["Platypus"] = 3;
    sign["Opossum"] = 4;
    sign["Marmot"] = 5;
    sign["Wombat"] = 6;
    sign["Blender"] = 7;
    sign["Packrat"] = 8;
    void main()
    {
        string p = "TC/" + my_class().to_int()+sign[my_sign()] + "/";
        foreach i in $items[] {
            buffer d = visit_url("desc_item.php?whichitem="+i.descid);
            cli_execute("mirror " + p + i.to_int() + ".html");
            print(d);
            cli_execute("mirror");
            print(i.to_int());
        }
        print("Done.");
    }

  5. #15
    Senior Member
    Join Date
    Jan 2014
    Posts
    195

    Default

    I've been using this command:
    Code:
    wget -i DownloadDescitemForEveryItem.txt
    Using this file.
    This downloads every item_desc.php, including negative food (gnomish, etc), to the current folder. I've been collecting the data; message me in-game if you need it. (I'm hosting it on NO, and I don't know NO's monthly bandwidth.)


    Also, it may be worth considering looking into mafia's item acquisition code - see if it can use the descid for matching, instead of item name.

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

    Default

    Interesting. I just started this.

    I notice that we recognize items found in combat (pickpocket or monster drops) just fine. That doesn't find me; we accumulate all the items found in combat from via a table that includes descid ans frelstring.

    Items from choice adventures (and presumably other non combats) do not go through that same processing - although they do include, at least, a descid.

    We should be able to use similar technology to recognize NC item drops.

    Getting updated enchantments would be more work. If we don't recognize the item, we register it from the item description, but we don't currently look up the description for items we think we know. Perhaps eventually we will know which prefixes mean what in a particular class/sign, but until then, we could look up the item description for anything new we find when in this path.

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

    Default

    There are a couple of files - tcrs.js and tcrs.css - that are at top level in KoL, rather than under the image directory.
    Therefore, we did not download and cache them like other images.

    I could have hardcoded those like favicon.ico and cached them, but for now, when the browser asks us to fetch them, we fetch them.

    As a result, I now see bouncing and wobbling items.

    I'll consider whether I can cache them. Later. Tell me how it works for you.

    Revision 19219

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

    Default

    Revision 19220 does not attempt to match displayed item name with item derived from relstring when in TCRS; it assumes that items will be matched in the order they are found. That seems to hold; drinks now get "drink" links and so on.

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

    Default

    Hopefully revision 19221 will handle all item acquisitions in TCRS. It identifies the items from the relstring.

    If you get a previously unknown item, we'll believe that the item name is what was displayed and will register the new item as such. That should make the item usable for your session, but will not be suitable for logging here for us to add to KoLmafia.
    (Actually, given the descid, somebody not in the path can derive the acual item data).

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

    Default

    Boy Howdy, there would be a lot to get this to work correctly.

    We should be able to recognize items correctly as they come in now, but:

    - item enchantments are not what they seem
    - consumables have different sizes and quality
    - potions give different effects.

    As a result

    - the maximizer is useless
    - the green sidebar isn't close to giving accurate data for ML, item drop, etc.
    - the food and booze section of the Item Manager are useless and/or dangerous
    - things like magical sausages and milk of magnesium are not what they seem.

    As an AT under the Vole sign:

    - anodized cold-filtered spinning milk of magnesium grants 63 turns of Educated (Kinda) for Spooky Resistance +5
    - frozen quadruple-deionized super-spiky hair gel grants 33 turns of Got Milk

    I wonder if the same set of adjectives always results in the same potion transformation? Ie. a "frozen quadruple-deionized" potion always gives "Got Milk"?
    I wonder if you can derive potency & size from consumable qualifiers
    I wonder if you can derive equipment modifiers from their enchantments.

    For monsters in OCRS, we have a "random_modifiers" field which is set for each monster when we see it. MonsterData:

    Code:
    	// The following apply to a specific (cloned) instance of a monster
    	private String[] randomModifiers;
    We store that for a specific instance of a monster that we encounter.

    I suppose we could do something similar for items in AdventureResult or a map in ItemDatabase or something.
    Or would it just be easier to munge the Modifiers (and size/quality & expected adv/mus/mys/mox range) for items we know about - either because we have the configuration data stored somehow or we can derive it from item number (or something) or because we've acquired (or looked the descriptions of) the items.

    Seems complicated.

    If we munged modifers/size/quality/(expected consumption ranges), Maximizer and green side pane and Item Manager might "just work".
    The "use milk" button would need coding to figure out which potiion actually gives you Got Milk.

    Just musing, after two days of playing in this path, since I'm missing KoLmafia features I am used to having available.

Posting Permissions

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