[L4D2] Weather Control (1.0) [10-May-2012]

  • 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.


(Pic1, Pic2, Pic3, Pic4, Pic5)

Map Light Style:

(Pic1, Pic2, Pic3, Pic4)
  • 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.

  • bubbabyte - Lots of testing on their server. Created custom storms and descriptions for the data config.

  • raziEiL - Lots of bug reports and testing on their server.

  • Herbie - Lots of testing on their server.

  • Optics

  • alexip121093

  • Mr. Man

  • [Resistance] Yoshi

  • JoBarfCreepy

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_maplight       // Set the maps lighting. Reset with no args. Usage: sm_maplight: <chars a-z, 1-64 chars allowed. More info: http://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"

// 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.

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.0 (10-May-2012)

    - Initial release.

  1. Put the SDKHooks include into your \addons\sourcemod\scripting\include\ folder.

  2. Put the plugins .sp file into your scripting folder and compile the plugin.

  • This plugin requires the SDKHooks extension.

  1. Download the .zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder.

  2. This plugin was compiled with SDKHooks version 2.1.

Attached Files

File Type: zip

l4d2_storm.zip (62.2 KB)

Orignal From: [L4D2] Weather Control (1.0) [10-May-2012]

No comments

Not a single link is allowed to submit in comment :o