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

Theraze

Active member
Should be uploaded now. Unless Crimson Editor is failing to actually SAVE in the format I'm telling it to use. If so, then I move on to another editor. Until I find one that will actually work.
 

lostcalpolydude

Developer
Staff member
One of the encoding options for Notepad++ is UTF-8 w/o BOM, so that should work fine. It also tells me that crown.ash and towerChecker.ash are in that format, and those have only been edited by me and only in Notepad++, so I guess file creation defaults to a usable encoding even. (I had never bothered to look at that before just now.)
 
If i
Code:
svn checkout https://svn.code.sf.net/p/therazekolmafia/canadv/code/
now, it still gives me a file that has a single 0xE8 byte in the place where the "è" of "Dègeulasse" is written. This is consistent with what Windows probably considers "ANSI" encoding. In UTF-8, the è would be two bytes: 0xC3 0xA8

So either your editor reconverted it back, or some subversion mechanism helpfully wanted to "correct" the "mistake" of the "wrong" encoding.

If you want to experiment with saving, svn-updating, svn-checkingout and everything to see whether the process worked out, but you don't have a tool handy that just shows you the raw bytes of the script, you may check the file size: The current script in svn (r35) is 36'857 bytes; in UTF-8 it should be 36'858 bytes (or three more bytes, if something decides to stick in an "UTF-8 BOM" in there).
 
Last edited:

xKiv

Active member
I would consider that to be getting around a Java library bug.

I wouldn't. Unicode support is messy and complicated. There are libraries. ICU for java has ... over 3 megabytes?
BOM is an actual unicode character, so not including it in the decoded string would be a bug too, at least without any normalization (and I don't think java does any level of unicode normalization by itself).
At least we don't have to care about combining sequences (yet).


I will point out that the format I said that "ONLY Windows will be able to read" is what Theraze called "ANSI"

And I will point out that this format is not ont that windows is *guaranteed* to be able to read correctly ;)
(my windows' "ANSI" is different from Theraze's windows' "ANSI")


When Emacs reads in a file, it looks at the whole thing and uses heuristics to decide how it is encoded and converts non-Unicode to Unicode for its own internal usage
...

I don't use Emacs, but vim does something like that too - it has a list of encodings to try (including "ucs-bom" which looks for any valid encoding of BOM and selects the corresponding unicode encoding), but can only handle one given 8-bit encoding (can't tell the difference between them).
 

Theraze

Active member
Looks like Crimson Editor just fails to actually write in UTF-8 for me. Joy.

Switched to Notepad++ and it seems to have actually added the extra byte.
 

Theraze

Active member
Interestingly, the Pump Up adventures are not listed as being part of their related zones - they're in a unique 'Gyms' zone instead, which is why Pump Up Mysticality returned true when our Little Canadia check was already in and working. Moved the 3 Pump Up/gym locations to their own section out of the otherwise-related zones, and gave them duplicate zone-checks since the official zone check is useless.
 

chown

Member
Just fyi, I don't think I saw any of these reported:

(My main goal was just to report the "Unknown location:"s. But also, I'm editing this to pose the additional question: Doesn't can_adv(where, false) mean not to mess with the equipment and buffs at all, rather than that any changes should be reverted afterward? It's a fairly minor issue, of course, but the former meaning makes more sense to me, and it appears that only a check for the pirate fledges did any such messing....)

Code:
> ash import <canadv.ash> foreach where in $locations[] can_adv(where, false);

Checking resistance to stench...
Internal checkpoint created.
Putting on pirate fledges...
Equipment changed.
Putting on tiny plastic chunk of depleted Grimacite...
Equipment changed.
Internal checkpoint created.
Putting on pirate fledges...
Equipment changed.
Putting on tiny plastic chunk of depleted Grimacite...
Equipment changed.
Internal checkpoint created.
Putting on pirate fledges...
Equipment changed.
Putting on tiny plastic chunk of depleted Grimacite...
Equipment changed.
Unknown location: The Thinknerd Warehouse
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Cave Before Time
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Inner Wolf Gym
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: Unleash Your Inner Wolf
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: Sweet-Ade Lake
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: Eager Rice Burrows
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: Gumdrop Forest
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: A Deserted Stretch of I-911
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Prince's Restroom
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Prince's Dance Floor
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Prince's Kitchen
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Prince's Balcony
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Prince's Lounge
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Prince's Canapes Table
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: Ye Olde Medievale Villagee
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: Portal to Terrible Parents
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: Rumpelstiltskin's Workshop
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Fun-Guy Mansion
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: Sloppy Seconds Diner
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Sunken Party Yacht
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Returned: void
 
Last edited:

Theraze

Active member
Yes and no. Certain areas require actually checking with the item. Specifically the pirate_check temporarily enables the prep-check so that we can find out if the zone is still available. Since it isn't always.
 

chown

Member
Okay, but why not just return false, then, when the fledges (or outfit) aren't already equipped? How is that different from other equipment changes that might be needed to adventure at some location?
 

Theraze

Active member
*shrugs* Nothing I say will convince you, so I'll just go with two simple answers.

1) Because that's how it is.
2) And because of SVN, if you want your copy to work differently, you can change how it works for you.
 

Bale

Minion
If I was to guess, I'd say that you are probably using a version of KoLmafia that dates to the era before the Spookyraven revamp (2 months ago) so it doesn't know that The Haunted Boiler Room exists.

Download an up-to-date version from HERE.
 

Fluxxdog

Active member
Got this today:
Code:
Unknown location: A Mob of Zeppelin Protesters
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
unlockedLocations => 52--, Cobb's Knob Barracks
unlockedLocations => 52--, Cobb's Knob Barracks, Cobb's Knob Harem
unlockedLocations => 52--, Cobb's Knob Barracks, Cobb's Knob Harem, Cobb's Knob Kitchens
unlockedLocations => 52--, Cobb's Knob Barracks, Cobb's Knob Harem, Cobb's Knob Kitchens, Cobb's Knob Treasury
Checking resistance to stench...
You can already resist stench.
Unknown location: The Copperhead Club
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
Unknown location: The Red Zeppelin
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
No logic exists for A Mob of Zeppelin Protesters
No logic exists for Cobb's Knob Menagerie, Level 2
 

Theraze

Active member
The following locations are all untracked. I'm tempted to put the twitch zones into the always closed section. Any sections that we actually know how and when they're unlocked?
Unknown location: The Thinknerd Warehouse
Unknown location: The Red Zeppelin
Unknown location: The Cave Before Time
Unknown location: An Illicit Bohemian Party
Unknown location: Moonshiners' Woods
Unknown location: The Roman Forum
Unknown location: The Inner Wolf Gym
Unknown location: Unleash Your Inner Wolf
Unknown location: Sweet-Ade Lake
Unknown location: Eager Rice Burrows
Unknown location: Gumdrop Forest
Unknown location: A Deserted Stretch of I-911
Unknown location: The Prince's Restroom
Unknown location: The Prince's Dance Floor
Unknown location: The Prince's Kitchen
Unknown location: The Prince's Balcony
Unknown location: The Prince's Lounge
Unknown location: The Prince's Canapes Table
Unknown location: Ye Olde Medievale Villagee
Unknown location: Portal to Terrible Parents
Unknown location: Rumpelstiltskin's Workshop
Unknown location: The Fun-Guy Mansion
Unknown location: Sloppy Seconds Diner
Unknown location: The Sunken Party Yacht

But you're using an old version of the script. Since the current version has Copperhead Club known.
 

Bale

Minion
Unknown location: The Thinknerd Warehouse

This is the only one I don't know.

Unknown location: The Cave Before Time
Unknown location: An Illicit Bohemian Party
Unknown location: Moonshiners' Woods
Unknown location: The Roman Forum

Code:
   case $location[The Cave Before Time]:
   case $location[An Illicit Bohemian Party]:
   case $location[Moonshiners' Woods]:
   case $location[The Cave Before Time]:
   case $location[The Roman Forum]: return get_property("timeTowerAvailable") == "true";

Unknown location: The Red Zeppelin

Code:
   case $location[The Red Zeppelin]: return get_property("zeppelinProtestors") >= 80;


Unknown location: The Inner Wolf Gym
Unknown location: Unleash Your Inner Wolf

Code:
   case $location[The Inner Wolf Gym]:
   case $location[Unleash Your Inner Wolf]: return get_property("grimstoneMaskPath") == "wolf";

Unknown location: Sweet-Ade Lake
Unknown location: Eager Rice Burrows
Unknown location: Gumdrop Forest

Code:
   case $location[Sweet-Ade Lake]:
   case $location[Eager Rice Burrows]:
   case $location[Gumdrop Forest]: return get_property("grimstoneMaskPath") == "witch";

Unknown location: A Deserted Stretch of I-911

Code:
   case $location[A Deserted Stretch of I-911]: return get_property("grimstoneMaskPath") == "hare";

Unknown location: The Prince's Restroom
Unknown location: The Prince's Dance Floor
Unknown location: The Prince's Kitchen
Unknown location: The Prince's Balcony
Unknown location: The Prince's Lounge
Unknown location: The Prince's Canapes Table

Code:
   case $location[The Prince's Restroom]:
   case $location[The Prince's Dance Floor]:
   case $location[The Prince's Kitchen]:
   case $location[The Prince's Kitchen]:
   case $location[The Prince's Balcony]:
   case $location[The Prince's Lounge]:
   case $location[The Prince's Canapes Table]: return get_property("grimstoneMaskPath") == "stepmother";

Unknown location: Ye Olde Medievale Villagee
Unknown location: Portal to Terrible Parents
Unknown location: Rumpelstiltskin's Workshop

Code:
   case $location[Ye Olde Medievale Villagee]:
   case $location[Portal to Terrible Parents]:
   case $location[Rumpelstiltskin's Workshop]: return get_property("grimstoneMaskPath") == "gnome";

Unknown location: The Fun-Guy Mansion
Unknown location: Sloppy Seconds Diner
Unknown location: The Sunken Party Yacht

Code:
   case $location[The Fun-Guy Mansion]:
   case $location[Sloppy Seconds Diner]:
   case $location[The Sunken Party Yacht]: return get_property("sleazeAirportAlways") == "true" || get_property("_sleazeAirportToday") == "true";
 
Last edited:

Bale

Minion
Corrected code for "The Red Zeppelin" in previous post! If you already copy/pasted it, I'm sorry.
 

Razorsoup

Member
Unknown location: The Thinknerd Warehouse

This is the only one I don't know.

Wouldn't that be

Code:
case $location[The Thinknerd Warehouse]: return get_property("questM22Shirt") != "unstarted";

since as long as you have at least started Melvin's quest, you have access to the Thinknerd Warehouse?
 
Last edited:
Top