Jump to content
luckylegs

Increasing frequency of lightning

Recommended Posts

Hi all,

 

I'm trying to increase the frequency of lightning strikes produced by the weather system. Currently, at max settings, strikes are still fairly infrequent (tested on Altis). I am going for something in the range of a strike every 0.5 to 4 seconds. I noticed ShackTac seems to have been able to achieve this for their Caesar Merlin missions, and from seeing video their lightning looks like the proper weather system lightning and not a scripted solution using Zeus lightning modules or some other custom scripted effect - as far as I can tell.

 

I searched through CfgWorlds and found the class LightningsConfig under CAWorld. Here are the default values:

Spoiler

class LightningsConfig
{
	minCloudiness = 0.85;
	minProbability = 0.0;
	maxProbability = 0.25;
	minCount = 0;
	maxCount = 6;
	scatter = 120;

 

 

This seemed like what I needed, so I attempted to make a tiny replacement config mod to play with these values. Here's what I have:

Spoiler

class CfgPatches
{
	class LEGS_moreLightning
	{
		name = "More Lightning";
		author = "LuckyLegs";
		units[]={};
		weapons[]={};
		requiredVersion=1;
		requiredAddons[]=
		{
			"A3_Map_Data"
		};
	};
};
class cfgWorlds
{
	class DefaultWorld
	{
		class Weather;
	};
	class CAWorld: DefaultWorld
	{
		class Weather: Weather
		{
			class LightningsConfig
			{
				minCloudiness = 0.85;
				minProbability = 0.9;
				maxProbability = 1;
				minCount = 1;
				maxCount = 2;
				scatter = 3;
			};
		};
	};
};

 

 

As you can see, I adjusted all but one of the values quite a bit. I did this one by one, with the aim being to hopefully see some kind of noticeable change of any kind.

 

Unfortunately nothing really worked. Nothing I changed seemed to have any effect whatsoever. I checked the config viewer inside the editor each time to make sure my replacement config was taking effect and propogating to the config for Altis, which it was.

 

Can anyone more experienced with configs see if I've overlooked anything or done something wrong here? Or perhaps if there's anyone out there with experience in terrain modding that has some knowledge of weather configs that could comment?

 

This is all a bit of a stab in the dark as I found barely anything in my searches on lightning, and of course I don't actually know what these config values actually do. At the very least hopefully this information helps someone else out who tries searching for lightning or LightningsConfig.

Share this post


Link to post
Share on other sites

Not sure how I missed this in my first look, but I've since found Shpook's excellent Ambient Lightning script.

 

This script produces pretty much exactly the effect I wanted, and is very versatile while remaining lightweight.

 

I did, however, find a couple of small errors, and have shared my edits on the relevant forum topic.

 

P.S. I did also find someone's Reddit comment saying that ShackTac apparently also used a scripted solution for their lightning. Well there you go; I didn't realise it was possible to get such good results this way.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×