Left 4 Dead 2

Left 4 Dead 2

734 ratings
[VSCRIPT] Real Time Common Infected
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.352 KB
13 Nov, 2024 @ 11:09am
20 Nov, 2024 @ 9:58am
5 Change Notes ( view )

Subscribe to download
[VSCRIPT] Real Time Common Infected

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 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.
• Increased zombie stacking to a range of 16, allowing for tighter clustering without causing them to push each other.

¡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.
-- Sets the NPC update frequency.
nb_update_frequency 0.0

-- Frame limit for NPC updates.
nb_update_framelimit 100

-- Maximum slide for NPC updates.
nb_update_maxslide 0

-- Sets the forward friction for NPCs. (to prevent them moving back and forth at high tickrates.)
nb_friction_forward 0

-- Sets the sideway friction for NPCs. (to prevent them sliding around like ice when turning in 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)
z_max_neighbor_range 16

-- Forced Lerp Values, as high values are not needed anymore.
sv_client_min_interp_ratio -1
sv_client_max_interp_ratio 0
58 Comments
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.
Shadow  [author] 20 Jun @ 3:51pm 
Te explicaría más a detalle algunas cosas pero steam limita mucho los mensajes, cualquier cosa añadime y explico mejor las cosas :demoticon:
Shadow  [author] 20 Jun @ 3:48pm 
Hola, veo que eres de Peru así que creo que puedo explicar mejor para ambos si escribo en Español. Para contestar tu pregunta. No, los lerps no afectan en general a todos los jugadores. 2ndo. Rarísimo la verdad, normalmente el parámetro -tickrate no anda, por más que le des un valor, se requiere si o si la ayuda externa con SourceMod y Metamod, si estás a 60-100 tickrate y los commons se ven lageados, entonces es porque nb_update_frequency no está andando, que hace que los commons se actualizen a un valor más rápido, te digo porque me ha pasado, y a varios amigos también.

• Si estás a 0.0 lerp o 100 lerp, y ves que los commons siguen lageados, significa que el vscript no está andando.
• Había por ahí algunos videos en Español, sobre como instalar bien Sourcemod y Metamod, te recomiendo que te instalés ese y luego uses un tickrate enabler, así te toma bien los ticks, el plugin de BHaType funciona bastate bien.
https://forums.alliedmods.net/showthread.php?p=2752405
I usually always use several scripts as the creator of my room and it happened to me that I saw the common zombies with delays as if I were with the lerps at 0 but I always play with the lerps in 100, what I did to solve that problem was to write in my launch parameters: -tickrate 60 and that solved that problem and I now see them normally as always.
It took me a long time to find that command by watching countless videos on YouTube to find the solution, it was very difficult for someone who doesn't know about these topics, but as The saying goes, he who seeks finds.
Hello, excuse my ignorance, if I create my room on a local server with a lerp for example 50, does the lerp affect all the players in my room or does it only affect me and for this addon to work only I should subscribe, right? or should I lower my lerps to 0 necessarily?
Doakes 31 May @ 7:24pm 
I do not use any blood texture replacers or extra gore mods, Real Time Common Infected works flawlessly. players connecting to my server are utterly thankful, 10/10!

my guess is if you are using anything that changes blood, gore, or gibbing, you may experience floating splatters and sprays
Zwed 12 Apr @ 6:23pm 
Unfortunately with this mod the blood splatters and blood sprays from common infected and other players are spawned not on body but in the air now. But the mod is good. If it is possible to spawn blood splatters with 0.0 delay too it would make it the best mod ever
MARCHESCHI 11 Mar @ 6:42am 
base
18 Feb @ 12:57am 
crazy, had 70FPS at lowest with this, 10/10 would let my local players be less lagged by commons