Jump to content
tpw

TPW MODS: enhanced realism and immersion for Arma 3 SP.

Recommended Posts

Hey, I made a little module addon that when placed enables the ambient combat. Nothing fancy you just place it and it uses the settings from the user config.

Do you want to know more?

  • Like 1

Share this post


Link to post
Share on other sites

how do i get the fog script to work by itself? example i moved the fog script into mission folder, but does not work, it says it needs the tpw_core.sqf, i have placed tht along side in the mission folder and the fog still does not work.

Share this post


Link to post
Share on other sites
7 hours ago, taro8 said:

Hey, I made a little module addon that when placed enables the ambient combat. Nothing fancy you just place it and it uses the settings from the user config.

Do you want to know more?

Yes please!

 

3 minutes ago, Caluu66x said:

how do i get the fog script to work by itself? example i moved the fog script into mission folder, but does not work, it says it needs the tpw_core.sqf, i have placed tht along side in the mission folder and the fog still does not work.

You need to actually run tpw_core.sqf

 

eg
 

0 =[] execvm "tpw_core.sqf";
sleep 1;
0 =[] execvm "tpw_fog.sqf";

 

Share this post


Link to post
Share on other sites

Hey tpw,

 

I've been getting this error in my rpt with the latest version:

17:23:59 Error in expression <able ["tpw_crowd_dest",_dest];
};


if (_mov > 0 && {_vis ==0}) then
{
_civ setv>
17:23:59   Error position: <_mov > 0 && {_vis ==0}) then
{
_civ setv>
17:23:59   Error Undefined variable in expression: _mov
17:23:59 File TPW_MODS\tpw_crowd.sqf, line 299

 Other than that, excellent work as usual.

Share this post


Link to post
Share on other sites

Hi TPW, I see you have made changes to raindrops in your newest update. My problem is-using TPW it never rains. Ever. If I start a mission with it raining, as soon as TPW initializes, the rain stops.

 

What do I need to do to make it rain? I know I can disable tpw_fog..but i'd rather not as I like the foggy breath feature.

Share this post


Link to post
Share on other sites
6 hours ago, ineptaphid said:

Hi TPW, I see you have made changes to raindrops in your newest update. My problem is-using TPW it never rains. Ever. If I start a mission with it raining, as soon as TPW initializes, the rain stops.

 

What do I need to do to make it rain? I know I can disable tpw_fog..but i'd rather not as I like the foggy breath feature.

Hi ineptaphid

 

TPW FOG internally models appropriate climate settings for the map you're on, but these relate to its own temperature, snow likelihood,  and dewpoint variables, it shouldn't affect rain unless it has determined that it should be snowing. Nor does it affect overcast, which rain is dependent on. Which maps are you running?

 

You can force rain at any time with something like:

 

0 setrain 0.5; 0 setovercast 0.8; skiptime 1 

I do this all the time when testing out rain related things and it works just fine.

Share this post


Link to post
Share on other sites
14 hours ago, arma131 said:

Hey tpw,

 

I've been getting this error in my rpt with the latest version:


17:23:59 Error in expression <able ["tpw_crowd_dest",_dest];
};


if (_mov > 0 && {_vis ==0}) then
{
_civ setv>
17:23:59   Error position: <_mov > 0 && {_vis ==0}) then
{
_civ setv>
17:23:59   Error Undefined variable in expression: _mov
17:23:59 File TPW_MODS\tpw_crowd.sqf, line 299

 Other than that, excellent work as usual.

Thanks for the bug report. I can't say I've seen this error, but I have modified the code slightly to allow for it anyway. I will release the fix in a few days. Thanks again. 

Share this post


Link to post
Share on other sites
18 hours ago, tpw said:

Hi ineptaphid

 

TPW FOG internally models appropriate climate settings for the map you're on, but these relate to its own temperature, snow likelihood,  and dewpoint variables, it shouldn't affect rain unless it has determined that it should be snowing. Nor does it affect overcast, which rain is dependent on. Which maps are you running?

 

You can force rain at any time with something like:

 


0 setrain 0.5; 0 setovercast 0.8; skiptime 1 

I do this all the time when testing out rain related things and it works just fine.

So what determines snow? For example, I will go to Altis in the editor, set the date to December, make it 70% overcast, put rain up to about 40% and in the editor it will start to rain. But when the mission starts the rain instantly stops again. And I have only seen it snow once since using TPW. Is there a specific setting to make sure it will start to snow when I start the mission?

 

EDIT: Apologies tpw, the rain issue was being caused by ACE. I thought it was tpw, as the rain stopped the second the tpw list appeared on screen. So is there a surefire way to make it snow?

Share this post


Link to post
Share on other sites

Hi ineptaphid. I'll repeat, TPW FOG does not affect rain unless it has determined that it should be snowing, in which case rain is disabled for the duration of the snow fx.

 

If I set up a simple mission on Altis in the editor with rain such as:

weather.jpg

 

then it rains in the editor, rains when when the mission starts, and keeps raining once TPW MODS initialises. The only thing that changes is the fog, which TPW FOG strangely enough controls! Are you running any other mods which could be affecting weather?

 

Re snow: TPW FOG internally models its own climate based on the climatic region of the map and the time of year. For a given map there's a given chance of snow on a given day. On Altis it will very rarely snow, on Chernarus there's a good chance of snow in Dec and Jan. Even if TPW FOG determines that there can be snow on a given day, it only snows if the temperature is less than 10degC and overcast is > 0.4.

 

If it is <10degC and overcast >0.4 then you can force snow with 

[] spawn tpw_fog_fnc_snow; 

 

or you can temporarily force the issue on any map at any time

tpw_fog_temp = 5; 0 setovercast 0.5; [] spawn tpw_fog_fnc_snow 

but it will only last for a minute or 2 until TPW FOG's climate calculations re-establish the correct temperature.

 

TPW FOG readme details TPW FOG and in particular the snow FX.

 

EDIT: Aaargh, your edit came through while I was typing this :)

Share this post


Link to post
Share on other sites

Looks like  ineptaphid came to the same ( appears to be incorrect) conclusion I had with regard to rain/fog and TPW fog.  I'd set up my missions with heavy fog and rain, load in game and as soon as the TPW initializing screen popped up the rain would stop, fog would go to zero.  I even got to the point where I'd load into Zeus and drop the weather module on the map, set it to storm with 50+ % fog, hit ok and by the time I could exit Zeus the weather would once again roll back to a no fog state.

 

Here is the crazy part,  I am not using ACE and when I disable TPW fog in the hpp...the weather works as I desire. 0_o 

 

I will do a vanilla set up tonight with only TPW and see what happens, god knows I have a nasty list of mods running but they are mostly additional gear mods.

Share this post


Link to post
Share on other sites
1 hour ago, Zakuaz said:

Looks like  ineptaphid came to the same ( appears to be incorrect) conclusion I had with regard to rain/fog and TPW fog.  I'd set up my missions with heavy fog and rain, load in game and as soon as the TPW initializing screen popped up the rain would stop, fog would go to zero.  I even got to the point where I'd load into Zeus and drop the weather module on the map, set it to storm with 50+ % fog, hit ok and by the time I could exit Zeus the weather would once again roll back to a no fog state.

 

Here is the crazy part,  I am not using ACE and when I disable TPW fog in the hpp...the weather works as I desire. 0_o 

 

I will do a vanilla set up tonight with only TPW and see what happens, god knows I have a nasty list of mods running but they are mostly additional gear mods.

I had the same issues. The fog will stay when you set the wind to 0 (manual override)

Share this post


Link to post
Share on other sites

Zukuaz and schulz: TPW FOG does override your fog settings (that's why it's called TPW FOG), but not the rain (as per my post above). You can disable its ground fog and rain fog functions in the HPP if they bother you too much.

Share this post


Link to post
Share on other sites
On 1/6/2017 at 2:12 PM, tpw said:

So the Furniture mod is coming along very nicely, i was wondering how would you go about randomizing the templates if there is more than one, is this something that is planned ??? iam going to sit down and look at it as soon as i get home from work.if anyone has any ideas in the mean time, please shout it out :)

 

Share this post


Link to post
Share on other sites

@hansson0728, template randomisation code is ready to go, just waiting on you guys to come up with some more templates!

Share this post


Link to post
Share on other sites

cool, iam  focusing most on placing military stuff like planes and statics stuff like that.

iam trying to figure out choppers on landingZones, but landingzones are not buildings, so that would take some modification, but maybe it work just by changing the placement script and not the actual furniture script.

 

can we get a preview of the random funcktion????

 

also templates how do you want them, just here in the forum or ???

 

i havent tried it, but if you already populated an area and place new stuff will the old stuff be included when grabbing later on then ??

 

 

 


			case "Land_Cargo_HQ_V1_F":
				{
				_items = [["Land_PortableLight_double_F",[-2.896,-1.03027,-0.731257],-81.1302],["Land_PortableLight_double_F",[6.51318,1.76978,-0.731257],88.7523],["Land_WoodenTable_small_F",[3.77783,5.7605,-3.13417],-89.6719],["MapBoard_seismic_F",[6.59717,5.38574,-3.09117],-41.2198],["B_UAV_01_F",[3.89893,5.76807,-2.26869],-25.6885],["Box_East_Ammo_F",[4.94629,-4.37915,-3.20634],-194.689],["Box_East_WpsSpecial_F",[3.66797,-4.57556,-3.25899],-178.221],["Box_East_Wps_F",[3.64258,-4.66638,-2.86101],-177.436],["C_supplyCrate_F",[6.71729,0.712402,-3.26471],-88.5486],["Box_IND_Grenades_F",[2.41699,-4.53979,-3.25634],90.8963],["B_Mortar_01_F",[-0.821777,-3.6908,-0.71907],96.963],["B_GMG_01_high_F",[6.11426,-1.79675,-0.707582],-93.0861],["B_GMG_01_high_F",[4.81934,4.54822,-0.757582],2.03609],["B_GMG_01_high_F",[-2.43848,2.9812,-0.757582],42.9098]];
				_bld setvariable ["tpw_furnished",1];
				_bld setvariable ["tpw_furniture",_items];
				};
				
			case "Land_Cargo_Patrol_V1_F":
				{
				_items = [["B_GMG_01_high_F",[0.114258,1.99805,-5.07105],5.86522]];
				_bld setvariable ["tpw_furnished",1];
				_bld setvariable ["tpw_furniture",_items];
				};
			
			case "Land_i_Stone_Shed_V1_F":
				{
				_items =  [["C_Quadbike_01_F",[0.959839,6.73096,-0.21109],-88.3166]];
				_bld setvariable ["tpw_furnished",1];
				_bld setvariable ["tpw_furniture",_items];
				};
				
			case "Land_i_Barracks_V2_F":
				{
				_items = [["MetalBarrel_burning_F",[-4.53442,5.77393,0.43895],183.642],["MetalBarrel_burning_F",[-5.61694,5.98096,0.434265],162.987],["B_G_Offroad_01_F",[-9.5022,6.47998,0.328781],92.1158],["C_Quadbike_01_F",[-7.8186,-7.27148,0.370163],185.869],["C_Quadbike_01_F",[-9.26343,-7.58154,0.380081],185.869],["B_GMG_01_high_F",[0.314453,-5.88965,7.5078],-119.291],["B_GMG_01_high_F",[-5.64966,-5.77783,7.50999],121.38]];
				_bld setvariable ["tpw_furnished",1];
				_bld setvariable ["tpw_furniture",_items];
				};

 

Nothing Fancy.....

 

i dont for turrents and stuff, i enabled simulation, maybe an option in the array to enable simulation on only certain objects ??? 

 

i see this as a great mission making tool and not only ambiance you know.

Share this post


Link to post
Share on other sites

@tpw thanks so much for the update, wish i find some time to test the new fog and rainfx effects on the next days as they look very promising with/after the latest change, thanks so much for bring out such an awesome mod and continue improving it. Keep it up!

Share this post


Link to post
Share on other sites
On 1/31/2017 at 3:42 PM, tpw said:

Zukuaz and schulz: TPW FOG does override your fog settings (that's why it's called TPW FOG), but not the rain (as per my post above). You can disable its ground fog and rain fog functions in the HPP if they bother you too much.

 Not bothered at all TPW =). Easy work arounds, and plenty of ways to get the feel we aim for.  TPW fog adds a lot of what I love so using it is the way to go for me.

Share this post


Link to post
Share on other sites

hansson0728: PM sent

 

Jimmakos and Zakuaz: Cheers!

Share this post


Link to post
Share on other sites

Cheers to you TPW... I've said it many times but man the game just is not the same with out your mod IMO. Love it ALL haha

 

BTW, the rain splash is well done, nice work.  Any chance we may see a variable in the hpp to adjust its "splash" effect?  I wouldn't mind dialing it up a tad.

Share this post


Link to post
Share on other sites

Hi TPW, the snow is great! Good job! 

 

No worries if you're busy, but I'm wondering if it's possible to force snow in a mission? I have a simple setup going on Thirsk Winter. With the month set to December it still can occasionally rain, which is kind of odd feeling for a winter map. Am I missing an editor related temperature setting maybe?

 

I'm also thinking if possible I'd love to include snow as a script only if there are instructions available for that. I'm not sure if it would solve this aspect of it, but when relying on the hpp userconfig file and running TPW as a mod, it rains on mission start while TPW initializes.

 

Do you think running it as a script would help with that? If that's doubtful I'll see if I can find a way to force a sleep/delay on BIS weather so TPW initializes first.

 

Anyway, nice work man. I realize snow is hard thing to get right in Arma and this is certainly one of the better implementations I've seen.

Share this post


Link to post
Share on other sites
6 hours ago, HeroesandvillainsOS said:

Hi TPW, the snow is great! Good job! 

 

No worries if you're busy, but I'm wondering if it's possible to force snow in a mission? I have a simple setup going on Thirsk Winter. With the month set to December it still can occasionally rain, which is kind of odd feeling for a winter map. Am I missing an editor related temperature setting maybe?

 

I'm also thinking if possible I'd love to include snow as a script only if there are instructions available for that. I'm not sure if it would solve this aspect of it, but when relying on the hpp userconfig file and running TPW as a mod, it rains on mission start while TPW initializes.

 

Do you think running it as a script would help with that? If that's doubtful I'll see if I can find a way to force a sleep/delay on BIS weather so TPW initializes first.

 

Anyway, nice work man. I realize snow is hard thing to get right in Arma and this is certainly one of the better implementations I've seen.

Thanks for the kind words HAVOS, much appreciated.

 

Regarding forcing snow, I need to give you a bit of (non-condescending) background to the way TPW FOG works as far as its snow implementation. Based on the climatic region each map is assigned to (by me), TPW FOG models things such as the maximum and minimum temperature for a given day, dewpoint, and the chance of snow on a given day. For a Nordic map like Thirsk, there's a pretty good chance of snow in December, but not 100%. If TPW FOG decides that it can snow on a given day, it then sets the variable tpw_fog_snowflag true,  and fires up the tpw_fog_fnc_snow function. However even if  it's a "snow" day, it will only snow if the temperature is less than 10degC, and the overcast is greater than 40%. So to force snow, you need to manually start the tpw_fog_fnc_snow function, and set the temperature to less than 10degC and overcast to greater than 40%. The following script will do that for you.

if (!tpw_fog_snowflag) then 
    {
    tpw_fog_snowflag = true;
    tpw_fog_temp = 2; 
    1 setovercast 0.8; 
    skiptime 1;
    [] spawn tpw_fog_fnc_snow;
    } else
    {
    tpw_fog_temp = 2; 
    1 setovercast 0.8; 
    skiptime 1;
    };   

Regardless of the above script, if you start a mission with heavy overcast then it will indeed rain until TPW FOG kicks in and replaces rain with snow. So you could start a mission with overcast  = 35% and then run the above script. But remember if the temperature rises above 10degC or the overcast falls below 40%, it will stop snowing.

 

Alternatively if you want a standalone snow script, the following script contains just the snow functions from TPW FOG:

Spoiler



//STAND ALONE SNOW FX	

// Snow fx on goggles
tpw_snow_fnc_goggledrops =
	{
	// More drops if heavier snow and/or moving faster
	private _dens = tpw_snow_snowdensity;
	if (_dens > 25) then {_dens = 25};
	private _spd = abs (ceil speed player);
	private _int = 4 / _dens / (1 + _spd); 
	
	// Emitter
	private _gogemitter = "#particlesource" createVehicleLocal [0,0,0];
	private _logic = "logic" createVehicleLocal [0,0,0];		
	_gogemitter attachto [_logic,[0,0,0]];
	_logic attachto [player,[0,0,0],"HEAD"];	
	_gogemitter setParticleCircle [0.0, [0, 0, 0]];
	_gogemitter setParticleRandom [0, [0.5,0.5,0.5], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];
	_gogemitter setParticleParams 
	[["\A3\data_f\ParticleEffects\Universal\Refract",1,0,1],
	"",
	"Billboard", 1,0.05, [0,0,0], [0,0,0], 1, 1, 0, 0,[0.1],[[1,1,1,1]],[0], 0, 0, "", "", _logic];
	_gogemitter setDropInterval _int;    
	sleep 0.5;
	deletevehicle _gogemitter;
	deletevehicle _logic;
	};
	
// Array of precalculated random position offsets
tpw_snow_fnc_snowpos = 
	{
	tpw_snow_snowpos = []; 
	for "_i" from 1 to 1000 do
		{
		private _dir = random 360;
		private _dist = random 20;
		tpw_snow_snowpos pushback [(_dist * sin _dir),(_dist * cos _dir),0];
		};
	};

// Single snowflake position and spawn	
tpw_snow_fnc_singlepos = 
	{
	private _playdir = _this select 0;
	private _min = _playdir - 30;	
	private _dir = _min + random 60;
	private _dist = 5 + random 10;
	private _offset =  [(_dist * sin _dir),(_dist * cos _dir),0];
	private _pos = eyepos player;
	private _lowpos = _pos vectoradd _offset;
	private _highpos = _lowpos vectoradd [0,0,30];
	// Emitter cover checks 
	if (!lineintersects [_lowpos,_highpos]) then
		{
		[_lowpos vectoradd [0,0,(random 3)]] spawn tpw_snow_fnc_snowemitter;
		};
	};	

// Array of exposed positions around player	
tpw_snow_fnc_expos =  
	{
	private _temppos = [];
	private _pos = eyepos player;
	for "_i" from 0 to count tpw_snow_snowpos - 1 do
		{
		private _offset = tpw_snow_snowpos select _i;
		private _lowpos = _pos vectoradd _offset;
		private _highpos = _lowpos vectoradd [0,0,30];

		// Emitter cover checks 
		if (!lineintersects [_lowpos,_highpos]) then
			{
			_temppos pushback (_lowpos vectoradd [0,0,(1 + random 3)]);
			};
		};
	tpw_snow_expos = _temppos;		
	};

// Fixed emitter for fast snow spawning	
tpw_snow_fnc_fastsnow =
	{
	private _spd = abs (ceil speed player);
	private _dst = _spd / 5; // snow box further away if faster
	private _snowEmitter = "#particlesource" createVehicleLocal [0,0,0];
	private _logic	=  "logic" createVehicleLocal [0,0,0];
	_snowEmitter attachto [_logic, [0,0,0]];
	_logic attachto [vehicle player, [0,_dst,1]];
	_snowEmitter setParticleCircle [0.0, [0, 0, 0]];
	_snowEmitter setParticleRandom [0, [2,2,2], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];
	_snowEmitter setParticleParams [["\A3\data_f\ParticleEffects\Universal\Universal", 16, 12, 1,0], "","Billboard", 10,10, [0,0,0], [0,0,0], 1, 0.0000001, 0, 20,[0.02],[[1,1,1,1]],[1000], 0.2, 0.2, "", "",_logic];
	_snowEmitter setDropInterval 0.2 / _spd; // more snow if faster  	
	sleep 1;
	deletevehicle _snowemitter;
	deletevehicle _logic;
	};	
	
// Spawn snow particles at exposed position
tpw_snow_fnc_snowemitter =
	{
	private _pos = asltoatl (_this select 0);	
	drop [["\A3\data_f\ParticleEffects\Universal\Universal", 16, 12, 1,0], "","Billboard", 10,10, _pos, [0,0,0], 0, 0.01,0, 10,[0.05],[[1,1,1,1]],[0,0], 0.2, 0.2, "", "", ""];
	};

// Random position for snow emitters
tpw_snow_fnc_snowscan =
	{
	private _time = (_this select 0) + 0.49;
	private _spd = _this select 1;
	private _posct = count tpw_snow_expos;
	while {time < _time} do
		{
		[tpw_snow_expos select floor random _posct] spawn tpw_snow_fnc_snowemitter; // random snowdrop around player
		if (_spd > 6) then
			{
			[getdir player] spawn tpw_snow_fnc_singlepos; // random snowdrops in direction of movement
			sleep 0.01;
			};
		sleep 0.01;
		};			
	};

// Main snow loop	
tpw_snow_fnc_snow =
	{
	while {true} do
		{
		// Conditions for snow
		if (alive player && {(eyepos player) select 2 > 0} && {diag_fps > 25}) then 
			{
			// Kill wind and rain
			0 setrain 0;
			0 setwindstr 0;
			
			// Player under cover?
			private _cover = false; 
			private _ep = eyepos player;
			private _epc = _ep vectoradd [0,0,30];
			if (lineintersects[_ep,_epc]) then
				{
				_cover = true;
				};
				
			// Snow droplets on goggles
			if (cameraview != "external" && {!_cover} && {player == vehicle player}) then
				{
				[] spawn tpw_snow_fnc_goggledrops;
				};
				
			// Periodically change snow density
			if (time > tpw_snow_snowtime) then
				{
				tpw_snow_snowtime = time + random 300;
				tpw_snow_snowdensity = ceil random 10;
				};
			
			// Complex snow for slow movers
			private _spd = abs (ceil speed player);
			if (_spd < 20) then 
				{
				// Update spawn positions only if player has moved sufficiently
				if (tpw_snow_lastpos distance player > 5) then
					{
					[] call tpw_snow_fnc_expos;
					tpw_snow_lastpos = getposasl player;
					};
				// Place snow drops in exposed areas
				for "_i" from 0 to tpw_snow_snowdensity do
					{	
					[time,_spd] spawn tpw_snow_fnc_snowscan;	
					};
				} else
				{
				// Simple snow emitter box for fast movers
				[] spawn tpw_snow_fnc_fastsnow;
				};
			};
		sleep 0.5;	
		};	
	};	
	
// RUN IT
[] spawn tpw_snow_fnc_snow;	

 

This script will cause snow regardless of temperature or overcast. If you run it in your mission init then it will start snowing immediately. You will need to set  tpw_fog_cansnow = 0; in the HPP to disable TPW FOG's snow functions which would otherwise interfere.

 

Hope this helps.

  • Like 2

Share this post


Link to post
Share on other sites

@tpw Thanks for the explanation! And that standalone script is exactly what I'm looking for! 

 

Two quick questions (and sorry, one of them is very noobish). With the script, can I totally disregard in-game weather settings in the editor? If vanilla fog/rain/etc is set to zero, this will still force snow?

 

And to call the script, just name it something like snow.sqf and in my init.sqf use [] execVM "snow.sqf"; ?

Share this post


Link to post
Share on other sites

Quick answer to both questions, yes!

  • Like 1

Share this post


Link to post
Share on other sites

// RUN IT
[] spawn tpw_snow_fnc_snow;

 

Sorry for needing my hand held on the script. :( Is that part supposed to be left in or am I supposed to remove it and just call the rest of the script above it? I copied the script in full exactly as it was written, including the last part, and naming it snow.sqf and calling it in my init.sqf using [] execVM "snow.sqf"; and I get some script errors about undefined variables in expression. If I remove the RUN IT part at the bottom the script errors stop but it also doesn't snow, at least not after a couple minutes starting the mission a few times.

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

×