User Tools

Site Tools


custom_teams_and_roles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
custom_teams_and_roles [2023/08/01 21:32] – [Properties and methods] antigravitiescustom_teams_and_roles [2026/05/01 23:27] (current) frank_lee_smith
Line 1: Line 1:
-====== Custom Teams and Roles ====== +coming soon when facepunch lets us do addons
- +
-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). +
-  * **''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. +
-===== Example roles ===== +
- +
-  * [[https://github.com/CutieCafe/seance|Seance by Cutie Café]]+
custom_teams_and_roles.1690925573.txt.gz · Last modified: 2023/08/01 21:32 by antigravities

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki