Feature - Implemented Matching location names between KoL and KoLmafia

12264 updates these location names and adds functionality connecting old names to new names. My plan is to remove locations from that array shortly after the next point release, and if there's ever a point release where that array is empty then I'll delete all that extra code. The next point release can probably come as soon as July's IotM is implemented.
 
I have one request: Would it be possible to identify which scripts are processing old names? If bork.ash is using Giant's Castle (Basement), have it pop up in the notice:
Code:
The string "Giant's Castle (Basement)" no longer matches a location name; use "Castle in the Clouds in the Sky (Basement)" instead (bork.ash)
Heck, a line number would help it more.
 
Dungeoneer's Association has a new NAME!

Ah, [DungeonFAQ - Level 1]! Nothing brightens up an indoor space like some plants, I always say.
Ah, [DungeonFAQ - Level 2]! Nothing brightens up an indoor space like some plants, I always say.
Ah, [DungeonFAQ - Level 3]! Nothing brightens up an indoor space like some plants, I always say.

Apparently the brackets are part of the name. Yes, the dungeon is currently open. (My charpane claims level 1 is called "The Thornyflats," but the Florist Friar disagrees.)
 
I refuse to match that in mafia. I consider it a KoL bug. That name is the same as it has been since I checked a while back, mentioned somewhere in one of the other threads.
 
Ah. Found the thread. Merged it. Is it really a KoL bug, just because we don't like the name?

Well, I'll program a work-around for ChIT.
 
There is no way Jick would consider a location name with [] in it aesthetically pleasing. It also wouldn't surprise me if trying to change the location to those names causes issues similar to The "Fun" House.
 
Eh, the brackets match both sides. Looks pleasing enough to me. Why wouldn't it necessarily look pleasing to Jick? And it has the additional amusement of causing difficulty in coding for people who aren't KoL proper, which sometimes drives decisions... :)
 
Brackets? Great.

Anyway, I found another mismatch or three if that's the way you count it.

Astral Mushroom (Bad Trip) is An Incredibly Strange Place (Bad Trip)
Astral Mushroom (Mediocre Trip) is An Incredibly Strange Place (Mediocre Trip)
Astral Mushroom (Great Trip) is An Incredibly Strange Place (Great Trip)
 
Here's another set:

Stately Pleasure Dome is The Stately Pleasure Dome
Mouldering Mansion is The Mouldering Mansion
Rogue Windmill is The Rogue Windmill

I've now planted +25% items, +MP and +HP flowers in 100 locations. There is no trophy for doing that.
 
This one. Do we need two threads? Merge them? Close one of them? End up with One (location name) Thread to Rule Them All?
I'm happy with any of the above. Or just tell me which thread I should add them too. Or close them both and I can make new ones for each I find. All fine with me.

EDIT: Oh, I just figured out there are three threads, not two.
 
Last edited:
Regarding The "Fun" House:

The NPE comes from trying to use the OLD_LOCATIONS and associated values before they are initialized, but that's only supposed to happen with user-supplied input, so the real problem is that StringUtilities.getMatchingNames() (the call 5 lines before the one that leads to an NPE) isn't finding a matching name. After staring at it for a while, I don't feel any close to understanding why. If I remove the code for old name matching, things start up fine, but there is nothing that I can figure out to put in $location[] to avoid a fuzzy match warning.
We are not looking for an exact match because we are not putting "" around the string. That's easily done. Once we try matching, we convert the name to "canonical" form - which puts in HTML entities, like " for ". I expect that has something to do with why it's not matching, but I have more investigation before I figure it out.

Seems tractable. I'll figure this out tomorrow, I expect.
 
It might not even be mentioned in this thread, but I couldn't figure out how to support The "Fun" House.
It was in another thread.

> ash $location[fun house]

Changing "fun house" to "The "Fun" House" would get rid of this message ()
Returned: The "Fun" House
nocombats => false
zone => Plains
parent => Plains
parentdesc => Nearby Plains
environment => indoor
bounty => empty greasepaint tube
combat_queue =>
noncombat_queue =>
kisses => 0

> ash $location[The "Fun" House]

Returned: The "Fun" House
nocombats => false
zone => Plains
parent => Plains
parentdesc => Nearby Plains
environment => indoor
bounty => empty greasepaint tube
combat_queue =>
noncombat_queue =>
kisses => 0
Revision 12757.

Is this done now? :)
 
Looks good to me. I'm sure there are a handful of locations missing, but people can make separate threads when they find those.
 
Back
Top