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

[L4D & L4D2] Anomaly (1.13) [25-Jan-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6964
Plugin Version:
1.13
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
8 
Plugin Description:
Randomly spawns an anomaly somewhere on the map that moves around and electrocutes people.
Old 03-04-2020 , 15:46   [L4D & L4D2] Anomaly (1.13) [25-Jan-2024]
Reply With Quote #1



About:
  • Inspired by the S.T.A.L.K.E.R. game series.
  • Something I wanted to create for years and slowly wrote over the past year.
  • Video demonstration - Thanks to "L4D2Noob"!



Features:
  • Randomly spawns on any map after players pass a certain flow distance. Specify with cvars.
  • Spawns in the same place for both Versus teams.
  • Slowly moves around and can move up/down stairs etc.
  • Electrocutes Survivors, Witches, Common and Special Infected.
  • Only possible for 1 to spawn and exist at a time. Please do not request for multiple Anomalies.



Damage Type Values: (used by the "l4d_anomaly_type_*" cvars). Add values together.
Spoiler




Thanks:
  • "Dragokas" - ideas and testing.
  • "xZk" - testing.



Admin Commands: (requires "z" flag)

PHP Code:
sm_anomaly    // Create an Anomaly where your crosshair is pointing.
sm_anom       // Create an Anomaly near you using the random spawn placement system. [Optional arg: number of seconds until spawn].
sm_anomoff    // Removes any active anomaly. 


CVars:

Saved to l4d_anomaly.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d_anomaly_allow "1"

// How close entities must be to the anomaly before being struck.
l4d_anomaly_damage_distance "200.0"

// 0.0=Off, also disables effects. The amount of damage to deal to Common Infected when being struck.
l4d_anomaly_damage_infected "20"

// 0.0=Off, also disables effects. The amount of damage to deal to Special Infected when being struck.
l4d_anomaly_damage_special "20"

// 0.0=Off, also disables effects. The amount of damage to deal to Survivors when being struck.
l4d_anomaly_damage_survivor "10"

// How often to damage entities within range.
l4d_anomaly_damage_time "1.5"

// 0.0=Off, also disables effects. The amount of damage to deal to Witches when being struck.
l4d_anomaly_damage_witch "50"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_anomaly_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_anomaly_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_anomaly_modes_tog "0"

// Ignore shooting players who are moving slower than this: 0=Off, 1=Stationary, 2=Crouch walking, 3=Walking.
l4d_anomaly_movement "1"

// How far can random sparks shoot out. These do not affect players and only visual effect.
l4d_anomaly_random_dist "200.0"

// 0.0=Off. Display random sparks and sound after this many seconds maximum.
l4d_anomaly_random_max "5.0"

// 0.0=Off. Display random sparks and sound after this many seconds minimum.
l4d_anomaly_random_min "2.0"

// 0.0=Off. Automatically spawns anomaly when Survivors pass between this minimum and maximum map flow distance percent.
l4d_anomaly_spawn_max "70.0"

// 0.0=Off. Automatically spawns anomaly when Survivors pass between this minimum and maximum map flow distance percent.
l4d_anomaly_spawn_min "20.0"

// The type of damage to deal to Common Infected.
l4d_anomaly_type_infected "33554432"

// The type of damage to deal to Special Infected.
l4d_anomaly_type_special "16777216"

// The type of damage to deal to Survivors.
l4d_anomaly_type_survivor "16777216"

//The type of damage to deal to Witches.
l4d_anomaly_type_witch "64"

// Anomaly plugin version.
l4d_anomaly_version 


Changes:
Code:
1.13 (23-Jan-2024)
    - Added cvar "l4d_anomaly_movement" to control if players can be moving or stationary to be ignored anomaly. Requested by "JustMadMan".
    - Changes to fix the Anomaly being able to damage through floors. Thanks to "JustMadMan" for reporting.

1.12 (10-Jan-2024)
    - Fixed the "l4d_anomaly_modes_tog" cvar detecting Versus and Survival modes incorrectly.

1.11 (22-Nov-2023)
    - Added command "sm_anomoff" to remove all anomalies. Requested by "kochiurun119".
    - Changed command "sm_anom" to allow specifying a time until spawn, this overrides the minimum spawn flow distance. Requested by "kochiurun119".

1.10 (20-Sep-2022)
    - Added cvars "l4d_anomaly_type_infected", "l4d_anomaly_type_special", "l4d_anomaly_type_survivor" and "l4d_anomaly_type_witch" to control the damage type.
    - Requested by "Sam B".

1.9 (25-Jun-2022)
    - Changed the classname of the anomaly to prevent conflicts with other plugins that were expecting an actual "prop_physics" entity.

1.8 (18-Nov-2021)
    - Changed forward "L4D_OnGameModeChange" to be compatible with "Left4DHooks" plugin version 1.63 and newer.
    - Compatibility support for SourceMod 1.11. Fixed various warnings.
    - Removed some old unused code.

1.7 (12-Sep-2021)
    - Fixed plugin conflict with those detecting the "tank_rock" entity. Thanks to "sonic155" for reporting.
    - Now using the new "Left4DHooks" native and forward: "L4D_GetGameModeType" and "L4D_OnGameModeChange".
    - Requires "Left4DHooks" version "1.54" or newer.

1.6 (20-Jun-2021)
    - Fixed not deleting the Anomaly when the plugin was toggled off.

1.5 (10-Apr-2021)
    - Fixed affecting players who have not spawned and are Special Infected ghosts.
    - Fixed damage cvars not applying correctly to Special Infected.

1.4 (15-May-2020)
    - Replaced "point_hurt" entity with "SDKHooks_TakeDamage" function.

1.3 (10-May-2020)
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Various changes to tidy up code.

1.2 (01-Apr-2020)
    - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.

1.1 (05-Mar-2020)
    - Now spawns in the same place for both Versus teams.

1.0 (04-Mar-2020)
    - Initial release.


Requirements:
  1. Uses Left 4 DHooks Direct plugin. Won't work without.
  2. L4D1: Requires adding the Tesla particles. See this post by Dragokas for the download. No source changes required.

Updating from 1.12 or older:
  • Cvars have changed: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

Installation:
  • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_anomaly.sp - 100 views - 37.5 KB)
__________________

Last edited by Silvers; 01-25-2024 at 12:31.
Silvers is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-04-2020 , 16:11   Re: [L4D & L4D2] Anomaly (1.0) [04-Mar-2020]
Reply With Quote #2

Works perfectly. Thanks
I'm going to lure a witch there.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
L4D2Noob
AlliedModders Donor
Join Date: Mar 2020
Location: Moscow
Old 03-04-2020 , 21:27   Re: [L4D & L4D2] Anomaly (1.0) [04-Mar-2020]
Reply With Quote #3

I shot a video to show the anomalies to my players. Maybe it is useful to you as a demo. If I broke the rules with my link, just say, I will delete it.
__________________
L4D2Noob is offline
Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-04-2020 , 21:43   Re: [L4D & L4D2] Anomaly (1.0) [04-Mar-2020]
Reply With Quote #4

Quote:
Originally Posted by L4D2Noob View Post
I shot a video to show the anomalies to my players. Maybe it is useful to you as a demo. If I broke the rules with my link, just say, I will delete it.
Very cool thank you! I will add link to the first post.
__________________
Silvers is offline
TiTz
Member
Join Date: Jan 2020
Old 03-08-2020 , 09:44   Re: [L4D & L4D2] Anomaly (1.1) [05-Mar-2020]
Reply With Quote #5

Quote:
Originally Posted by Silvers View Post
Requirements:
  1. Uses Left 4 DHooks Direct plugin. Won't work without.
  2. L4D1: Requires adding the Tesla particles. See this post by Dragokas for the download. No source changes required.
Installation:
  • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
Hi Silvers, this looks great - another great plugin! I've installed Left 4 DHooks Direct plugin but I'm a little confused about where stuff goe's in tesla-particle.zip

I put these 4 files into my Server and L4D client folders \left4dead\materials\particle

bendibeam.vmt.bz2
bendibeam.vtf.bz2
bendibeam.vmt
bendibeam.vtf

The anomaly works just fine ...

But how do my servers clients download the files ? i assume 'downloads_simple.ini' makes this automatic

If so where doe's 'downloads_simple.ini' go ?
The downloads folder?


Update - i figured it out - installed - SM File/Folder Downloader and Precacher https://forums.alliedmods.net/showthread.php?p=602270

put the downloads_simple.ini in configs ... an now clients download is

All's working great!

regards

Titz

Last edited by TiTz; 03-08-2020 at 10:46. Reason: solved problem
TiTz is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-08-2020 , 09:48   Re: [L4D & L4D2] Anomaly (1.1) [05-Mar-2020]
Reply With Quote #6

It is used by SM File/Folder Downloader and Precacher
I updated my post.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
TiTz
Member
Join Date: Jan 2020
Old 03-08-2020 , 10:48   Re: [L4D & L4D2] Anomaly (1.1) [05-Mar-2020]
Reply With Quote #7

Quote:
Originally Posted by Dragokas View Post
It is used by SM File/Folder Downloader and Precacher
I updated my post.
Thanks Dragokas - i just figured it out ... just before you posted thanks for your reply ... hopfully this will help others installing it
TiTz is offline
L4D2Noob
AlliedModders Donor
Join Date: Mar 2020
Location: Moscow
Old 03-09-2020 , 18:37   Re: [L4D & L4D2] Anomaly (1.1) [05-Mar-2020]
Reply With Quote #8

I propose for players to add a notification in the chat, which would tell the players that in a certain area of the map, you need to be careful.

If for example this is possible. I just remembered that in CS GO maps are divided into zones, and each zone has its own name.
__________________
L4D2Noob is offline
Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-10-2020 , 02:04   Re: [L4D & L4D2] Anomaly (1.1) [05-Mar-2020]
Reply With Quote #9

Quote:
Originally Posted by L4D2Noob View Post
I propose for players to add a notification in the chat, which would tell the players that in a certain area of the map, you need to be careful.

If for example this is possible. I just remembered that in CS GO maps are divided into zones, and each zone has its own name.
L4D/2 doesn't have any named areas.
__________________
Silvers is offline
L4D2Noob
AlliedModders Donor
Join Date: Mar 2020
Location: Moscow
Old 03-10-2020 , 03:32   Re: [L4D & L4D2] Anomaly (1.1) [05-Mar-2020]
Reply With Quote #10

Quote:
Originally Posted by Silvers View Post
L4D/2 doesn't have any named areas.
In principle, there is another option, I hope this works. If the electric ball does not appear immediately when loading the card, but when passing through ...
На русском
__________________
L4D2Noob is offline
Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
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 23:10.


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