Garry's Mod

Garry's Mod

评价数不足
[TTT] Death Panel - Custom Roles Compatible
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 服务器内容
插件标签: 快乐
文件大小
发表于
更新日期
101.036 KB
2021 年 9 月 23 日 下午 10:23
9 月 18 日 下午 5:46
10 项改动说明 ( 查看 )

订阅以下载
[TTT] Death Panel - Custom Roles Compatible

在 The Stig 的 1 个合集中
The Stig's TTT Mod List
307 件物品
描述
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://psteamcommunity.yuanyoumao.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 条留言
The Stig  [作者] 9 月 18 日 上午 3:42 
@Kutaka @Hikawa Kaguya Thanks for letting me know, it should be working now.
Kutaka 9 月 17 日 下午 11:31 
自从更新之后,使用这个插件会导致卡在“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 9 月 17 日 下午 11:04 
On the latest update of version 64 on September 17th, gmod broke this plugin, causing it to keep "Lua Started"
hawky_ 4 月 14 日 上午 9:39 
@The Stig Aw man, thats a shame. Thanks for responding though!
TerrariaGuy 4 月 13 日 上午 1:51 
+The Stig Ohhhh, that explains it.
The Stig  [作者] 4 月 13 日 上午 1:50 
@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_ 4 月 12 日 下午 3:05 
Does this work with TTT2?
The Stig  [作者] 1 月 31 日 上午 12:21 
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 1 月 30 日 上午 7:20 
I know, but i meant like... I just include all of those pages???
The Stig  [作者] 1 月 28 日 下午 3:58 
If you follow what I said all of those mods will be added to a collection in 1 click