Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
28d45e7
Changed role pack to apply next round, if the round is already active
Malivil Feb 22, 2026
f0ddb58
Added more acts
Malivil Feb 26, 2026
ac4c5de
Added navmesh to known globals
Malivil Feb 28, 2026
7a58dd7
Fixed wrong information in role tutorial
Malivil Mar 1, 2026
29e123a
Added Cannibal gaining health from eating players
joel4848 Mar 3, 2026
1dd91c9
Added cannibal digesting (fully killing) victims after a configurable…
joel4848 Mar 3, 2026
daca068
Added global
Malivil Mar 3, 2026
eb85c9f
Added cannibal poop model & sound
joel4848 Mar 3, 2026
65c43ea
Merge branch 'dev' of https://github.com/joel4848/TTT-Custom-Roles in…
joel4848 Mar 3, 2026
78b7b92
Updated Cannibal tutorial to include digestion info if enabled
joel4848 Mar 3, 2026
ab6fb68
Merge branch 'Custom-Roles-for-TTT:dev' into dev
joel4848 Mar 3, 2026
534dfe1
Added new Cannibal convars to CONVARS.md
joel4848 Mar 3, 2026
98c9497
Merge branch 'dev' of https://github.com/joel4848/TTT-Custom-Roles in…
joel4848 Mar 3, 2026
2bb87ec
Fixed typo
Malivil Mar 5, 2026
16e5f45
Ported "TTT: Use gmod_language setting by default"
Malivil Mar 8, 2026
56cf4ef
Ported "TTT: Translatability improvements"
Malivil Mar 8, 2026
1c7beba
Changed logic to reassign a player's role if they change roles into b…
Malivil Mar 9, 2026
be31e78
Fixed cheat sheet getting cut off when it exceeded the height of the …
Malivil Mar 9, 2026
2b0b2f3
Fixed jester, detective, innocent, and traitor role rename ConVars no…
Malivil Mar 9, 2026
db873fd
Removed debug prints
Malivil Mar 9, 2026
0e22520
Ported "TTT: Equipment menu sorting options"
Malivil Mar 13, 2026
3b2e2b7
Fixed random button not working in shop
Malivil Mar 13, 2026
d89257b
Fix error in Cannibal's role weapon HUD when weapon was selected from…
TheStig294 Mar 21, 2026
fea1466
Merge pull request #928 from TheStig294/patch-1
Malivil Mar 21, 2026
56ab726
Added release note for Stig's fix
Malivil Mar 21, 2026
7cd0423
Merge branch 'dev' into dev
Malivil Mar 21, 2026
5be0dd0
Merge pull request #923 from Malivil/dev
Malivil Mar 21, 2026
e430fa1
Apply suggestions from code review
Malivil Mar 21, 2026
f1b05fa
Apply suggestions from code review
Malivil Mar 21, 2026
2c5ce86
Merge branch 'dev' into dev
Malivil Mar 21, 2026
56e2009
Cleanup fixes and suggestions applied
Malivil Mar 21, 2026
e8d411b
Changed convar defaults
Malivil Mar 21, 2026
bb3489c
Changed convar defaults
Malivil Mar 21, 2026
cc6905c
Merge pull request #924 from joel4848/dev
Malivil Mar 21, 2026
c8c0ea6
Ported "Add check for checking weapon GetHeadshotMultiplier"
Malivil Mar 21, 2026
b3d82ea
Fixed detective hats not hiding when the owning player was eaten by t…
Malivil Mar 21, 2026
851cb6f
Cleanup
Malivil Mar 21, 2026
9bb201d
Added new cannibal convars to HTML
Malivil Mar 21, 2026
bcb2fa6
Updated release date and number
Malivil Mar 21, 2026
e19a337
Merge pull request #929 from Malivil/dev
Malivil Mar 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,100 @@ globals = {
"ACT_HL2MP_GESTURE_RELOAD_SHOTGUN",
"ACT_HL2MP_GESTURE_RELOAD_SLAM",
"ACT_HL2MP_GESTURE_RELOAD_SMG1",
"ACT_HL2MP_IDLE_AR2",
"ACT_HL2MP_IDLE_CAMERA",
"ACT_HL2MP_IDLE_CROSSBOW",
"ACT_HL2MP_IDLE_CROUCH_AR2",
"ACT_HL2MP_IDLE_CROUCH_CAMERA",
"ACT_HL2MP_IDLE_CROUCH_CROSSBOW",
"ACT_HL2MP_IDLE_CROUCH_DUEL",
"ACT_HL2MP_IDLE_CROUCH_FIST",
"ACT_HL2MP_IDLE_CROUCH_GRENADE",
"ACT_HL2MP_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ACT_HL2MP_RUN_REVOLVER",
"ACT_HL2MP_RUN_RPG",
"ACT_HL2MP_RUN_SHOTGUN",
"ACT_HL2MP_RUN_SLAM",
"ACT_HL2MP_RUN_SMG1",
"ACT_HL2MP_RUN_ZOMBIE",
"ACT_HL2MP_WALK_AR2",
"ACT_HL2MP_WALK_CAMERA",
"ACT_HL2MP_WALK_CROSSBOW",
"ACT_HL2MP_WALK_CROUCH_AR2",
"ACT_HL2MP_WALK_CROUCH_CAMERA",
"ACT_HL2MP_WALK_CROUCH_CROSSBOW",
"ACT_HL2MP_WALK_CROUCH_DUEL",
"ACT_HL2MP_WALK_CROUCH_FIST",
"ACT_HL2MP_WALK_CROUCH_GRENADE",
"ACT_HL2MP_WALK_CROUCH_KNIFE",
"ACT_HL2MP_WALK_CROUCH_MAGIC",
"ACT_HL2MP_WALK_CROUCH_MELEE",
"ACT_HL2MP_WALK_CROUCH_MELEE2",
"ACT_HL2MP_WALK_CROUCH_PASSIVE",
"ACT_HL2MP_WALK_CROUCH_PHYSGUN",
"ACT_HL2MP_WALK_CROUCH_PISTOL",
"ACT_HL2MP_WALK_CROUCH_REVOLVER",
"ACT_HL2MP_WALK_CROUCH_RPG",
"ACT_HL2MP_WALK_CROUCH_SHOTGUN",
"ACT_HL2MP_WALK_CROUCH_SLAM",
"ACT_HL2MP_WALK_CROUCH_SMG1",
"ACT_HL2MP_WALK_CROUCH_ZOMBIE_01",
"ACT_HL2MP_WALK_DUEL",
"ACT_HL2MP_WALK_FIST",
"ACT_HL2MP_WALK_GRENADE",
"ACT_HL2MP_WALK_KNIFE",
"ACT_HL2MP_WALK_MAGIC",
"ACT_HL2MP_WALK_MELEE",
"ACT_HL2MP_WALK_MELEE2",
"ACT_HL2MP_WALK_PASSIVE",
"ACT_HL2MP_WALK_PHYSGUN",
"ACT_HL2MP_WALK_PISTOL",
"ACT_HL2MP_WALK_REVOLVER",
"ACT_HL2MP_WALK_RPG",
"ACT_HL2MP_WALK_SHOTGUN",
"ACT_HL2MP_WALK_SLAM",
"ACT_HL2MP_WALK_SMG1",
"ACT_HL2MP_WALK_ZOMBIE_01",
"ACT_IDLE",
"ACT_GMOD_GESTURE_AGREE",
Expand Down Expand Up @@ -634,6 +724,7 @@ globals = {
"CreateClientConVar",
"CreateConVar",
"CreateFavTable",
"CreateMaterial",
"CreateSound",
"CreateTransferMenu",
"CurTime",
Expand Down Expand Up @@ -788,6 +879,7 @@ globals = {
"input",
"list",
"math",
"navmesh",
"net",
"os",
"permissions",
Expand Down Expand Up @@ -1035,6 +1127,7 @@ globals = {
"ROLE_STARTING_HEALTH",
"ROLE_STARTING_TEAM",
"ROLE_STRINGS",
"ROLE_STRINGS_DEFAULT",
"ROLE_STRINGS_EXT",
"ROLE_STRINGS_PLURAL",
"ROLE_STRINGS_RAW",
Expand Down
5 changes: 5 additions & 0 deletions API/GLOBAL_VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ Table of title-case names for each role.\
*Realm:* Client and Server\
*Added in:* 1.0.0

### ROLE_STRINGS_DEFAULT
Table of title-case names for each role. Copy of `ROLE_STRINGS` from before role strings are changed by ConVars.\
*Realm:* Client and Server\
*Added in:* 2.4.4

### ROLE_STRINGS_EXT
Table of extended (e.g. prefixed by an article) names for each role.\
*Realm:* Client and Server\
Expand Down
6 changes: 6 additions & 0 deletions CONVARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,12 @@ ttt_cannibal_eat_cooldown 10 // The amount of time (in
ttt_cannibal_damage_penalty 0 // The fraction a Cannibal's damage will be scaled by when they are attacking (Only applies if ttt_cannibal_is_independent is enabled)
ttt_cannibal_can_see_jesters 0 // Whether jesters are revealed (via head icons, color/icon on the scoreboard, etc.) to the Cannibal (Only applies if ttt_cannibal_is_independent is enabled)
ttt_cannibal_update_scoreboard 0 // Whether the Cannibal shows dead players as missing in action (Only applies if ttt_cannibal_is_independent is enabled)
ttt_cannibal_gains_health 0 // Whether the Cannibal gains their victim's health when eating them
ttt_cannibal_gained_health_percentage 15 // What percentage of their victim's health the Cannibal gains. Set to 0 to always gain a flat 100HP (Only applies if ttt_cannibal_gains_health is enabled)
ttt_cannibal_digestion 0 // Whether the Cannibal digests and permanently kills their victims over time
ttt_cannibal_digestion_time 30 // How long in seconds a victim takes to be digested when eaten. Set to 0 for immediate digestion (Only applies if ttt_cannibal_digestion is enabled)
ttt_cannibal_digestion_poop 1 // Whether the Cannibal drops poop when a victim is digested (Only applies if ttt_cannibal_digestion is enabled)
ttt_cannibal_digestion_poop_sound 1 // Whether the Cannibal causes a sound when poop is dropped from a digested victim (Only applies if ttt_cannibal_digestion is enabled)

// ----------------------------------------

Expand Down
8 changes: 5 additions & 3 deletions CREATE_YOUR_OWN_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In order to create your own role you will need to make sure you have downloaded
- **.lua** - This can be done in Notepad in a pinch but at the very least we would recommend [Notepad++](https://notepad-plus-plus.org/).
- **.vmt and .vtf** - [VTFEdit Reloaded](https://github.com/Sky-rym/VTFEdit-Reloaded/releases) is the best way to edit these files but if you know what you are doing there are plugins for other apps.

In this guide we will be walking through how we made the Summoner role and you can download all the templates we are using [here](/templates/role).
In this guide we will be walking through how we made the Summoner role and you can download all the templates we are using [here](/templates/role) using a tool that allows downloading directories from a GitHub repo like [this one](https://kinolien.github.io/gitzip/) *(Note: In most cases you won't need to enter a token despite its recommendation)*.

Last thing to do before you are ready to get started is to unzip that file which should give you 4 .psd files and a folder like this:

Expand All @@ -81,7 +81,7 @@ ROLE.desc = [[]]

ROLE.shortdesc = ""

ROLE.team =
ROLE.team = ROLE_TEAM_

ROLE.shop = nil
ROLE.loadout = {}
Expand Down Expand Up @@ -835,7 +835,9 @@ end

### Role Registration

The next line simply tells CR for TTT to register your role and passes through all the relevant information. You do not need to edit this line. CR for TTT automatically defines an enumeration for your role, `ROLE_%NAMERAW%` as well as helper functions `Get%NAMERAW%`, `Is%NAMERAW%` and `IsActive%NAMERAW%` if you would like to use them to add extra logic for your role.
The next line simply tells CR for TTT to register your role and passes through all the relevant information. You do not need to edit this line. CR for TTT automatically defines an enumeration for your role, `ROLE_%NAMERAW%` as well as helper functions `Get%NAME%`, `Is%NAME%` and `IsActive%NAME%` if you would like to use them to add extra logic for your role.

*(Note: All spaces are removed from `%NAME%` before `Get%NAME%`, `Is%NAME%` and `IsActive%NAME%` are created)*

### Final Block

Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ If you would like to test the available configurations, we recommend using ULX/U
- MaxCooljazz from the CR4TTT Community for allowing us to integrate their Spy role into the mod.
- [Game icons](https://game-icons.net), [Noun Project](https://thenounproject.com), and [Icons8](https://icons8.com) for the role icons.
- [Videvo](https://www.videvo.net/profile/videvo/) for the royalty-free [extinguish sound](https://www.videvo.net/sound-effect/short-light-fire-exti-pe363704/255924/) and cough sounds: [1](https://www.videvo.net/sound-effect/human-cough-33/427996/), [2](https://www.videvo.net/sound-effect/human-cough-36/427999/), [3](https://www.videvo.net/sound-effect/human-cough-39/428002/), [4](https://www.videvo.net/sound-effect/human-cough-63/428026/)
- [freesound.org](https://freesound.org/) for the poop sounds used by the Cannibal's digestion effect
- Licensed under [Creative Commons 0](https://creativecommons.org/public-domain/cc0/)
- [fart](https://freesound.org/people/MacKaffee/sounds/326143/) by [MacKaffee](https://freesound.org/people/MacKaffee/)
- [Short, definite fart](https://freesound.org/people/ycbcr/sounds/249583/) by [ycbcr](https://freesound.org/people/ycbcr/)
- [small fart](https://freesound.org/people/KataVlogsYT/sounds/324453/) by [KataVlogsYT](https://freesound.org/people/KataVlogsYT/)
- [queef_fart](https://freesound.org/people/faen/sounds/167090/) by [faen](https://freesound.org/people/faen/)
- [WAV Fart Vegan 047](https://freesound.org/people/frenkfurth/sounds/650693/) by [frenkfurth](https://freesound.org/people/frenkfurth/)
- Licensed under [Creative Commons BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- [fart_anxious](https://freesound.org/people/IFartInUrGeneralDirection/sounds/37850/) by [IFartInUrGeneralDirection](https://freesound.org/people/IFartInUrGeneralDirection/)
- [Deika](https://steamcommunity.com/id/deikaeus) for the [model](https://steamcommunity.com/sharedfiles/filedetails/?id=304354340) used by the Cannibal's digestion poop effect
- Our friends and everyone on the Discord server for their suggestions and help testing.

## Conflicts
Expand Down
26 changes: 26 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Release Notes

## 2.4.4 (Beta)
**Released: March 21st, 2026**

### Additions
- Added messages to existing twins when a player becomes a twin during an active round
- Added option to allow Cannibal to gain a configurable percentage of their victims' health (disabled by default) (Thanks Joel!)
- Added option to allow Cannibal to "digest" (permanently kill) their victims a configurable amount of time after eating them (disabled by default) (Thanks Joel!)
- Added option to allow Cannibal to drop a poop when a victim is fully digested, with or without an audible cue (enabled by default, but depends on digestion being enabled) (Thanks Joel!)

### Changes
- Changed role pack to apply next round, if the round is already active
- Changed logic to reassign a player's role if they change roles into being a solo twin during an active round
- Ported "TTT: Use gmod_language setting by default"
- Ported "TTT: Translatability improvements"
- Ported "TTT: Equipment menu sorting options"

### Fixes
- Fixed cheat sheet getting cut off when it exceeded the height of the screen and a role pack was enabled
- Fixed jester, detective, innocent, and traitor role rename ConVars not working
- Fixed error in Cannibal's role weapon HUD when weapon was selected from last round (Thanks Stig!)
- Fixed detective hats not hiding when the owning player was eaten by the Cannibal
- Ported "Add check for checking weapon GetHeadshotMultiplier"

### Developer
- Added `ROLE_STRINGS_DEFAULT` as a copy of `ROLE_STRINGS` from before role strings are changed by ConVars

## 2.4.3 (Beta)
**Released: February 21st, 2026**

Expand Down
7 changes: 7 additions & 0 deletions docs/api/global_variables.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ <h3><a id="role_strings" href="#role_strings">ROLE_STRINGS</a></h3>
<em>Added in:</em> 1.0.0
</p>

<h3><a id="role_strings_default" href="#role_strings_default">ROLE_STRINGS_DEFAULT</a> <span data-text="Beta Only" class="betaonly betaicon tooltip">&nbsp;</span></h3>
<p>
Table of title-case names for each role. Copy of <code>ROLE_STRINGS</code> from before role strings are changed by ConVars.<br>
<em>Realm:</em> Client and Server<br>
<em>Added in:</em> 2.4.4
</p>

<h3><a id="role_strings_ext" href="#role_strings_ext">ROLE_STRINGS_EXT</a></h3>
<p>
Table of extended (e.g. prefixed by an article) names for each role.<br>
Expand Down
34 changes: 32 additions & 2 deletions docs/teams/jester.html
Original file line number Diff line number Diff line change
Expand Up @@ -580,14 +580,44 @@ <h3 style="margin: 10px 0; padding: 0;">Role Configuration:</h3>
<td>ttt_cannibal_damage_penalty</td>
<td>0</td>
<td>Float</td>
<td>The fraction a Cannibal's damage will be scaled by when they are attacking. <i>(Requires <code>ttt_bodysnatcher_is_independent</code> to be enabled.)</i></td>
<td>The fraction a Cannibal's damage will be scaled by when they are attacking. <i>(Requires <code>ttt_cannibal_is_independent</code> to be enabled.)</i></td>
</tr>
<tr>
<td>ttt_cannibal_digestion <span data-text="Beta Only" class="betaonly betaicon tooltip">&nbsp;</span></td>
<td>0</td>
<td>Boolean</td>
<td>Whether the Cannibal digests and permanently kills their victims over time.</td>
</tr>
<tr>
<td>ttt_cannibal_digestion_poop <span data-text="Beta Only" class="betaonly betaicon tooltip">&nbsp;</span></td>
<td>1</td>
<td>Boolean</td>
<td>Whether the Cannibal drops poop when a victim is digested. <i>(Requires <code>ttt_cannibal_digestion</code> to be enabled.)</i></td>
</tr>
<tr>
<td>ttt_cannibal_digestion_poop_sound <span data-text="Beta Only" class="betaonly betaicon tooltip">&nbsp;</span></td>
<td>1</td>
<td>Boolean</td>
<td>Whether the Cannibal causes a sound when poop is dropped from a digested victim. <i>(Requires <code>ttt_cannibal_digestion</code> to be enabled.)</i></td>
</tr>
<tr>
<td>ttt_cannibal_eat_cooldown</td>
<td>10</td>
<td>Integer</td>
<td>The amount of time in seconds between uses of the Cannibal's Cannibalizer.</td>
</tr>
<tr>
<td>ttt_cannibal_gains_health <span data-text="Beta Only" class="betaonly betaicon tooltip">&nbsp;</span></td>
<td>0</td>
<td>Boolean</td>
<td>Whether the Cannibal gains their victim's health when eating them.</td>
</tr>
<tr>
<td>ttt_cannibal_gained_health_percentage <span data-text="Beta Only" class="betaonly betaicon tooltip">&nbsp;</span></td>
<td>15</td>
<td>Integer</td>
<td>What percentage of their victim's health the Cannibal gains. Set to 0 to always gain a flat 100HP <i>(Requires <code>ttt_cannibal_gains_health</code> to be enabled.)</i></td>
</tr>
<tr>
<td>ttt_cannibal_is_independent</td>
<td>0</td>
Expand All @@ -598,7 +628,7 @@ <h3 style="margin: 10px 0; padding: 0;">Role Configuration:</h3>
<td>ttt_cannibal_update_scoreboard</td>
<td>0</td>
<td>Boolean</td>
<td>Whether the Cannibal shows dead players as missing in action. <i>(Requires <code>ttt_bodysnatcher_is_independent</code> to be enabled.)</i></td>
<td>Whether the Cannibal shows dead players as missing in action. <i>(Requires <code>ttt_cannibal_is_independent</code> to be enabled.)</i></td>
</tr>
</tbody>
</table>
Expand Down
Loading
Loading