Left 4 Dead 2

Left 4 Dead 2

448 ratings
Damage Display MOD Fixed and Enhanced
3
   
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://gtm.steamproxy.vip/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
119 Comments
FAT SQUIRREL 25 Sep @ 9:23am 
thanks man
Alpha  [author] 24 Sep @ 9:15am 
@pills
为每个特感单独配置的话,难度倒是不大,就是配置项会特别多,对大多数人就麻烦了。你想只显示tank的话,可以解包自己改改。
Alpha  [author] 24 Sep @ 9:13am 
@FAT SQUIRREL
The Ultimate Mod Testing and Reviewing Area - Main Files
FAT SQUIRREL 23 Sep @ 2:21pm 
what map are you using in the pics?
pills 20 Sep @ 3:03am 
好奇有没有只显示tank血条的mod,其他的用不大上(
Vibrating Nepal kid 1 Sep @ 8:07am 
I FKIN LOVE U DUDDEEE THANKS A LOT
Alpha  [author] 30 Aug @ 6:39am 
Vibrating Nepal kid 29 Aug @ 5:11am 
is there a way to get that? or it si bugged for me? still not working for me.
Vibrating Nepal kid 28 Aug @ 7:01pm 
I mean in yr video, when u shoot charger n witch, there “x” on the crosshair like in those cod games. Its shows that u hit the target. Hehehehe sorry if i dont explain it nicely. I dont know what to call that stuff. But the others, the hp, the kill feed all working fine.
Alpha  [author] 28 Aug @ 10:51am 
@nigerewww
What do you mean of "x hit mark"?