A slight issue has arisen with the Caledon Directory, in that, ahem, it doesn’t work. Well, to be fair to myself it does work in Caledon I, and it does produce a map with all of the landmarks placed appropriately - it is just that when one touches a landmark outside of Caledon I and opts to Teleport, one does not actually go there.
The reason for this is simple. The Directory holds a number of landmarks, which as I am sure you are aware are a specific and special type of object in Second Life. A script may only read the contents of a landmark via the llRequestInventoryData function (as it happens, this function can only read the contents of a landmark) and the datum returned is the position of that landmark.
Here is the issue: that position is a local position in the sim that the call was made. Thus, if my Directory makes the call from Caledon I relating to the Takashi Estate, say, the returned position is <413, 393, 39> even though the position within the Caledon Highlands is <156, 136, 39>. Now, there is currently no way to retrieve the name of a sim from its global co-ordinates (found by adding the value of llGetRegionCorner) thus the poor Directory is forced to tell the map that the location is, indeed, Caledon (413, 393, 39).
It is fortunate that the map is able to interpret this into a proper position for the little lightbulb icon, but when it comes to travelling back to the Grid, alas, it fails. A secondlife://SimName/X/Y/ link is used and this is not able to interpret a co-ordinate actually outside the sim in question. Try it for yourself - you will simply be pointed to Caledon (256,256) which is not a useful position in the slightest.
From delving into the Javascript behind the Map API (an activity which requires heavy rubber clothing and vaccination beforehand) I was able to ascertain that there is a function therein which translates global positions to the name of their sims, but there are good reasons why one not should not use functions which are not actually part of the API itself; they may change at a moment’s notice. In any case it would be an inelegant hack to use such.
So, well, I had hopes for the simplicity of the approach that I was using, simply holding landmarks, but it seems that it is not perfect. I have a few other ideas involving such things as an additional central list of locations, but they are not quite as elegant.
During conversation, the idea of a device attached to one which repeats notes pertaining to the current location came up, and I have a prototype of such which allows one to records such notes. It might be an idea to create one which is controlled purely by a notecard, a tour guide if you will, which gives the wearer enlightening information when they are within a certain distance of a notable landmark, in a manner similar to the automatic tour guide devices provided by certain Museums, yet less annoying, as it would not require one to follow a certain path and also to listen to irrelevant dronings on the luncheon habits of some long-dead artistic gadabout.
Edit: and now, thanks to the expertise of my readers, it is working. Lawks!


8 comments
Comments feed for this article
Trackback link
http://ordinalmalaprop.com/engine/2006/07/31/a-slight-issue/trackback/
August 1, 2006 at 10:19 am
Barney Boomslang
How about just using a “master-map” of regions in your tool? So you see that the coordinate relative to caledon I is over 256 - so it must be in another sim. And you know what sims are there in caledon, so you can subtract 256 from the direction that is above 256 and “move” your internal pointer to the sim that is in that direction. Continue to subtract 256 from the coordinates and move the internal pointer and you should end up with the right sim name and the right coordinate.
Sure, this requires a change whenever a new sim comes up, but that isn’t that often the case, so it should be possible with relative minor work.
August 1, 2006 at 10:49 am
ordinal.malaprop
Oh, yes, I could do it specifically for Caledon, as I know what the sim names are there. However, for elegance’s sake I would prefer a system which worked automatically and, more importantly, I am thinking that this might be a more general tool for landowners around the world.
I am currently thinking that a solution simply containing a notecard listing sim names and locations would be workable, as the in-world device could use llMapDestination to send people there, the map itself would work, and in fact one does not always want a landmark for everywhere one wishes to visit anyway.
August 1, 2006 at 4:23 pm
Dyne Talamasca
Actually, I believe there IS a function that retrieves the name in the API.
I discovered it last time I poked around the API documentation (shortly after the nick of time … when I was making the grid map now in the Academy, I needed some means to find the names of islands, since SL’s World Map kills my net connection)
Ah, here we go: getRegionName:
http://secondlife.com/developers/mapapi/example-get-region-name.html
It isn’t in the API guide, apparently due more to lack of the guide getting updated than the function not being part of the API (since it’s listed on the Announcements, and there’s an example for it).
August 1, 2006 at 4:36 pm
ordinal.malaprop
Oh, I see, well spotted. I will be able to use that then I suppose which will save some time. I shall have to change things to send global co-ordinates rather than region-relative ones I suppose, but that is easily done (I think).
August 1, 2006 at 10:15 pm
ordinal.malaprop
Well, that all seems to be working now, as far as I can tell.
August 2, 2006 at 2:30 am
Desmond Shang
Absolutely wonderful!
I’ve been working on the railroad, as well - hoping to get at least one line running before I leave for the Far East on 7 Aug.
The train is still very much ‘in the rough’ especially in terms of elegance and motion, and I am still mitigating the prim grace period issue.
Ordinal, I’ll have to discuss a few fine points with you later which may enlighten me and smooth it considerably.
Great to see some of Caledon’s stunning minds here, and commenting :)
August 2, 2006 at 6:35 am
Dyne Talamasca
Good to hear it.
I forgot to mention, though, that you have an outdated landmark to my parcel, which is now owned by someone else. Elsewhen Tower moved to Caledon Tamrannoch when it opened, slightly south and east of where the directory says it is (it’s now on the east shore of that southern inlet).
August 2, 2006 at 1:56 pm
ordinal.malaprop
Ah, right. I shall replace that landmark. Actually I should go around the various sims and take landmarks for each… a rather laborious task, but, well, it is the only way. Perhaps some New Resident Urchin could be paid a sum to do this.