Methods available globally (within the defined realm)
Assigns the target player their next assassination target (if they are the Assassin role).
Realm: Client and Server
Added in: 1.0.0
Parameters:
false
)
Whether the current version is equal to or newer than the version number given.
Realm: Client and Server
Added in: 1.0.0
Parameters:
Finds a possible respawn position based on accessible areas around the given position.
Realm: Server
Added in: 1.0.0
Parameters:
Returns: An accessible position around the given position or false
if none can be found
Generates a new ID to be used for custom scoring events.
Realm: Server
Added in: 1.2.5
Parameters:
ROLE_NONE
if this should not be associated with any role (Added in 1.4.2)NOTE: To get this value on the client, use the TTTSyncEventIDs
hook and pull the value out of the EVENTS_BY_ROLE
global table
Generates a new ID to be used for custom win conditions.
Realm: Server
Added in: 1.2.5
Parameters:
ROLE_NONE
if this should not be associated with any role (Added in 1.4.2)NOTE: To get this value on the client, use the TTTSyncWinIDs
hook and pull the value out of the WINS_BY_ROLE
global table
Gets an equipment item's definition by their ID.
Realm: Client and Server
Added in: 1.0.0
Parameters:
Gets an equipment item's definition by their name.
Realm: Client and Server
Added in: 1.0.0
Parameters:
Dynamically created functions for each role that returns a function that filters net messages to players that are role. For example: GetTraitorFilter()
and GetPhantomFilter()
return a filter function that can be used to send a message to players who are a Traitor or a Phantom, respectively.
Realm: Server
Added in: Whenever each role is added
Parameters:
false
)
Returns a function that filters net messages to players that are on the innocent team.
Realm: Server
Added in: 1.0.0
Parameters:
false
)
Returns a function that filters net messages to players that are on the jester team.
Realm: Server
Added in: 1.0.0
Parameters:
false
)
Returns a function that filters net messages to players that are on the independent team.
Realm: Server
Added in: 1.0.0
Parameters:
false
)
Returns a function that filters net messages to players that are on the monster team.
Realm: Server
Added in: 1.0.0
Parameters:
false
)
Gets the untranslated name belonging to the specified role team (see ROLE_TEAM_* global enumeration).
Realm: Client and Server
Added in: 1.8.6
Parameters:
Gets the color belonging to the specified role team (see ROLE_TEAM_* global enumeration).
Realm: Client
Added in: 1.1.8
Parameters:
Gets the name and color belonging to the specified role team (see ROLE_TEAM_* global enumeration).
Realm: Client
Added in: 1.2.7
Parameters:
Returns:
Gets the name belonging to the specified role team (see ROLE_TEAM_* global enumeration).
Realm: Client and Server
Added in: 1.2.7 on Client and 1.8.2 on Server
Parameters:
NOTE: This will not use translated names when called on the server
Gets the given player's current sprint multiplier.
Realm: Client and Server
Added in: 1.0.0
Parameters:
Gets a table of role numbers that belong to the team whose lookup table is given.
Realm: Client and Server
Added in: 1.0.2
Parameters:
Returns a function that filters net messages to players that are on the traitor team.
Realm: Server
Added in: 1.0.0
Parameters:
false
)
Used to display a message, play a sound, and/or create confetti when a member of the jester team is killed. Automatically checks ttt_%NAMERAW%_notify_mode
, ttt_%NAMERAW%_notify_sound
, and ttt_%NAMERAW%_notify_confetti
convars.
Realm: Server
Added in: 1.3.1
Parameters:
true
)
Handles player highlighting (colored glow around players) rules for the local player.
Realm: Client
Added in: 1.2.7
Parameters:
false
, jesters will appear in the generic enemy color insteadtrue
, allied roles will be shown in the traitor color. Otherwise allied roles will be shown in the innocent colortrue
then allies will not be highlighted. If both this and showJesters are true
then neither allies nor jesters will be highlighted
Registers a role with Custom Roles for TTT. See here for instructions on how to create a role and role table structure.
Realm: Client and Server
Added in: 1.0.9
Sets the target player's health and max health based on their role convars.
Realm: Client and Server
Added in: 1.0.3
Parameters:
Sets the target player's max health based on their role convars.
Realm: Client and Server
Added in: 1.0.15
Parameters:
Sets the target player's health based on their role convars.
Realm: Client and Server
Added in: 1.0.15
Parameters:
Whether the glitch should be blocking communications (text and voice).
Realm: Client and Server
Added in: 2.1.10
Whether extra information should be shown for the traitor team (e.g. teammate Assassin's target and teammate Parasite's infection).
Realm: Client and Server
Added in: 1.5.7
Whether an unpromoted detective-like player (deputy/Impersonator) should be promoted.
Realm: Server
Added in: 1.2.5
Whether the given string starts with a vowel.
Realm: Client and Server
Added in: 1.0.8
Updates the role color tables based on the color convars and color type convar.
Realm: Client and Server
Added in: 1.0.0
Updates the role string tables based on the role name convars.
Realm: Client and Server
Added in: 1.0.7
Enables and disables weapons based on which roles are enabled.
Realm: Client and Server
Added in: 1.0.5
Updates the team membership, colors, and weapon state based on which roles are enabled and belong to which teams.
Realm: Client and Server
Added in: 1.0.0