New Content - Implemented Two Crazy Random Summer

Since this thread apparently doesn't exist yet.

Reward is this ring, though it seems to be affected by a path modifier that keep changing according to Ezandora, maybe based on current class/sign/something.
--------------------
10252 ring 170559868 dcring.gif accessory 0
ring 0 none
Item ring Single Equip
--------------------

The path also changes all equipments, foods, boozes, spleen items and potions, this seems to be seeded by class and moonsign.

Data collection is already in progress: http://plasticlobster.com/summer/

For mafia to properly support this path, it probably needs to keep that info in a datafile somewhere, though I'm not sure what would be the best way to handle that. (And ideally, mafia also learns to recognize the modifications on items not present in these datafiles for future-proofing).

Equipment modifiers and food, beverage and booze quality and size seem directly related to the modifiers, but effects and effect durations seems to be unrelated. The effects themselves seem to be coming from the same list used by the hookah and other random effect sources.

Modifier spading seems to me mostly done: https://docs.google.com/spreadsheets/d/1-zX43XLrD7p5wZPcSttkQVZQNBqM0cwgj6XMIRAb_aY/edit#gid=0
 
Last edited:

ckb

Minion
Staff member
It would be helpful for scripting to initially add my_path() support so my scripts can know they are in Two Crazy mode.
 

Jeparo

New member
It would be staggeringly helpful if the "you obtained an item" parser stripped off 2CRS prefixes and suffixes, mostly so quest items are tracked properly. This... might be ambiguous in some cases (e.g. "blue blue potion"), but even being correct most of the time would be a big improvement.

Example of a consequence of this:

> acquire 2 turtle totem

Placing items into closet...
Using 1 chewing gum on a string...
Unrecognized item found: cyan turtle totem
You acquire an item: cyan turtle totem
Finished using 1 chewing gum on a string.
Purchasing chewing gum on a string (1 @ 47)...
You spent 47 Meat
Unrecognized item found: huge chewing gum on a string
You acquire an item: huge chewing gum on a string
Desired purchase quantity not reached (wanted 1, got 0)
You need 1 more chewing gum on a string to continue.
Removing items from closet...
Unrecognized item found: cyan turtle totem
You acquire an item: cyan turtle totem
Unable to acquire 1 sewer items.
 

Darzil

Developer
For mafia to properly support this path, it probably needs to keep that info in a datafile somewhere, though I'm not sure what would be the best way to handle that. (And ideally, mafia also learns to recognize the modifications on items not present in these datafiles for future-proofing).

Equipment modifiers and food, beverage and booze quality and size seem directly related to the modifiers, but effects and effect durations seems to be unrelated. The effects themselves seem to be coming from the same list used by the hookah and other random effect sources.

I'm hoping that in reasonable time the seeds are worked out, like they were for Noob. Otherwise it'll be a huge amount of spading and work, such that we will be faced with either not supporting it, or supporting it by doing a hit on itemdesc for all items during the path each session or something crazy like that.

I'm going to try to raise enough enthusiasm for making it not break too badly, but the level of coding needed to make everything work well is pretty daunting unless we can find a simple relationship.
 
That would be ideal, but might not be feasible without implementing php's randomizer function or something, but would definitely be the easiest to handle and the most future proof.

Alternately, mafia learns which names map to which modifications, then it only has to look at the inventory page (though I don't think that works for potion effects, so you would still need to look at all those descriptions).

That said, keeping something like 2CRS-Seal-Marmot-modifiers.txt in mafias internal data with the alternate modifiers in that seed would require only 54 files and reduce the need for those server hits to just once to fill out the data files.
 

Darzil

Developer
Alternately, mafia learns which names map to which modifications, then it only has to look at the inventory page (though I don't think that works for potion effects, so you would still need to look at all those descriptions).

Mafia needs to know the modifications of everything you can make or buy, as well as everything you have.
 

fronobulax

Developer
Staff member
I shudder at the prospect of managing 54 new data files within the mafia code base. At the very least I'd prefer one file that had to be read and processed to extract the relevant information :) I wonder if this is the time to expand the price sharing idea? Users discover new information, it is added to a file, the file is uploaded (and processed) at Kolmafia.us and downloaded at the next session. This, of course, assumes the discovery process can be reliably automated.
 

Darzil

Developer
I shudder at the prospect of managing 54 new data files within the mafia code base. At the very least I'd prefer one file that had to be read and processed to extract the relevant information :) I wonder if this is the time to expand the price sharing idea? Users discover new information, it is added to a file, the file is uploaded (and processed) at Kolmafia.us and downloaded at the next session. This, of course, assumes the discovery process can be reliably automated.

I suspect it has been automated, and is looking up each item using itemdesc.php. So 'all' that is needed is 54 characters that start the path and then run a few thousand server hits to grab the data then process it. I suspect that is what the files that the dictator links above is.
 

Darzil

Developer
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' ?
 

lostcalpolydude

Developer
Staff member
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.
 

Crowther

Active member
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/p60pv57l884ldn6/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.");
}
 

Ezandora

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

Veracity

Developer
Staff member
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.
 

Veracity

Developer
Staff member
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
 

Veracity

Developer
Staff member
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.
 

Veracity

Developer
Staff member
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).
 

Veracity

Developer
Staff member
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. :)
 
Top