I've set up a fortress server 2.8rc3 unix dedicated and would like to change team colors.
Not that I have anything against Yellow and Blue, I just like other colours better. Like Red or Green.
I've tried out ALLOW_TEAM_NAME_PLAYER 1 which takes the color of the team leader, this sometimes causes confusion if the colours of the leaders are similar or unusual.
I'd also like to give teams interesting names instead of Team Blue or Team Gold. All I can find is ALLOW_TEAM_NAME_PLAYER 1 which will name the team after the leader.
Can't I have the Purple Pansies versus The Red Spoons?
Fortress Team Colours and names.
- Jonathan
- A Brave Victim
- Posts: 3391
- Joined: Thu Feb 03, 2005 12:50 am
- Location: Not really lurking anymore
If you compiled it yourself, or if you don't mind doing that, take a look at the start of armagetronad/src/engine/eTeam.cpp:
#define TEAMCOLORS 8 is the number of colors. The triplets in se_team_rgb are 0-15 RGB colors like your player color. The strings in se_team_name are the team names, in the same order as the aforementioned colors. The $ in front means that the string is taken from the language file, e.g. from armagetronad/language/english_base.txt:
So how would you replace Team blue by, say, Team orange? Replace the RGB triplet of blue:
with
As you can see I changed the numbers and the comment on the right side of //. Comments don't change anything in the result, but they can help you remind what something is.
Now change the name:
to
You could also use the language file:
to
and
to
(repeat for other languages)
but that's probably not needed in your case.
Now you can build and run!
I think this is reasonably clear to non-programmers, but even if not you should now know teams are hardcoded. Perhaps the dev team will change that sometime, but not before you can modify teams yourself.
Code: Select all
#define TEAMCOLORS 8
static unsigned short se_team_rgb[TEAMCOLORS][3]=
{ { 4, 8, 15 } , // blue
{ 15, 15, 4 } , // gold
{ 15, 4, 4 } , // red
{ 4, 15, 4 } , // green
{ 15, 4, 15 } , // violet
{ 4, 15, 15 } , // ugly green
{ 15, 15, 15 } , // white
{ 7, 7, 7 } // black
};
static char* se_team_name[TEAMCOLORS]=
{
"$team_name_blue",
"$team_name_gold",
"$team_name_red",
"$team_name_green",
"$team_name_violet",
"$team_name_ugly",
"$team_name_white",
"$team_name_black"
};
Code: Select all
team_name_blue Team blue
team_name_gold Team gold
team_name_red Team red
team_name_green Team green
team_name_violet Team violet
team_name_ugly Team ugly
team_name_white Team white
team_name_black Team black
Code: Select all
{ { 4, 8, 15 } , // blue
Code: Select all
{ { 15, 8, 0 } , // orange
Now change the name:
Code: Select all
"$team_name_blue",
Code: Select all
"Team orange",
Code: Select all
"$team_name_blue",
Code: Select all
"$team_name_orange",
Code: Select all
team_name_blue Team blue
Code: Select all
team_name_orange Team orange
but that's probably not needed in your case.
Now you can build and run!
I think this is reasonably clear to non-programmers, but even if not you should now know teams are hardcoded. Perhaps the dev team will change that sometime, but not before you can modify teams yourself.
Last edited by Jonathan on Mon Feb 13, 2006 10:34 pm, edited 1 time in total.
Lucifer's team. 
rgb = 0.1, 0, 0.2
or so...
rgb = 0.1, 0, 0.2
or so...
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden