Raised This Month: $235 Target: $400

[L4D2] Weather Control (1.11) [30-Sep-2020]

Post New Thread Reply   
Thread Tools Display Modes
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
Plugin Version:
Plugin Category:
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Create storms, lightning, fog, rain, wind, changes the skybox, sun and background colors.
    Old 05-10-2012 , 03:48   [L4D2] Weather Control (1.11) [30-Sep-2020]
    Reply With Quote #1

    • bubbabyte - Lots of testing on their server. Created custom storms and descriptions for the data config.
    • disawar1 (raziEiL) - Lots of bug reports and testing on their server.
    • Herbie - Lots of testing on their server.
    • Optics
    • alexip121093
    • Mr. Man
    • [Resistance] Yoshi
    • JoBarfCreepy
    • Sev
    • Worminater
    • Chatyak

    • Read/search this post before asking questions.
    • Does not affect the Hard Rain storm.
    • View the data config to customise storm settings for all maps or individual specific maps.
    • The fog can disappear if you reset the maps weather when the weather state is transitioning between idle/storm.
    • Multiple triggers can be saved and sized, which trigger the storm to start when a Survivor walks through. Use the sm_storm command and menu.
    • The triggers are saved to l4d2_storm_triggers.cfg in your servers \addons\sourcemod\data\ folder.

    Users with "low" shader settings will see the black and purple missing texture image if you use a skybox from Valve maps "c1" - "c5" on maps "c8" - "c12". Skyboxes from "c6" - "c13" will do the same on maps "c1" - "c5". "c6", "c7" and "c13" display a blue (or other solid color) background instead of the missing texture image. The "docks_hdr" skybox works fine on all maps for all users.
    Large maps and open areas will cause the game to crash, especially with lower hardware specs. The error message is: "Engine error: too many indices for index buffer. . tell a programmer ( 33096>32768 )". DO NOT report this problem, you can minimise the chances of the crash by setting the "rain" to "1" or "0" on some maps. Or lower the maps far z clip (advanced).


    (Pic1, Pic2, Pic3, Pic4, Pic5)

    Map Light Style:

    (Pic1, Pic2, Pic3, Pic4)
    • The map light style only affects the world surfaces (walls, ground, etc) and not individual props.
    • The map light style can be changed with the command sm_maplight and the data config key "light_style".
    • This may cause 0.2 seconds of low FPS when changed (may not be noticable). Occurs on a player when they first spawn or for everyone on round start, after 5.5, 8.0 and 10.0 seconds.

    Post Process Effect:

    (Pic1, Pic2, Pic3, Pic4, Pic5)
    • The cvar l4d2_storm_post applies the above post process effect. when weather sets to the storm state.
    • The Mind zombie in the Mutant Zombies plugin conflicts with this effect. Which ever last spawned will override. For example:
    • If the storm state has started after a mind zombie spawns, you will no longer see the mind zombie effect and only see the storm effect, and vice versa.

    Admin Commands: (requires "z" flag)

    PHP Code:
    sm_storm          // Opens the Storm menu.
    sm_stormstart     // Stats the Storm if possible.
    sm_stormstop      // Stops the Storm if possible.
    sm_stormrefresh   // Refresh the plugin, reloading the config and storm.
    sm_stormreset     // Stops the storm and resets the weather to the maps default.
    sm_lightning      // Creates a Lightning Strike.
    sm_rains          // Toggles the rain on/off.
    sm_wind           // Toggles the wind on/off.
    sm_farz           // Set the maps far z-clip. This will make the map stop rendering stuff after the specified distance. Usage: sm_farz <distance>.
    sm_maplight       // Set the maps lighting. Reset with no args. Usage: sm_maplight: <chars a-z, 1-64 chars allowed. More info: https://developer.valvesoftware.com/wiki/Light#Appearances
    sm_stormset       // Sets the fog, background and sun color. Reset with no args. Set the color with three values between 0-255 separated by spaces: sm_stormset <r> <g> <b>.
    sm_background     // Set the background color. Reset with no args. Set the color with three values between 0-255 separated by spaces: sm_background <r> <g> <b>.
    sm_sun            // Set the sun color. Reset with no args. Turn off: sm_sun 0. Set the color with three values between 0-255 separated by spaces: sm_sun <r> <g> <b>.
    sm_fog            // No args toggles the fog on/off. Set the color with three values between 0-255 separated by spaces: sm_fog <r> <g> <b>. 


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

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

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

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

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

    // 0=Off, 1=Turn down the voip voice transmit volume during the storm state.
    l4d2_storm_mixer "1"

    // 0.0=Off. Applies post process effect during the storm state. Value near 0 will blur, lower values cause other effects.
    l4d2_storm_post "-0.50"

    // 0=Off. 1=On. Select a new weather preset from the random section when changing chapter.
    l4d2_storm_random "1"

    // Method to refresh map light style: 0=Old (0.2 sec low FPS, does not the whole world). 1=Almost always lights the whole world (0.5 sec low FPS), 2=Lights the whole world (1 sec low FPS).
    l4d2_storm_style "1"

    // Weather Control plugin version.


    Saved to l4d2_storm.cfg in your servers \addons\sourcemod\data\ folder.

    The config controls weather effects on maps you specify. All the available keys are in the "all" section of the config.

    For changes to take affect, you must either:
    A) Use the command sm_stormrefresh.
    B) Open the menu with sm_storm and press "5. Refresh" on the menu.
    C) Reload the plugin.
    D) Change map.

    The "Main" section:
    The "main" section will create a storm on all maps with these settings. Any map specific settings will load instead.
    Used to create storms on all maps unless the map name is specified as a section in the data config.

    Map specific section:
    Put the map name as the section value. For example "c1m1_hotel". This allows map specific weather.

    If you have a main section, you can make the map load those settings by adding the key and value: "use_section" "main".
    After the "use_section" data loads, map specific data will load and any set values will override.

    View the l4d2_storm.cfg config for examples in the "c1m1_hotel" and other map specific sections.

    "use_section" key:
    Attempts to load data from the section name you put as the "use_section" value.
    If the Value is set to "all" it will load settings from the "all" section.
    After the "use_section" data loads, map specific data will load and any set values will override.

    This allows standard weather settings from the "use_section" and custom settings for specific maps.
    "" =Off, this is the default value which will disable loading custom information.

    Random Storm Selection:
    You can set up many custom storm types to be chosen at random when the map loads.
    You can have as many preset storms as you like by simply adding or adjusting the count number and names that you see below.

    Set the "count" key to the number of sections to randomly select from. Specify each key as an incremental number from 1. Each keys value should point to a section in the config.

    Here is an example where the map "c1m2_streets" will load either red, green or blue fog.
    PHP Code:
    "use_section"    "some_random"
    "count"      "3"
            "1"              "SectionRed"
            "2"              "SectionGreen"
            "3"              "Blue"
    "background"     "255 0 0"
            "fog_color"      "255 0 0"
    "background"     "0 255 0"
            "fog_color"      "0 255 0"
    "background"     "0 0 255"
            "fog_color"      "0 0 255"

    1.11 (30-Sep-2020)
        - Fixed compile errors on SM 1.11.
        - Removed an unused variable.
    1.10 (10-May-2020)
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
        - Various changes to tidy up code.
        - Various optimizations and fixes.
    1.9 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    1.8.2 (30-Oct-2019)
        - Lightning no longer spams "Setting CBaseEntity to non-brush model" to server console. Model not required for small boxes.
    1.8.1 (28-Jun-2019)
        - Changed PrecacheParticle method.
        - Better fading wind and rain sound effects volume.
    1.8 (14-Aug-2018)
        - Added cvar "l4d2_storm_random" to control if a new weather preset is selected from the "random" section on each chapter or only the first.
        - Added data config key "rain_type", to control which type of rain to use. 0=Default. 4=Particle Rain. 6=Particle Rain Storm.
        - Copied 'Hard Rain' rain values as suggested by "Lux".
        - Rain particles (not type 0), are invisible to clients with low graphic settings, and in some parts of maps (due to how the engine works).
    1.7 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
    1.6 (12-Aug-2013)
        - Added snow.
        - Added command "sm_snows" to toggle snow on and off.
        - Added data config keys "snow", "snow_idle", "snow_storm", to control when snow is enabled.
        - Fixed duplicate key entry for "fog_idle_start" in the data. Replaced with the correct "fog_storm_start" key.
    1.5 (23-May-2012)
        - Missing data config keys "rain_idle" and "rain_storm" will use default values "75" and "250" respectively.
        - Fixed creating entities when the map has not started.
    1.4 (21-May-2012)
        - Fixed the fog disappearing when weather is reset during a transition between idle/storm.
    1.3 (20-May-2012)
        - Added data config keys "rain_idle" and "rain_storm" to control the visibility of rain, requested by "adrianman".
    1.2 (17-May-2012)
        - Fixed a bug with the fog when resetting the map, which caused the bots to not see properly.
    1.1 (15-May-2012)
        - Added cvar "l4d2_storm_style". Method to refresh map light style: 0=Old (0.2 sec low FPS, does not the whole world). 1=Almost always lights the whole world (0.5 sec low FPS), 2=Lights the whole world (1 sec low FPS).
        - Added command "sm_farz" to set the maps far z-clip. This will make the map stop rendering stuff after the specified distance.
        - Added data config keys "far_z_idle" and "far_z_storm" which control the maps far z-clip when the weather is idle/storm.
        - Added data config key "lightning_time" to control how long fires burn when lightning strikes the ground.
    1.0 (10-May-2012)
        - Initial release.

    • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    • Download "l4d2_storm.cfg" and save to your servers \addons\sourcemod\data\ folder.

    Updating from 1.7 or older:
    • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
    Attached Files
    File Type: cfg l4d2_storm.cfg (21.1 KB, 3177 views)
    File Type: sp Get Plugin or Get Source (l4d2_storm.sp - 1629 views - 121.5 KB)

    Last edited by Silvers; 09-29-2020 at 23:11.
    Silvers is offline
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 05-10-2012 , 03:48   Re: [L4D2] Weather Control
    Reply With Quote #2

    Silvers is offline
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 05-10-2012 , 04:16   Re: [L4D2] Weather Control (1.0) [10-May-2012]
    Reply With Quote #3

    Yes, he did it!
    Click image for larger version

Name:	2012-04-23_00006.jpg
Views:	3608
Size:	58.5 KB
ID:	103409Click image for larger version

Name:	2012-04-23_00018.jpg
Views:	2780
Size:	75.2 KB
ID:	103410Click image for larger version

Name:	2012-04-23_00011.jpg
Views:	2988
Size:	93.3 KB
ID:	103411
    Click image for larger version

Name:	2012-04-23_00004.jpg
Views:	2943
Size:	87.3 KB
ID:	103412Click image for larger version

Name:	2012-04-23_00001.jpg
Views:	2543
Size:	80.0 KB
ID:	103413Click image for larger version

Name:	2012-04-23_00009.jpg
Views:	3117
Size:	81.7 KB
ID:	103414
    Some of my screenshots.
    disawar1 is offline
    Junior Member
    Join Date: Jul 2011
    Old 05-10-2012 , 09:15   Re: [L4D2] Weather Control (1.0) [10-May-2012]
    Reply With Quote #4

    Very good plugins, thank you silver.
    Blazen123 is offline
    Veteran Member
    Join Date: May 2010
    Old 05-10-2012 , 10:17   Re: [L4D2] Weather Control (1.0) [10-May-2012]
    Reply With Quote #5

    Wonderful job.

    One of the handful of people left who contribute greatly to this game.

    Such a great idea for a plugin.

    Hopefully pubs warm up to it. They seem to mostly like the plane crash plugin.

    Though I can see it now...


    Sev is offline
    Senior Member
    Join Date: Dec 2009
    Location: Hong Kong
    Old 05-10-2012 , 11:09   Re: [L4D2] Weather Control (1.0) [10-May-2012]
    Reply With Quote #6

    5 stars. "It changes everything again."
    Now l4d2 is a highly customizable game.
    It brings new gaming experience to left 4 dead 2

    Will or will not add support for l4d1 ?
    alexip121093 is offline
    Send a message via MSN to alexip121093
    Junior Member
    Join Date: Apr 2012
    Old 05-10-2012 , 11:43   You very good man.
    Reply With Quote #7

    This is Nice Plugin.

    Thank you.

    This is very well work now.
    JeungHun is offline
    Join Date: Jun 2010
    Old 05-10-2012 , 12:16   Re: [L4D2] Weather Control (1.0) [10-May-2012]
    Reply With Quote #8

    great job Silvers.. been testing it for a while and it is a phenomenal plugin and really changes the feel of the whole game.
    bubbabyte is offline
    Veteran Member
    Join Date: May 2010
    Old 05-10-2012 , 17:42   Re: [L4D2] Weather Control (1.0) [10-May-2012]
    Reply With Quote #9

    Plugin does seem to crash a bit due to too many entities with storm related configs.

    It probably doesn't have room to utilize them but the maps with only light/skybox changes seem fine for me anyway.

    But the storm related configs are causing client side crashes.

    Maybe a tweak is in order. I have trust Silver will.

    Last edited by Sev; 05-10-2012 at 17:42.
    Sev is offline
    AlliedModders Donor
    Join Date: Nov 2009
    Old 05-10-2012 , 18:20   Re: [L4D2] Weather Control (1.0) [10-May-2012]
    Reply With Quote #10

    Amazing job, Silvers. Your plugins never cease to amaze me.
    JackieChan is offline

    Thread Tools
    Display Modes

    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 01:28.

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