Merge player colors from map.properties into Game XMLs
-
I'm wondering if it makes sense to move the player colors from map.properties into game XMLs.
For example, we can have this list in map.properties:
color.British=916400 color.Italians=236b6a color.Americans=5a5a00 color.Russians=af2828 color.Germans=5a5a5a color.Japanese=e6b42d color.Chinese=644664 color.Neutral=e87112 color.Impassable=d8ba7c
As XML that could be:
<playerList> <player name="British" color="916400" /> </playerList>
-
@LaFayette No. That is visual, so it belongs to the skin.
-
Yes.....
-
@Cernel map.properties is not the skin. It's an odd split to have since it's the only thing in map.properties that references a game XML entity (not good).
It's also kinda odd as different XMLs could have different players and then suddenly you can't control the colors per XML, and/or you wind up defining needless player colors for different XMLs.
-
@Cernel said another way, map.properties is supposed to be generic to the map files. Game players are not generic to a map, they are specific to a game. Hence, there is game configuration in the map.properties by referencing the players in this way.
-
@LaFayette so all the units would then be greyscale, even if they are uniquevisually to a particular player/country?
-
@ubernaut didn't mean to be confusing; it's simply that the player colors in map.properties would be defined in game XML instead of in map.properties.
The engine to support old maps would still look in map.properties for player colors, but if it finds player colors in the XML it would use that first.
-
@LaFayette i was referring specifically to unit graphics, several maps have totally different graphics for the same unit, bombers being the first to come to mind.
-
Ah. @ubernaut - No plans here to change that (greyscale), only just where you specify the player colors.
-
@LaFayette not on you i am easily confused but if the colors are already embedded in the graphics then how can we consistently set colors in the engine?
i swear we've had this discussion in the forums before, maybe it was on nabble, or maybe i'm just being thick.
-
@ubernaut There is a hue-shift feature now! I forget exactly what you need to do turn it on, and I also forget where exactly the player colors in map.properties are used..
Regardless of all of those features, the question here is if it makes sense to move the player colors to XML (so that way all data about players will be in the same file).
-
@LaFayette well there are a number of issues with just trying to blanket change the hue of a set of images for one thing not all of the image should be colored in all cases. for another thing, the original image will need to be desaturated first here is an example of what happens when you try to make an already desaturated unit (german) set to the same hue as russia:
and this is what happens when you try that with a unit that already has a color:
-
@ubernaut the code to due hue shifting is not a naive hue shift, it takes into account luminosity. I recommend giving it a try, saturated images should hur shift quite nicely. Though, we are getting off topic. AFAIK the player colors in map.properties are not the trigger for hue shifting ( those props have been there for a long time, well before there were hue shifting properties)
-
@LaFayette the 'color' mode i'm using here does the same thing. different colors that are not primary (ie 100% green red or blue) would typically have different luminosities, the germans are coming out darker than the target and the usa units are coming out lighter. anyway, i'm just speaking to the not so obvious side effects of using such a feature. it certainly is good to have as an option. i just think in terms of high quality maps its utility is questionable in my mind.
-
@ubernaut just saying that the algorithm used by gane engine for hue shift is not just hue, it's involved, and it has done in cases a great job with well saturated images. IMHO you'd need to try it to really judge.
-
@LaFayette not sure how i would but regardless even if the thing is using curves to match a gamut it will not be 100% as good an originally colored graphic some information is always lost when you do it it's just a matter of degrees and again often times the unit is not of one hue to begin with so yeah… maybe we've talked this one past death at this point.