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

> ash import <canadv.ash> can_adv($location[The Deep Machine Tunnels])

Unknown location: The Deep Machine Tunnels (zone: Town)
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Returned: false

> ash have_familiar( $familiar[machine elf] )

Returned: true
This is not my current familiar

> ash import <canadv.ash> can_adv($location[The Unquiet Garves])

Returned: false

> get questG04Nemesis

finished
Um. Considering that I had to go there to complete the quest, it certainly available.

> ash import <canadv.ash> can_adv($location[The Bugbear Pen])

Returned: true

> ash import <canadv.ash> can_adv($location[The Spooky Gravy Burrow])

Returned: true
I have not started Mayor Zapruder's quest. When I try to go to the Bugbear Pens, KoL says:

The door to the bugbear pen is locked.

When I try to go to the Spooky Gravy Burrow, without a gravy fairy at my side KoL says:

You approach the adorable little door, but you can't figure out how to open it. I guess it's a secret door that will only open for gravy fairies.

When I go there WITH a gravy fairy, KoL says:

You should probably stay out of there unless you have a good reason to go in. Like if you were on a quest to find something in there, or something.

In any case, although I am in a Gnoll sign and I can see both locations inside the Knoll, neither location is available.
 
Matt Chugg's new Crimbo tracking relay script is reporting that Canadv isn't aware of the folllowing locations:

The Deep Machine Tunnels (zone: Town)
The Ruins of the Fully Automated Crimbo Factory (zone: Crimbo15)
The SMOOCH Army HQ (zone: That 70s Volcano)
The Velvet / Gold Mine (zone: That 70s Volcano)
LavaCo™ Lamp Factory (zone: That 70s Volcano)
The Bubblin' Caldera (zone: That 70s Volcano)
The Ice Hotel (zone: The Glaciest)
VYKEA (zone: The Glaciest)
The Ice Hole (zone: The Glaciest)

There seem to be checks for both The Glaciest and That 70's Volcano in Canadv so I'm not sure why. Any thoughts?
 
Getting Bad location value: "Globe Theatre Main Stage" (canadv.ash, line 364)

Where do I update or get the new one or ??????????
 
Getting Bad location value: "Globe Theatre Main Stage" (canadv.ash, line 364)

Where do I update or get the new one or ??????????

Just answered this same question where you posted it in another thread, but you need a new KoLmafia, not a new CanAdv. Get it HERE.
 
So r73 added that the Unquiet Garves don't lock just because you've unlocked the VERY Unquiet.
Then r74 added the specific locations for Glaciest and 70s Volcano - people like me who don't actually have the zones unlocked were already fine, because we failed the zone test. People who had the charter needed the zones to actually be adventurable there. It also added Crimbo2015 as a new zone and fixed the nemesis Volcano unlock from step 3 which someone guessed years ago to 22, which should be right post-revamp.
 
A small error: Knob Shaft should be moved out of always-unlocked-if-their-zone-is:

PHP:
  // lab
   case $location[The Knob Shaft]: return have_effect($effect[earthen fist]) == 0;

More detailed handling could be added to account for prep if you have the skill, but this will work in a pinch for fixing Crimbo scripts.
 
So earthen fist always locks the knob shaft? Does it also lock the dwarven mine?

Edit: No answer yet, and it's about time for me to sleep. Assuming so, and that's r79. Can tweak it if wrong.
 
Last edited:
Not a problem. I've been trying to fix CA to make it more accurate as I hit things, but for items which I don't possess or where I don't have the bug, more info is needed. :D
That's the issue with the charters - if you don't have the charter, it filters out all of the specific locations through the zone check. If you do have them, then the locations need to be there to evaluate to true.
It's why we don't currently need a Crimbo15 zone in the zone section - it's currently unlocked - but we do need the factory ruins down in the locations section - because we can adventure there.

Stuff that's remaining is whatever makes the machine elf zone work - because I don't have one and haven't ever gone there, and nobody's posted anything in this thread about what makes it work - and locking the post-war ducks off after you finish spending your 5 turns there. Otherwise it seems fairly accurate.
 
whatever makes the machine elf zone work

You can adventure there (there's only one location: the deep machine tunnels) if you have the machine elf familiar out, or the Inside The Snowglobe effect active (which comes from using Deep Machine Tunnels snowglobe)
 
So if famcheck works on the elf, then you can adventure there. If you have the effect, you can adventure there. If you have a snowglobe, it detects as available and if you ask it to prep, it uses it.

All sounds right?
 
All of the zones for Marty's quest need moving from "always open". Fortunately mafia makes all of this easy for us.

PHP:
  // le marais degueulasse 
   case $location[The Edge of the Swamp]: return qprop("questM18Swamp","started");
   case $location[Swamp Beaver Territory]: return get_property("maraisBeaverUnlock") == "true";
   case $location[The Corpse Bog]: return get_property("maraisCorpseUnlock") == "true";
   case $location[The Dark and Spooky Swamp]: return get_property("maraisDarkUnlock") == "true";
   case $location[The Ruined Wizard Tower]: return get_property("maraisWizardUnlock") == "true";
   case $location[The Weird Swamp Village]: return get_property("maraisVillageUnlock") == "true";
   case $location[The Wildlife Sanctuarrrrrgh]: return get_property("maraisWildlifeUnlock") == "true";

Also the qprop() function needs updating now that there are quests with steps numbering in the 20s.

PHP:
   boolean qprop(string prop, string target) {
      string currp = get_property(prop);
      if (currp == "unstarted") return false;
      if (target == currp || currp == "finished") return true;
      string s;
      for i from 0 upto 26 {  // nemesis quest has 26 steps (think it's the most atm)
         s = (i == 0) ? "started" : "step"+to_string(i);
         if (s == currp) break;
         if (s == target) return true;
      }
      return false;
   }
 
Okay, applied your two fixes.

Also committed the Deep Machine Tunnels tracking based on my understandings of a month ago that nobody felt like confirming. :)

Only zone in mafia that CanAdv doesn't believe it knows about in r16625 is snojo. If someone cares and wants to shed light on that soon, I'll add support. Otherwise, it will languish until someone cares and posts enough for me to make an educated guess on implementation.
 
In pseudocode that you can translate to actual ASH easily enough:

DMT: my_familiar() == machine elf (if no prep allowed; else you can use have_familiar) || have_effect(inside the snowglobe) > 0
Snojo: pref("snojoAvailable") == "true"
 
Okay, Snojo support is in. Had to modify that slightly to turn it into real ASH, as you said.
Tunnel support was already in. Until it's tested, I'll assume it's good. It's what you posted, but more robust... the item is also considered an allowance and will be used if you prep.

Which means CanAdv should potentially be fully accurate... if you find it not-so, at least post where. If someone with access to that zone gives enough information to fix it, we'll get it committed.
 
Code:
Unknown location: Gotpork Gardens Cemetery (zone:     Center Park (Low Crime))
Unknown location:     Gotpork Conservatory of Flowers (zone: Center Park (Low Crime))
Please     report this missing location here: http://kolmafia.us/showthread.php?t=2027
Please     report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown     location: Center Park After Dark (zone: Center Park (Low Crime))
Please     report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown     location: Gotpork Municipal Reservoir (zone: Center Park (Low Crime))
Please     report this missing location here: http://kolmafia.us/showthread.php?t=2027
unlockedLocations     => 226--, Cobb's Knob Treasury
You acquire an item: Degrassi Knoll     shopping list
You acquire an item: Fernswarthy's key
unlockedLocations     => 226--, Cobb's Knob Treasury, The Fungal Nethers
Unknown     location: Gotpork City Sewers (zone: Slums (Moderate Crime))
Please     report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown     location: The Old Gotpork Library (zone: Slums (Moderate Crime))
Please     report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown     location: Porkham Asylum (zone: Slums (Moderate Crime))
Please     report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown     location: Investigating a Plaintive Telegram (zone: Town)
Please     report this missing location here: http://kolmafia.us/showthread.php?t=2027
unlockedLocations     => 226--, Cobb's Knob Treasury, The Fungal Nethers, Whitey's Grove
 
As per always, if you want a zone unlocked that I don't have access to, you'll need to post the unlock condition as well...
 
For gotpork zones, hazarding a guess:
Code:
limit_mode() == 'batman'

For Investigating a Plaintive Telegram, the telegraphOfficeAvailable property should be true.
 
Back
Top