Mudlet mapper script Q&A

All and any discussion and development of the Mudlet Mapper.
User avatar
Akaya
Posts: 412
Joined: Thu Apr 19, 2012 1:36 am

Re: Mudlet mapper script Q&A

Post by Akaya » Thu Oct 09, 2014 6:24 pm

Kinda figured it out. Not sure if this is the easiest way but I setCustomEnvColor() and setRoomEnv()

Silvine
Posts: 142
Joined: Sat Oct 23, 2010 2:36 pm

Re: Mudlet mapper script Q&A

Post by Silvine » Thu Oct 09, 2014 7:20 pm

I do it like this
Code: [show] | [select all] lua
function __SetTerrainColor()

	local terrain = gmcp.room.info.terrain
	local roomID = tonumber(gmcp.room.info.num)

	if __debug__ then cecho("<green>Terrain:"..terrain.."\n")	 end--if
	centerview(roomID)

		-- the ID here must be >16 I started at 100 keeping out of trouble		
		if terrain == "Inside" then setRoomEnv( roomID, 100 ) ; setCustomEnvColor(100, 153, 0, 153, 255) --(ID, purple, transparancy)
		elseif terrain == "City" then setRoomEnv( roomID, 110 ) ; setCustomEnvColor(110, 153, 76, 0, 255) --burnt orange
		elseif terrain == "Forest" then setRoomEnv( roomID, 120 ) ; setCustomEnvColor(120, 0, 51, 0, 255) --dark green
		elseif terrain == "Field" then setRoomEnv( roomID, 130 ) ; setCustomEnvColor(130, 0, 153, 0, 255) --green
		elseif terrain == "ocean" then setRoomEnv( roomID, 140 ) ; setCustomEnvColor(140, 0, 0, 102, 255) --dark blue
		elseif terrain == "Water (No Swim)" then setRoomEnv( roomID, 150 ) ; setCustomEnvColor(150, 102, 178, 255, 255) --light blue
		elseif terrain == "Water (Swim)" then setRoomEnv( roomID, 160 ) ; setCustomEnvColor(160, 0, 102, 204, 255) --pale blue
		elseif terrain == "Hills" then setRoomEnv( roomID, 170 ) ; setCustomEnvColor(170, 0, 102, 0, 255) --darkish green
		elseif terrain == "Mountains" then setRoomEnv( roomID, 180 ) ; setCustomEnvColor(180, 128, 128, 128, 255) --grey
		else cecho("<orange> Need new color for terrain "..terrain)
		end--if Terrain
end--function
which is probably just as you were getting at.
Mapper of Bedlam

User avatar
Akaya
Posts: 412
Joined: Thu Apr 19, 2012 1:36 am

Re: Mudlet mapper script Q&A

Post by Akaya » Fri Oct 10, 2014 5:09 pm

So I've written a mapping script. Works great. But how do I share what I've mapped with others that use the same mapping script?

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

Re: Mudlet mapper script Q&A

Post by Vadi » Sat Oct 11, 2014 12:16 am

Save the map using the settings window and have them load it is one way.

User avatar
Akaya
Posts: 412
Joined: Thu Apr 19, 2012 1:36 am

Re: Mudlet mapper script Q&A

Post by Akaya » Sat Oct 11, 2014 12:22 am

Yet another cool new feature. Thanks!

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

Re: Mudlet mapper script Q&A

Post by Vadi » Sat Oct 11, 2014 12:34 am

It's in 2.1 as well!

User avatar
Akaya
Posts: 412
Joined: Thu Apr 19, 2012 1:36 am

Re: Mudlet mapper script Q&A

Post by Akaya » Sat Oct 11, 2014 1:37 am

Bleh. Shows how much I've messed with the mapper :P

User avatar
Akaya
Posts: 412
Joined: Thu Apr 19, 2012 1:36 am

Re: Mudlet mapper script Q&A

Post by Akaya » Wed Oct 15, 2014 5:33 am

Checking out some of the options you get when you right click a selected room on the mapper...

Custom exit lines: This is pretty cool. Can this kind of stuff be applied to the main window? How can you click and drag a point you've made on a custom exit line? This requires mouse coordinates. How is it done? Who is responsible for this genius?

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

Re: Mudlet mapper script Q&A

Post by Vadi » Wed Oct 15, 2014 5:43 am

The custom exit lines are for the mapper only. I'm not sure how would custom exit lines help on the main window...

Heiko wrote the feature and Stephen improved it in 3.0.

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

Re: Mudlet mapper script Q&A

Post by SlySven » Wed Oct 15, 2014 4:43 pm

I currently think that Map labels are something that would benefit from a UI overhaul, though I'm currently experimenting with an improved map room letter - or more properly symbol feature (use any unicode grapheme from a nominated font {not just a mono-spaced one as we only need a single "symbol" so spacing is less an issue, and non-mono-spaced members of a font family typically have more glyphs to choose from!}) in any of the defined colours... :geek:

Post Reply

Who is online

Users browsing this forum: Darkfire and 1 guest