Skip to content

Commit 9a38ded

Browse files
authored
Merge pull request #882 from NoxxFlame/taskmaster
Taskmaster
2 parents 277a1cb + 0da2100 commit 9a38ded

73 files changed

Lines changed: 6720 additions & 37 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.luacheckrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,7 @@ globals = {
897897
"EVENT_VINDICATORFAIL",
898898
"EVENT_VINDICATORSUCCESS",
899899
"EVENT_ZOMBIFIED",
900+
"FEET_PER_METER",
900901
"GLITCH_CHAT_NONE",
901902
"GLITCH_CHAT_BLOCK_ALWAYS",
902903
"GLITCH_CHAT_BLOCK_WHILE_ALIVE",
@@ -1052,6 +1053,10 @@ globals = {
10521053
"SPECIAL_DETECTIVE_HIDE_NONE",
10531054
"SPONGE_ALL_PLAYERS",
10541055
"SPONGE_ATTACKER_AND_VICTIM",
1056+
"TASKMASTER_TF_TARGETID_PLAYERICON",
1057+
"TASKMASTER_TF_TARGETID_PLAYERTEXT",
1058+
"TASKMASTER_TF_PROGRESSBAR",
1059+
"TASKMASTER_TF_PARTICLERADIUS",
10551060
"TRACKRADAR",
10561061
"TRAITOR_BUTTON_ROLES",
10571062
"TRAITOR_ROLES",
@@ -1078,6 +1083,7 @@ globals = {
10781083
"WIN_PLAGUEMASTER",
10791084
"WIN_SHADOW",
10801085
"WIN_SPONGE",
1086+
"WIN_TASKMASTER",
10811087
"WIN_TIMELIMIT",
10821088
"WIN_TRAITOR",
10831089
"WIN_VAMPIRE",
@@ -1145,6 +1151,7 @@ globals = {
11451151
"ROLE_SPONGE",
11461152
"ROLE_SPY",
11471153
"ROLE_SWAPPER",
1154+
"ROLE_TASKMASTER",
11481155
"ROLE_TRACKER",
11491156
"ROLE_TRICKSTER",
11501157
"ROLE_TURNCOAT",
@@ -1213,6 +1220,7 @@ globals = {
12131220
"CRHUD",
12141221
"DEATHRADAR",
12151222
"SYNC",
1223+
"TASKMASTER",
12161224

12171225
-- TTTPAP Namespaces
12181226
"TTTPAP",

API/HOOKS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@ Called before the name and role of a player's killer is shown to the victim. Use
199199
- *killerName* - The new killerName value to use or the original passed into the hook
200200
- *role* - The new role value to use or the original passed into the hook. Use `ROLE_NONE` to hide the attacker's role from the victim
201201

202+
### TTTDetectiveCalledToBody(ply, owner, rag)
203+
Called when a player calls a detective to a player ragdoll.\
204+
*Realm:* Server\
205+
*Added in:* 2.3.5\
206+
*Parameters:*
207+
- *ply* - The player who is calling for a detective
208+
- *owner* - The player who owns the corpse the detective is being called to
209+
- *rag* - The ragdoll representing the corpse being called to
210+
202211
### TTTDetectiveLikePromoted(ply)
203212
Called when a detective-like (deputy, impersonator, etc.) player is promoted.\
204213
*Realm:* Server\

CONVARS.md

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ ttt_shadow_enabled 0 // Whether or not the Sha
116116
ttt_arsonist_enabled 0 // Whether or not the Arsonist should spawn
117117
ttt_hivemind_enabled 0 // Whether or not the Hive Mind should spawn
118118
ttt_plaguemaster_enabled 0 // Whether or not the Plaguemaster should spawn
119+
ttt_taskmaster_enabled 0 // Whether or not the Taskmaster should spawn
119120

120121
// Individual Role Spawn Weights
121122
ttt_hypnotist_spawn_weight 1 // The weight assigned to spawning the Hypnotist
@@ -165,6 +166,7 @@ ttt_shadow_spawn_weight 1 // The weight assigned to
165166
ttt_arsonist_spawn_weight 1 // The weight assigned to spawning the Arsonist
166167
ttt_hivemind_spawn_weight 1 // The weight assigned to spawning the Hive Mind
167168
ttt_plaguemaster_spawn_weight 1 // The weight assigned to spawning the Plaguemaster
169+
ttt_taskmaster_spawn_weight 1 // The weight assigned to spawning the Taskmaster
168170

169171
// (Note: Each role is limited to one player per round.)
170172

@@ -216,6 +218,7 @@ ttt_shadow_min_players 0 // The minimum number of
216218
ttt_arsonist_min_players 0 // The minimum number of players required to spawn the Arsonist
217219
ttt_hivemind_min_players 0 // The minimum number of players required to spawn the Hive Mind
218220
ttt_plaguemaster_min_players 0 // The minimum number of players required to spawn the Plaguemaster
221+
ttt_taskmaster_min_players 0 // The minimum number of players required to spawn the Taskmaster
219222

220223
// Grouped Role Spawn Settings
221224
ttt_twins_enabled 0 // Whether or not the Twins should spawn
@@ -967,7 +970,88 @@ ttt_plaguemaster_dart_replace_timer 0 // How long (in seconds)
967970
ttt_plaguemaster_body_search_mode 1 // Whether dead bodies reveal if they had the plague when searched. 0 - Don't show. 1 - Show if died from plague. 2 - Show if Infected with plague.
968971
ttt_plaguemaster_can_see_jesters 0 // Whether jesters are revealed (via head icons, color/icon on the scoreboard, etc.) to the Plaguemaster
969972
ttt_plaguemaster_update_scoreboard 1 // Whether the Plaguemaster shows dead players as missing in action
970-
973+
974+
// Taskmaster
975+
ttt_taskmaster_blocks_team_wins 1 // Whether the Taskmaster should block teams (innocent, traitor, monster) from winning if they are alive and haven't finished their tasks.
976+
ttt_taskmaster_is_passive 0 // Whether the Taskmaster should count as a 'passive' role for roles that need to kill other players, allowing them to win while the Taskmaster is still alive (if 'ttt_taskmaster_wins_with_others' is enabled)
977+
ttt_taskmaster_kill_tasks 1 // The number of kill tasks assigned to the Taskmaster
978+
ttt_taskmaster_misc_tasks 2 // The number of miscellaneous tasks assigned to the Taskmaster
979+
ttt_taskmaster_repeat_rerolls 1 // Whether the Taskmaster can be assigned tasks they previously rerolled away from
980+
ttt_taskmaster_win_block_length 60 // How long (in seconds) the Taskmaster should block teams (innocent, traitor, monster) from winning for (if 'ttt_taskmaster_blocks_team_wins' is enabled). Set to 0 to block until time runs out
981+
ttt_taskmaster_wins_with_others 1 // If the Taskmaster should be allowed to win alongside other teams/players
982+
983+
// Taskmaster tasks
984+
ttt_taskmaster_calldetective_enabled 1 // Whether the 'Call a Detective to a Body' task should be enabled
985+
ttt_taskmaster_carrycorpse_enabled 1 // Whether the 'Carry a Corpse for X Seconds' task should be enabled
986+
ttt_taskmaster_carrycorpse_time 60 // The time (in seconds) a player must carry a player corpse to complete the 'Carry Corpse' task
987+
ttt_taskmaster_chat_enabled 1 // Whether the 'Send X Messages' task should be enabled
988+
ttt_taskmaster_chat_times 25 // The number of text messages a player must sent to complete the 'Send X Messages' task
989+
ttt_taskmaster_completion_bonus 1 // How many credits the Taskmaster should get whenever they complete a task
990+
ttt_taskmaster_crouch_enabled 1 // Whether the 'Crouch for X Seconds' task should be enabled
991+
ttt_taskmaster_crouch_time 40 // The time (in seconds) a player must stay crouched to complete the 'Crouch' task
992+
ttt_taskmaster_crouchnearbody_enabled 1 // Whether the 'Crouch Near a Body' task should be enabled
993+
ttt_taskmaster_crouchnearbody_range 1 // The distance (in meters) away a player must stay within to count for the 'Crouch Near Body' task
994+
ttt_taskmaster_crouchnearbody_time 20 // The time (in seconds) a player must stay near a body to count for the 'Crouch Near Body' task
995+
ttt_taskmaster_crowbar_enabled 1 // Whether the 'Swing a Crowbar 50 Times' task should be enabled
996+
ttt_taskmaster_crowbar_times 50 // The number of times a player must use their crowbar to complete the 'Swing Crowbar' task
997+
ttt_taskmaster_damageeveryone_enabled 1 // Whether the 'Damage Everyone Else' task should be enabled
998+
ttt_taskmaster_dodamage_amount 200 // The amount of damage a player must do to complete the 'Deal X Damage' task
999+
ttt_taskmaster_dodamage_enabled 1 // Whether the 'Deal X Damage' task should be enabled
1000+
ttt_taskmaster_firebullets_enabled 1 // Whether the 'Fire X Bullets' task should be enabled
1001+
ttt_taskmaster_firebullets_times 100 // The jump of times a player must fire a bullet to complete the 'Fire X Bullets' task
1002+
ttt_taskmaster_getplayerkilled_enabled 1 // Whether the 'Get Target Killed' task should be enabled
1003+
ttt_taskmaster_getplayertokill_enabled 1 // Whether the 'Get Target to Kill' task should be enabled
1004+
ttt_taskmaster_healthunder_amount 15 // The amount of health a player must stay under to complete the 'Health Under' task
1005+
ttt_taskmaster_healthunder_enabled 1 // Whether the 'Survive Under X Health' task should be enabled
1006+
ttt_taskmaster_healthunder_time 60 // The time (in seconds) a player must stay under the target health to complete the 'Health Under' task
1007+
ttt_taskmaster_holstered_enabled 1 // Whether the 'Stay Holstered for X Seconds' task should be enabled
1008+
ttt_taskmaster_holstered_time 60 // The time (in seconds) a player must stay holstered to complete the 'Holstered' task
1009+
ttt_taskmaster_jump_enabled 1 // Whether the 'Jump x Times' task should be enabled
1010+
ttt_taskmaster_jump_times 100 // The jump of times a player must jump to complete the 'Jump X Times' task
1011+
ttt_taskmaster_kill360_enabled 1 // Whether the 'Kill a Player After a 360' task should be enabled
1012+
ttt_taskmaster_kill360_time 3 // The time (in seconds) a player has after completing a 360 to kill a player for the 'Kill a Player After a 360' task
1013+
ttt_taskmaster_killaiming_enabled 1 // Whether the 'Kill a Player While Aiming' task should be enabled
1014+
ttt_taskmaster_killairborne_enabled 1 // Whether the 'Kill an Airborne Player' task should be enabled
1015+
ttt_taskmaster_killbehind_enabled 1 // Whether the 'Kill a Player From Behind' task should be enabled
1016+
ttt_taskmaster_killbehind_view_angle 75 // The angle (in degrees) from a player's eye angle within which the Taskmaster is 'spotted' for the 'Kill a Player From Behind' task
1017+
ttt_taskmaster_killcrowbar_enabled 1 // Whether the 'Kill a Player With a Crowbar' task should be enabled
1018+
ttt_taskmaster_killdistant_enabled 1 // Whether the 'Kill a Distant Player' task should be enabled
1019+
ttt_taskmaster_killdistant_range 25 // The minimum distance (in meters) away a player can be to count for the 'Kill a Distant Player' task
1020+
ttt_taskmaster_killdouble_enabled 1 // Whether the 'Get a Double Kill' task should be enabled
1021+
ttt_taskmaster_killdouble_time 5 // The time (in seconds) the taskmaster has between kills to complete the 'Get a Double Kill' task
1022+
ttt_taskmaster_killheadshot_enabled 1 // Whether the 'Kill a Player With a Headshot' task should be enabled
1023+
ttt_taskmaster_killlastbullet_enabled 1 // Whether the 'Kill a Player With Your Last Bullet' task should be enabled
1024+
ttt_taskmaster_killmidair_enabled 1 // Whether the 'Kill a Player While Midair' task should be enabled
1025+
ttt_taskmaster_killnearby_enabled 1 // Whether the 'Kill a Nearby Player' task should be enabled
1026+
ttt_taskmaster_killnearby_range 5 // The maximum distance (in meters) away a player can be to count for the 'Kill a Nearby Player' task
1027+
ttt_taskmaster_killonehit_enabled 1 // Whether the 'Kill a Player in One Hit' task should be enabled
1028+
ttt_taskmaster_killpistol_enabled 1 // Whether the 'Kill a Player With a Pistol' task should be enabled
1029+
ttt_taskmaster_killretaliate_enabled 1 // Whether the 'Kill a Player That Attacked First' task should be enabled
1030+
ttt_taskmaster_killtarget_enabled 1 // Whether the 'Kill Target' task should be enabled
1031+
ttt_taskmaster_killweapon_enabled 1 // Whether the 'Kill a Player With a Specific Weapon' task should be enabled
1032+
ttt_taskmaster_lookatplayer_enabled 1 // Whether the 'Look at Target' task should be enabled
1033+
ttt_taskmaster_lookatplayer_time 30 // The time (in seconds) a player must look at their target to complete for the 'Look at Player' task
1034+
ttt_taskmaster_pickupshopitem_enabled 1 // Whether the 'Pick up a Shop Item' task should be enabled
1035+
ttt_taskmaster_standonplayer_enabled 1 // Whether the 'Stand on a Player for X Seconds' task should be enabled
1036+
ttt_taskmaster_standonplayer_time 15 // The time (in seconds) a player must stay stand on top of another player to complete the 'Stand On Player' task
1037+
ttt_taskmaster_stayhidden_enabled 1 // Whether the 'Stay Hidden for X Seconds' task should be enabled
1038+
ttt_taskmaster_stayhidden_time 30 // The time (in seconds) a player must hide to complete for the 'Stay Hidden' task
1039+
ttt_taskmaster_stayhigher_enabled 1 // Whether the 'Be Highest for X Seconds' task should be enabled
1040+
ttt_taskmaster_stayhigher_time 30 // The time (in seconds) a player must stay higher up to complete the 'Highest Player' task
1041+
ttt_taskmaster_stayinarea_enabled 1 // Whether the 'Stay in Area for X Seconds' task should be enabled
1042+
ttt_taskmaster_stayinarea_range 5 // The distance (in meters) away from the location that a player must stay within to count for the 'Stay in Area' task
1043+
ttt_taskmaster_stayinarea_time 30 // The time (in seconds) a player must stay inside the target area to count for the 'Stay in Area' task
1044+
ttt_taskmaster_staylower_enabled 1 // Whether the 'Be Lowest for X Seconds' task should be enabled
1045+
ttt_taskmaster_staylower_time 30 // The time (in seconds) a player must stay lower down to complete the 'Lowest Player' task
1046+
ttt_taskmaster_stayneartarget_enabled 1 // Whether the 'Stay Near Target' task should be enabled
1047+
ttt_taskmaster_stayneartarget_range 5 // The distance (in meters) away a player must stay within to count for the 'Stay Near Target' task
1048+
ttt_taskmaster_stayneartarget_time 30 // The time (in seconds) a player must stay near their target to count for the 'Stay Near Target' task
1049+
ttt_taskmaster_survive_enabled 1 // Whether the 'Survive' task should be enabled
1050+
ttt_taskmaster_takedamage_enabled 1 // Whether the 'Take Damage and Survive' task should be enabled
1051+
ttt_taskmaster_takedamage_time 60 // The time (in seconds) a player must survive without taking further damage to complete the 'Take Damage' task
1052+
ttt_taskmaster_weaponpickups_count 20 // The number of unique weapons a player must pick up to complete the 'Pick Up Weapons' task
1053+
ttt_taskmaster_weaponpickups_enabled 1 // Whether the 'Pick up X Weapons' task should be enabled
1054+
9711055
// ----------------------------------------
9721056

9731057
// GROUPED ROLE SETTINGS
@@ -1145,6 +1229,7 @@ ttt_shadow_starting_health 100 // The amount of health t
11451229
ttt_arsonist_starting_health 100 // The amount of health the Arsonist starts with
11461230
ttt_hivemind_starting_health 100 // The amount of health the Hive Mind starts with
11471231
ttt_plaguemaster_starting_health 100 // The amount of health the Plaguemaster starts with
1232+
ttt_taskmaster_starting_health 100 // The amount of health the Taskmaster starts with
11481233

11491234
// Individual Role Max Health. Set to 0 or -1 to use the game's default maximum health.
11501235
ttt_traitor_max_health 100 // The maximum amount of health a Traitor can have
@@ -1199,6 +1284,7 @@ ttt_shadow_max_health 100 // The maximum amount of
11991284
ttt_arsonist_max_health 100 // The maximum amount of health the Arsonist can have
12001285
ttt_hivemind_max_health 100 // The maximum amount of health the Hive Mind can have
12011286
ttt_plaguemaster_max_health 100 // The maximum amount of health the Plaguemaster can have
1287+
ttt_taskmaster_max_health 100 // The maximum amount of health the Taskmaster can have
12021288

12031289
// Round Time
12041290
ttt_roundtime_win_draw 0 // Whether a round that ends because the round time limit has passed counts as a draw. If it is not a draw, the traitor team loses

RELEASE.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
## 2.3.5 (Beta)
44
**Released:**
55

6-
### Changes
7-
- Updated weapon switch and pickup HUD elements to use the same logic for getting weapon names
8-
- Fixes very rare cases where they would say different things
9-
106
### Additions
7+
- Added new independent role: Taskmaster
118
- Added ability to control whether the mercenary gets body armor as part of their loadout (defaults to `true`)
129
- Added ability to change vampire's fang drain overheal to overheal (default), increase max health, or do both
1310
- Added ability to disable automatically confirming a players death when searching their body (disabled by default)
1411

12+
### Changes
13+
- Updated weapon switch and pickup HUD elements to use the same logic for getting weapon names
14+
- Fixes very rare cases where they would say different things
15+
1516
### Fixes
1617
- Fixed illusionist not blocking traitor team voice chat
1718
- Fixed promoted impersonator and deputy who are searched by a detective not always showing their true role on the scoreboard
@@ -20,6 +21,8 @@
2021
- Added `state` parameter to `TTTTeamVoiceChatTargets` hook
2122
- Added `table.GetFirstItemWithPropertyValue` static method
2223
- Added `maxchange` parameter to `TTTVampireBodyEaten` hook
24+
- Added `TTTDetectiveCalledToBody` hook which is called when a player calls a detective to a body
25+
- Changed `SYNC` methods to not clear values that are already `nil`
2326

2427
## 2.3.4 (Beta)
2528
**Released: August 9th, 2025**

docs/api/hooks.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,19 @@ <h3><a id="tttdeathnotifyoverridevictim-inflictor-attacker-reason-killername-rol
308308
<li><em>role</em> - The new role value to use or the original passed into the hook. Use <code>ROLE_NONE</code> to hide the attacker's role from the victim</li>
309309
</ul>
310310

311+
<h3><a id="tttdetectivecalledtobodyply-owner-rag" href="#tttdetectivecalledtobodyply-owner-rag">TTTDetectiveCalledToBody(ply, owner, rag)</a> <span data-text="Beta Only" class="betaonly betaicon tooltip">&nbsp;</span></h3>
312+
<p>
313+
Called when a player calls a detective to a player ragdoll.<br>
314+
<em>Realm:</em> Server<br>
315+
<em>Added in:</em> 2.3.5<br>
316+
<em>Parameters:</em>
317+
</p>
318+
<ul>
319+
<li><em>ply</em> - The player who is calling for a detective</li>
320+
<li><em>owner</em> - The player who owns the corpse the detective is being called to</li>
321+
<li><em>rag</em> - The ragdoll representing the corpse being called to</li>
322+
</ul>
323+
311324
<h3><a id="tttdetectivelikepromotedply" href="#tttdetectivelikepromotedply">TTTDetectiveLikePromoted(ply)</a></h3>
312325
<p>
313326
Called when a detective-like (deputy, impersonator, etc.) player is promoted.<br>

0 commit comments

Comments
 (0)