Page 1 of 1

Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 3:08 pm
by EvilGrins
I've noticed this for years, and I've not actually played around with it before, but it's been idly bugging me for awhile.

When setting up any of the UTDM-monsters for team games I usually just enter the number, as I know them. But the thing is just right of the field where you enter the team number, there's a sliding bar there which you can drag the indicator over to pick a number... but it goes up a lot higher than to "3".

Typical team numbers work like this:
0 - Red
1 - Blue
2 - Green
3 - Yellow
255 - No team

This sliding bar can select any number between 0 to 255, and I can't help but wonder if I were to assign a UTDM-monster to team 5 or 134 would that be an as yet unknown team? Do these unknown teams have their own colors? Is there a Team Purple?

Just like that one guy on The Resevoir Dogs I don't wanna be on Team Pink, but you get the idea.

Thoughts?

Re: Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 3:57 pm
by PrinceOfFunky
the team number is just a number, it all depends on its interpretation. E.g. FlagBase spawns flags depending on the team number but it only checks for team 0 and 1:

Code: Select all

if ( Team == 0 )
{
    Skin=texture'JpflagR';	
    myFlag = Spawn(class'RedFlag');
}
else if ( Team == 1 )
    myFlag = Spawn(class'CTFFlag');
Although it later assigns the arbitrary team number to the spawned flag:

Code: Select all

myFlag.HomeBase = self;
myFlag.Team = Team;
CTFReplicationInfo(Level.Game.GameReplicationInfo).FlagList[Team] = myFlag;
it still wouldn't spawn a flag if the team number is different from 0 or 1.

Re: Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 4:00 pm
by OjitroC
EvilGrins wrote: Fri Apr 16, 2021 3:08 pm
This sliding bar can select any number between 0 to 255, and I can't help but wonder if I were to assign a UTDM-monster to team 5 or 134 would that be an as yet unknown team? Do these unknown teams have their own colors? Is there a Team Purple?
Maximum allowed teams :
Botpack.TeamGamePlus= 4 [CTF, Assault, DOM gametypes + TDM?]
UnrealShare.TeamGame = 16

So no idea what happens if you set the UTDM Titan to a team not 0-3 or 255, possibly defaults to no team? Possibly defaults to one of the others? Possibly crashes the game? Try it.

@PrinceofFunky - the question here is to do with the team a 'player' is assigned to rather than the colour of flags.

Re: Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 4:29 pm
by EvilGrins
PrinceOfFunky wrote: Fri Apr 16, 2021 3:57 pmthe team number is just a number, it all depends on its interpretation. E.g. FlagBase spawns flags depending on the team number but it only checks for team 0 and 1:
Team Deathmatch.

Re: Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 5:09 pm
by Buggie
Botpack.TeamGamePlus hardcoded limit on 4 teams.

if any subclass use bScoreTeamKills and call Super.ScoreKill then you have problems when team number not in range 0-3. Even if it 255.

Generally speaking subclasses can be coded properly and not be affected Botpack.TeamGamePlus teamlimit.

Bu it is rare case. If you simply subclass, blindly call Super and so on, team not in range 0-3 can break all or some stuff.

--- EDIT ---

Team deatchmatch hardcoded in many places:
scr_1618589426.png
scr_1618589426.png (1.48 KiB) Viewed 1254 times
scr_1618589433.png
scr_1618589433.png (1.01 KiB) Viewed 1254 times
scr_1618589441.png
scr_1618589441.png (3.18 KiB) Viewed 1254 times

Re: Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 7:43 pm
by OjitroC
EvilGrins wrote: Fri Apr 16, 2021 3:08 pm
This sliding bar can select any number between 0 to 255, and I can't help but wonder if I were to assign a UTDM-monster to team 5 or 134 would that be an as yet unknown team? Do these unknown teams have their own colors? Is there a Team Purple?
As has been indicated, the answer to all that is no.

A test on CTF-UTDMT-Fragisland - I set the Blue Titan team to 52 - in game it appeared as the Gold Team - I was on Red and it didn't react to taking fire from me. Unsurprisingly, there was a lot of log spam with multiple lines
Spoiler
Error: UnrealCTFScoreboard Autoplay.UnrealCTFScoreboard0 (Function Botpack.TeamScoreBoard.ShowScores:014A) Accessed array 'PlayerCounts' out of bounds (52/4)
Error: ChallengeCTFHUD Autoplay.ChallengeCTFHUD0 (Function Botpack.ChallengeTeamHUD.Message:00BE) Accessed array 'TeamColor' out of bounds (52/4)
Error: ChallengeCTFHUD Autoplay.ChallengeCTFHUD0 (Function Botpack.ChallengeTeamHUD.SetIDColor:0033) Accessed array 'AltTeamColor' out of bounds (52/4)

Re: Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 8:30 pm
by Buggie
As I say before, you feel free to write own implementation of handling this stuff. And make 32 (or even more) teams in your own game type.
Standard game type allow only 4.

But possible you need reimplement too many stuff because suddenly can be found number 4 in very different places.

Re: Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 9:35 pm
by Barbie
EvilGrins wrote: Fri Apr 16, 2021 3:08 pm there's a sliding bar there which you can drag the indicator over to pick a number... but it goes up a lot higher than to "3".
That sliding bar is not specific to "team" and does not know its specification. The variable where the team number is stored is of type "byte", which may contain a number between 0 and 255. The Editor sees the variable type and gives you a sliding bar for the variable "byte".

Re: Are team games really limited to only 4 teams?

Posted: Fri Apr 16, 2021 11:33 pm
by sektor2111
These boys are having issues with numbers and understanding Teams array.
If unreal engine has a pri array of 32 this doesn't means that planet ends with this number, only engine says - these are my rules which are under my attention, the rest are your problems not mine. If reachSpecs array has 3000 this doesn't mean that this number is final number from all maths from planet. It's just an array and if you work out of array crapped results are your problem. My father (when was alive...) was talking shortly about computers based on his understanding: Trash thrown Inside machine returns another Trash Outside for mindless user...
So to speak machine rewards you based on your own actions.

BotPack has a hard-coded array delegated to manage stock teams and colors. Slider has nothing to do with this small array, slider is a byte variable bigger than array. If you do "settings" you will gain "results", that simple.

You can look at TeamGamePlus code and see all variables - it's all done for 4 Teams.

Code: Select all

var			 int	MaxAllowedTeams; //default properties = 4
var	TeamInfo Teams[4]; // Red, Blue, Green, Gold
...
var localized string TeamColor[4];
var byte TEAM_Red, TEAM_Blue, TEAM_Green, TEAM_Gold;
...
var name CurrentOrders[4];
...
event InitGame( string Options, out string Error )
{
	Super.InitGame(Options, Error);
	MaxTeams = Min(MaxTeams,MaxAllowedTeams);
}
...
...
defaultproperties
{
...
     MaxAllowedTeams=4
...
     TeamColor(0)="Red"
     TeamColor(1)="Blue"
     TeamColor(2)="Green"
     TeamColor(3)="Gold"
...
     TEAM_Blue=1
     TEAM_Green=2
     TEAM_Gold=3
     CurrentOrders(0)=Defend
     CurrentOrders(1)=Defend
     CurrentOrders(2)=Defend
     CurrentOrders(3)=Defend
...
Now you can draw a slider on your walls and try to setup any team - game will stay at 4 teams.
Feel free to recode everything, maybe you can remap packages, maybe you can have 32 Bits colors for 16 millions of teams and so on - Good luck and Have Fun...
Either way you can get over YOUR limitations and do some mapping instead of talking about these "issues" never intended to be more right from factory - it will be more constructive. The rest is DeathMatch - each player it's like its own team.

Re: Are team games really limited to only 4 teams?

Posted: Sat Apr 17, 2021 8:09 pm
by PrinceOfFunky
OjitroC wrote: Fri Apr 16, 2021 4:00 pm @PrinceofFunky - the question here is to do with the team a 'player' is assigned to rather than the colour of flags.
EvilGrins wrote: Fri Apr 16, 2021 4:29 pm
PrinceOfFunky wrote: Fri Apr 16, 2021 3:57 pmthe team number is just a number, it all depends on its interpretation. E.g. FlagBase spawns flags depending on the team number but it only checks for team 0 and 1:
Team Deathmatch.
I know, when I said "team number" I meant a team number variable in general, it is always just a number and the standard actors don't treat it in a flexible way, which means that all the standard actors check for the team number in a hardcoded way.