Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] Survivor Utilities (API) (v 1.5.1) [19-Mar-23]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Earendil
Senior Member
Join Date: Jan 2020
Location: Spain
Plugin ID:
7898
Plugin Version:
1.5
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
8 
Plugin Description:
Modify survivor speeds and add custom effects.
Old 12-24-2021 , 23:23   [L4D & L4D2] Survivor Utilities (API) (v 1.5.1) [19-Mar-23]
Reply With Quote #1

About:
I’m making some plugins that changes survivor speeds and adds effects (better freeze, intoxication, bleeding, ect), to prevent multiple calls and bugs between plugins making the same effect, and to prevent redundancy, I have done this plugin that acts as an API, to allow plugins to work well together.
If you want to make plugins using this, you are free to do, also you can install this plugin in your server and change global player speeds with convars (to acces to other features you need to use other plugins, that I will upload too when I complete them).

Description:

Survivor movement speed modify:
This plugin modifies survivor moving speeds, jump and fall speed don't change, so the speed effect feels more realistic.
Current speeds that can be modified by ConVar:
  • Running speed.
  • Walking speed.
  • Crouch speed.
  • Moving speed on water.
  • Limping speed (when survivor health is lower than 40 by default).
  • Critical speed (probably will have other name, but this refers to the survivor speed when he has been incapacitated once and HP falls to 1).
  • Movement speed while using an sniper scope.
  • Exhaust speed (this is an API feature that will only be activated by other plugins).

Rules of how speeds are being assigned:
  • Run, walk or crouch speeds are independent, and won't restrict the others (you can set walk speed faster than run speed if you want).
  • If the survivor is having one or more conditions that decreases the main speed, it will set the most restrictive.
  • If a restrictive speed has a higher value than the main speed, it won't be applied, restrictive speeds don't boost main speeds.
  • Adrenaline will prevent survivors to lose speed due to restrictions, just like in the original game.
Other plugins can use the Natives provided in this plugin to change specific survivor speeds, for perks, RPG, or anything you can imagine.

IMPORTANT Changes in the speed system. The plugin now has 2 systems or kernels to modify survivor speeds:
  • 1 - Legacy kernel:
    It uses Left 4 DHooks forwards to change survivor speeds. It has a much lower chance to conflict with other plugins that change player speeds, since the method used is not very often used. But in the other hand speeds are restricted between 65 and 650 units. Any speed under 65 will make survivors stop moving, and values over 650 will have no effect. Moreover, when boosted players jump they will notice an strange push in the direction of their movement.
  • 2 - New kernel:
    This one doesn't require Left 4 DHooks, if you don't have that plugin installed, only this kernel will work. It uses the "m_flLaggedMovementValue" netprop to scale survivor speeds. This kernel will conflict with other plugins that uses the same system to scale speeds, but the limitations are removed, you can set speed value with this kernel without restrictions. This kernel works getting the mechanics from here.
  • What kernel should be used?
    It depends of the situation, by default the new kernel is enabled and is the most recomended option, but in case you start experiencing incompatibilities with other plugins, you should use the legacy kernel.
Survivor conditions accesible from natives and forwards:
  • Bleeding: Survivors will lose health over time, bleeding can be stopped if the survivor uses a medkit.
  • Intoxication: Survivors will lose health over time due to an intoxication, it can be stopped if the survivor uses pain pills or adrenaline.
  • Improved freeze: Survivor is unable to move, shoot, reload or shove, also a screen effect is displayed while the survivor is frozen.
  • Exhaustion, while exhausted the survivor will lose movement speed, maxed shove penalty and increased recoil, a screen effect is displayed (thanks to Silvers for the fog_volume and postprocess code). Exhaust can be cancelled with adrenaline, also if the survivor doesn’t move will recover faster.

Health, defib and revive hooks.
  • Detoured survivor healing, reviving and defibrillating game functions.
  • Survivor revive heal or defib duration can be override with GlobalForwards.
  • Functions can also be blocked to prevent survivors to revive or perform healing.


Natives
Spoiler
GlobalForwards
You can hook, change or even block plugin natives via GlobalForwards.
Spoiler
ConVars:
Spoiler
Dependences:by Silvers.


Test Plugin:
The plugin l4d_su_testplugin.smx includes admin commands and has all GlobalForwards and Natives tested.

Extension:
Also I have included a plugin extension l4d_su_notifications.smx that will notify to the survivors when effects start/end.

Thanks:
To Silvers for the help with the postprocess controller and fog_volume solutions and helping with Natives and Forwards.
Source Code

Changelog:
Spoiler
Attached Files
File Type: zip l4d_survivor_utilities.zip (60.5 KB, 659 views)
__________________
>>My plugins<<
>>GitHub<<

Last edited by Earendil; 03-18-2023 at 21:30. Reason: Updated to 1.5.1
Earendil is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode