Building info in the Aetolia map .xml

All and any discussion and development of the Mudlet Mapper.
Post Reply
Ginga Giri Giri
Posts: 11
Joined: Mon Dec 17, 2012 2:58 am

Building info in the Aetolia map .xml

Post by Ginga Giri Giri »

Hi! I'm writing my own custom text-based map display for Aetolia and I've run into a bit of a snag.

I'm trying to prevent rooms that are inside player buildings from overlapping on the main maps for the areas they belong to. I noticed that Aetolia's .xml file does indeed specify whether a room is in a building or not, as you can see here.

Regular room:
Code: [show] | [select all] lua
   <room id="13208" area="111" title="Before the towering gates of a great citadel" environment="26">
      <coord x="0" y="5" z="2" />
      <exit direction="south" target="13207" />
      <exit direction="in" target="13209" />
   </room>
Building room:
Code: [show] | [select all] lua
   <room id="51455" area="25" title="Passing the cells for prisoners of state" environment="8">
      <coord x="27" y="-4" z="0" building="45797" />
      <exit direction="northeast" target="52744" />
      <exit direction="west" target="51979" />
   </room>
Note the "building" entry in the coord attribute. Is Mudlet retaining this information? If so, how can I access it?

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

Re: Building info in the Aetolia map .xml

Post by SlySven »

Nope! Though I am revising the XML parser currently (have prototype code that adds the ability to MANUALLY import a XML map file which cannot be done from the GUI presently.)

I am also added code to process and include the "door=1" {or 2 or 3} and "hidden=1" {treats as door=3} exit attributes. Also am extending environment processing code so the user can find out the full env id and what it means (previous code only looked at the "color" attribute that mapped environments to one of the colors 1-15 - new code looks at the "htmlcolor" attribute if present and maps the room to use THAT instead if it can). Of the IRE MUDs Achaea is currently the only one using different "htmlcolor" values for environments with the same "color" - which isn't being used in the published Mudlet code.

I am looking at my prototype code and something is wrong with it at present but what is the significance of the "building" attribute - it seems to represent one of the room vnumbers within the building - is that the sole entrance or what? Also if you are getting overlaps is your room size at 11 - the 10 makes the rooms completely fill the space (and thus masks out the exit lines from rooms in immediate adjacent spaces) but if you decrease that to say 8 that should look better. My current code is somehow losing rooms I think so I've gotta check that out first but I want to look at this.

I would consider adding this attribute to the room user data using the key "xmlParse.coord.building" and then I would change things so that those "hidden" and "door" exit attributes are saved in the same data area under keys"xmlParse.exit.<exit direction>.door" and "xmlParse.exit.<exit direction>.hidden" respectively. That being the case, what other XML per room or per exit attributes should at least be parsed even if Mudlet cannot make use of them. I suppose we ought to make it possible to export Mudlet maps as well so there is some more data entities that should be allowable as well - if anyone else can think of something that we should handle now would be a good time to mention them!

One thing I have noticed is that none of the IRE MUD maps use what we call "Special" exits - that is something that will have to go in to allow using XML import as an easy way to import maps from other Clients.

Ginga Giri Giri
Posts: 11
Joined: Mon Dec 17, 2012 2:58 am

Re: Building info in the Aetolia map .xml

Post by Ginga Giri Giri »

Thanks for the insight! Knowing that Mudlet isn't handling the building data is better than nothing - it means I can move on and try to find other solutions. I hope your work goes well, capturing that info would be very helpful!

Let my illustrate my precise problem. This issue is coming up as a result of me creating a custom text-based map. I'm not using the engine's 2D/3D mapping solution. Here's a shot of the in-game map, vs. my efforts at map generation. In this first screenshot, you can see it working fine (except for how I hadn't yet put in exit links).

Image

In the next example I'm using an alternative method of displaying the map. This has exit links so you can really see what's going on. I've made it so that any overlaps appear as an "(?)" glyph with no exits.

Image

The building coordinates in the map .xml data are literally the game's internal ID for the player house. If this information could be somehow utilized, it would be trivial to partition off maps (if room.building ~= cell.building then return end) exactly how the game's mapper does it! Any efforts to add this feature would be greatly appreciated.

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

Re: Building info in the Aetolia map .xml

Post by SlySven »

Have you ever used the TinTin++ client? Your work sort of looks like that console-based client's mapper and seems vaguely familiar to me!

Also in THAT client there is the option to set an exit or a room with a flag that hides what is beyond it or it respectively IIRC. Mudlet does not have "hidden" or "hide the stuff on the other side of the exit" options - for rooms OR exits, explicitly - but perhaps you could record something to do so in the room's user data for when you use the data to draw your own map.

I take it you must be parsing the XML data yourself using a lua script?

Post Reply