Template talk:Dynamic map label

Color
That is just weird... in the Preview or when I look at my first revision history, the text for Outpost appears black, but when I look at the current page, it's white. That is really odd, unless I'm being stupid today. ~Farlo Talk 20:28, 22 May 2011 (UTC)
 * Alright... after my last revision, I only see the cream colored background in the Preview pane... I'm just going to leave it alone, but I think I'm implemented color somewhat? ~Farlo Talk 20:30, 22 May 2011 (UTC)


 * (Edit conflict) It's a cache thing; it has to be refreshed in order for it to display correctly after changing the template. If the time clock is showing in your personal navbar (top right, left-most area), you can click it to refresh. Sometimes I have to do it 2x to make it work. — Tennessee Ernie Ford ( TEF ) 20:32, 22 May 2011 (UTC)


 * I deliberately set all the variations to be different, but I didn't make any effort for them to look good. The idea was to allow you (or whoever) room to experiment and see how this could work. It should also make it easier to read the wikicode for the maps, since those will end up with less wikicode. — Tennessee Ernie Ford ( TEF ) 20:34, 22 May 2011 (UTC)
 * Ah, didn't know they were cached, and yeah, I figured the color schemes were more for example :P ~Farlo Talk 02:29, 23 May 2011 (UTC)

Wiki-code
It occurs to me that it might be easier to recode this so that the entire format is repeated for each label type. This would also make it easier to combine labeltype + maptype later on. It would also make it easier to adjust the formatting for a single label type without forgetting to change one of the style components.
 * Current system: each piece of formatting checks separately for the label type and applies the relevant format.
 * Alternative: check the labeltype once, and setup the entire label 1x.

I'll aim to fix this next; if anyone else has a better coding idea, please post or boldly update.

— Tennessee Ernie Ford ( TEF ) 03:31, 23 May 2011 (UTC)
 * If I'm reading this right, you want to make a separate template for each label type? Depending on how we want to set this up, I was thinking that we should have a template for each region, and just put this code in each one and alter for colors.  On the test map, the templates seem to work alright, so we'd just have something like:


 * We'd add maybe 15 new templates (1 for each region), but it'd be easy enough to manage them and I think it'd work as a decent way to keep the colors separate between regions but allow for a universal theme within the region, as well as making it easier to update a whole region at once. The template you've already built can change just about everything we need it to and it meshes fairly well within the original one, so I say just use that method since it's simplest, unless someone has an objection.


 * No, one template. Use a parameter to specify the rough background color of the map and use that to adjust the labels. The same template will work everywhere. (i.e. insert one more pipe before regionname and maybe change that to mapBackgroundColor or some such). — Tennessee Ernie Ford ( TEF ) 07:37, 23 May 2011 (UTC)


 * BTW: we wouldn't even have to decide now; that could be changed later on. — Tennessee Ernie Ford ( TEF ) 07:40, 23 May 2011 (UTC)

(Reset indent) I updated the coding; I think the new format is much easier to edit, especially if one only wants to change the style for a single type of label. For variations of the labeling style(s) depending on map or region, see the next section. — Tennessee Ernie Ford ( TEF ) 16:08, 23 May 2011 (UTC)

Next step: allowing for variations depending on the map
The next evolution of this template is to allow for variations in the styling based on the specific map. There are several ways this could go:
 * 1) Limit the number of variations to e.g. three, based on maps with light, medium, or dark backgrounds.
 * 2) Create a variation for each region  or each campaign.
 * 3) Only change the color/background-color and allow it to change for any label (, i.e. the font-size/shape/style remain the same for all Outposts, but we can make it easy to tweak the color from e.g. blue to dark blue to increase the contrast for a specific label.
 * 4) * One method would be to specify an override color/background color ( and/or  ).
 * 5) * Another would be to specify the possible override colors in the template, e.g. based on limited choices of light/medium/dark.
 * 6) * One more (harder to code) variation would be to somehow mathematically calculate the variation, e.g. default #0000CC might be changed to #00CCCC if

Some of these are far easier to code than others and they vary in flexibility and consistency. I prefer #3a or #3b: these both allow a change to fit the map, without requiring a lot of knowledge about how the templates work and without allowing two maps to look substantially different. — Tennessee Ernie Ford ( TEF ) 16:25, 23 May 2011 (UTC)
 * I'd either say #2 or #3b. 2 would be a bit more work, because we'd most likely need a separate one for each region (or almost all regions), but it'd give us a lot of flexibility.  #3b would also be pretty easy and give us 3x the colors to choose from without that much hassle.  I'd say #3c, but... no, lol.  The only problem I see is if there's conflicting needs to change a color for different maps, or if none of those variations work.  Although this could probably be fixed with another addition to this code without too much trouble. ~Farlo Talk


 * Assume that there's no effort involved for you, what do you think makes the most sense for the wiki and the project?


 * The only one that I'm not sure how to go about coding is 3c. The others are a matter of whether I'm good enough (probably not) to efficiently code. But we can get help with that and figure it out.


 * I like 3a because it allows you to just override color/background for a specific label...keeping all else the same. I like 3b because it's less effort for the person setting up the map (more coding, though). If I had to choose, I'd say 3a.


 * I don't like the idea of per-campaign or per-region, because (a) I think that's unnecessarily complicated and (b) makes it a lot harder to adjust later (e.g. if we somehow find a good replica of the official fonts). It also creates additional visual inconsistencies, which I think makes the maps less readable. (As you go from one area to another.) — Tennessee Ernie Ford ( TEF ) 17:51, 23 May 2011 (UTC)


 * The only place you're really going to need alternative font/formatting is in the (far) Shiverpeaks - everywhere else will take the same formatting pretty well. (maybe another exception being echovald forest since its pretty dark..) - so you'd only really need 2 or 3 different "regions" of formatting:
 * Shiverpeaks (anti-snow)
 * General
 * Dark (dungeons/echovald/Realm of Torment) --[[Image:User_Chieftain_Alex_Chieftain Signature.png]] Chieftain  Alex 18:29, 23 May 2011 (UTC)


 * Do you want the flexibility of changing for an individual label? Or do you want all the labels to change color based on specifying one more parameter (e.g.  or   or  )? — Tennessee Ernie Ford ( TEF ) 18:45, 23 May 2011 (UTC)
 * Oddly, it seems like a better idea to have both. Have 3 separate shade sets (light, dark, medium), either within one template controlled by a parameter, or in 3 separate templates, but then also allow an individual override.  It might look weird, but we could have the template look for a specific override first, display that if it can, or otherwise take the color from whatever the light, medium, dark switch tells it to.  ~Farlo Talk 00:46, 24 May 2011 (UTC)


 * I don't think it's an odd idea, but I'm going to ask you to choose anyhow. I'm not adept enough at wikicode to be sure I can manage both without causing issues. Plus: look at the first effort (horribly difficult to see where to edit) compared to the second (much more elegant). — Tennessee Ernie Ford ( TEF ) 00:51, 24 May 2011 (UTC)


 * Maybe we can figure out a way later, but if I must choose, I'd have to say 3 separate shades/tones for now. One way we could do both is to make three different templates for light, medium, and dark each with an override itself, but I don't know if we want to have that much more effort for whoever makes a map.  ~Farlo Talk 00:59, 24 May 2011 (UTC)


 * You want to keep the map creation/editing simple (one reason for templatizing the formatting in this way). BTW: if I do this right, it should be easy to add an arbitrary number of variations on the coloring; we can start with: Default, Bright, Dark for now. — Tennessee Ernie Ford ( TEF ) 01:23, 24 May 2011 (UTC)
 * Yeah, I figured that was the primary goal of you redoing the template, haha. 3 shades should be alright for now, my only real worry is snowy areas and some of the brighter Desolation areas.  For those we might have to use overrides or some other special theme.  ~Farlo Talk 01:31, 24 May 2011 (UTC)

Feature request: multiple lines on label
One thing I just noticed is that this template doesn't allow for the text on the label to be broken into multiple lines to shorten it. This might be an issue for a few maps, especially with bosses or anything with a long name. One way to allow for this would be to set up an optional override parameter for what the text actually shows as (outside formatting).

I'm not sure how to show that in code, but instead of it taking the "label" in the section where the formatting is applied, it could look for, say, "labelcustom" and insert that if it's available but then default to "label" if it isn't. Then in the map, if you wanted to break up the words, you'd add " | labelcustom = Gates of Kryta ". It should only change the text and apply those tags like the old code used to. ~Farlo Talk 02:44, 24 May 2011 (UTC)


 * The way it works is that it assumes that the link and link text (label) are part of the same anchor. We could set it up so that there's a second line parameter, e.g. . If it's empty, do nothing; else: do a line break and use same color text. I believe that you could also insert a line break in the label2 contents. The custom label technique ... I don't have an immediate idea for how to code that. Do you have a wikipedia map that does it? I could take a look at what they do.


 * Another technique would be to add a parameter to shrink the width of the div container, e.g.  or  . That would probably be better anyhow. Also easier to code than trying to force line breaks manually.


 * Of the two, I think I prefer shrinking the label. What do you prefer? — Tennessee Ernie Ford ( TEF ) 03:39, 24 May 2011 (UTC)
 * I don't know if restricting it universally would be a good idea. The   was kind of what I was aiming atm, but I was thinking of a giving it a bit more freedom (although complexity) on the map maker's end. Let me see if I can put together a bad example.

Inside the last bit, where what text will actually be shown is pulled from the parameter label, instead have something like:
 * outpost ... font-style:normal;" > ]]

I have no clue if that's even the right code or if I used it right, but the idea is that if it finds a custom label, that text (along with the line breaks inside it) will be placed in that space, and should appear with those line breaks as well as the font format, and if it's undefined (or not there), it will default to the normal label text. ~Farlo Talk 05:35, 24 May 2011 (UTC)
 * outpost ... font-style:normal;" > ]]

Color resources

 * Dynamic color wheel
 * Colors, by common name
 * Colors, by Crayola name
 * CSS named colors, alternative presentation

— Tennessee Ernie Ford ( TEF ) 17:03, 24 May 2011 (UTC)

Colour edits
Ok I'm sure if anyone is watching the interactive maps, they'll have noticed some colours changed and some rubbish grey backgrounds have started appearing on Northern shiverpeaks maps - I'm about to do the Crystal desert map, but I acknowledge that the colours produced by | maptype = light are going to look even worse in the desert - this will be an issue in elona too - any objections to a dark brown/orange colour background to the text? -- Chieftain  Alex 15:47, 27 May 2011 (UTC)


 * Please! The original colors in the label template weren't chosen with any due diligence. Let me know if you think we need more variations. I suspect we'll need to keep updating them for a while until there's a good, overall look.


 * For | maptype = light, the non-transparent background contrasts too strongly in my opinion. — Tennessee Ernie Ford ( TEF ) 16:32, 27 May 2011 (UTC)


 * Perhaps change the background of the text in those areas to white, and the explorable text to black. --[[Image:User_Chieftain_Alex_Chieftain Signature.png]] Chieftain  Alex 18:16, 27 May 2011 (UTC)

Relative sizes and weights
I think we should up the size on the explorable labels, so that they are noticeable bigger than everything else. (Perhaps we should also add a tag for Region?) I also think we should make the pvp/pve outposts bold (font-weight:bold), so that they stand out a bit more. Any objections? — Tennessee Ernie Ford ( TEF ) 17:17, 27 May 2011 (UTC)
 * Nope, I definitely think they should be at least bold. I'm not sure if explorables should be bigger than towns or not, but either way, go for it. ~Farlo Talk 19:45, 27 May 2011 (UTC)

Possible shadow hack?
Shouldn't we strive to use font-sizes and colors similar to the real ingame map? The game solves the "white text on light map" problem by having a feint black outline around the text. Good news is: most browsers support text-shadows nowadays, which can be used to simulate black outlines. Bad news: guess which one doesn't? (correct, Internet Explorer)



1) White Text (difficult to read)

2) Example-Text with blurry shadow (doesn't work on IE) - and a link

3) IE-Only shadows - and a link

4) This one works everywhere. link 4) This one works everywhere. link 4) This one works everywhere. link 4) This one works everywhere. link 4) This one works everywhere. link  We could try to implement this, using colored backgrounds as a fallback on IE. Opinions? Tub 23:49, 27 May 2011 (UTC)


 * I agree that the current white text is too difficult to read. I don't think we should use something that fails to work in IE or that requires determining which browser is being used.


 * I also agree that we should use similar choices to those used in the game, but they need not be identical (if for no other reason then that we labeling a lot more than ANet does: bosses, landmarks, portals, etc.).


 * Regardless, we can do much better than the current setup... and, in theory, this template allows us to experiment while we decide. PS Feel free to make use of my sandbox to copy the existing template and hack the heck out of it...so we can see specific examples (without interfering with the current maps). — Tennessee Ernie Ford ( TEF ) 00:28, 28 May 2011 (UTC)
 * I saw this a while ago, and I decided to not even try because of TEF's reasons, although I do totally agree they could look better. ~Farlo Talk 02:18, 28 May 2011 (UTC)
 * I've added two more hacks and numbered them:
 * 3) is an IE-only shadow, using their css filters. It's not as flexible as the official css shadows, but it works.
 * 4) is a simple hack that repeats the text a few times, dark and slightly shifted, to simulate an outline. It works absolutely everywhere, but it's really ugly to implement - the uglyness can be contained in the templates, but still. It also doesn't allow us to provide beautiful blurry shadows on browsers that support them.
 * 2) and 3) can be trivially combined to work on every major browser (IE6+, Firefox 3.5+, Seamonkey 2.0+, Safari, Konqueror, Opera 9+, everything else that's gecko- or webkit-based), but may fail to display a shadow on more exotic browsers and browser versions that are really really old. It produces better looking outlines than variant 4, it's easier to implement, but it will not display a outline at all on a very small subset of browsers. Tub 13:24, 28 May 2011 (UTC)
 * You're right, 4) is really ugly and would make everything take 5x longer to implement (the region maps take about an hour to make) - 3) is crap and I wouldn't be bothering with that one. to be honest, I find the plain white text looks fine on most areas - the shadow won't really help with visibility on the shiverpeak maps --[[Image:User_Chieftain_Alex_Chieftain Signature.png]] Chieftain  Alex 13:32, 28 May 2011 (UTC)
 * Bloody IE, ruining your nice looking ideas. Do IE8 or 9 even support the shadows? lol.  I have to agree with Chieftan, most of the maps look pretty damned good (Kaineng, Ascalon, Pre, and Magumma) by themselves, it's just a couple that have odd colors.  Desolation will be another fun one once we get around to that. ~Farlo Talk 19:41, 28 May 2011 (UTC)



2) Text with blurry shadow (not IE) - and a link

3) IE-Only shadows - and a link
 * Call me blind but when you make the text a bit bigger for the labels, the shadow from 3 looks fine on IE. (if you wanted to make up a template to auto shadow everything + add the IE shadow to whenever it doesn't work that would be great).--[[Image:User_Chieftain_Alex_Chieftain Signature.png]] Chieftain  Alex 20:39, 28 May 2011 (UTC)