How is the mudlet mapper map updated (IRE)?

Post Reply
Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

How is the mudlet mapper map updated (IRE)?

Post by Slayd »

I'm trying to troubleshoot why my map in Imperian does not update when I use the facility built-in to Settings->Mapper.

Vadi suggested I submit a bug to Imperian admin. I did. The reply said their map is updated daily. I get in game alerts telling me to update my map.

Could someone who has worked on the mapper explain how the map is updated? I see an xml at the following url: http://www.imperian.com/maps/map.xml.

In my profile, in the map directory, I see .dat files like 22-08-2015#22-46-37map.dat. Reading mapper documentation, the dat files appear to be created by the mapper save custom command. I assume this is done as part of the save profile on exit process.

Am I able to load the map.xml file manually into the mapper. Is the Imperian map.xml file downloaded to my computer each time I press the download button on Settings->Mapper? The map I am using in mapper seems way out of date, many rooms no longer there, room connections missing, etc.

Could someone please talk me through the process? The only IRE game that seems to work trouble free for me on map updates is Achaea and only when using crowdmap.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: How is the mudlet mapper map updated (IRE)?

Post by SlySven »

Each time the game is exited and "allowed" to save, the map is also saved with the style of name you see there (it is in dd-mm-yyyy#hh-mm-ss format which is NOT optimal from a sorting point of view - the alphanumeric sort order is almost useless, yyyy first would be much better IMVHO!)

Generally you can load a map manually but for users' Mudlet uses a *.dat map file - I recall we do have code that parses an .xml file but from what I recall/can see it may not accessible manually as it seems to be invoked automatically for download map files. The format is internally organised differently so even if you were able to download the map file manually and "save as" from a Internet Browser I'm not sure if you can get it loaded in.

For the .dat type file you can load it in manually to Mudlet from the "Mapper" tab on the "Options" (a.k.a. profile preferences) dialog (and then exit the game to ensure it is written out for use next time.)

One provisio for using "crowdmaps" is that any customisation you do is likely to get lost once you next download the crowdmap; I don't know the full intricacies of how MUDs that offer these crowdmaps do their updates and how well the scripts that are used tolerate a map change - I am just speaking from a Mudlet application coder's Point of View.

I should warn you that I don't know everything so I could be wrong but I don't see how you can load the xml file in.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: How is the mudlet mapper map updated (IRE)?

Post by Vadi »

The only way to load the XML file in is to use the Settings > Mapper, download map from game. That will download the XML file linked above, provided you're connected to the server "imperian.com".

Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

Re: How is the mudlet mapper map updated (IRE)?

Post by Slayd »

That's not working for me, Vadi. When I try to use that approach, a dialogue box flashes on the screen, not long enough to read what it is doing, let alone download the map.xml file. The map never gets updated.

Related to this: when I first download an IRE map on a new profile, the dialogue box is up for a while as the .xml file is downloaded. But the map is blank, even if I previously set gmcp and closed/reopened mudlet before trying to get the map for the first time. The only way I could get a functioning map in this new profile scenario, is to manually create the map directory in the new profile, and seed that directory with an existing map.dat file from another profile for the same IRE game. Only in Achaea, once I've selected crowdmap, updates maps for me. No other IRE game.

Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

Re: How is the mudlet mapper map updated (IRE)?

Post by Slayd »

Just to close the loop. I ultimately had to not only uninstall/re-install mudlet, but also go in and manually delete the Home/.config/mudlet directory (after saving a copy). I did this between uninstall and re-install. I can now download initial maps as well as update them again. I had tried just uninstall/re-install many times before with no success.

May have had something corrupted in the directory itself as the map wouldn't update on any IRE game, old or new character.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: How is the mudlet mapper map updated (IRE)?

Post by SlySven »

@Vadim - do we need to provide a way to load a map in .xml format (and perhaps export it also) from within the Mudlet application by manual means? I suppose it is possible to write (though I suppose they may already exist) Lua scripts to do both of these? Inspection of the above quoted file reveal an .xml file format something like:

<map>
 <areas>
  <area id="areaId" name="areaName" x="0" y="0"/>
  ...
 </areas>
 <rooms>
  <room id="roomId" area="areaId" title="roomName" environment="envId"
important="1" color="#6hexDigitRGBColor">
   <coord x="x-coord" y="y-coord" z="z-coord"
building="buildingId"/>
   <exit direction="exitDirection in lowercase, unspaced words" target="destination roomId
tgarea="destination areaId if not the same" hidden="'1' if exit is hidden" door="'1' if there is a door"/>
   ...
  <room/>
  ...
 </rooms>
 <environments>
  <environment id="envId"
name="Environment Name" color="{Mudlet?} colorId" htmlcolor="#6hexDigitRGBColor"/>
  ...
 </environments>
</map>


The items in grey are optional or not necessarily parsed by Mudlet. I guess supporting manual .xml import/export (and documenting it) makes it easier to import and export map data from/to other MUD clients... :D

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: How is the mudlet mapper map updated (IRE)?

Post by Vadi »

I don't see much point, that XML can only be downloaded from IRE games, and a way to download it is already built into the application - see mapper settings, "download" button.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: How is the mudlet mapper map updated (IRE)?

Post by SlySven »

Vadi wrote:...that XML can only be downloaded from IRE games...
That may be so for THOSE IRE maps but XML does provide a good way to import/export map data in a human parse-able way from other sources - and can be hand-crafted/edited if absolutely necessary. Having a documented format (schema ?) makes it much easier to get the data from another MUD client - I have an old map from WoTMUD from many moons ago but that was from TinTin++ and whilst a set of Lua scripts might be able to enable me to import the data a manually usable XML parser is a more elegant IMHO way of doing things...

I have downloaded some of the maps from IRE games with a browser and have read them in successfully from local storage with my modified codebase - which if it got into the release code-base might have helped the OP...

Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

Re: How is the mudlet mapper map updated (IRE)?

Post by Slayd »

+1

I have given up on the mudlet map import functionality as it stands now, for IRE games: Achaea (except crowdmap), Imperian, Lusternia.

When I create a new IRE character and try to download the map for the first time, the progress bar looks good and then nothing. I've set up gmcp and tested that works before trying to get the map.

The map directory in the new profile is not created as part of the download process. I am running the latest OS X, but also have Windows and have tested it there. I've tried with both mudlet 2.1 and mudlet 3-delta. Even using Achaea crowdmap, it fails until I have manually created the map directory inside the new profile. What read-write-execute privileges is mudlet expecting? What account is mudlet running under when it tries to create the map directory?

If I switch to crowdmap in Achaea, and have manually set up the map directory ahead of time. I get usable map data.

While experimenting in Imperian, I uninstalled mudlet, deleted the .config directory, reinstalled mudlet then created a new profile/character. I had to create the map directory again, but was finally able to download the map using mudlet functionality. The maps were messed up but that was because all the private homes/areas were showing sometimes superimposed on other rooms. Why did I have to delete .config and create another directory structure. I had bugged the map data with Imperian support, and they replied it was updated daily.

Unfortunately, after that initial download, if I got a message that the map was updated and tried to update it, I downloaded an incomplete map i.e. the Antioch area was missing, ROOM LIST gave me an empty list, so I had to reload my older map.

An XML file import facility, available to the end user, would allow me to troubleshoot the problem. Isn't that was mudlet is using under the covers? Can't it be open to our use too?

Am I the only asshole having this problem? Has no one else tried to create a new IRE alt and load the initial map? Would someone please try and report back? Imperian, Lusternia and Achaea (non crowd) needs to be tested. If its working for everyone else and just not me, I will fuck off and never bother this board again.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: How is the mudlet mapper map updated (IRE)?

Post by SlySven »

I'm not aware of any rectal orifices having this problem ;) , it is just that some people go off and do things that push the envelope of what Mudlet ought to do and as the range of things that it does that could benefit from some polishing is, um, a target-rich environment some features get to be a little more shiny than others. I'm someone who is willing to get their hands dirty {I'm currently doing an open-heart operation on the C++ class that stores all the information about rooms and I want to make sure that I get all the bits joined back together in a more straightforward, streamlined and, well, working manner, without any data spurting out uncontrollably :ugeek: } so when I can, I will try and see if what I cobbled together is up to being put out for general consumption.

In hindsight I guess the existing use case, specifically downloading and using MUD server provided XML based maps from IRE games was working enough that those who were having a problem did not have enough idea that what was going wrong was specifically a fault with Mudlet.

<coder_note>
In reviewing the code around line 243 of ./src/dlgMapper.cpp in the (void) dlgMapper::replyFinished( QNetworkReply * reply ) class member function I see that the {map.xml} file that has been downloaded from the IRE server chosen depending on the MUD selected is written straight out to the main profile specific sub-directory of the user {i.e. to ~/.config/mudlet/<profile_name>/map.xml - the filename is fixed}- without checking that it has even been received without errors or that the target directory actually exists {this seems to assume that the directory has already been created, which may not actually be the case for a NEW character - I'm not sure of the programme flow without further research}. Immediately afterwards Mudlet tries to open the file from that location and will put up a message box if it cannot; OTOH, if it can, the code that parses the XML, which is a little light on explicit error reporting, does flag if there was an overall problem. Sadly, the code that calls it doesn't bother to check that currently, it just blows away any previous map, tries to use the new data, assumes it is OK and raises a "sysMapDownloadEvent" for the lua subsytem and user scripts to work on...
</coder_note>

Maybe a bug report needs to be filed (so we are less likely to forget it).

Post Reply