User Tools

Site Tools


custom_teams_and_roles

Custom Teams and Roles

Custom teams and roles are created by deriving from the BaseTeam class. New roles will automatically be picked up and loaded when the game first starts if they derive from this class.

Properties and methods

A number of properties and methods can be overridden to customize the team.

  • TerrorTown.TeamAlignment TeamAlignment - Determines how this team is aligned, relative to the other teams. You might set this to TeamAlignment.Innocent to inherit enemies of the innocents, TeamAlignment.Traitor to inherit enemies of the traitors, TeamAlignment.NoAllies to make this team an enemy of everyone, or TeamAlignment.NoEnemies to make this team friendly with all other teams.
  • List<string> AdversaryTeams - Manually specify which teams are enemies of this team. You probably don't want to ever set this directly and use TeamAlignment instead.
  • string TeamName - The name of this team. This will be visible to players.
  • Color TeamColour - The color of this team. This will be visible to players.
  • TerrorTown.TeamMemberVisibility TeamMemberVisibility - How this team looks to other teams. This is a bitfield - you can specify multiple of these values by separating them with a pipe (|). You might set this to TeamMemberVisibility.Public if all players should know members affiliated with this team (i.e. Detectives), TeamMemberVisibility.Team if players on this same team should know which players are on this team (i.e. Traitors), TeamMemberVisibility.None if no one but individual players should know the team they are on (i.e. Innocents), TeamMemberVisibility.PublicWhenConfirmedDead if this team member's affiliation should be revealed when they die (i.e. Traitors), TeamMemberVisibility.Alignment if this team member's affiliation should be revealed to teams aligned with this team (see TeamAlignment).
  • string VictimKillMessage - The message to show to a victim when they are killed by a member of this team, if that is enabled.
  • string RoleDescription - The role description to show when the player is added to this team at the beginning of the round.
  • string IdentifyString - The message that should be shown when a member of this team is confirmed dead.
  • float TeamPlayerPercentage - The percentage of total players (minus spectators and slain players) that should be assigned to this role.
  • bool ShouldWin() - Called periodically to determine whether this team has won the game. The default is to check whether all of this team's enemies are dead. For innocent and traitor-aligned teams, this should probably always return false.
  • string OverheadIcon - The icon to show overhead this player to players that can know this player's role. An example is the T icon that shows over Traitor heads.
  • bool HasTeamVoiceChat - Whether this team can voice chat amongst themselves privately by pressing WALK+VOICE.
  • bool CanSeeMIA - Whether players on this team can see the Missing in Action list
  • bool CanSeePrivateTime - Whether players on this team can see the private time (i.e. full haste mode round length).
  • bool TeamPlayerMinimum - The minimum number of players that must be on this team.

Example roles

custom_teams_and_roles.txt · Last modified: 2023/08/01 21:40 by antigravities

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki