AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Weather Control (1.17) [12-Mar-2024] (https://forums.alliedmods.net/showthread.php?t=184890)

leaffan 05-19-2023 09:47

Re: [L4D & L4D2] Weather Control (1.15) [05-Jul-2022]
 
Quote:

Originally Posted by DARG367 (Post 2804163)
Use the following cvar command /cvar l4d2_storm_allow 1 and make sure to set the cfg file below to 0 in the cfg/sourcemod folder.
PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d2_storm_allow "0" 


Quote:

Originally Posted by replay_84 (Post 2804211)
I use
bind "F8" "sm_cvar l4d2_storm_allow 1 ; sm_stormpreset"


But yes, make sure to disable the plugin by default first as DARG367 mentioned.

But sometimes the addon seems to be active in some maps, but every time I click 'Refresh', it doesn't give me rain or storm, only the weather darkens and lightning strikes. Does this not work on every map?

ZBzibing 09-18-2023 05:59

Re: [L4D & L4D2] Weather Control (1.15) [05-Jul-2022]
 
1 Attachment(s)
l4d1_storm.cfg的中文翻译

Chinese translation

chungocanh12 11-15-2023 03:33

Re: [L4D & L4D2] Weather Control (1.15) [05-Jul-2022]
 
Thank you for creating this great plugin

caphao1101 11-22-2023 10:32

Re: [L4D2] Weather Control
 
Quote:

Originally Posted by Silvers (Post 1706055)
Reserved.

Can you help me find a name for this sky? Thank
https://www.twitch.tv/videos/1252577937

Marttt 11-22-2023 12:12

Re: [L4D & L4D2] Weather Control (1.15) [05-Jul-2022]
 
Quote:

Originally Posted by Silvers (Post 1706054)
  • Available skyboxes, their names and images listed here: (L4D2) and (L4D1).

If isn't one of these, then probably is custom (like workshop addon).

Sev 02-19-2024 08:20

Re: [L4D & L4D2] Weather Control (1.15) [05-Jul-2022]
 
I'd be interested if anyone has designed a preset storm like the ones already made with the config file, but for a snow storm similar to the one seen on the custom campaign 'Cold Front' where you have whiteout conditions during the horde.

Marttt 02-19-2024 09:18

Re: [L4D & L4D2] Weather Control (1.15) [05-Jul-2022]
 
I believe the whiteout is based on the fog setting

HarryPotter 03-05-2024 10:38

Re: [L4D & L4D2] Weather Control (1.15) [05-Jul-2022]
 
PHP Code:

L 03/05/2024 23:22:57: [SMException reportedEntity 15 (15is invalid
L 03
/05/2024 23:22:57: [SMBlamingl4d2_storm.smx
L 03
/05/2024 23:22:57: [SMCall stack trace:
L 03/05/2024 23:22:57: [SM]   [0GetEntProp
L 03
/05/2024 23:22:57: [SM]   [1Line 959l4d2_storm.sp::Event_TankKilled
L 03
/05/2024 23:23:02: [SMException reportedEntity 15 (15is invalid
L 03
/05/2024 23:23:02: [SMBlamingl4d2_storm.smx
L 03
/05/2024 23:23:02: [SMCall stack trace:
L 03/05/2024 23:23:02: [SM]   [0GetEntProp
L 03
/05/2024 23:23:02: [SM]   [1Line 959l4d2_storm.sp::Event_TankKilled
L 03
/05/2024 23:23:02: [SMException reportedEntity 15 (15is invalid
L 03
/05/2024 23:23:02: [SMBlamingl4d2_storm.smx
L 03
/05/2024 23:23:02: [SMCall stack trace:
L 03/05/2024 23:23:02: [SM]   [0GetEntProp
L 03
/05/2024 23:23:02: [SM]   [1Line 959l4d2_storm.sp::Event_TankKilled 


glhf3000 03-10-2024 01:39

Re: [L4D & L4D2] Weather Control (1.16) [05-Mar-2024]
 
4 Attachment(s)
I suggest adding 4 extra options for env_sun to data/l4d2_storm.cfg, "sun_overlaysize", "sun_size" and "sun_overlaysize_storm", "sun_size_storm":
Sometimes overlay is really annoying, like how can sun blind you so much during the storm when you cant see shit through the rain?
Size can be different too.
attached sp is 1.15, please wait for silvers to add this or update 1.16 manually, since this one contains a bit of my own sunny/rainy random at 2780

PHP Code:

g_iCfgSunOverlaysize 0;
g_iCfgSunOverlaysizeStorm 0;
g_iCfgSunSize 0;
g_iCfgSunSizeStorm 0;
    
g_iCfgSunSizeDefault 0;
g_iCfgSunOverlaysizeDefault 0

PHP Code:

g_iCfgSunOverlaysize =            hFile.GetNum("sun_overlaysize",                    g_iCfgSunOverlaysize);             /////////
g_iCfgSunOverlaysizeStorm =        hFile.GetNum("sun_overlaysize_storm",            g_iCfgSunOverlaysizeStorm);     /////////
g_iCfgSunSize =                    hFile.GetNum("sun_size",                        g_iCfgSunSize);                 /////////
g_iCfgSunSizeStorm =            hFile.GetNum("sun_size_storm",                    g_iCfgSunSizeStorm);             ///////// 

for OnMapStart
PHP Code:

void SaveDefaultEnvSunSize()
{
    
int env_sun = -1;
    while( (
env_sun FindEntityByClassname(env_sun"env_sun")) != INVALID_ENT_REFERENCE )
    {
        
g_iCfgSunSizeDefault GetEntProp(env_sunProp_Data"m_nSize");
        
g_iCfgSunOverlaysizeDefault GetEntProp(env_sunProp_Data"m_nOverlaySize");
        
        return;
    }

    
g_iCfgSunSizeDefault 0;
    
g_iCfgSunOverlaysizeDefault 0;


And places where presets load or storm starts/stops
PHP Code:

void SetSunSize(int env_sun = -1)
{    
    
int overlaySizesize;
    
    if(
env_sun == -1)
    {
        while( (
env_sun FindEntityByClassname(env_sun"env_sun")) != INVALID_ENT_REFERENCE )
        {
            break;
        }
    }
    
    if(
env_sun == -1) return;
    
    if( 
g_iStormState <= STATE_IDLE )    
    {
        
////////// OVERLAY SIZE
        
if(g_iCfgSunOverlaysize 0)
            
overlaySize g_iCfgSunOverlaysize;
        else
            
overlaySize g_iCfgSunOverlaysizeDefault;
        
        
////////// SIZE
        
if(g_iCfgSunSize 0)
            
size g_iCfgSunSize;
        else
            
size g_iCfgSunSizeDefault;
    }
    else
    {    
        
////////// OVERLAY SIZE
        
if(g_iCfgSunOverlaysizeStorm 0)
            
overlaySize g_iCfgSunOverlaysizeStorm;
        else
            
overlaySize g_iCfgSunOverlaysizeDefault;
            
        
////////// SIZE    
        
if(g_iCfgSunSizeStorm 0)
            
size g_iCfgSunSizeStorm;
        else
            
size g_iCfgSunSizeDefault;
    }

    
SetEntProp(env_sunProp_Send"m_nOverlaySize"overlaySize); 
    
SetEntProp(env_sunProp_Send"m_nSize"size); 


So for DarkRainy or ForeverStorm it would be
Code:

       
"sun_overlaysize"              "8"
"sun_size"                                "8"
"sun_overlaysize_storm"    "4"
"sun_size_storm"                "4"

P.S. feels like this provides more random random
PHP Code:

int Math_GetRandomInt(int minint max)
{
    
int random GetURandomInt();

    if (
random == 0) {
        
random++;
    }

    return 
RoundToCeil(float(random) / (float(2147483647) / float(max min 1))) + min 1;


Edit: removed plugin, added to main post. Thanks! -Silvers


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

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