Left 4 Dead 2

Left 4 Dead 2

311 ratings
Damage Display MOD Fixed and Enhanced
2
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts, UI
File Size
Posted
Updated
15.775 KB
1 Sep, 2024 @ 4:09am
1 Jun @ 7:03am
15 Change Notes ( view )

Subscribe to download
Damage Display MOD Fixed and Enhanced

Description
**Fixes and New Features:**

**Bug Fixes:**

1. Fixed the bug where two lines ("Hit", "Kill") were displayed when a small zombie was killed.
2. Fixed the bug where the first shot of a Witch would show no health loss (even though it had already been damaged, the first damage was calculated incorrectly).
3. Fixed some potential conflicts caused by event binding clashes.
4. Fixed the issue where a TANK’s health wouldn’t reset to 0 when it falls.
5. Special health bars now handle values exceeding 32768.
6. Rewrote the code structure, removed the use of `entfire` for mounting additional files, preventing issues where certain events wouldn't trigger, causing mounting failures.

**Function Optimizations:**

1. **Style Optimization:**
Updated the health bar style so that the remaining health and lost health are displayed using monospaced characters, ensuring that the length of the health bar doesn’t change during the health transition.

2. **Real-time Health Bars:**
Previously, the script only updated health bar data when the player attacked a special infected. For example, when Player A hits a Tank for 2000 health, and Player B hits it for 1000, Player A wouldn’t know the current health of the Tank unless they attacked it again.
In this new script, it records the last player who attacked the special infected. When that infected receives damage, all players who attacked it will see the updated health in real-time. Data is cleared after a kill.

3. **Health Bars for Jimmy and Fallen Survivors:**
These two are special; they don’t die from headshots. This creates a bit of a challenge in the code logic, and as a result, an extra line will appear for damage display. Therefore, they’re directly treated as special infected with health bars.
The health bars for Jimmy and Fallen Survivors cannot exceed 32768, mainly because I couldn’t find an event to listen for their spawn. However, it’s rare for servers to handle them in this way.

**New Features:**

1. **Display Modes: [Default: 0]**
Some players feel that the display is too cluttered. Four display modes are provided, and you can toggle between them using the command `!cp 0/1/2/3` in the chat. The setting will persist after switching.
- 0: Full Mode (Shows hit, kill, and damage values)
- 1: Text Mode (Shows only hit and kill)
- 2: Kill Only Mode (Shows only kills)
- 3: Single Line Mode (Shows only kills and condenses them to a single line, while others show multiple lines)

2. **Language Toggle: [Default: 0]**
Language switching has always been a feature. Use `!cl 0/1` to switch between Chinese and English. The switch will be permanent after toggling.
- 0: Chinese
- 1: English

3. **Kill Counter: [Default Delay: 3]**
Kills will now show as "+n" after the text, with a default kill streak delay of 3 seconds.
You can adjust the kill streak reset delay by typing `!cd x` in the chat, where x is the delay time in seconds.

4. **Line Count Setting: [Default: 4]**
You can modify the number of lines displayed by typing `!cm x` in the chat, which is effective in multi-line mode.
- Minimum of 1 line. If you don’t want any lines, use “Health Bar Toggle”.
- Maximum of 9 lines. Going beyond 9 lines will cause the text length to exceed 255 characters, resulting in failure.

5. **Health Bar Toggle: [Default: 3]**
You can now type `!cb 0/1/2/3` in the chat to independently control the visibility of the small zombie kills and special infected health bars.
- 0: All Off
- 1: Show small zombie kills
- 2: Show special infected health bars
- 3: Show both

6. **Delay Setting for Maximum Health: [Default Delay: -1]**
This feature is designed for certain plugins that dynamically modify the maximum health of Special Infected, as these plugins may prevent this mod from correctly reading the adjusted maximum health by default.
- ※※※ If your server can properly retrieve the maximum health of Special Infected, keep this setting as default. ※※※
- If your server fails to correctly obtain the maximum health of Special Infected, adjust the delay time (in seconds, decimals allowed) as needed to ensure this mod retrieves the value after the plugin modifies the health.
Note: Setting the delay too long may result in retrieving the health after the Special Infected has already taken damage. It is recommended to set it between 0.5 to 1 second.

If you find that the mod isn’t working (especially after new features are released), try manually entering some or all of the configurations. You can also delete "xxx/left4dead2/ems/alpha/idd/config.txt," and the settings will be automatically reset when the game starts.

Feel free to leave any bug reports or suggestions in the comment section. I will make updates over the weekend or when I have free time.

**Original Work:**
[Steam Community Original Work Link](https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3251401763&searchtext=%E8%A1%80%E9%87%8F%E6%98%BE%E7%A4%BAmod)
Thanks to the original creator and the original creator’s contributions!

**Date:** April 23, 2025
81 Comments
Alpha  [author] 8 Jul @ 5:40am 
@QueasyNurples
No, it uses game engine to show the text
QueasyNurples 7 Jul @ 2:37am 
is there anyway to increase the size of txt? I have it on singleline mode to decrease screen clutter but the kill counter is almost impossible to read it is so small
SoLo 1 Jun @ 6:56pm 
@Alpha
感谢回覆,我明白了
Alpha  [author] 1 Jun @ 7:32am 
@SoLo
客户端与服务端问题这个目前我没有好的办法,客户端不会加载自己的脚本文件。
你提供的mod我看了一下,没找到脚本文件,hud和vdf相关的我没弄过。
如果你想看自己打了多少小僵尸等数据,你可以看一下这个mod。
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2819660601
但他也是要求服务端安装的。
Alpha  [author] 1 Jun @ 7:21am 
@nelson010491
没有发现描述有问题,对于血条开关,游戏内描述和文档说明的意思是一致的。
Alpha  [author] 1 Jun @ 7:19am 
@Dragon
你的问题已经有解决方案,详细内容在功能6。
SoLo 31 May @ 6:15pm 
这个插件挺好的,但就像作者前面留言讲的一样
如果我是客户端进别人的本地伺服器
这个插件我就用不上了

有没有可能做一个像以下连结一样的插件
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=778840399
不考虑伺服器数据,只用本地主机的数据去显示自己的击杀数量?
我不懂代码..所以不知道自己讲的话有没有问题
我的理解是像上面连结的插件那样,用动画显示而非脚本(即纯文字)
然后透过动画显示自己的击杀数量(说实话伤害或者有没有打中头也是想显示的,但目前找不到类似的插件,所以想先把要求降到最低,务求插件能做出来先)
每次都是游戏地图结算时才知道自己打了多少只,没办法推动玩的时候愿意开枪的积极性(譬如3个队友都往前看的时候,我负责断后,开枪就没那么主动了)
nelson010491 30 May @ 2:29am 
是不是要更新一下描述,至少血条开关的指令实际意思和现在写的不一样
Dragon 18 May @ 5:18am 
@Alpha
我這插件他就是隨這人數增加或是減少tank的血量會以我自己設定的血量
我是昨天把更新後的放在伺服器在玩得當下就發現有這樣問題
還有我發現tank血量低於12000才會顯示血條,12000以上還不會顯示!
我的插件都有在更新~目前是最新版本!
目前我先退回2024/09/04 那個版本,因為這個版本我測試過顯示正常
Steam好友已加~請接受!!!