Raised This Month: $32 Target: $400
 8% 

[L4D2] Zed Time with Highlight Kill System v1.6.1 [13-January-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Plugin ID:
7922
Plugin Version:
1.6.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
4 
Plugin Description:
when you do high value kill trigger slow motion like Killing Floor Zed Time
Old 01-14-2022 , 15:08   [L4D2] Zed Time with Highlight Kill System v1.6.1 [13-January-2023]
Reply With Quote #1

about
  • Slow the game time when you do high value kill, all kill weight ratio configuration
    Completely rewrite from Zed Time
  • Boost weapon actions under Zed Time, rather than slowing you and zombies(required [L4D/L4D2]WeaponHandling_API)
  • To trigger Zed Time, the plugins have Threshold value, Zed Time triggered when you accumulate this amountof kills in a short period of time.
  • When players joined the game, this threshold value require amount also increase
  • you can config amount multiplier of headhost, melee, distance, grenade, pipe bomb, tank, witch, boomer...etc.


ConVar
PHP Code:
// zed time duration
zed_time_duration "0.5"

// Zed Time enable
zed_time_enable "1"

// zed time scale of game time
zed_time_timescale "0.2"

// if kill threshold worth greater than needed and between this time then trigger
zed_time_threshold_cooldown "0.3"

// to trigger zed time you need kill many zombie on short time, 4 means you need to kill 4 worth value of zombies
zed_time_threshold_needed_base "4"

// every alive human survivor will increase zed time threshold needed, if 3 human you should kill 6.66(4+2*1.33) unit zombies to trigger
zed_time_threshold_needed_increase "1.33"

// max distance to apply multiplier worth value
// Minimum: "220.000000"
zed_time_threshold_distance_max "1200"

// if kill distance close to max, multiplier also close to x1.5, nearest is x1
zed_time_threshold_distance_ratio "1.5"

// multiplier of grenade launcher kill
zed_time_threshold_grenade_ratio "0.75"

// worth value multiplier of headshot
zed_time_threshold_headshot_ratio "1.5"

// multiplier of melee kill
zed_time_threshold_melee_ratio "1.16"

// if zombie kill by pipe bomb, the kill worth multiply this value
// Default: "0.85"
zed_time_threshold_piped_ratio "0.85"

// multiplier of boomer death
zed_time_threshold_boomer_ratio "1.33"

// multiplier of charger death
zed_time_threshold_charger_ratio "1.5"

// multiplier of hunter death
zed_time_threshold_hunter_ratio "1.25"

// multiplier of jockey death
zed_time_threshold_jockey_ratio "1.25"

// multiplier of smoker death
zed_time_threshold_smoker_ratio "1.33"

// multiplier of spitter death
zed_time_threshold_spitter_ratio "1.2"

// multiplier of tank death
zed_time_threshold_tank_ratio "32"

// multiplier of witch death
zed_time_threshold_witch_ratio "32"

// percent of silence volume, 
// 0: do not silence, 100: completely silence
zed_time_trigger_silence "50"

// silence fading time, 0: instantly silence
// Minimum: "0.000000"
zed_time_trigger_silence_fading "0.2"

// trigger sound play to all client. 
// recommended: 
// ui/menu_countdown.wav 
// level/countdown.wav  
// plats/churchbell_end.wav
zed_time_trigger_sound "level/countdown.wav"

// threashold value of survivor death trigger Zed Time, 0:disable
zed_time_threshold_survivor_death "32"

// admin flag to acces ZedTime commands f:slay empty:allow everyone
zed_time_access "f"

// use lucky mode instead threshold mode, also effect by threshold requirement
zed_time_lucky "0"

// bot weight ratio, 0.5:bot cause half threshold 0:bot cant trigger
zed_time_threshold_bot "0.5"

// which actions boost under ZedTime
// 1=Firing 2=Deploying 4=Reloading 8=MeleeSwinging 16=Throwing 32=Movement -1=All.
// add numbers together you want
zed_time_boost_actions "31"

// how fast boost the actions under ZedTime
// -1:auto scaling by timescale 2:doubling speed 0:disable
zed_time_boost_speed "-1"

// threshold value multiplier of kill by burn damage
zed_time_threshold_burn_ratio "1.0" 

external call
trigger:
PHP Code:
native int ZedTime(float duration 0.0float timescale 0.0); //declare it before call
ZedTime(); // trigger zed time, 0 mean plugin default 
event forward (for developer):
PHP Code:
forward Action OnZedTime(float &durationfloat &timescale); //receive event before declare

public Action OnZedTime(float &durationfloat &timescale) {/*receiving event*/
Commands
  • sm_zedtime // Trigger ZedTime manually. Usage: sm_zedtime [duration] [timescale]
  • sm_zedstop //stop the zedtime manually


changelog
  • v1.0 just released; 1-15-22
  • v1.1 add option "silence volume", "silence fading time", "trigging sound"; bug fix; 1-17-22
  • v1.1.1 now volume silence and trigging sound also work with native call; 1-17-22
  • v1.1.2 bug fix for ZedBack(); 1-19-22
  • v1.2 add feature: survivor or survivor bot death trigger Zed Time, code clean and create event forward OnZedTime(); 2-6-22
  • v1.3 new features:
    lucky mode instead threshold mode,
    commands 'sm_zedtime [duration] [timescale]', 'sm_zedstop' to trigger manually and permission configuable,
    remove ConVar threshold_survivor_death and add threshold_bot to instead, fix trigger multiple zedtime cause multi sound effects,
    rewrite some code and less performance usage; 3-March-2022
  • v1.5 new feature 'boost movement speed when ZedTime triggering' but didnt recommended, explosion damage wont trigger headshot ; 1-May-2022
  • v1.5.1
    command sm_zedtime now can trigger from server console,
    optimize code suggestion from Silvers,
    new ConVar *_threshold_burn_ratio to control fire damage causes threshold; 1-November-2022
  • v1.6 fixes:
    - now support "Lagged Movement" plugin,
    - little negligence cause movement boost default enabled, that should be optional,
    - remove some redundant code,
    - change forward OnZedTime to "Action OnZedTime(float &duration, float &timescale)",
    - turn code style to hungarian notation,
    - fix boost movement speed cause wrong velocity,
    - support late load; 21-December-2022; 21-December-2022
  • v1.6.1 fix rare issue ZedTime trigger on round ended cause wont stop; 13-January-2023


Credits
  • base idea and rewrite from McFlurry's ZedTime v1.4
    and alliedmods wiki sourcepawn document lol

Known Issue
  • if you change zed_time_boost_actions to enable or disable boost movement speed, changes will happen on next map or your reload plugin

Installation
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_zed_time_highlights.sp - 491 views - 26.6 KB)
__________________

Last edited by NoroHime; 01-12-2023 at 19:17.
NoroHime is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-14-2022 , 16:33   Re: [L4D2] Zed Time with Highlight Kill System
Reply With Quote #2

Cool !!!
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
NikkMann
New Member
Join Date: Jan 2022
Old 01-15-2022 , 23:45   Re: [L4D2] Zed Time with Highlight Kill System
Reply With Quote #3

This is amazing!

Anyway you could add in the slow down sound effect from killing floor too?
Something like this: https://www.youtube.com/watch?v=Ei1hL1mZnJY
I could make one so that it lasts during the whole duration (for the default time) and has a "speed up" sound once its over if you want.

Also, noticed that the sound becomes oddly quiet during the slowmo. Anyway to keep it at the normal volume?

Last edited by NikkMann; 01-16-2022 at 01:04.
NikkMann is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 01-16-2022 , 14:30   Re: [L4D2] Zed Time with Highlight Kill System
Reply With Quote #4

Quote:
Originally Posted by NikkMann View Post
This is amazing!

Anyway you could add in the slow down sound effect from killing floor too?
Something like this: https://www.youtube.com/watch?v=Ei1hL1mZnJY
I could make one so that it lasts during the whole duration (for the default time) and has a "speed up" sound once its over if you want.

Also, noticed that the sound becomes oddly quiet during the slowmo. Anyway to keep it at the normal volume?
yes you can, convert video to sound and put on left4dead2/sound/<file>
but you want server players hear too you might set download server, reference Custom Melee

now improve cvar to change sound file, silence percent, silence fading time

Quote:
v1.1 add option "silence volume", "silence fading time", "trigging sound"; 1-17-22
v1.1.1 now volume silence and trigging sound also work with native call; 1-17-22

PHP Code:
// percent of silence volume[0-100], 0: do not silence, 100: completely silence
zed_time_trigger_silence "50"

// silence fading time, 0: instantly silence
// Minimum: "0.000000"
zed_time_trigger_silence_fading "0.2"

// trigger sound play to all client. recommanded: ui/menu_countdown.wav level/countdown.wav plats/churchbell_end.wav
zed_time_trigger_sound "level/countdown.wav" 
__________________

Last edited by NoroHime; 01-16-2022 at 15:34.
NoroHime is offline
NikkMann
New Member
Join Date: Jan 2022
Old 01-16-2022 , 16:42   Re: [L4D2] Zed Time with Highlight Kill System v1.1.1 [1-17-22]
Reply With Quote #5

Thank you!
But when I try to play my custom sound, it does not work. Any idea why? I tried placing it in level just like the clock sound and edited the cfg to point to it.

Also, found a bug where sometimes gun fire sounds will not return to their original volume after the slow-mo until you reload.

Last edited by NikkMann; 01-16-2022 at 20:41.
NikkMann is offline
Iizuka07
Senior Member
Join Date: Aug 2018
Location: Underground
Old 01-17-2022 , 09:35   Re: [L4D2] Zed Time with Highlight Kill System v1.1.1 [1-17-22]
Reply With Quote #6

Quote:
Originally Posted by NikkMann View Post
Thank you!
But when I try to play my custom sound, it does not work. Any idea why? I tried placing it in level just like the clock sound and edited the cfg to point to it.

Also, found a bug where sometimes gun fire sounds will not return to their original volume after the slow-mo until you reload.
This has something to do with audio caches, I have many custom sounds that replaced the originals but are stored in a different folder. Every time I add a new sound in the sound scripts, I basically rebuild the sound cache in order for it to play the sound the next time I load the game.
__________________
死が待っている
Iizuka07 is offline
Krufftys Killers
Senior Member
Join Date: Jan 2014
Old 01-17-2022 , 11:06   Re: [L4D2] Zed Time with Highlight Kill System v1.1.1 [1-17-22]
Reply With Quote #7

Got this error

L 01/16/2022 - 16:01:29: SourceMod error session started
L 01/16/2022 - 16:01:29: Info (map "l4d2_lotrm1_moria") (file "C:\servers\kruffty\left4dead2\addons\sourcem od\logs\errors_20220116.log")
L 01/16/2022 - 16:01:29: [SM] Exception reported: Client 1 is not in game
L 01/16/2022 - 16:01:29: [SM] Blaming: l4d2_zed_time_highlights.smx
L 01/16/2022 - 16:01:29: [SM] Call stack trace:
L 01/16/2022 - 16:01:29: [SM] [0] FindEntityByClassname
L 01/16/2022 - 16:01:29: [SM] [1] Line 398, /home/forums/content/files/2/7/2/5/1/8/193116.attach::ZedBack
L 01/16/2022 - 16:01:29: [SM] [3] TriggerTimer
L 01/16/2022 - 16:01:29: [SM] [4] Line 223, /home/forums/content/files/2/7/2/5/1/8/193116.attach::Event_RoundStart
L 01/16/2022 - 16:06:08: Error log file session closed.
Krufftys Killers is offline
NikkMann
New Member
Join Date: Jan 2022
Old 01-17-2022 , 18:23   Re: [L4D2] Zed Time with Highlight Kill System v1.1.1 [1-17-22]
Reply With Quote #8

Quote:
Originally Posted by Iizuka07 View Post
This has something to do with audio caches, I have many custom sounds that replaced the originals but are stored in a different folder. Every time I add a new sound in the sound scripts, I basically rebuild the sound cache in order for it to play the sound the next time I load the game.
Thanks, that fixed it!

Made a custom slowdown sound. slowdown5 is for the default 0.5 duration setting. slowdown65 is for a 0.65 duration, which I think is better.

Place them in your left4dead2/sound/levels folder and have the sound pointer in the generated cfg point to whichever one you need. Start your game and fully rebuild the sound cache using snd_rebuildaudiocache
Restart your game once its done rebuilding and it should work.

slowdown5: https://www.mediafire.com/file/buvcf...down5.wav/file

slowdown65: https://www.mediafire.com/file/8y5ss...own65.wav/file

They were made using this sound as a base, adjusted for the length of the slowdown in the game: https://www.youtube.com/watch?v=Ei1hL1mZnJY

Last edited by NikkMann; 01-17-2022 at 18:24.
NikkMann is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 01-18-2022 , 15:44   Re: [L4D2] Zed Time with Highlight Kill System v1.1.1 [1-17-22]
Reply With Quote #9

Quote:
Originally Posted by Krufftys Killers View Post
Got this error

L 01/16/2022 - 16:01:29: SourceMod error session started
L 01/16/2022 - 16:01:29: Info (map "l4d2_lotrm1_moria") (file "C:\servers\kruffty\left4dead2\addons\sourcem od\logs\errors_20220116.log")
L 01/16/2022 - 16:01:29: [SM] Exception reported: Client 1 is not in game
L 01/16/2022 - 16:01:29: [SM] Blaming: l4d2_zed_time_highlights.smx
L 01/16/2022 - 16:01:29: [SM] Call stack trace:
L 01/16/2022 - 16:01:29: [SM] [0] FindEntityByClassname
L 01/16/2022 - 16:01:29: [SM] [1] Line 398, /home/forums/content/files/2/7/2/5/1/8/193116.attach::ZedBack
L 01/16/2022 - 16:01:29: [SM] [3] TriggerTimer
L 01/16/2022 - 16:01:29: [SM] [4] Line 223, /home/forums/content/files/2/7/2/5/1/8/193116.attach::Event_RoundStart
L 01/16/2022 - 16:06:08: Error log file session closed.
thanks report, now shold fix, since i wrong usage for find entity

Quote:
v1.1.2 bug fix for ZedBack(); 1-19-22
__________________

Last edited by NoroHime; 01-18-2022 at 15:52.
NoroHime is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 01-18-2022 , 15:46   Re: [L4D2] Zed Time with Highlight Kill System v1.1.1 [1-17-22]
Reply With Quote #10

Quote:
Originally Posted by NikkMann View Post
Thanks, that fixed it!

Made a custom slowdown sound. slowdown5 is for the default 0.5 duration setting. slowdown65 is for a 0.65 duration, which I think is better.

Place them in your left4dead2/sound/levels folder and have the sound pointer in the generated cfg point to whichever one you need. Start your game and fully rebuild the sound cache using snd_rebuildaudiocache
Restart your game once its done rebuilding and it should work.

slowdown5: https://www.mediafire.com/file/buvcf...down5.wav/file

slowdown65: https://www.mediafire.com/file/8y5ss...own65.wav/file

They were made using this sound as a base, adjusted for the length of the slowdown in the game: https://www.youtube.com/watch?v=Ei1hL1mZnJY
this sound is fascinating, unfortunately im stuck on setting up a download server, do you have any good content hosting service suggestions, my server running under 2m
__________________
NoroHime is offline
Reply



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 17:22.


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