Un-Hardcode TeamColors
Post ideas and suggestions on new features or improvements here.
posted on October 9th, 2011, 2:08 pm
In the next patch, can you make it so that team colors are not hardcoded?
It seems like the colors can be changed, but the name of the colors and the number of colors seem hardcoded. I do understand the first 9 on the list though, but I would like the rest to be configurable. Here's an example of what I mean.
Here is the code of the corrected TeamColors ODF file of the A2 Import mod:
On the list in the editor, it recognizes the color changes to existing colors, but additions/deletions/renames of colors are not recognized. Please change that.
It seems like the colors can be changed, but the name of the colors and the number of colors seem hardcoded. I do understand the first 9 on the list though, but I would like the rest to be configurable. Here's an example of what I mean.
Here is the code of the corrected TeamColors ODF file of the A2 Import mod:
- Code: Select all
// Team colors. (0 = neutral, 1-8 = teams)
empty = 0.5 0.5 0.5
mpcolor01 = 0.9 0.9 0.9
mpcolor02 = 1.0 0.0 0.0
mpcolor03 = 0.0 0.4 1.0
mpcolor04 = 0.0 1.0 0.0
mpcolor05 = 0.9 0.9 0.0
mpcolor06 = 0.686 0.0 1.0
mpcolor07 = 0.0 1.0 0.784
mpcolor08 = 0.6 0.4 0.0
mpcolor09 = 1.0 0.588 0.0
mpcolor10 = 1.0 0.5 0.5
mpcolor11 = 1.0 0.0 1.0
mpcolor12 = 0.5 0.5 0.5
mpcolor13 = 0.0 0.0 0.0
//Race base colors (these will need to be edited)
ferengi = 1.0 0.588 0.0
dominion = 0.8 0.2 1.0
klingon = 1.0 0.2 0.2
romulan = 0.4 1.0 0.4
borg = 0.0 0.6 0.4
federation = 0.9 0.9 0.9
cardassian = 0.9 0.6 0.0
breen = 0.0 0.7 0.0
sona = 0.8 0.8 0.8
alien = 0.8 0.8 0.8
//more eccentric colors
brickred = 0.5 0.1 0.1
burntsienna = 0.412 0.192 0.055
ceruleanblue = 0.145 0.623 0.847
species8472 = 0.80 0.65 0.49
On the list in the editor, it recognizes the color changes to existing colors, but additions/deletions/renames of colors are not recognized. Please change that.
posted on October 9th, 2011, 3:18 pm
Hm? Teamcolors arent hardcoded, mpcolor01 - mpcolor08 are the colors chosable in the game
feel free to edit them

posted on October 9th, 2011, 3:41 pm
That's not what I meant. The colors themselves are not hardcoded, but the color names and indexes are hard-coded. Here's what's in the file I'm using:
Here's a screenshot of what the color names are after "mpcolor13." The color names, number of colors, and color indexes are hard-coded, even though the color values are not hardcoded, you can't scramble the color list, add, remove, or rename the colors. That's why I concluded that the color list is hardcoded.
EDIT:
As you can clearly see, the list shown in the screenshot does not mach what's in the teamcolors.odf file.
- Code: Select all
// Team colors. (0 = neutral, 1-8 = teams)
empty = 0.5 0.5 0.5
mpcolor01 = 0.9 0.9 0.9
mpcolor02 = 1.0 0.0 0.0
mpcolor03 = 0.0 0.4 1.0
mpcolor04 = 0.0 1.0 0.0
mpcolor05 = 0.9 0.9 0.0
mpcolor06 = 0.686 0.0 1.0
mpcolor07 = 0.0 1.0 0.784
mpcolor08 = 0.6 0.4 0.0
mpcolor09 = 1.0 0.588 0.0
mpcolor10 = 1.0 0.5 0.5
mpcolor11 = 1.0 0.0 1.0
mpcolor12 = 0.5 0.5 0.5
mpcolor13 = 0.0 0.0 0.0
//Race base colors (these will need to be edited)
ferengi = 1.0 0.588 0.0
dominion = 0.8 0.2 1.0
klingon = 1.0 0.2 0.2
romulan = 0.4 1.0 0.4
borg = 0.0 0.6 0.4
federation = 0.9 0.9 0.9
cardassian = 0.9 0.6 0.0
breen = 0.0 0.7 0.0
sona = 0.8 0.8 0.8
alien = 0.8 0.8 0.8
//more eccentric colors
brickred = 0.5 0.1 0.1
burntsienna = 0.412 0.192 0.055
ceruleanblue = 0.145 0.623 0.847
species8472 = 0.80 0.65 0.49
Here's a screenshot of what the color names are after "mpcolor13." The color names, number of colors, and color indexes are hard-coded, even though the color values are not hardcoded, you can't scramble the color list, add, remove, or rename the colors. That's why I concluded that the color list is hardcoded.
EDIT:
As you can clearly see, the list shown in the screenshot does not mach what's in the teamcolors.odf file.
Attachments
- color_names.PNG (1.36 KiB) Viewed 725 times
posted on October 9th, 2011, 4:13 pm
yea, you can also not rename classlabels, or any other variable in an odf. That's how it works
Armada needs to know what you mean with the lines you write, after all

posted on October 9th, 2011, 4:16 pm
Is there any way that a configuration file can be made to define the color list?
posted on October 9th, 2011, 8:38 pm
Nope because thats hardcoded not everything can be changed.
posted on October 9th, 2011, 9:01 pm
Some improvements are planned now 

posted on October 9th, 2011, 9:33 pm
Thanks.
posted on October 9th, 2011, 9:53 pm
Given that we don't actually have an SP campaign at this point, those "hardcoded" colours below mpcolor13 aren't actually used; only the mpcolor[n] colours are.
So does it really matter right now?
So does it really matter right now?
posted on October 9th, 2011, 10:02 pm
Maybe, but with the Stock A2 Import mod and increasing compatibility with stock A2. Such a feature would greatly increase the flexibility of the mod.
Who is online
Users browsing this forum: Bing [Bot] and 15 guests