CanAdv -- check whether you can adventure at a given location

Idran

Member
Okay, so I just recently started my second Boris run, and I forgot to actually check what specifically it is, but you definitely can unlock the pre-Cyrpt Cemetary, it's not just HC bugginess. It seems to be either from the Luter quest or from just hitting level 7 and getting access to the Cyrpt, but I got the Luter quest just a couple adventures after hitting 7, and I didn't think to check the Plains in between the two. But at least that narrows it down a bit.

(Assuming, of course, that I didn't unlock it earlier and just space on it. But I'm pretty sure I didn't.)
 
Last edited:

Theraze

Active member
Luter is unrelated, I think... Believe it's part of level 7. I'll be trying to watch tomorrow though. Degrassi Knoll is definitely unlocked on requesting the untinker quest... validated that today.
 

Idran

Member
Corner case worth mentioning: it looks like Whitey's Grove doesn't unlock in Boriscore if you have the wet stunt nut stew already when you talk to Mr. Alarm for the first time. This might also be the case if you skip the Guild quest in a normal run.
 
Last edited:

Theraze

Active member
Luter unlocks as soon as you hit Level 7, regardless of checking with the council. Possibly regardless of if Clancy is level 3 yet or not, but uncertain.

Pre-Cyrpt Cemetary unlocks as soon as you talk to the council at level 7 and the cyrpt unlocks.

Don't think we'll be able to... wait...
Okay, updated my copy of CanAdv to start using quest properties. In a Boriscore run, it should still properly detect the Pump up Muscle, Knoll, and the Pre-Cyrpt based on their quests (untinker/level7) being started, since that's the unlock point for them. Unfortunately we're going to need a server hit on Level 11 and the grove, but I'll delay spinning the next release until after I hit that (should hopefully be today at some point, depends on how well I can HC meat-collect, might be tomorrow if I've screwed up the updates to the Rinn scripts and it goes REALLY bad) and validate which series of properties mean unlocked. Guessing it will be the questL11Palindome, but... We'll see.

What that last twisted series of sentence means is, we won't do our server hit on the woods until after the quest says it should be unlockable, if the guild is locked up.
 
Last edited:

Theraze

Active member
Okay, version 0.76 spun.

This one checks for step3, step4, or finished on the Palindome quest as meaning that we'll probably be able to go to Whitey's Grove with the guild locked.
This also adds a new zlib variable, canadv's first, named canadv_unlockGuild, defaulting to true. With it set to true, if the guild is locked, it will unlock on a regular available check. This is the default both because it's the current behaviour, as well as that it avoids people complaining about canadv prep making them lose the guano junction semirare or something similar. If it's set to false, it will unlock if the guild check is set to prep. I'd considered not having it auto-unlock ever, with this set to false, but considered that some people might want it to still do it on a prep shot, even though I consider a prep as needing to immediately succeed.

Thoughts? Do we want it to be able to spend adventures with this disabled, or do we want to say that with this disabled it will only tell you which zones you can actually adventure in with your next adventure?
 

Idran

Member
Something to keep in mind with this is what I mentioned in my previous post; Whitey's Grove isn't guaranteed to be unlocked based on Palindome position, it skips unlocking it entirely if you've already got the wet stunt nut stew from a Softcore pull when you hit the Mr. Alarm adventure, which most Softcore people probably would. I don't know a good way you could account for that though, there's no way to know (especially after the fact) if Whitey's Grove was unlocked from the Palindome or not.

Then again, I'm not sure if it's a KoL bug or not that this situation doesn't unlock the Grove; if it is a bug, no reason CanAdv should even deal with it. I guess I could put in a bug report and see, it does seem a little strange to me.
 

Theraze

Active member
CanAdv will know if the zone is available either way. It just means that if you've passed step2 in the Palindome quest, you'll do a server hit to check. If KoL wants to keep us doing server hits to check if it's now open, that's their choice. We're making our best option possible. :)

But... unlockGuild, automatic adventuring on prep or no?
 

Idran

Member
Ah, okay, I misunderstood the earlier post; I thought you meant a server hit to check the quest itself.

As for unlockGuild, I'd tentatively say no, since setting it to false would imply to me that you never want to do any automatic adventuring. Although I can see why having it automatically adventure on prep would be useful behavior.

Because of that, I think the best option, if this is possible, would be to offer three settings: "yes", "prep", and "no". But if that's not possible, I'll stick with just "no auto adv on prep".
 

Theraze

Active member
I'm a fan of the int choices instead of booleans, but it seems to make things confusing for people eventually. If a bunch more people don't speak up asking for the triple-int choice, I'll probably just end up turn off the auto-adventuring on prep on the next release.
 

fronobulax

Developer
Staff member
I don't see any version checking in CanAdv so we could just start a new thread under Theraze's stewardship and have a minion or dev edit the first post in this thread to direct people to the new thread, right?

I note that the current behavior seems to be to call mafia's Guild function which now works and burns turns. I'd rather opt in to burning turns but since the various tests used to cost adventures it means that I have changed and not whether CanAdv could or would burn turns.

That said, if we are willing to possibly break existing scripts, I vote for a boolean preference - Unlock or not. If true then CavAdv will run Mafia's Guild whenever CavAdv notices that the Guild is not unlocked, otherwise it will just report the status. The distinction between "prep" or not seems to me to be added complexity with little or no benefit.
 

Winterbay

Active member
I don't see any version checking in CanAdv so we could just start a new thread under Theraze's stewardship and have a minion or dev edit the first post in this thread to direct people to the new thread, right?

I note that the current behavior seems to be to call mafia's Guild function which now works and burns turns. I'd rather opt in to burning turns but since the various tests used to cost adventures it means that I have changed and not whether CanAdv could or would burn turns.

That said, if we are willing to possibly break existing scripts, I vote for a boolean preference - Unlock or not. If true then CavAdv will run Mafia's Guild whenever CavAdv notices that the Guild is not unlocked, otherwise it will just report the status. The distinction between "prep" or not seems to me to be added complexity with little or no benefit.

I believe the version posted in post 2 does not use the Guild-command if you set whatever zlib-variable it was to false.
 

fronobulax

Developer
Staff member
I believe the version posted in post 2 does not use the Guild-command if you set whatever zlib-variable it was to false.

You're right but somehow the existence of a version in Post 2 escaped my notice ;-) It also appears to do some version checking as well.
 

Theraze

Active member
Yep, the new version is in post 2, not 1, and has been version checking since 0.74, so... :)

Anyways, sounds like there's general agreement that possibly breaking scripts that depend on prepping guild unlocks is fine, since that behaviour wasn't in before, and you have to opt out of the guild unlock. Only people that get affected are those using 0.76, so... guess it's time for 0.77, which also moves Fudge Mountain and the Lollipop Forest to the former event zone section out of holiday zones.
 

zarqon

Well-known member
Not to sound ungrateful for your maintenance of this script Theraze, but I grimaced when I saw the new setting -- the script is called CanAdv, not Adv. It should only tell you whether or not you can adventure somewhere, not actually adventure somewhere. If it's going to also become a zone-unlock script, where do we draw the line? If I call can_adv($location[airship], true) as a level 1 character, should CanAdv level me up to 10 and farm a bean in order to prepare the zone? Obviously not -- and that's because adventuring to unlock zones belongs in turn-burning scripts, not informational scripts such as this one. It is, or ought to be, outside the scope of this script. The script calling CanAdv can call the guild function if CanAdv returns false, but CanAdv should not itself adventure.

In short, I don't think the guild function belongs in CanAdv at all. I put it there as a temporary stopgap measure long ago when the guild was unlocked by a short series of tests rather than actually adventuring at a zone, but even then I never liked it. Seeing it finally get replaced by the actual checks needed would make me happy.

Also had a suggestion to go along with my complaint. :) How about an overloaded can_adv(location), where prep is false by default?
 

Theraze

Active member
Well, the setting was there to maintain the functionality you'd put in... ;) I'll change the default to not unlock the guild. Since unlocking the guild is no longer a series of tests but due to the acquisition of a specific choiceadv, it's impossible to "get replaced by the actual [stat] checks needed" without making it just true/false, but the default will now just be that true/false check.

As well, also adding in the overloaded can_adv and... that's the 0.78 spun.
 

zarqon

Well-known member
Seems like this script would benefit from incorporating a lot of the questXYName preferences (when were those added?). Yay for perpetually unfinished projects!
 

Theraze

Active member
Just... and I did add in the capability to work off of those in 0.78, I think... added the prop and noprop checks for permanent unlocks, but... the existence of those checks should probably change the unlocked string from permanently marking zones as unlocked to checking the quest string every time, to make it not screw up on zones like the hippy and frat camps that aren't always available.

Agree or disagree?

Pro-change: More accurate.
Con-change: More preferences checked.

Regardless: Less server hits by checking mafia preferences instead of KoL pages, but CanAdv will break HARD for people not using the latest mafia.
 

Idran

Member
I think it's sensible. The only issue would be for people that update CanAdv but not Mafia, which I don't know the size of but I can't imagine would be that large a number. Plus, there's sure to be some point in the future when they'll have to update Mafia anyway, so there doesn't seem to be much reason to me to cater to people that don't keep it updated.
 

Theraze

Active member
Believe that we have confirmation that CanAdv wasn't actually causing the bad unlockedLocations now, since I haven't had pre-Cyrpt get marked as permanently unlocked since the CC changes and I've had a bunch of Boriscore runs. Since we know that this script wasn't the cause, I can move onwards with conversion and trying to reduce server hits and the like knowing that the existing core works and doesn't mark stuff wrong. Especially able to move as we've had a proper mafia release since the quest variables were initially added.

Spun 0.79 with support for the initial 3 bugrun locations known to mafia as of 10979. Marked as available if you're in a bugrun, unavailable otherwise. We'll update that as mafia gets more detailed bits available to us. Or as I discover what they are, alternatively. :)

Edit: Starting to look through... Pete's Stupor was set as possible if you were overdrunk on his day, not if your inebriety was > 25. Fixed.
 
Last edited:

Theraze

Active member
Okay... here's what I have planned for the refactoring.
warProgress - better/newer preference that doesn't take relay decorator? hippy/frat/pirate.

Haunted Wine Cellar - Q11?
Bats - Q4 (needs individual values instead of the current to_url one)
Knobs - Q5 (needs invidivual values instead of the current to_url one, but some might still use old check)
Greater Sign - unlock preference maybe?
Dungeons Doom - unlock preference maybe?
Fernswarthy Basement - quest preference?
Sorc Hedge Maze - quest preference?
Pump Up Muscle - quest preference or just eliminating the actual check?
Bugbear Pens - quest preference?
Post-quest Bugbear Pens - quest preference?
Hidden Temple - unlock preference?
Degrassi Knoll - eliminating the actual check?
Fun House - quest preference?
Throne Room - quest preference (make sure that knobs unlocked, not just having the stuff, since the current check can give false positive for SC)
Vacations - item check for meatcar, bus ticket, pumpkin carriage?
South of border - same item check.
Defiled and Haert - check evil levels to see if they're closed, as well as general quest preference
Cyrpt Cemetary - quest preference
Goatlet - Q8 quest preference post-mine
Snowmen - Q8 quest preference done
Slope - Q8 quest preference post-goats
Whitey - eliminate actual check?
Dark Woods - Q6 quest preference and item check?
Comedy/Arena/Slums - Q6 quest preference
Orc Chasm - dictionary check?
Airship - improve bean-planting (prep only?) and maybe Q10 quest preference?
Citadel - quest preference?
Haunted down - unlock preference?
Icy Peak - Q8 quest preference
Pirates - eliminate pirate_check entirely with item check and quest preferences?
Hidden City - quest or unlock preference?
Lower Chambers - quest preference?
Nemesis Cave - quest preference?
Volcanos - quest preference?
Nemesis Lair - quest preference?
Vibrato - not sure...
Basement - preferences or...? maybe these are required hits.

Former zones - changed from -6 to -9, so people wanting more information don't get spammed unless they REALLY want to know.
Pickles - moved from former to holiday, since it's generally available April 1st. Might be able to check server-day for this.
Any problems with that? If nobody pipes up, I'll probably randomly wander through and do as listed above.

At some point, I should search and re-request knowledge of holidays, since that requires a server hit... currently the only holiday we actually hit on instead of just marking as always available is sneaky pete's day, but there's 4 others that we could/should have proper awareness of.
 
Top