Garry's Mod

Garry's Mod

Not enough ratings
[TTT] Death Panel - Custom Roles Compatible
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Fun
File Size
Posted
Updated
101.036 KB
23 Sep, 2021 @ 10:23pm
18 Sep @ 5:46pm
10 Change Notes ( view )

Subscribe to download
[TTT] Death Panel - Custom Roles Compatible

In 1 collection by The Stig
The Stig's TTT Mod List
308 items
Description
Adds a panel which slides onto the screen when you die, displaying detailed info about how you died!
Now compatible with Custom Roles! (Works with or without it)

Includes:
- The player who killed you
- Their role
- Their name and Steam profile image
- Where in your body you were hit if shot
- What weapon they used
- Your cause of death, even if it wasn't from a player
(e.g. falling to your death)

Convars
ttt_death_panel_damage_taken (0 or 1)
(Default: 0)
Whether to include how much damage you take in the death panel

ttt_death_panel_hide_role (0 or 1)
(Default: 0)
Whether the role of a player's killer should be hidden

Credit
Created by wgetJane[github.com]on Github, this is a fork of their mod to add compatibility with Custom Roles for TTT, where the mod was created under the GNU General Public License v3.0[github.com]

Link to the original mod:
https://steamproxy.com/sharedfiles/filedetails/?id=2793252897

Link to this mod's source code:
https://github.com/TheStig294/ttt-death-panel-2/tree/custom-roles

Description
(From the GitHub page, see the bottom for the link)
Shows killer info on death with verbose (and overengineered) death messages like:
- You were shot in the head with a Deagle by Player (Traitor)
- You were shot in the crotch with a Shotgun by Player (Detective)
- You were blown up with an Incendiary Grenade by Player (Innocent)
- You were blown up with an explosive barrel by Player (Traitor)
- You were incinerated with a Flare gun by Player (Traitor)
- You fell to your death

This uses the Bebas Neue font: https://github.com/dharmatype/Bebas-Neue
Linux and OSX clients

You have to install the Bebas Neue font because of a bug with gmod: https://github.com/Facepunch/garrysmod-issues/issues/415

On linux, you have to put the ttf file in a directory like ~/.local/share/fonts/

On osx, idk lol just look up "how to install ttf on mac"

Compatibility with other addons

This should be compatible with other ttt addons that are written properly

I've found this to be not fully compatible with some steam workshop weapon addons because they don't set the correct entities for CTakeDamageInfo's attacker and inflictor fields
They won't crash or cause errors, but inaccurate information will be displayed by the panel on death


For a weapon addon to be fully compatible with this addon, it must follow this simple standard for setting correct values for CTakeDamageInfo:

attacker is who to credit for killing someone, inflictor is what was used to kill someone
if i dropped a banana peel and somebody slips and breaks their neck because of it,
then i was the "attacker" while the banana peel was the "inflictor"

attacker should typically be a player, an npc, or the world

attacker should NEVER be a weapon or projectile
seriously stop doing this, this prevents kills with your weapon from being credited properly
use common sense: if you threw a rock at someone, the rock is NOT the attacker, you are

inflictor should be the weapon or projectile that was used to deal damage
Steven shooting Jeremy with a revolver:
attacker = Steven, inflictor = revolver, victim = Jeremy
Steven hitting Jeremy with a thrown spear:
attacker = Steven, inflictor = spear, victim = Jeremy
Steven planting a bomb and blowing it up next to Jeremy:
attacker = Steven, inflictor = bomb, victim = Jeremy
Steven's sentry gun shooting Jeremy:
attacker = Steven, inflictor = sentry gun, victim = Jeremy
Jeremy stepping on a bear trap left by Steven:
attacker = Steven, inflictor = bear trap, victim = Jeremy

inflictor can also just be the attacker if the damage was dealt immediately using a weapon that's currently held by the attacker
cool: instant damage (e.g. guns, melee weapons)
not cool:
damage over time (e.g. poison damage, fire damage)
has travel time (e.g. projectiles, grenades)
indirect damage (e.g. turrets, booby-traps)
basically, this is only cool to do if the attacker can't switch weapons before the damage is actually dealt

weapon addons that don't follow this standard are written incorrectly, so any issues they cause with this addon are none of my fault
19 Comments
The Stig  [author] 18 Sep @ 3:42am 
@Kutaka @Hikawa Kaguya Thanks for letting me know, it should be working now.
Kutaka 17 Sep @ 11:31pm 
自从更新之后,使用这个插件会导致卡在“Lua Started”。我试着将client文件的“dumb workaround”部分进行注释化之后发现可以正常运行了。
Since the latest update, using this plugin has caused the game to get stuck at "Lua Started". I tried commenting out the "dumb workaround" section in the client file and found that the game could run normally afterward.
Hikawa Kaguya 17 Sep @ 11:04pm 
On the latest update of version 64 on September 17th, gmod broke this plugin, causing it to keep "Lua Started"
hawky_ 14 Apr @ 9:39am 
@The Stig Aw man, thats a shame. Thanks for responding though!
TerrariaGuy 13 Apr @ 1:51am 
+The Stig Ohhhh, that explains it.
The Stig  [author] 13 Apr @ 1:50am 
@hawky_ I'm afraid not. At least, I have not tested it, but I don't imagine it does.
Custom Roles and vanilla TTT should work though.
hawky_ 12 Apr @ 3:05pm 
Does this work with TTT2?
The Stig  [author] 31 Jan @ 12:21am 
If you can yes, what you’re doing is letting me look through your mods rather than you doing it yourself. Otherwise if there’s too many to fit in one collection, you’re going to have to go through all of your mods yourself.

Basically what I would say in that case is to disable half of your mods at a time, and see if the issue persists, until it goes away, which then means one of the mods you just disabled was causing the issue.

I would suggest not having so many mods installed at once, since you’re very likely going to install mods that are incompatible with each other, and it makes finding incompatible mods much harder.
TerrariaGuy 30 Jan @ 7:20am 
I know, but i meant like... I just include all of those pages???
The Stig  [author] 28 Jan @ 3:58pm 
If you follow what I said all of those mods will be added to a collection in 1 click