Left 4 Dead 2

Left 4 Dead 2

780 ratings
[VSCRIPT] Real Time Common Infected & Witches
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.029 KB
13 Nov, 2024 @ 11:09am
23 Jul @ 8:42pm
6 Change Notes ( view )

Subscribe to download
[VSCRIPT] Real Time Common Infected & Witches

Description
DESCRIPTION

This V-SCRIPT tweaks several core parameters of all common infected and witches, which share the same AI (nextbots). The script enables infected to update continuously rather than every 0.100 ms as in vanilla, ensuring that players with 0.0 lerp won’t experience lagging or teleporting common infected.

This will negatively affect the performance of the host. Setting the refresh rate to 0.0 ms requires the host to use more resources because it needs to process updates faster than if it were set to 0.100 ms. Although on a mid-range or high-end computer the impact is minor, almost not noticeable, it is likely that Valve has limited this frequency thinking about older computers, from around 2008-2009.

FEATURES
• Continuous AI updates for Commons & Witches (No Special Infected)
• Smoother commons and witches for low-lerp players
• Prevents zombies from moving back and forth during attacks, which was causing players to miss their melee swings in some occasions.
• Improves hitbox positioning accuracy, making CI & Witches appear closer to where they actually are.
• Increased zombie stacking to a range of 16, allowing for tighter clustering without causing them to push each other.
• Makes the game harder, since commons get more frequent updates and behave more “smarter”.

¡THIS IS FOR LOCAL SERVERS, not for Official Dedicated Servers!

Known Bugs:

• If you set sv_cheats to 1, the update frequency will reset to default values (0.100 ms)

• With high update frequency, commons can get stuck when trying to climb cars or some surfaces, or else they can also get stuck and crouched on some tables or low places. (Tables at c1m3_mall, alarm event, cars and surfaces in c2m1_highway) For now I know that you can multiply the probability of this error occurring by using high tickrates, and since vanilla has 30 ticks, it has a low chance of occurring. Currently, there is no patch for this in VScript, but there are various solutions available with SourceMod See below for more information.

• For Sourcemod Users, i recommend the below plugins

Plugins, Extensions, Etc:

[L4D2] nb_update_frequency fix (Experimental)
https://forums.alliedmods.net/showthread.php?t=344019 by BHaType

[L4D & L4D2] Shove Direction Fix
https://forums.alliedmods.net/showthread.php?p=2675039 by BHaType

[L4D & 2] Fix Common Shove
https://github.com/Target5150/MoYu_Server_Stupid_Plugins/tree/master/The%20Last%20Stand/l4d_fix_common_shove by MoYu

[L4D & 2] Fix Nextbot Collision
https://github.com/Target5150/MoYu_Server_Stupid_Plugins/tree/master/The%20Last%20Stand/l4d_fix_nextbot_collision by MoYu

• If you're interested in which convars this changes, maybe to use in your server with sm_cvar, see below.
• How frequently nextbots are updated (lower = more frequent updates, default is 0.1).
nb_update_frequency 0.0

• Maximum number of nextbots updated per frame (default is 15).
nb_update_framelimit 100

• Reduces delay between nextbot updates.
nb_update_maxslide 0

• Forward friction (prevents them from moving back and forth evading melee attacks) (i think this affects the most at high tickrates).
nb_friction_forward 0

• Sideways friction; helps prevent infected from sliding when turning corners. (Thanks Melon for This)
nb_friction_sideways 10

• Maximum detection range between common infected. (to prevent them pushing eachother in a horde, bile, incapped, etc) ( i added this because somehow, more updates broke the vanilla clustering so i manually forced it similar to vanilla).
z_max_neighbor_range 16

• Rotation speed of common infected & witches (higher = faster turning). (added so witches turn faster when you try to melee them from the back and repeatedly jump to evade her attacks).
nb_yaw_rate 800

• I... seriously don't know why cl_interp_ratio exists...
It divides (cl_interp_ratio / cl_updaterate), but why?! you can't set 0.0 lerps because of this ♥♥♥♥.
only if you set your cl_updaterate to something like 30 000 then it will divide by that high number and give you 0.0 lerp
I mean, it's not even needed anymore anyway.
sv_client_min_interp_ratio -1
sv_client_max_interp_ratio 0
66 Comments
Sensuka 26 Jul @ 10:50am 
you have no fucking clue how much this has greatly improved ever since tls has botched my expert difficulty. thank you so much, you have earned my like & favorite. :Fistofdosh:
HIPPO 26 Jul @ 2:41am 
Thank you for your answer :D
Shadow  [author] 25 Jul @ 3:49pm 
No setup required, just download and play! :winter2019happyyul:
but if you want to take full advantage of the mod, set cl_interp 0.0 and cl_interp_ratio 0



(the description stuff is all the optional and additional stuff you could install, which do require sourcemod and metamod to work).
HIPPO 25 Jul @ 3:30pm 
I'm not good at English, so I'm running a translator. Can I just subscribe and use it right away? Or should I set it up separately?
me 25 Jul @ 4:07am 
one must imagine l4d2 with 64 bit and 60 tickrate
Sitonai 23 Jul @ 8:22pm 
@Shadow, thanks for the reply and recommendations!
Shadow  [author] 23 Jul @ 6:07pm 
No, it's completely unnecesary as sourcemod provides the override of commands with a cfg (this vscript does that), i recommend that if your server is a listenserver (local server), then add the commands that i added in the description of the mod.

like this for example in your listenserver.cfg:

|
v

sm_cvar nb_update_frequency 0.014
sm_cvar nb_update_framelimit 100
sm_cvar nb_update_maxslide 0
sm_cvar nb_friction_forward 0
sm_cvar nb_friction_sideways 10
sm_cvar z_max_neighbor_range 16
sm_cvar sv_client_min_interp_ratio -1
sm_cvar sv_client_max_interp_ratio 0

it will do the same thing that this vscript does
Sitonai 23 Jul @ 6:01pm 
If I already have the 4 plugins in my sourcemod, do you still recommend to subscribe for the vscript version?
acabó de encontrar ese comando que mencionastes con esté valor:
nb_update_frecuency 0.014 pero no lo puse en mi cvar ésto hace que los comunes corran sin retrasos verdad?
jajajaj que bueno que hables en español así es más fácil hablar, que raro que el comando -tickrate 60 no afecte en nada porque hice la prueba y primero entre al juego con mis mods y algunos plugins de sourcemod sin el parámetro y creé mi sala en pública y en servidor local y los veia correr lageados cuando venian en hordas, luego puse el comando volví a crear mi sala en pública y servidor local y ya veia a los zombies comunes correr normal sin lag.