Page 1 of 1

Team Colors?

Posted: Thu Oct 16, 2008 3:53 am
by Gahlik
Uh, right, so.

Another problem.

I'm currently trying to creaat a mod, and I have a question.

How exactly would one edit team colors? I saw what to do within the sticky up there, but when I'm done making them, what would I do with hte file, exactly?

Posted: Thu Oct 16, 2008 4:49 am
by Major Cooke
I wish to know the same thing.

Posted: Thu Oct 16, 2008 5:08 am
by briceman2
2 words: you can't.

The four or five team colors are hardcoded in the engine. You *can* change the colors of anything that has a .shp shape file... but one color fits all teams, so SoulDestroyers are always the same color, no matter their team. Same goes for anything 3-dimensional.

Teams & DG colors:

255 grey/white (only useful in some cases)
0 green
1 red
2 yellow
3 blue (non-functional team)

You *can* fudge the team color a little bit by photoshopping the darwinian.bmp sprite file... the non-magenta areas are normally grey tone, and the team colors are mixed with the grey, so the colors remain pure. But if you shift the grey areas towards one of the primary colors (or the team colors) you can subtly shift the team colors without making things seem weird or wrong.

trickfred did this in EW3 to turn the normally yellow team 2 DGs into the bright orange Skald clan. He did such a good job that unless you find the "secret" ending, you will never notice that the team colors are a bit off. If you want to understand how to make this trick work for you, you need to really understand RGB colors... here's a 20 second intro:

RGB colors are a triplet of values which range from 0-255. Pure red is (255,0,0), pure green is (0,255,0). What the engine does is to *multiply* the colors in the darwinian.bmp image by the team color numbers. Grey scale images are always something like (128,128,128) where all three values are the same. So this grey pixel, when rendered for team 1 (red) will end up as (128*255, 128*0, 128*0) which is then scaled down so everything is in the range of 0-255, giving a final color triplet of (128,0,0) which is half-intensity red.

You can shift the colors by changing the grey-scale sprite to a non-grey image... then when the engine multiplies the sprite colros by the team colors, you get a mixed color rather than a pure one. To get orange from team 2 = yellow = (255, 255, 0) you can shift the (128,128,128) grey image to (192,128,128) which adds in extra red. Notice that this will not affect team Red except to slightly darken the red in some places... and it will not affect team Green *at all* because (192, 128, 128) * (0, 255, 0) still gives (0, 128, 0) no matter what the red number is in the sprite colors.

All hail trickfred!!

EDIT: what trickfred actually did was to shift the DG sprite towards a greenish yellow. The DG outline went from (82, 82, 82) grey scale to (101, 110, 40)... same idea as my example, just more complicated 'cause he's mixing all the colors together... and his orange obviously was not pure orange.

EDIT2: the team colors are actually not pure, but closer to half-saturation, so they are similar to the following -- although my best guess is the values are closer to 200 instead of 128:

255 grey (128, 128, 128)
0 green (0, 128, 0)
1 red (128, 0, 0)
2 yellow (128, 128, 0)
3 blue (0, 0, 128)

Posted: Thu Oct 16, 2008 2:59 pm
by Major Cooke
Briceman, we're talking the new MODDING features Icepick told us were available...

See the first post here: ... php?t=3657

It should be available to us...

Posted: Thu Oct 16, 2008 4:22 pm
by xander
Major Cooke wrote:It should be available to us...

But it isn't, so any discussion of it is rather pointless. If one wants to know how to change the colors, then there are two possible answers: briceman2's very detailed explanation, or and explanation that it cannot be done, but may be possible at some point in the future (don't hold your breath).


Posted: Thu Oct 16, 2008 5:17 pm
by Major Cooke
Damnit! I got all my hopes up... :(

Posted: Thu Oct 16, 2008 5:37 pm
by briceman2
...I haven't yet bought MW ('cause I'm supposed to be looking for a new job), but I downloaded the demo to see what new sounds and shapes were in there (to steal for my maybe never mod).

I noticed that the entire Darwinia setup is included. Can you play Darwinia from within MW? (is that the Darwinia+ thing?)

If so, might people be able to play mods from within MW?

And lastly, maybe MW has some of Icepick's mod code inside? You can spawn creatures in MW, right?... do they take the colors of the team? or always the same red & white? Does MW use a single darwinian.bmp? (I would guess it does, but the possibility exists that some of what you're looking for might have made it into MW...)

Posted: Sat Oct 18, 2008 3:10 am
by The GoldFish
There's a bunch of sounds missing (mainly the music) and it doesn't like multiwinia's sounds.txt, or input settings, but otherwise yeah it's pretty much all there.

Also I think you can hex edit the team colours or something; pretty lame though.