(mapping script) Mudlet Mapper script for Achaea/IREs

All and any discussion and development of the Mudlet Mapper.
missari
Posts: 6
Joined: Tue May 10, 2016 12:48 am

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by missari » Thu Jun 09, 2016 3:50 pm

I don't know how the crowdmap thing works, but if we can get this thing working correctly I wouldn't mind. I'm already using mudlet 3.0 so the https change won't affect me >_>
lua display(gmcp.Room.Info)
{
map = "www.aetolia.com/irex/maps/clientmap.php ... =0&level=1 0 0",
num = 19344,
details = {
"indoors",
"darkness"
},
coords = "46,0,0,1",
desc = "Sloping sharply, the cavern begins to take shape. Waters from the delta just outside lap at its rocky shores
and have smoothly eroded the very edges of the entrance, but they do nothing to chase away the perturbing odour
escaping from the deeper, inner reaches of the underground structure.",
name = "A damp cavern entrance",
environment = "Natural underground",
exits = {
d = 19346
},
area = "the Caverns of Mor"
}

User avatar
keneanung
Site Admin
Posts: 94
Joined: Mon Mar 21, 2011 9:36 am
Discord: keneanung#2803

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by keneanung » Thu Jun 09, 2016 8:15 pm

Hrm... This looks good, so either mudlet or the mapper has a bug or you are using it wrong, but I can't see how. I'll point the Achaean mapper here when I get hold of him...

About the crowdmap: You basically export the map and others can download and use the map. Achaea's crowdmap is hosted in a way that the mapper can do that automatically. And for others to download it, it should be reachable via http.

missari
Posts: 6
Joined: Tue May 10, 2016 12:48 am

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by missari » Sat Jun 18, 2016 6:18 am

I found a fix, by selecting the rooms via the GUI map and changing the area that way it sticks.

jgh713
Posts: 9
Joined: Tue Jun 14, 2016 8:32 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by jgh713 » Sat Jun 18, 2016 10:05 pm

Oh hey, someone encountered the same bug as me. It's a setRoomArea bug with mudlet 3.0. I'm not sure if it's a problem with area creation or a problem with setRoomArea not working properly with empty areas, but if you create a new area on 3.0delta, you can't move rooms into it.

2.1: setRoomArea returns nil no matter what, but works with both newly created areas and empty areas properly.
3.0: setRoomArea returns true on success, but silently fails, returning nil (and no error) when trying to move a room into an area that's newly created and empty.

Endlessly frustrating. Definitely needs to be looked into.

jgh713
Posts: 9
Joined: Tue Jun 14, 2016 8:32 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by jgh713 » Sat Jun 18, 2016 10:06 pm

And after testing with missari's workaround, it looks like an issue with moving rooms into empty areas, instead of an issue with area creation. After moving a room into an area with the mapper window, setRoomArea works fine.

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

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by SlySven » Sat Jun 18, 2016 11:54 pm

So, the issue seems to be that moving a room into an empty (room-less) with the lua command setRoomArea( <roomId>,<areaId> ) is not working but using the 2D mapper it is...

Which Mudlet 3.0.0 preview is this happening on? There are known bugs in moving rooms around area in previews before I think "delta" and even the current latest code branches development or release_30 as of today may not display a freshly downloaded (Xml) map without saving and reloading it - though they should otherwise handle room movement between areas correctly...

Also, how are new areas being created in this case, which of these are you using:
  1. addAreaName( newAreaName ) which returns a new area id number.
  2. setAreaName( new area id, new area name ), which returns true on success, false on failure. BTW it now also takes an existing area name as a first argument and can rename that to the second argument!
Note that uniqueness of area names is now mandatory (otherwise it would make the area name widget on the mapper not workable!) and is enforced - so check for an error message as a second return value if the first is a lua nil rather than a number or a boolean value...!

jgh713
Posts: 9
Joined: Tue Jun 14, 2016 8:32 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by jgh713 » Sun Jun 19, 2016 12:31 am

"setRoomArea: bad argument #2 value (area Id must exist.)"

As the second return. Using setAreaName. The area name is unique.

jgh713
Posts: 9
Joined: Tue Jun 14, 2016 8:32 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by jgh713 » Sun Jun 19, 2016 1:00 am

Happening on mudlet 3.0.0-delta. This map is not freshly-loaded.

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

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by SlySven » Sun Jun 19, 2016 12:45 pm

Humm, that string is not in the actual "delta" release dated 2015_01_19 (commit-75483cce) but was inserted into that branch on 2015_06_24 (commit-3342a08b) though on reviewing it that does look as though it will not work as intended (to create a NEW area id with the given name).

Further digging reveals that I fixed this as one of the commits merged in on 2015_06_28 (commit-b3aa1e44) and that the current release_30 version {and the development one} on the GitHub repositories should work correctly (in at least THIS matter!) :geek:

tl;dr; You have a version with a bug and you need a later one...! :(

jgh713
Posts: 9
Joined: Tue Jun 14, 2016 8:32 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by jgh713 » Sun Jun 19, 2016 7:13 pm

Don't suppose you have a compiled version of either of those lying around for windows?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest