I wish I had named it pirateRealmAlways (and _pirateRealmToday), rather than following the lead of "frAlways".
I didn't even know we had preferences -> IOTM tracking.
That was a smart idea, whoever did it.
I added it a while back for items of the month with daily passes which can’t otherwise be recognised
One last feature request:
Could the activation message for the lucky gold ring be logged into the session logs? (And maybe Screege, Cheengs too. Snowglobe might be trickier).
We're getting so many end of combat things that it can be tricky to distinguish what came from where.
Revision 19186 adds all of the PirateRealm islands as individual adventuring location. This is primarily for logging and to allow each location to have exactly the correct monsters in it, but you can automate using the individual island names.
I left the following as adventuring locations:
Sailing the PirateRealm Seas
... which are what you see in the charpane, but I also made "PirateRealm Island" a "zone" which contains:
and all the rest. They all have the same URL as the "PirateRealm Island" location, but when translating from URL to Adventure Location, if it is that (shared) URL, we look in the "_lastPirateRealmIsland" setting, which is set when you choose the island in "Island #1, Who Are You?", "What's Behind Island #2?", or "Third Island's the Charm" choice adventures.
I left the "PirateRealm Island" location for backwards compatibility; if you have a script which uses only the two advenure.php URLS in PirateRealm, you can use the original names for them. I believe that any script which runs PirateRealm, if there are any, has to know which islands it is visiting - and in any case it caln look at _lastPirateRealmIsland to get the real location name, but, whatever.
I do not validate whether you can actually go to "Crab Island", for example. I could check the setting, but I don't (yet) clear that setting when you have done the boss fight or otherwise collected the reward. For that matter, we don't validate either the generic "Sailing the PirateRealm Seas" or "PirateRealm Island" adventures. Probably should do that - and also at least recognize the "you can't go there any more" messages, if you try to automate when they are unavailable.
Nice job. If you are only leaving it in for backwards-compatibility, you may want to consider warning people that it is deprecated (sort of like the warning you’d get for using $location[PirateRealm Isla]). Considering how new the content is, I doubt there are many unmaintained scripts using that location by this point. After a few months of notice, it should be safe to remove the old location entirely.
Originally Posted by Veracity
Leaving it in can make things tricky for scripts that iterate through $locations, so it is best avoided in the long-term in my opinion.
Oh, and I have an equipment script that is equipping Red Roger's red left foot when my_location() is PirateRealm Island. It doesn’t need to know which island for that. Anything else probably would, though.
Is “PirateRealm” still a zone? As far as organization goes, this is a bit like Hobopolis: everything in the zone works similarly with regards to applicable modifiers and such, with one exception. In Hobopolis’s case, “A Maze of Sewer Tunnels”. In PirateRealm, “Sailing the PirateRealm Sea”. Based on that precedent, I don’t think sequestering the islands in a distinct zone is necessary.
If you can nest zones, which I wasn’t aware of as a possibility, maybe we could do the same with Hobopolis?
Zones can nest. There is no visibility within ASH for zones, but they are displayed in the GUI and you can filter on them, just as for individual locations.
PirateRealm -> Sailing the PirateRealm Seas = a location
PirateRealm -> PirateRealm Island = a location, but which maps to a specific island, which changes as you progress
Those two locations appear in the charpane (and api.php) as links to adventure.php?snarfblat=xxx
And that is a reason to leave them. I'll give a specific example later.
PirateRealm -> PirateRealm Island -> Crab Island = a location
Happens to have the same adventure number as "PirateRealm Island", but if we know you are adventuring there, my_location() returns $location[ Crab Island ] which has "giant crab" and "giant giant crab" as monsters.
Now, why would we want generic "PirateRealm Island" as a location?
Looking at my own session log:
I got the choice adventure to choose (this or that) island.
(At tis time, KoLmafia knew what my various choice options ere; it had a map from option number -> (text displayed for that option. 1 -> Crab Island, etc.)
This was a choice that, somehow, did not prevent me from doing SOME other things. I didn't know which isand to go to, so I ran "missingManuel".
That looked up every Manuel page and reported on which monsters had incomplete factoids.
Based on that idata, I selected the choice option - in the relay browser - for the Island which would get me factoids.
KoL accepted it!
And KoLmafia reported I had taken choice XXX option 3 which was "unknown" - since it had thrown away the choice options.
That is probably worth a closer look; I was still in a choice, although I had opened 27 Manuel pages, at least.
But, because I had navigated away from the choice - as KoLmafia thought - it forgot the options.
As I said - it should not have forgotten them. Peraps Manuel (questlog) requests should not count as "walking away" from the choice.
But the result was that _lastPirateRealmChoice was "unknown".
Which we now translate to the generic "PirateRealm Island" adventure, given a PirateRealm Island URL.
If you take that choice outside of KoLmafia, the same thing will happen: we will recognize you are in PirateRealm Island but will not know which one.
That's a degenerate case, but we CANNOT assume that every single click you make in the game has been watched by KoLmafia.
I'm not sure if anyone else is having this issue, but whenever I try to access the Fun-A-Log in the relay browser, I get this chaos.
Do you have a shop.php relay override that can't handle the piraterealm fun-a-log?