Mudlet mapper script Q&A
Mudlet mapper script Q&A
Need help getting your mapper script for Mudlet working? Here's the thread where you can ask Mudlet developers & other scripters for help.
Re: Mudlet mapper script Q&A
So I have successfully completed the Mapping script as per the tutorial in the wiki. Thanks for that, it worked! Unfortunately, it stops very early. Now the next best thing I found was the complete list of all Mapper Functions. This took a while to digest! After skimming through it, I decided to focus on my first room, add some description to it. I got this via gmcp:
Looking at setRoomName and getRoomName, etc. I assume, this info should be easy to add to my room, however I still managed to fail already, and did not find out why, yet. I can see no error message, neither as return nor in the debug/error consoles.
I did not even create a room 2, yet. What is happening? Do I really fail at the easiest get/set combo there possibly is?
Code: Select all
lua display(gmcp.MG.room.info)
{
short = "Waldweg.",
id = "48bb56336af7ddf63baa1638704654ef",
domain = "Wald",
exits = {
"osten",
"norden",
"westen"
}
}
Code: Select all
lua setRoomName(1, gmcp.MG.room.info.short)
-- no return, nothing seems to happen
lua display(gmcp.MG.room.info.short)
"Waldweg."
lua getRoomName(1)
1
lua getRoomName(2)
2
Re: Mudlet mapper script Q&A
Hm. Did you use addRoom first to create the room?
Re: Mudlet mapper script Q&A
Yes. I followed the steps in the tutorial to create my first room: http://wiki.mudlet.org/w/Mapping_script#Adding_rooms
Using Mudlet 2.1 on Win7.
Using Mudlet 2.1 on Win7.
Re: Mudlet mapper script Q&A
Quick question... I recently sat down and went through the torture of creating a mapper for my MUD. It works perfectly but when moving around the different rooms it barely ever shows the Area in the info. However it always shows the Room Name. What's up with that? Is there a way I can make it always show the area?
Re: Mudlet mapper script Q&A
Never seen it happen, how does it look like on a screenshot?
Re: Mudlet mapper script Q&A
I took a screenshot of the first area (Central Wilderness) I made, and then the fifth area (Marinford) that is bordering the first.
Re: Mudlet mapper script Q&A
Do all rooms in the second area lack a area name being displayed? Have you set a name for the area ID they're in?
Re: Mudlet mapper script Q&A
Each area has a name attached to it. But only area 1 (Central Wilderness) displays the area name. I don't know how the area name is displayed exactly in the Info, but when I do
it displays the area ID (38) for Nisse. When I do
it displays Nisse. So I don't understand :/
Re: Mudlet mapper script Q&A
Looking at the code, it still seems like the mapper is thinking there is no area ID:
So a bit odd.
Code: Select all
TArea * _paid = mpMap->mpRoomDB->getArea( _iaid );
QString _paid_name = mpMap->mpRoomDB->getAreaNamesMap().value(_iaid);
if( _paid )//if( mpMap->areaNamesMap.contains(__rid))
{
text = QString("Area: %1 ID:%2 x:%3-%4 y:%5-%6").arg(_paid_name).arg(_iaid).arg(_paid->min_x).arg(_paid->max_x).arg(_paid->min_y).arg(_paid->max_y);
p.drawText( 10, mFontHeight, text );
}