New Content - Implemented Changes in the Rat Quest

Veracity

Developer
Staff member
The revamped Tavern means that a bunch of KoLmafia needs to be changed - or is simply obsolete.

Used to be, the tavern cellar was rats.php. When we visited it, we'd remember what we saw in the square in the tavernLayout setting. Since the old cellar did not give you any indication of which squares you'd visited - and you could visit the same square multiple times - we'd "decorate" that page by showing you pictures of rats, booze, whatever in the appropriate square. The Quest menu had a Tavern entry which would randomly visit unvisited squares until the faucet was found.

The new cellar is cellar.php. You can only visit an "unexplored" space once - and KoL itself shows you what you found there. You can only explore a space which is next to a space you've already been in.

I think this suggests the following changes:

- RequestEditorKit.addTavernSpoilers is obsolete: KoL itself shows you what you found when you explored a square, and you can no longer go to (most) previously explored squares a second time.
- tavernLayout needs to be revisited. Currently, squares are tagged like this:
1 = rat
2 = booze
3 = faucet
4 = Baron
For the new cellar, we have, potentially, the adventurer, the faucet, and the Baron as unique squares, as well as different kinds of combats and noncombats. Do those matter?
- GenericRequest uses rats.php to decide if it's a rat quest square. It needs to use cellar.php
- validateFaucetQuest, preTavernVisit and postTavernVisit are currently in KoLmafia.java. They should move to TavernRequest.php
- KoLmafia.locateTavernFaucet is the Quest Menu entry. It should be modified to look using the new "can only explore squares adjacent to know squares" rule. Whether it should still be random is an open spading question.
 

Theraze

Active member
Regarding optimal fount-hunting, I haven't yet seen it out of the Left/Bottom edge or one out... that is to say, it's been in either the left two rows, or the bottom two rows, or some combination thereof. If we're trying to speed things up, best is probably to reach bottom left corner as quickly as possible, and then to spread out from that corner. If we're looking for full tavern looting as an easy (optional, with boolean or the like maybe?) thing, random is good.
 

Veracity

Developer
Staff member
Revision 8723 does some of this; it removes the obsolete decorator, adjusts all references of rats.php to cellar.php, and moves cellar square tracking to TavernRequest.

- TavernRequest.postTavernVisit still records squares as 1, 2, 3, and 4. If/when we want to switch to tracking a different set of things, we should use letters.
- KoLmafia.locateTavernFaucet is unchanged.
 

Theraze

Active member
Regarding an easy way to make the faucet quest work currently, we could just have it increment numbers... If I remember properly from yesterday, the upper right-but-one square is square number 1, the one to the left is number 2, the one to its left is number 3, etc... If you just start at 1 and work your way up, the faucet will eventually be found and you won't need to worry about invalid requests. Well, as long as you don't fail enough rat-fights to leave undiscoverable corners.
 

Fluxxdog

Active member
Something else that needs to be changed, I guess. The property "lastTavernAscension" constantly changes to your current ascension, regardless of whether you've even clicked one square or not. Started a brand new ascension and started a script that checked for the property and it kept telling me it turned off the faucet.

PS: The ash function tavern() is broke also, but that's to be expected ;)
 

Theraze

Active member
Something else that needs to be changed, I guess. The property "lastTavernAscension" constantly changes to your current ascension, regardless of whether you've even clicked one square or not. Started a brand new ascension and started a script that checked for the property and it kept telling me it turned off the faucet.

PS: The ash function tavern() is broke also, but that's to be expected ;)

From looking, this is as it should be... lastTavernAscension means that it's reset the tavern layout to blank for this ascension, not that you've completed the tavern. This happens the first time you do "tavern" at or above level 3 during an ascension. I suppose that resetting the layout could be done in Valhalla during ascension and it could be entered as a default value to catch the new players... but that's not the current behaviour.

Testing a tweak for tavern hunting tonight. We'll see if the top corner is high or low, then I'll attach the patch here.
 

Theraze

Active member
To test for Level 3 completion, you can run something like this:
PHP:
ashq if ((index_of(get_property("tavernLayout"), "3") + 1) < 1) print("You haven't completed the tavern quest yet."); else print ("Tavern quest completed.");

Working through the quest in a random fashion currently... trying to make it so that it actually detects what kind of square is used, since the old detection didn't work right. Got the auto-adventuring working properly... where is now whichspot, and you also need to pass action/explore. My only issue is trying to make it actually count down a side properly with the whole subtractive sorted list... so I decided I'd ignore that for now and work on making the tavern adventures properly detect between combat and item squares.

One sidenote... choiceadventure 511 is the Baron, and currently has no default. Should probably default to skip, since that doesn't take an adventure, and people can always toggle it later.
 

Fluxxdog

Active member
Huh, I guess I misunderstood the setting. Thanks, Theraze.

Some other side notes for reference:
496: 1-3 bottles of mixed booze, 2-skip adventure if you have +20 hot weapon damage
513: 1-3 beers, 2-skip adventure if you have +20 cold damage
514: 1-whiskers and possible smiling rat, 2-skip adventure if you have +20 stench weapon damage
515: 1-3 bottles of tequila, 2-skip adventure if you have +20 spooky weapon damage
 

Theraze

Active member
Just looked and it seems the rest are already set to 1 (complete adventure, the only choice if you don't have 20 in the required elemental damage), it's just Baron who spawns a browser window by default. Though it's possible I updated my defaults.txt at some point and normal people don't have tavern handling recognized yet... but I think it's in there by default now.

Just making a formal request from someone who can to change the default on the Baron from browser to skip, since it doesn't cost an adventure and you can spawn it at anytime after finding it.
 

Veracity

Developer
Staff member
Changed to New Content (now that we have that tag) and bumping, since the "Tavern" solver in the Quest menu doesn't work correctly any more, since you can not go to squares at random.
 

Theraze

Active member
Do we want to do something like the solver that is in bumcheekascend or the Rinn Level 3? It's not as efficient as it might be, but it does work...
 

StDoodle

Minion
From my reading of the KoLspading thread on the topic, it appears that when you get the quest non-combats is based on how many squares you've adventured in, with a random distribution, and isn't really affected by where those squares are. It's just that so many people have heard the "it must be on a far wall" thing that people head for those squares and therefore end up finding the faucet there, or near the far corner, most of the time.

So which method is used shouldn't matter. In fact, for spading, it might be nice if mafia's solver went in a completely different manner. ;)
 

Theraze

Active member
What I mean by efficiency is that instead of making a list of which squares should be checkable and hitting them in some order, it hits the main cellar and decides each new square. The problem with either the current system or the 'efficient' system where it just goes off what SHOULD be available is that, when CCS bugs and mafia thinks combat is done after the initial consult, it marks squares done based on that they should be visited, ignoring the fact that you're actually still in combat and finishing up more rounds.

Actually the reason why I scrapped the code I'd done that would just peel down the right side using the tavernlayout preference... combat issues made it not reliable enough to keep.
 

StDoodle

Minion
Ah, I see, I spend too much time talking to filthy speeders. ;)

I can see how that's a tough problem; would it be possible to assume each square is finished, and then when trying to do the next square, monitor for whatever KoL responds when you can't reach said square, aborting if found, but otherwise assuming everything work? That's about all I can think of to do that doesn't involve a ton of server hits... still leaves the possibility of aborts, which are never fun, but 90% of the time it would be because the user set up a CCS or something incorrectly.
 

Theraze

Active member
Well, the problem is that in those cases, one of the options that we expect is combat, and we get it... we're just getting it as a continuation of the prior visit, not a new visit. Until the "consult only running one line" issue is actually replicable and gets fixed, it's difficult to do this in an efficient and intelligent way. :(
 

StDoodle

Minion
Ah, k. I'm guessing if hola goes ahead with his round-numbering refactorization, that may make the tavern part doable as well, no?
 

Theraze

Active member
Long as that fixes the consult issue, yep. No guarantees if it doesn't... using things like Saucy Salve that might not increase official round count makes start of combat detection based on rounds... dangerous.

Suppose I could make a patch to have it do something similar to the current system that most people are probably using if they're automating... One visit to the cellar, then one square explored... continue until you find the faucet. Or do we want to wait until we know we can just use the layout?
 

Veracity

Developer
Staff member
It is not a difficult problem. The old scheme visited squares randomly, for some reason; it could have started at the top left and looked at each square in order across the columns and down the rows. In order to make the Tavern quest completer work again, all we have to do is remove the randomness and simply visit squares in a particular order. We may as head left and spiral in, for example.

I have no idea why you are discussing your purported consult script problem; it seems to have nothing whatsoever to do with the "Tavern" quest completer in the menu.
 
Top