From 01a04b443f61a158114ef12f403e7c865814aa52 Mon Sep 17 00:00:00 2001 From: Malivil Date: Sat, 6 Sep 2025 17:56:13 -0400 Subject: [PATCH 01/12] Added completed task count to taskmaster on the round summary screen --- .../roles/taskmaster/cl_taskmaster.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gamemodes/terrortown/gamemode/roles/taskmaster/cl_taskmaster.lua b/gamemodes/terrortown/gamemode/roles/taskmaster/cl_taskmaster.lua index 6a0813c6e..b38866cbe 100644 --- a/gamemodes/terrortown/gamemode/roles/taskmaster/cl_taskmaster.lua +++ b/gamemodes/terrortown/gamemode/roles/taskmaster/cl_taskmaster.lua @@ -35,6 +35,9 @@ hook.Add("Initialize", "Taskmaster_Translations_Initialize", function() -- HUD LANG.AddToLanguage("english", "taskmaster_hud", "You will lose in: {time}") + -- Scoring + LANG.AddToLanguage("english", "score_taskmaster_taskscomplete", "Tasks complete:") + -- Cheat Sheet LANG.AddToLanguage("english", "cheatsheet_desc_taskmaster", "Has a list of tasks that they must complete before the end of the round.") @@ -91,6 +94,26 @@ hook.Add("TTTScoringSecondaryWins", "Taskmaster_TTTScoringSecondaryWins", functi end end) +------------- +-- SCORING -- +------------- + +hook.Add("TTTScoringSummaryRender", "Taskmaster_TTTScoringSummaryRender", function(ply, roleFileName, groupingRole, roleColor, name, startingRole, finalRole) + if not IsPlayer(ply) then return end + + if ply:IsTaskmaster() then + local complete = #ply.TaskmasterCompletedTasks + local total = 0 + if ply.TaskmasterKillTasks then + total = total + #ply.TaskmasterKillTasks + end + if ply.TaskmasterMiscTasks then + total = total + #ply.TaskmasterMiscTasks + end + return roleFileName, groupingRole, roleColor, name, complete .. "/" .. total, LANG.GetTranslation("score_taskmaster_taskscomplete") + end +end) + ------------ -- EVENTS -- ------------ From 65be705f38663dfa365645039bf7857b955cfeba Mon Sep 17 00:00:00 2001 From: Malivil Date: Sat, 6 Sep 2025 17:56:30 -0400 Subject: [PATCH 02/12] Fixed spectators counting against the taskmaster in the Stay Hidden task --- .../terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/gamemodes/terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua b/gamemodes/terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua index c763579c6..d6950deb6 100644 --- a/gamemodes/terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua +++ b/gamemodes/terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua @@ -76,6 +76,7 @@ if SERVER then local function IsHidden(ply) for _, p in PlayerIterator() do if ply == p then continue end + if not p:Alive() or p:IsSpec() then continue end -- Check IsOnScreen first because math is more efficient then sending traces this often if p:IsOnScreen(ply, 0.35) and IsTargetInView(p, ply) then From 319ca5694e28badbd341835f7eb177aba562887e Mon Sep 17 00:00:00 2001 From: Malivil Date: Sat, 6 Sep 2025 18:06:55 -0400 Subject: [PATCH 03/12] Changed Stay Hidden task to be a bit less lenient --- .../gamemode/roles/taskmaster/tasks/stayhidden.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gamemodes/terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua b/gamemodes/terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua index d6950deb6..4927eb8ca 100644 --- a/gamemodes/terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua +++ b/gamemodes/terrortown/gamemode/roles/taskmaster/tasks/stayhidden.lua @@ -66,20 +66,13 @@ if SERVER then TASKMASTER_TF_PROGRESSBAR } - local function IsTargetInView(ply, target) - if not IsValid(ply) then return false end - - local tr = ply:GetEyeTrace(MASK_SHOT) - return tr.Entity == target - end - local function IsHidden(ply) for _, p in PlayerIterator() do if ply == p then continue end if not p:Alive() or p:IsSpec() then continue end -- Check IsOnScreen first because math is more efficient then sending traces this often - if p:IsOnScreen(ply, 0.35) and IsTargetInView(p, ply) then + if p:IsOnScreen(ply, 0.35) and p:IsLineOfSightClear(ply) then return false end end From 3b6491e3006231821160ad30f3700f9f4e20f998 Mon Sep 17 00:00:00 2001 From: Malivil Date: Mon, 8 Sep 2025 21:38:00 -0400 Subject: [PATCH 04/12] Ported "TTT: Reduce Healing sound repetition count in Radio" --- RELEASE.md | 14 ++++++++++++++ gamemodes/terrortown/gamemode/radio_shd.lua | 2 +- gamemodes/terrortown/gamemode/shared.lua | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index e40300ef0..366ff9865 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,5 +1,19 @@ # Release Notes +## 2.4.0 +**Released:**\ +Includes beta updates [2.3.1](#231-beta) to [2.3.5](#235-beta). + +### Additions +- Added completed task count to Taskmaster on the round summary screen + +### Changes +- Changed Taskmaster's "Stay Hidden" task to be a bit less lenient +- Ported "TTT: Reduce Healing sound repetition count in Radio" + +### Fixes +- Fixed spectators counting against the Taskmaster in the "Stay Hidden" task + ## 2.3.5 (Beta) **Released: September 5th, 2025** diff --git a/gamemodes/terrortown/gamemode/radio_shd.lua b/gamemodes/terrortown/gamemode/radio_shd.lua index 26fe2e85a..ce8d81495 100644 --- a/gamemodes/terrortown/gamemode/radio_shd.lua +++ b/gamemodes/terrortown/gamemode/radio_shd.lua @@ -65,7 +65,7 @@ TRADIO.Sounds = { name = "radio_button_heal", sound = Sound("items/medshot4.wav"), delay = 2, - times = {4, 8} + times = {3, 5} }, -- Serial Sounds diff --git a/gamemodes/terrortown/gamemode/shared.lua b/gamemodes/terrortown/gamemode/shared.lua index 7dd64e2fe..28eac2cf1 100644 --- a/gamemodes/terrortown/gamemode/shared.lua +++ b/gamemodes/terrortown/gamemode/shared.lua @@ -24,7 +24,7 @@ local StringSub = string.sub include("player_class/player_ttt.lua") -- Version string for display and function for version checks -CR_VERSION = "2.3.5" +CR_VERSION = "2.4.0" CR_BETA = true CR_WORKSHOP_ID = CR_BETA and "2404251054" or "2421039084" From c6705fa7ba2f325dd8dc281da5c952d3e656e89b Mon Sep 17 00:00:00 2001 From: Malivil Date: Mon, 8 Sep 2025 21:43:52 -0400 Subject: [PATCH 05/12] Ported "TTT: Do not stack round start popups" --- RELEASE.md | 2 ++ gamemodes/terrortown/gamemode/cl_popups.lua | 37 +++++++++------------ 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 366ff9865..802db8fb7 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,6 +10,8 @@ Includes beta updates [2.3.1](#231-beta) to [2.3.5](#235-beta). ### Changes - Changed Taskmaster's "Stay Hidden" task to be a bit less lenient - Ported "TTT: Reduce Healing sound repetition count in Radio" +- Ported "TTT: Do not stack round start popups" + - There is no change in functionality, we just adjusted our implementation of this feature to match the base ### Fixes - Fixed spectators counting against the Taskmaster in the "Stay Hidden" task diff --git a/gamemodes/terrortown/gamemode/cl_popups.lua b/gamemodes/terrortown/gamemode/cl_popups.lua index 8bcd96591..72af458ad 100644 --- a/gamemodes/terrortown/gamemode/cl_popups.lua +++ b/gamemodes/terrortown/gamemode/cl_popups.lua @@ -139,40 +139,29 @@ local function GetTextForLocalPlayer() end end -local popupframe = nil -local function RoundStartPopupClose() - if IsValid(popupframe) then - popupframe:Remove() - popupframe = nil - end -end - local startshowtime = CreateConVar("ttt_startpopup_duration", "17", FCVAR_ARCHIVE) +local roundStartFrame = nil -- shows info about goal and fellow traitors (if any) local function RoundStartPopup() -- based on Derma_Message - -- close last round's if it's still there - RoundStartPopupClose() - timer.Remove("roundstartpopupclose") - if startshowtime:GetInt() <= 0 then return end if not LocalPlayer() then return end - popupframe = vgui.Create("Panel") - popupframe:SetDrawOnTop(true) - popupframe:SetMouseInputEnabled(false) - popupframe:SetKeyboardInputEnabled(false) + local dframe = vgui.Create("Panel") + dframe:SetDrawOnTop(true) + dframe:SetMouseInputEnabled(false) + dframe:SetKeyboardInputEnabled(false) local color = Color(0, 0, 0, 200) - popupframe.Paint = function(s) + dframe.Paint = function(s) draw.RoundedBox(8, 0, 0, s:GetWide(), s:GetTall(), color) end local text = GetTextForLocalPlayer() - local dtext = vgui.Create("DLabel", popupframe) + local dtext = vgui.Create("DLabel", dframe) dtext:SetFont("TabLarge") dtext:SetText(text) dtext:SizeToContents() @@ -184,12 +173,16 @@ local function RoundStartPopup() dtext:SetPos(m, m) - popupframe:SetSize(w + m * 2, h + m * 2) - popupframe:Center() + dframe:SetSize(w + m * 2, h + m * 2) + dframe:Center() + + dframe:AlignBottom(10) - popupframe:AlignBottom(10) + -- Do not stack the messages when ttt_roundrestart is used + if IsValid(roundStartFrame) then roundStartFrame:Remove() end + roundStartFrame = dframe - timer.Create("roundstartpopupclose", startshowtime:GetInt(), 1, RoundStartPopupClose) + timer.Simple(startshowtime:GetInt(), function() if IsValid(dframe) then dframe:Remove() end end) end concommand.Add("ttt_cl_startpopup", RoundStartPopup) From b38f3594331622133be8a29913d89a24d077aecd Mon Sep 17 00:00:00 2001 From: Malivil Date: Mon, 8 Sep 2025 21:51:47 -0400 Subject: [PATCH 06/12] Ported "TTT: Fixed font warnings (no visual changes)" --- RELEASE.md | 1 + .../entities/entities/ttt_c4/cl_init.lua | 2 +- .../terrortown/entities/entities/ttt_c4/shared.lua | 2 +- gamemodes/terrortown/gamemode/cl_help.lua | 2 +- gamemodes/terrortown/gamemode/cl_hud.lua | 12 ++++++------ gamemodes/terrortown/gamemode/cl_init.lua | 2 +- gamemodes/terrortown/gamemode/cl_scoring.lua | 14 +++++++------- gamemodes/terrortown/gamemode/cl_targetid.lua | 2 +- gamemodes/terrortown/gamemode/vgui/sb_main.lua | 2 +- 9 files changed, 20 insertions(+), 19 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 802db8fb7..f0415dc7e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -15,6 +15,7 @@ Includes beta updates [2.3.1](#231-beta) to [2.3.5](#235-beta). ### Fixes - Fixed spectators counting against the Taskmaster in the "Stay Hidden" task +- Ported "TTT: Fixed font warnings (no visual changes)" ## 2.3.5 (Beta) **Released: September 5th, 2025** diff --git a/gamemodes/terrortown/entities/entities/ttt_c4/cl_init.lua b/gamemodes/terrortown/entities/entities/ttt_c4/cl_init.lua index 7debb2d6e..e4d37b5a0 100644 --- a/gamemodes/terrortown/entities/entities/ttt_c4/cl_init.lua +++ b/gamemodes/terrortown/entities/entities/ttt_c4/cl_init.lua @@ -279,7 +279,7 @@ end vgui.Register("DisarmPanel", PANEL, "DPanel") surface.CreateFont("C4Timer", { - font = "TabLarge", + font = "Tahoma", size = 30, weight = 750 }) diff --git a/gamemodes/terrortown/entities/entities/ttt_c4/shared.lua b/gamemodes/terrortown/entities/entities/ttt_c4/shared.lua index 7f9c710f9..adb23e3be 100644 --- a/gamemodes/terrortown/entities/entities/ttt_c4/shared.lua +++ b/gamemodes/terrortown/entities/entities/ttt_c4/shared.lua @@ -605,7 +605,7 @@ end if CLIENT then surface.CreateFont("C4ModelTimer", { - font = "Default", + font = "Tahoma", size = 13, weight = 0, antialias = false diff --git a/gamemodes/terrortown/gamemode/cl_help.lua b/gamemodes/terrortown/gamemode/cl_help.lua index a47d93df4..59b6f7065 100644 --- a/gamemodes/terrortown/gamemode/cl_help.lua +++ b/gamemodes/terrortown/gamemode/cl_help.lua @@ -17,7 +17,7 @@ local GetPTranslation = LANG.GetParamTranslation local HookCall = hook.Call surface.CreateFont("TutorialTitle", { - font = "Trebuchet MS", + font = "Tahoma", size = 30, weight = 900 }) diff --git a/gamemodes/terrortown/gamemode/cl_hud.lua b/gamemodes/terrortown/gamemode/cl_hud.lua index 19b4fd018..c492465b1 100644 --- a/gamemodes/terrortown/gamemode/cl_hud.lua +++ b/gamemodes/terrortown/gamemode/cl_hud.lua @@ -26,32 +26,32 @@ local hide_role = GetConVar("ttt_hide_role") -- Fonts surface.CreateFont("TraitorState", { - font = "Trebuchet24", + font = "Tahoma", size = 28, weight = 1000 }) surface.CreateFont("TraitorStateSmall", { - font = "Trebuchet24", + font = "Tahoma", size = 24, weight = 1000 }) surface.CreateFont("TimeLeft", { - font = "Trebuchet24", + font = "Tahoma", size = 24, weight = 800 }) surface.CreateFont("HealthAmmo", { - font = "Trebuchet24", + font = "Tahoma", size = 24, weight = 750 }) surface.CreateFont("UseHintCaption", { - font = "Trebuchet24", + font = "Tahoma", size = 24, weight = 750 }) surface.CreateFont("UseHint", { - font = "Trebuchet24", + font = "Tahoma", size = 18, weight = 750 }) diff --git a/gamemodes/terrortown/gamemode/cl_init.lua b/gamemodes/terrortown/gamemode/cl_init.lua index 3252fb61e..bb57c6df3 100644 --- a/gamemodes/terrortown/gamemode/cl_init.lua +++ b/gamemodes/terrortown/gamemode/cl_init.lua @@ -39,7 +39,7 @@ surface.CreateFont("TabLarge", { weight = 700, shadow = true, antialias = false }) surface.CreateFont("Trebuchet22", { - font = "Trebuchet MS", + font = "Tahoma", size = 22, weight = 900 }) diff --git a/gamemodes/terrortown/gamemode/cl_scoring.lua b/gamemodes/terrortown/gamemode/cl_scoring.lua index bb1aaa805..fb533fa2d 100644 --- a/gamemodes/terrortown/gamemode/cl_scoring.lua +++ b/gamemodes/terrortown/gamemode/cl_scoring.lua @@ -38,7 +38,7 @@ include("scoring_shd.lua") local skull_icon = Material("HUD/killicons/default") surface.CreateFont("WinHuge", { - font = "Trebuchet24", + font = "Tahoma", size = 72, weight = 1000, shadow = true, @@ -46,7 +46,7 @@ surface.CreateFont("WinHuge", { }) surface.CreateFont("WinLarge", { - font = "Trebuchet24", + font = "Tahoma", size = 48, weight = 1000, shadow = true, @@ -54,7 +54,7 @@ surface.CreateFont("WinLarge", { }) surface.CreateFont("WinMedium", { - font = "Trebuchet24", + font = "Tahoma", size = 40, weight = 1000, shadow = true, @@ -62,7 +62,7 @@ surface.CreateFont("WinMedium", { }) surface.CreateFont("WinSmall", { - font = "Trebuchet24", + font = "Tahoma", size = 32, weight = 1000, shadow = true, @@ -70,7 +70,7 @@ surface.CreateFont("WinSmall", { }) surface.CreateFont("WinTiny", { - font = "Trebuchet24", + font = "Tahoma", size = 24, weight = 1000, shadow = true, @@ -78,13 +78,13 @@ surface.CreateFont("WinTiny", { }) surface.CreateFont("ScoreNicks", { - font = "Trebuchet24", + font = "Tahoma", size = 32, weight = 100 }) surface.CreateFont("IconText", { - font = "Trebuchet24", + font = "Tahoma", size = 24, weight = 100 }) diff --git a/gamemodes/terrortown/gamemode/cl_targetid.lua b/gamemodes/terrortown/gamemode/cl_targetid.lua index d7b00a6da..9b7b47f71 100644 --- a/gamemodes/terrortown/gamemode/cl_targetid.lua +++ b/gamemodes/terrortown/gamemode/cl_targetid.lua @@ -388,7 +388,7 @@ end ---- Crosshair affairs -surface.CreateFont("TargetIDSmall2", { font = "TargetID", +surface.CreateFont("TargetIDSmall2", { font = "Tahoma", size = 16, weight = 1000 }) diff --git a/gamemodes/terrortown/gamemode/vgui/sb_main.lua b/gamemodes/terrortown/gamemode/vgui/sb_main.lua index ca1d78367..a9bea90f8 100644 --- a/gamemodes/terrortown/gamemode/vgui/sb_main.lua +++ b/gamemodes/terrortown/gamemode/vgui/sb_main.lua @@ -39,7 +39,7 @@ surface.CreateFont("cool_large", { weight = 400 }) surface.CreateFont("treb_small", { - font = "Trebuchet18", + font = "Tahoma", size = 14, weight = 700 }) From 2022e2adc0e88ebd92501276fff1eef0bd3919cb Mon Sep 17 00:00:00 2001 From: Malivil Date: Thu, 11 Sep 2025 09:29:41 -0400 Subject: [PATCH 07/12] Added ability to use parameters when defining custom radio sound names --- RELEASE.md | 3 +++ gamemodes/terrortown/gamemode/cl_radio.lua | 11 ++++++++++- gamemodes/terrortown/gamemode/radio_shd.lua | 15 ++++++++------- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index f0415dc7e..4b00d5069 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,6 +17,9 @@ Includes beta updates [2.3.1](#231-beta) to [2.3.5](#235-beta). - Fixed spectators counting against the Taskmaster in the "Stay Hidden" task - Ported "TTT: Fixed font warnings (no visual changes)" +### Developer +- Added ability to use parameters when defining custom radio sound names + ## 2.3.5 (Beta) **Released: September 5th, 2025** diff --git a/gamemodes/terrortown/gamemode/cl_radio.lua b/gamemodes/terrortown/gamemode/cl_radio.lua index 9117236dd..8966d5a47 100644 --- a/gamemodes/terrortown/gamemode/cl_radio.lua +++ b/gamemodes/terrortown/gamemode/cl_radio.lua @@ -4,6 +4,7 @@ local math = math local vgui = vgui local GetTranslation = LANG.GetTranslation +local GetPTranslation = LANG.GetParamTranslation local TryTranslation = LANG.TryTranslation TRADIO.SoundOrder = { @@ -47,7 +48,15 @@ local function CreateSoundBoard(parent) for ri, snd in ipairs(sorder) do local but = grid:Add("DButton") but:SetSize(bw, bh) - but:SetText(TryTranslation(TRADIO.Sounds[snd].name)) + + local name = TRADIO.Sounds[snd].name + local name_params = TRADIO.Sounds[snd].name_params + local translated = TryTranslation(name) + if name_params and name ~= translated then + translated = GetPTranslation(name, name_params) + end + but:SetText(translated) + but.snd = snd but.DoClick = ButtonClickPlay end diff --git a/gamemodes/terrortown/gamemode/radio_shd.lua b/gamemodes/terrortown/gamemode/radio_shd.lua index ce8d81495..cd2083383 100644 --- a/gamemodes/terrortown/gamemode/radio_shd.lua +++ b/gamemodes/terrortown/gamemode/radio_shd.lua @@ -10,6 +10,7 @@ TRADIO = TRADIO or {} -- or how the sound is played on the server: -- -- name: The name of the sound shown in the T menu. Can be localized. +-- name_params: The parameters to use when localizing the name, if any. -- sound: The sound to be played, or a table of sounds to pick from randomly. -- serial: If true, play through the sound table in sequential order instead of randomly. -- times: The number of times to repeat the sound. If set to a table, randomizes the number of times within the range {min, max}. @@ -104,7 +105,7 @@ TRADIO.Sounds = { -- Gun Sounds shotgun = { name = "radio_button_shotgun", - sound = Sound( "Weapon_XM1014.Single" ), + sound = Sound("Weapon_XM1014.Single"), delay = {0.8, 1.6}, times = {1, 3}, ampl = 90 @@ -112,7 +113,7 @@ TRADIO.Sounds = { pistol = { name = "radio_button_pistol", - sound = Sound( "Weapon_FiveSeven.Single" ), + sound = Sound("Weapon_FiveSeven.Single"), delay = {0.4, 0.8}, times = {2, 4}, ampl = 90 @@ -120,7 +121,7 @@ TRADIO.Sounds = { mac10 = { name = "radio_button_mac10", - sound = Sound( "Weapon_mac10.Single" ), + sound = Sound("Weapon_mac10.Single"), delay = 0.065, times = {5, 10}, ampl = 90 @@ -128,7 +129,7 @@ TRADIO.Sounds = { deagle = { name = "radio_button_deagle", - sound = Sound( "Weapon_Deagle.Single" ), + sound = Sound("Weapon_Deagle.Single"), delay = {0.6, 1.2}, times = {1, 3}, ampl = 90 @@ -136,7 +137,7 @@ TRADIO.Sounds = { m16 = { name = "radio_button_m16", - sound = Sound( "Weapon_M4A1.Single" ), + sound = Sound("Weapon_M4A1.Single"), delay = 0.2, times = {1, 5}, ampl = 90 @@ -144,13 +145,13 @@ TRADIO.Sounds = { rifle = { name = "radio_button_rifle", - sound = Sound( "weapons/scout/scout_fire-1.wav" ), + sound = Sound("weapons/scout/scout_fire-1.wav"), ampl = 80 }, huge = { name = "radio_button_huge", - sound = Sound( "Weapon_m249.Single" ), + sound = Sound("Weapon_m249.Single"), delay = 0.055, times = {6, 12}, ampl = 90 From 463f5ab47ea03071ac919f98ab9ba27d277032d5 Mon Sep 17 00:00:00 2001 From: Malivil Date: Thu, 11 Sep 2025 11:35:01 -0400 Subject: [PATCH 08/12] Added radio sounds for Clown activate, Jester celebrate, Loot Goblin cackle, Old Man ramble, Vampire fade, and Zombie leap --- RELEASE.md | 1 + .../terrortown/gamemode/roles/clown/cl_clown.lua | 3 +++ .../terrortown/gamemode/roles/clown/shared.lua | 14 +++++++++++++- .../gamemode/roles/jester/cl_jester.lua | 3 +++ .../terrortown/gamemode/roles/jester/shared.lua | 14 +++++++++++++- .../gamemode/roles/lootgoblin/cl_lootgoblin.lua | 3 +++ .../gamemode/roles/lootgoblin/shared.lua | 16 ++++++++++++++++ .../gamemode/roles/oldman/cl_oldman.lua | 3 +++ .../terrortown/gamemode/roles/oldman/shared.lua | 13 ++++++++++++- .../gamemode/roles/vampire/cl_vampire.lua | 3 +++ .../terrortown/gamemode/roles/vampire/shared.lua | 12 ++++++++++++ .../gamemode/roles/zombie/cl_zombie.lua | 3 +++ .../terrortown/gamemode/roles/zombie/shared.lua | 10 ++++++++++ 13 files changed, 95 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 4b00d5069..4e2c2fa88 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -6,6 +6,7 @@ Includes beta updates [2.3.1](#231-beta) to [2.3.5](#235-beta). ### Additions - Added completed task count to Taskmaster on the round summary screen +- Added radio sounds for Clown activate, Jester celebrate, Loot Goblin cackle, Old Man ramble, Vampire fade, and Zombie leap ### Changes - Changed Taskmaster's "Stay Hidden" task to be a bit less lenient diff --git a/gamemodes/terrortown/gamemode/roles/clown/cl_clown.lua b/gamemodes/terrortown/gamemode/roles/clown/cl_clown.lua index 48dbb1f0a..409c18142 100644 --- a/gamemodes/terrortown/gamemode/roles/clown/cl_clown.lua +++ b/gamemodes/terrortown/gamemode/roles/clown/cl_clown.lua @@ -27,6 +27,9 @@ hook.Add("Initialize", "Clown_Translations_Initialize", function() LANG.AddToLanguage("english", "win_clown", "The {role} has murdered you all!") LANG.AddToLanguage("english", "ev_win_clown", "The vicious {role} won the round!") + -- Radio + LANG.AddToLanguage("english", "radio_clo_activate", "{clown} Activate") + -- Cheat Sheet LANG.AddToLanguage("english", "cheatsheet_desc_clown", "Pretends to be a Jester until someone is about to win, then they become an independent and must kill everyone else to win.") diff --git a/gamemodes/terrortown/gamemode/roles/clown/shared.lua b/gamemodes/terrortown/gamemode/roles/clown/shared.lua index 00a1e51a7..7cfa0dc40 100644 --- a/gamemodes/terrortown/gamemode/roles/clown/shared.lua +++ b/gamemodes/terrortown/gamemode/roles/clown/shared.lua @@ -100,4 +100,16 @@ ROLE_SHOULD_ACT_LIKE_JESTER[ROLE_CLOWN] = function(ply) if ply:IsJesterTeam() or ply:IsRoleAbilityDisabled() then return true end -end \ No newline at end of file +end + +-- Initialize role features +hook.Add("TTTPrepareRound", "Clown_Shared_TTTPrepareRound", function() + -- Add radio sounds + if not TRADIO.Sounds.cloactivate and util.CanRoleSpawn(ROLE_CLOWN) then + TRADIO.AddNewSound("cloactivate", { + name = "radio_clo_activate", + name_params = { clown = ROLE_STRINGS[ROLE_CLOWN] }, + sound = "clown.wav" + }) + end +end) \ No newline at end of file diff --git a/gamemodes/terrortown/gamemode/roles/jester/cl_jester.lua b/gamemodes/terrortown/gamemode/roles/jester/cl_jester.lua index 227e6aadb..2ea229e60 100644 --- a/gamemodes/terrortown/gamemode/roles/jester/cl_jester.lua +++ b/gamemodes/terrortown/gamemode/roles/jester/cl_jester.lua @@ -20,6 +20,9 @@ hook.Add("Initialize", "Jester_Translations_Initialize", function() -- Scoring LANG.AddToLanguage("english", "score_jester_killedby", "Killed by") + -- Radio + LANG.AddToLanguage("english", "radio_jes_celebrate", "{jester} Celebrate") + -- Cheat Sheet LANG.AddToLanguage("english", "cheatsheet_desc_jester", "Wins the round if they can get another player to kill them.") diff --git a/gamemodes/terrortown/gamemode/roles/jester/shared.lua b/gamemodes/terrortown/gamemode/roles/jester/shared.lua index d7ed0fa75..385da6c7e 100644 --- a/gamemodes/terrortown/gamemode/roles/jester/shared.lua +++ b/gamemodes/terrortown/gamemode/roles/jester/shared.lua @@ -39,4 +39,16 @@ table.insert(ROLE_CONVARS[ROLE_JESTER], { table.insert(ROLE_CONVARS[ROLE_JESTER], { cvar = "ttt_jester_healthstation_reduce_max", type = ROLE_CONVAR_TYPE_BOOL -}) \ No newline at end of file +}) + +-- Initialize role features +hook.Add("TTTPrepareRound", "Jester_Shared_TTTPrepareRound", function() + -- Add radio sounds + if not TRADIO.Sounds.jescelebrate and util.CanRoleSpawn(ROLE_JESTER) then + TRADIO.AddNewSound("jescelebrate", { + name = "radio_jes_celebrate", + name_params = { jester = ROLE_STRINGS[ROLE_JESTER] }, + sound = "birthday.wav" + }) + end +end) \ No newline at end of file diff --git a/gamemodes/terrortown/gamemode/roles/lootgoblin/cl_lootgoblin.lua b/gamemodes/terrortown/gamemode/roles/lootgoblin/cl_lootgoblin.lua index 330ba4c8f..94274036f 100644 --- a/gamemodes/terrortown/gamemode/roles/lootgoblin/cl_lootgoblin.lua +++ b/gamemodes/terrortown/gamemode/roles/lootgoblin/cl_lootgoblin.lua @@ -28,6 +28,9 @@ hook.Add("Initialize", "LootGoblin_Translations_Initialize", function() -- ConVars LANG.AddToLanguage("english", "lootgoblin_config_radar_sound", "Play radar ping sound") + -- Radio + LANG.AddToLanguage("english", "radio_lgob_cackle", "{goblin} Cackle") + -- Cheat Sheet LANG.AddToLanguage("english", "cheatsheet_desc_lootgoblin", "Revealed to all players and drops random shop items when they die. They win if they can survive until the end of the round.") diff --git a/gamemodes/terrortown/gamemode/roles/lootgoblin/shared.lua b/gamemodes/terrortown/gamemode/roles/lootgoblin/shared.lua index db3e43a1b..bb3bd8a67 100644 --- a/gamemodes/terrortown/gamemode/roles/lootgoblin/shared.lua +++ b/gamemodes/terrortown/gamemode/roles/lootgoblin/shared.lua @@ -172,3 +172,19 @@ hook.Add("TTTSpeedMultiplier", "LootGoblin_TTTSpeedMultiplier", function(ply, mu TableInsert(mults, lootgoblin_speed_mult:GetFloat()) end end) + +-- Initialize role features +hook.Add("TTTPrepareRound", "LootGoblin_Shared_TTTPrepareRound", function() + -- Add radio sounds + if not TRADIO.Sounds.lgobcackle and util.CanRoleSpawn(ROLE_LOOTGOBLIN) then + TRADIO.AddNewSound("lgobcackle", { + name = "radio_lgob_cackle", + name_params = { goblin = ROLE_STRINGS[ROLE_LOOTGOBLIN] }, + sound = { + Sound("lootgoblin/cackle1.wav"), + Sound("lootgoblin/cackle2.wav"), + Sound("lootgoblin/cackle3.wav") + } + }) + end +end) \ No newline at end of file diff --git a/gamemodes/terrortown/gamemode/roles/oldman/cl_oldman.lua b/gamemodes/terrortown/gamemode/roles/oldman/cl_oldman.lua index 1a7325519..750810b26 100644 --- a/gamemodes/terrortown/gamemode/roles/oldman/cl_oldman.lua +++ b/gamemodes/terrortown/gamemode/roles/oldman/cl_oldman.lua @@ -19,6 +19,9 @@ hook.Add("Initialize", "OldMan_Translations_Initialize", function() -- Win conditions LANG.AddToLanguage("english", "ev_win_oldman", "The {role} has somehow survived and also won the round!") + -- Radio + LANG.AddToLanguage("english", "radio_old_ramble", "{oldman} Ramble") + -- Cheat Sheet LANG.AddToLanguage("english", "cheatsheet_desc_oldman", "Has barely any health and must survive until the end of the round to win.") diff --git a/gamemodes/terrortown/gamemode/roles/oldman/shared.lua b/gamemodes/terrortown/gamemode/roles/oldman/shared.lua index 16e5f4d65..bb87aa5eb 100644 --- a/gamemodes/terrortown/gamemode/roles/oldman/shared.lua +++ b/gamemodes/terrortown/gamemode/roles/oldman/shared.lua @@ -57,4 +57,15 @@ ROLE_IS_ACTIVE[ROLE_OLDMAN] = function(ply) end ROLE_SHOULD_REVEAL_ROLE_WHEN_ACTIVE[ROLE_OLDMAN] = function() return not oldman_hide_when_active:GetBool() -end \ No newline at end of file +end + +hook.Add("TTTPrepareRound", "OldMan_Shared_TTTPrepareRound", function() + -- Add radio sounds + if not TRADIO.Sounds.oldramble and util.CanRoleSpawn(ROLE_OLDMAN) then + TRADIO.AddNewSound("oldramble", { + name = "radio_old_ramble", + name_params = { oldman = ROLE_STRINGS[ROLE_OLDMAN] }, + sound = "oldmanramble.wav" + }) + end +end) \ No newline at end of file diff --git a/gamemodes/terrortown/gamemode/roles/vampire/cl_vampire.lua b/gamemodes/terrortown/gamemode/roles/vampire/cl_vampire.lua index 8d7eb3579..9d31643ef 100644 --- a/gamemodes/terrortown/gamemode/roles/vampire/cl_vampire.lua +++ b/gamemodes/terrortown/gamemode/roles/vampire/cl_vampire.lua @@ -37,6 +37,9 @@ hook.Add("Initialize", "Vampire_Translations_Initialize", function() LANG.AddToLanguage("english", "vam_fangs_kill", "KILL") LANG.AddToLanguage("english", "vam_fangs_killing", "KILLING") + -- Radio + LANG.AddToLanguage("english", "radio_vam_fade", "{vampire} Fade") + -- Cheat Sheet LANG.AddToLanguage("english", "cheatsheet_desc_vampire", "Can drain players and bodies of blood to heal, leaving only a pile of bones behind as evidence.") LANG.AddToLanguage("english", "cheatsheet_desc_vampire_no_bones", "Can drain players and bodies of blood to heal, leaving behind no evidence.") diff --git a/gamemodes/terrortown/gamemode/roles/vampire/shared.lua b/gamemodes/terrortown/gamemode/roles/vampire/shared.lua index 558e6082a..aea85f8db 100644 --- a/gamemodes/terrortown/gamemode/roles/vampire/shared.lua +++ b/gamemodes/terrortown/gamemode/roles/vampire/shared.lua @@ -239,6 +239,18 @@ hook.Add("Initialize", "Vampire_Shared_Initialize", function() end) hook.Add("TTTPrepareRound", "Vampire_Shared_TTTPrepareRound", function() InitializeEquipment() + + -- Add radio sounds + if not TRADIO.Sounds.vamfade and util.CanRoleSpawn(ROLE_VAMPIRE) then + TRADIO.AddNewSound("vamfade", { + name = "radio_vam_fade", + name_params = { vampire = ROLE_STRINGS[ROLE_VAMPIRE] }, + sound = { Sound("weapons/ttt/fade.wav"), Sound("weapons/ttt/unfade.wav") }, + serial = true, + delay = { 2, 4 }, + ampl = 110 + }) + end end) hook.Add("TTTUpdateRoleState", "Vampire_TTTUpdateRoleState", function() diff --git a/gamemodes/terrortown/gamemode/roles/zombie/cl_zombie.lua b/gamemodes/terrortown/gamemode/roles/zombie/cl_zombie.lua index 344fbb88e..42645ba16 100644 --- a/gamemodes/terrortown/gamemode/roles/zombie/cl_zombie.lua +++ b/gamemodes/terrortown/gamemode/roles/zombie/cl_zombie.lua @@ -29,6 +29,9 @@ hook.Add("Initialize", "Zombie_Translations_Initialize", function() -- Events LANG.AddToLanguage("english", "ev_zombi", "{victim} was turned into {azombie}") + -- Radio + LANG.AddToLanguage("english", "radio_zom_leap", "{zombie} Leap") + -- Cheat Sheet LANG.AddToLanguage("english", "cheatsheet_desc_zombie", "Can turn other players into Zombies using their claws. They win by turning everyone into a Zombie.") diff --git a/gamemodes/terrortown/gamemode/roles/zombie/shared.lua b/gamemodes/terrortown/gamemode/roles/zombie/shared.lua index 385da3560..ccf679a6b 100644 --- a/gamemodes/terrortown/gamemode/roles/zombie/shared.lua +++ b/gamemodes/terrortown/gamemode/roles/zombie/shared.lua @@ -264,6 +264,16 @@ hook.Add("Initialize", "Zombie_Shared_Initialize", function() end) hook.Add("TTTPrepareRound", "Zombie_Shared_TTTPrepareRound", function() InitializeEquipment() + + -- Add radio sounds + if not TRADIO.Sounds.zomleap and util.CanRoleSpawn(ROLE_ZOMBIE) then + TRADIO.AddNewSound("zomleap", { + name = "radio_zom_leap", + name_params = { zombie = ROLE_STRINGS[ROLE_ZOMBIE] }, + sound = { Sound("npc/fast_zombie/leap1.wav"), Sound("npc/zombie/zo_attack2.wav"), + Sound("npc/fast_zombie/fz_alert_close1.wav"), Sound("npc/zombie/zombie_alert1.wav") } + }) + end end) hook.Add("TTTUpdateRoleState", "Zombie_Team_TTTUpdateRoleState", function() From cb27b136c2012fc14da0a1f82822e46a65b9cc91 Mon Sep 17 00:00:00 2001 From: Malivil Date: Thu, 11 Sep 2025 14:08:31 -0400 Subject: [PATCH 09/12] Ported "TTT: make Radio buttons a bit wider" --- RELEASE.md | 1 + gamemodes/terrortown/gamemode/cl_radio.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 4e2c2fa88..54bd41bfe 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -13,6 +13,7 @@ Includes beta updates [2.3.1](#231-beta) to [2.3.5](#235-beta). - Ported "TTT: Reduce Healing sound repetition count in Radio" - Ported "TTT: Do not stack round start popups" - There is no change in functionality, we just adjusted our implementation of this feature to match the base +- Ported "TTT: make Radio buttons a bit wider" ### Fixes - Fixed spectators counting against the Taskmaster in the "Stay Hidden" task diff --git a/gamemodes/terrortown/gamemode/cl_radio.lua b/gamemodes/terrortown/gamemode/cl_radio.lua index 8966d5a47..f0c8235ae 100644 --- a/gamemodes/terrortown/gamemode/cl_radio.lua +++ b/gamemodes/terrortown/gamemode/cl_radio.lua @@ -26,7 +26,7 @@ local function ButtonClickPlay(s) PlayRadioSound(s.snd) end local columns = 4 local rows = 5 -local bh, bw = 50, 100 +local bh, bw = 50, 120 local m = 5 local function CreateSoundBoard(parent) From ff6a47c044bad41345cc2ca75c42b45b5307a01b Mon Sep 17 00:00:00 2001 From: Malivil Date: Sun, 14 Sep 2025 21:23:40 -0400 Subject: [PATCH 10/12] Updated Phantom tutorial to show the maximum number of respawns they have, if that setting is enabled --- RELEASE.md | 1 + .../terrortown/gamemode/roles/phantom/cl_phantom.lua | 11 ++++++++++- .../terrortown/gamemode/roles/phantom/phantom.lua | 2 +- .../terrortown/gamemode/roles/phantom/shared.lua | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 54bd41bfe..e6e62b1db 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,6 +10,7 @@ Includes beta updates [2.3.1](#231-beta) to [2.3.5](#235-beta). ### Changes - Changed Taskmaster's "Stay Hidden" task to be a bit less lenient +- Updated Phantom tutorial to show the maximum number of respawns they have, if that setting is enabled - Ported "TTT: Reduce Healing sound repetition count in Radio" - Ported "TTT: Do not stack round start popups" - There is no change in functionality, we just adjusted our implementation of this feature to match the base diff --git a/gamemodes/terrortown/gamemode/roles/phantom/cl_phantom.lua b/gamemodes/terrortown/gamemode/roles/phantom/cl_phantom.lua index 6e7e43be1..dfb507776 100644 --- a/gamemodes/terrortown/gamemode/roles/phantom/cl_phantom.lua +++ b/gamemodes/terrortown/gamemode/roles/phantom/cl_phantom.lua @@ -16,6 +16,7 @@ local phantom_weaker_each_respawn = GetConVar("ttt_phantom_weaker_each_respawn") local phantom_announce_death = GetConVar("ttt_phantom_announce_death") local phantom_killer_footstep_time = GetConVar("ttt_phantom_killer_footstep_time") local phantom_respawn = GetConVar("ttt_phantom_respawn") +local phantom_respawn_limit = GetConVar("ttt_phantom_respawn_limit") ------------------ -- TRANSLATIONS -- @@ -230,7 +231,15 @@ hook.Add("TTTTutorialRoleText", "Phantom_TTTTutorialRoleText", function(role, ti -- Respawn if phantom_respawn:GetBool() then - html = html .. "If the " .. ROLE_STRINGS[ROLE_PHANTOM] .. " is killed, they will be resurrected if the person that killed them then dies." + local respawn_limit = phantom_respawn_limit:GetInt() + + html = html .. "If the " .. ROLE_STRINGS[ROLE_PHANTOM] .. " is killed, they will be resurrected if the person that killed them then dies" + if respawn_limit > 1 then + html = html .. ", up to " .. respawn_limit .. " times" + elseif respawn_limit == 1 then + html = html .. ", but only once" + end + html = html .. "." -- Weaker each respawn if phantom_weaker_each_respawn:GetBool() then diff --git a/gamemodes/terrortown/gamemode/roles/phantom/phantom.lua b/gamemodes/terrortown/gamemode/roles/phantom/phantom.lua index ad374ae36..aa82bccea 100644 --- a/gamemodes/terrortown/gamemode/roles/phantom/phantom.lua +++ b/gamemodes/terrortown/gamemode/roles/phantom/phantom.lua @@ -28,9 +28,9 @@ local phantom_weaker_each_respawn = GetConVar("ttt_phantom_weaker_each_respawn") local phantom_announce_death = GetConVar("ttt_phantom_announce_death") local phantom_killer_footstep_time = GetConVar("ttt_phantom_killer_footstep_time") local phantom_respawn = GetConVar("ttt_phantom_respawn") +local phantom_respawn_limit = GetConVar("ttt_phantom_respawn_limit") local phantom_respawn_health = CreateConVar("ttt_phantom_respawn_health", "50", FCVAR_NONE, "The amount of health a phantom will respawn with", 1, 100) -local phantom_respawn_limit = CreateConVar("ttt_phantom_respawn_limit", "0", FCVAR_NONE, "The amount of times a phantom can respawn. Set to 0 to have no limit", 0, 20) local phantom_killer_haunt_power_rate = CreateConVar("ttt_phantom_killer_haunt_power_rate", "10", FCVAR_NONE, "The amount of power to regain per second when a phantom is haunting their killer", 1, 25) local phantom_killer_haunt_power_starting = CreateConVar("ttt_phantom_killer_haunt_power_starting", "0", FCVAR_NONE, "The amount of power to the phantom starts with", 0, 200) local phantom_killer_haunt_without_body = CreateConVar("ttt_phantom_killer_haunt_without_body", "1") diff --git a/gamemodes/terrortown/gamemode/roles/phantom/shared.lua b/gamemodes/terrortown/gamemode/roles/phantom/shared.lua index 4000d3faa..93bdaec97 100644 --- a/gamemodes/terrortown/gamemode/roles/phantom/shared.lua +++ b/gamemodes/terrortown/gamemode/roles/phantom/shared.lua @@ -24,6 +24,7 @@ CreateConVar("ttt_phantom_weaker_each_respawn", "0", FCVAR_REPLICATED) CreateConVar("ttt_phantom_announce_death", "0", FCVAR_REPLICATED) CreateConVar("ttt_phantom_killer_footstep_time", "0", FCVAR_REPLICATED, "The amount of time a phantom's killer's footsteps should show before fading. Set to 0 to disable", 0, 60) CreateConVar("ttt_phantom_respawn", "1", FCVAR_REPLICATED, "Whether the phantom should respawn when their killer is killed", 0, 1) +CreateConVar("ttt_phantom_respawn_limit", "0", FCVAR_REPLICATED, "The amount of times a phantom can respawn. Set to 0 to have no limit", 0, 20) ROLE_CONVARS[ROLE_PHANTOM] = {} table.insert(ROLE_CONVARS[ROLE_PHANTOM], { From 455a17fd9df303c20b59a3328f41b86dbccf7991 Mon Sep 17 00:00:00 2001 From: Malivil Date: Tue, 16 Sep 2025 09:40:46 -0400 Subject: [PATCH 11/12] Downgrade to a 2.3.6 beta --- RELEASE.md | 5 ++--- gamemodes/terrortown/gamemode/shared.lua | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index e6e62b1db..b6c38290b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,8 +1,7 @@ # Release Notes -## 2.4.0 -**Released:**\ -Includes beta updates [2.3.1](#231-beta) to [2.3.5](#235-beta). +## 2.3.6 (Beta) +**Released:** ### Additions - Added completed task count to Taskmaster on the round summary screen diff --git a/gamemodes/terrortown/gamemode/shared.lua b/gamemodes/terrortown/gamemode/shared.lua index 28eac2cf1..575a30934 100644 --- a/gamemodes/terrortown/gamemode/shared.lua +++ b/gamemodes/terrortown/gamemode/shared.lua @@ -24,7 +24,7 @@ local StringSub = string.sub include("player_class/player_ttt.lua") -- Version string for display and function for version checks -CR_VERSION = "2.4.0" +CR_VERSION = "2.3.6" CR_BETA = true CR_WORKSHOP_ID = CR_BETA and "2404251054" or "2421039084" From 94a1ef5423bf390e0ea975c23ffeaf9c23f0752e Mon Sep 17 00:00:00 2001 From: Malivil Date: Fri, 19 Sep 2025 11:42:30 -0400 Subject: [PATCH 12/12] Updated changelog for bugfix in other PR --- RELEASE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.md b/RELEASE.md index b6c38290b..96983f415 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,6 +17,7 @@ ### Fixes - Fixed spectators counting against the Taskmaster in the "Stay Hidden" task +- Fixed the Taskmaster's "Kill a Player After a 360" task - Ported "TTT: Fixed font warnings (no visual changes)" ### Developer