Are team games really limited to only 4 teams?

Discussions about GameTypes
User avatar
EvilGrins
Godlike
Posts: 8956
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

Are team games really limited to only 4 teams?

Post by EvilGrins » Fri Apr 16, 2021 3:08 pm

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?
You do not have the required permissions to view the files attached to this post.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758

User avatar
PrinceOfFunky
Godlike
Posts: 1192
Joined: Mon Aug 31, 2015 10:31 pm

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

Post by PrinceOfFunky » Fri Apr 16, 2021 3:57 pm

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.
"Your stuff is known to be buggy and unfinished/not properly tested"

User avatar
OjitroC
Godlike
Posts: 3086
Joined: Sat Sep 12, 2015 8:46 pm

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

Post by OjitroC » Fri Apr 16, 2021 4:00 pm

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.
Last edited by OjitroC on Fri Apr 16, 2021 4:40 pm, edited 1 time in total.

User avatar
EvilGrins
Godlike
Posts: 8956
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

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

Post by EvilGrins » Fri Apr 16, 2021 4:29 pm

PrinceOfFunky wrote:
Fri Apr 16, 2021 3:57 pm
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:
Team Deathmatch.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758

Buggie
Godlike
Posts: 1763
Joined: Sat Mar 21, 2020 5:32 am

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

Post by Buggie » Fri Apr 16, 2021 5:09 pm

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_1618589433.png
scr_1618589441.png
You do not have the required permissions to view the files attached to this post.

User avatar
OjitroC
Godlike
Posts: 3086
Joined: Sat Sep 12, 2015 8:46 pm

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

Post by OjitroC » Fri Apr 16, 2021 7:43 pm

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
Show
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)

Buggie
Godlike
Posts: 1763
Joined: Sat Mar 21, 2020 5:32 am

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

Post by Buggie » Fri Apr 16, 2021 8:30 pm

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.

User avatar
Barbie
Godlike
Posts: 2479
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

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

Post by Barbie » Fri Apr 16, 2021 9:35 pm

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".
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 6030
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

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

Post by sektor2111 » Fri Apr 16, 2021 11:33 pm

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.

User avatar
PrinceOfFunky
Godlike
Posts: 1192
Joined: Mon Aug 31, 2015 10:31 pm

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

Post by PrinceOfFunky » Sat Apr 17, 2021 8:09 pm

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 pm
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:
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.
"Your stuff is known to be buggy and unfinished/not properly tested"