Page 3 of 4

Re: Mudlet mapper script Q&A

Posted: Thu Oct 09, 2014 6:24 pm
by Akaya
Kinda figured it out. Not sure if this is the easiest way but I setCustomEnvColor() and setRoomEnv()

Re: Mudlet mapper script Q&A

Posted: Thu Oct 09, 2014 7:20 pm
by Silvine
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.

Re: Mudlet mapper script Q&A

Posted: Fri Oct 10, 2014 5:09 pm
by Akaya
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?

Re: Mudlet mapper script Q&A

Posted: Sat Oct 11, 2014 12:16 am
by Vadi
Save the map using the settings window and have them load it is one way.

Re: Mudlet mapper script Q&A

Posted: Sat Oct 11, 2014 12:22 am
by Akaya
Yet another cool new feature. Thanks!

Re: Mudlet mapper script Q&A

Posted: Sat Oct 11, 2014 12:34 am
by Vadi
It's in 2.1 as well!

Re: Mudlet mapper script Q&A

Posted: Sat Oct 11, 2014 1:37 am
by Akaya
Bleh. Shows how much I've messed with the mapper :P

Re: Mudlet mapper script Q&A

Posted: Wed Oct 15, 2014 5:33 am
by Akaya
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?

Re: Mudlet mapper script Q&A

Posted: Wed Oct 15, 2014 5:43 am
by Vadi
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.

Re: Mudlet mapper script Q&A

Posted: Wed Oct 15, 2014 4:43 pm
by SlySven
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: