Jump to content
m0nkey

MKY Sandstorm script

Recommended Posts

It would seem I found things behaved differently than I had thought. It took a lot of playing around with different parameters before I saw it, but it explains things. Now the effect is better in one sense as there are fewer "dead zones", at least on foot. 

 

This first video just shows a lighter effect I am trying to get. The second video is 5 minutes of a heavy-ish effect and then a lighter effect, in different times of day and overcast (lighting basically). Its just to show the various looks this type of efx can achieve.

 

I am hoping to be very near the end of this stage and release a beta within the week.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

This is what I finished with. I have to tweak it still, the script that is. Some minor tweaks to how the sand efx can vary, but mostly on how the whole thing is implemented in the script. Its not as light as I had wanted originally, but then I found some new things out about PE's that I did not know about prior. The effect is very nice IMO. Alpha is finished, working on beta release 1 now.

 

  • Like 1

Share this post


Link to post
Share on other sites

Dude these look amazing. I'm currently working on a cinematic and I am definitely going to be using this script (whenever it comes out) for most of my desert maps. Keep it up!

Share this post


Link to post
Share on other sites

So here is the first beta. Its too thick, its not supposed to be lol. But it looked really cool with huge "sand clouds" developing. More weird particle behaviours to unlock it would appear. (sigh)

 

But, I do have a good start on getting the wind to die down (used 1212's snippet as a starting point, thank you) and on (finally) keeping the particles consistent when getting in/out of vehicles (again, it was particle behaviour that I only found by tweaking over and over). I have the vehicles keeping the effect to a small degree. If you drive as fast as you can in a hunter/atv you simply outrun it, but for tracked vehicles and a moderate speed, its working fairly well.

 

Check it out.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Here is what I have come up with for a "light" effect. Right now I have 4: light/moderate/heavy/random. The moderate/heavy are easy, and the effect is really neat. The random is also great. But it can get to be a little much, so I wanted something that does not hinder any game styles at all, or minimally.

 

What does anyone think about the strength/opacity of this? Seem right for a rather non-obtrusive effect?

 

  • Like 3

Share this post


Link to post
Share on other sites

Here is what I have come up with for a "light" effect. Right now I have 4: light/moderate/heavy/random. The moderate/heavy are easy, and the effect is really neat. The random is also great. But it can get to be a little much, so I wanted something that does not hinder any game styles at all, or minimally.

 

What does anyone think about the strength/opacity of this? Seem right for a rather non-obtrusive effect?

 

AWESOME!!!...now..'nuff with testing..release the damn thing..LOLLLL

  • Like 1

Share this post


Link to post
Share on other sites

LoL, you will get your wish very soon indeed. Here is a little sample using MCC4 on Shapur with what I will call my "final for now" blowing sand effect. This is the "light" effect, which I could optimize further, but I have other things to do IRL so its going to suffice. It looks nice, is not too bad on resources. Tried it in a 7 player LAN coop over the holidays, and it seemed to work fine on everyones machine. The dedi server only needed to give everyone an array so that the wind blew from the same direction for all clients. Other than that its pretty much all client side. The other effects (random/heavy/moderate) have not been fully tweaked to my likings, but its still nice.

 

I will clean up the code, comment it out some more (for my sake as well, cannot remember it all) for the scripters out there, and then put together a sample mission. Should be ready this weekend sometime unless something unforseen distracts me.

 

To whet your appetite ;)

 

  • Like 2

Share this post


Link to post
Share on other sites

LoL, you will get your wish very soon indeed. Here is a little sample using MCC4 on Shapur with what I will call my "final for now" blowing sand effect. This is the "light" effect, which I could optimize further, but I have other things to do IRL so its going to suffice. It looks nice, is not too bad on resources. Tried it in a 7 player LAN coop over the holidays, and it seemed to work fine on everyones machine. The dedi server only needed to give everyone an array so that the wind blew from the same direction for all clients. Other than that its pretty much all client side. The other effects (random/heavy/moderate) have not been fully tweaked to my likings, but its still nice.

 

I will clean up the code, comment it out some more (for my sake as well, cannot remember it all) for the scripters out there, and then put together a sample mission. Should be ready this weekend sometime unless something unforseen distracts me.

 

To whet your appetite ;)

 

YOU'RE a BAD BOY, my friend!!!

Whet my appetite?? You got me begging for food at the corner of the streets..HAHAHAHAHA...

​Excellent job, and since I'm WIP on a mission in Shapur this come in perfect time...THANK YOU MAN!!!!!!

  • Like 1

Share this post


Link to post
Share on other sites

I tried publishing it to steam. We will see if that works or not. Its a template on Shapur for MCC4. You can DePBO the mission to see how to use it in a script. Pretty easy really. At least to me.

 

Here is the "random" effect on Zargabad. I have not used MCC much so its not very entertaining...

 

Share this post


Link to post
Share on other sites

I give up. I was a steam holdout for years and years, and this is why. I can code in multiple languages, I can build and fix complex systems IRL, but clicking on a few buttons that I followed directions on explicitly fails. It reminds me why I dislike steam/origin/apple and all that "you must do it this way" stuff...

 

I will post the mission up later.

 

EDIT: Steam sux, would not let me publish it for some reason. Here it is though.. in pbo and zipped format

 

https://app.box.com/s/asfzhdstutxxzj76grkpxovyq2i73fms

  • Like 1

Share this post


Link to post
Share on other sites

On it. In Love.
I have more contrast on screen settings but... Thank you, So beautiful. (Heavy param' for particle + LUT's Desert)

 

ello-49763473-a344-4dd2-8321-bf6c8713143

EDIT:
 

This script release is not easy to port for newbie, right now... x)
No problem for using on Altis in a personnal mission was working on since few days. (And, again : Thank You ! Really, it's just a big immersion step for Arma community.)
But, i've trying to add this on Mogadishu on a clear map with no other script. (trying with mcc too). Impossible. I've add : "Mog" & after "Mogadishu" in the array for terrain, but nothing happen's. Maybe im wrong, Maybe its a problem...? Filename is Mog.pbo
Any idea...? :/
Thank you again for this work Monkey


 

Share this post


Link to post
Share on other sites

It works like this.

 

In description.ext, you must define the music for the script for the "wind" to work. This uses the class CfgMusic. This does not have to be located in description.ext, but it often is. If you are tweaking anothers work and the sound gives issues, download an app called dngrep and use it to search the entire mission directory for "CfgMusic". Then you can add it in the proper place. As an example the mission All Out Warfare Coop 21 by Cruioss had the CfgMusic in the zombie script of all places, so I just put my audio config entries where that was at. If you follow.

 

Once you get the CfgMusic defined for the wind, all you really have to do is execVM two scripts.

 

The first is MKY_Sand_Server.sqf, and it just gets a wind direction and creates an array. A server would also publicize that array to clients.

ie. nul = [] exexVM "MKY\sand\MKY_Sand_Server.sqf";

 

The second is MKY_Sand_Client.sqf. This is the real workhorse. The parameters are as follows (from the .sqf file)

///////////////////////////////// m0nkey sand client /////////////////////////////////////
/*
_this:
0 - array  - fog data  -- ie. [.3,.5,200] -- use 0 to ignore (can omit)
1 - integer  - overcast   -- use "" to ignore (can omit)
2 - boolean  - use ppEffects (default is false) -- (can omit)
3 - boolean  - allow rain (default is false)  -- (can omit)
4 - boolean - enforce wind dir/strength (default is true)  -- (can omit)
5 - boolean  - vary fog effect (default is true) -- (can omit)
6 - boolean - use wind audio file (default is true) -- (can omit)
7 - integer - effect strength 0-random, 1-light, 2-moderate, 3-heavy -- (can omit)
NOTE: omitting a value means you can stop there and not have to list the remaining parameters (defaults will be applied)
 
EXAMPLES:
0 = [[0.23,0.021,100],"",true] execVM "script.sqf"; // fog, no overcast change, use ppeffects, (no rain)
0 = [0,.3,false,true] execVM "script.sqf"; // no fog, .3 overcast, do not use ppeffects, allow rain
0 = [0,"",false,true,false] execVM "script.sqf"; // no fog, no overcast change, do not use ppeffects, allow rain, do not enforce wind
0 = [] execVM "script.sqf"; // no fog, no overcast change, do not use ppeffects, no rain, enforced wind (direction & strength)
 
NOTES:
fog array values [overall fog density, amount of dissipation with altitude, altitude]
using [0.25,0,5] will create a thick, low fog that does not dissipate - same from top to bottom
using [0.25,1,5] will create a thick on bottom and hazy on top fog
these values [0.23,0.021,60] will give a nice thick distance fog while allowing a few hundred yards of some visibility
when allowed to vary the fog effect, this script will try to maintain the altitude of fog that you gave
this means if you gave [.2,.1,10] that you would not see the fog most likely at 50m altitude (a hilltop)
vary fog means to periodically reset its altitude to match the players
using fog with snow works great, with sand its a mixed bag IMO.
*/

In my sample mission, the actual syntax I have been using is this 

0 = [0,"",true,false,true,true,true,(paramsArray select 0)] execVM "MKY\sand\MKY_Sand_Client.sqf";

the last value (paramsArray select 0) comes from the parameter array I made in description.ext

class Params {
class PEFX {
title = "Snow/Sand particle effects";
values[] = {0,1,2,3,4};
texts[] = {"Random","Light","Moderate","Heavy","Disabled"};
default = 1;
};
};

this way I can change it as I see fit prior to starting the mission. You could just hard-code one of the valid integers in there.

 

The rest of the code in init.sqf of my sample should be commented. I have an array that I list all worlds I want the sand EFX to work in. If the parameter array is not set to disabled and the current world is in the array of worlds I just mentioned, then it starts the server script, and waits. Then starts the client script when certain things are ready. The very last chunk is only some testing I was doing on the new stamina/fatigue stuff.

 

 

Your screenshot looks great. So you are using a combination of your monitors contrast and that program (I forget the name) that uses one of LUTs color schemes? You are not using any ppEffects? I apply one, you might want to comment that out of my client script and see what it does to your color effect. Interested to hear what you might be doing other than using that app. I have used that app, and I used to use sweetFx as well (they are similar), but found my monitor actually has one of its settings that do something similar.

 

EDIT: you can also PM me a link or something and I will make it work. And yes, if the world name is mission.mog.pbo, then you would put "mog" in that array, and it should work. But really if you put those two execVM lines in the init.sqf, it would also work. (don't forget about CfgMusic and paramsArray too ).

 

EDIT: Here you go. I created a mission on Desert (world name is Desert_E) and just put down a single rifleman (as player). Opened the mission directory, copied in the MKY directory and then created an init.sqf with this

if (isServer) then {
nul = [] execVM "MKY\sand\MKY_Sand_Server.sqf";
};
if (hasInterface) then {
0 = [] spawn {
waitUntil {sleep 5;!(isNil "varEnableSand")};
// call the sand client script, using params array as input for type/strength of the EFX
// look at MKY_Sand_Client.sqf for details on the parameters
0 = [0,"",true,false,true,true,true,0] execVM "MKY\sand\MKY_Sand_Client.sqf";
};
};

Thats it. You don't really need the music or paramsArray if you don't want. Actually, I could have modified the parameter for the client script to make the audio use as false, that would have been "better", but it works regardless.

ie. 0 = [0,"",true,false,true,true,false,0] execVM "MKY\sand\MKY_Sand_Client.sqf";

  • Like 2

Share this post


Link to post
Share on other sites

Ok ! My mystake was in the init.sqf with the exec of the sandserver! It works ! THANKS ! 
And now, i see your second Edit....... '-___- 
i just use LUT's, ( heavy param was the setting of your script ;), bad english, sorry.. ) and Lut's integrate sweet fx it seems. (I have clean my sweet fx files before installing Lut's, and is back and load at launch of arma. So... )
I have 2 screenshot, one with LUT's and your PP, and the second without LUT's.
And... Damn....
I'ts so mad with this script. ( screenshoot with the appPhoto of the official arma editor preview )

ello-32a0cdf4-f865-4c0a-b9fd-c60f149970b

ello-830e2fe6-3cee-4d67-bda7-61c5f6b7e7e

  • Like 2

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

news_download_a3_3.png

MKY Sandstorm script v1.0

** Armaholic now supports authors with donation button/links. When you have any donation/support links please contact me!

@iWazaru

I hope you dont mind but I added your screenshot to the Armaholic page, with credits!

Share this post


Link to post
Share on other sites

This is great dude.  Thanks for sharing.  Stupid question i guess...does this affect AI view like arma fog does?

  • Like 1

Share this post


Link to post
Share on other sites

Looks awesome, definitely want to use it if it doesn't create imbalance vs AI.  Do we have any authoritative view on whether or not the AI are affected on a dedicated server?

 

Good work thus far!

Share this post


Link to post
Share on other sites

This is great dude.  Thanks for sharing.  Stupid question i guess...does this affect AI view like arma fog does?

Asking myself the same question..

Share this post


Link to post
Share on other sites

This is great dude.  Thanks for sharing.  Stupid question i guess...does this affect AI view like arma fog does?

 

it seems the script use official bohémiah frog particle... So, Ai must be affect. An overall permanent tweakable frog activable and totally adjustable, and some particle of frog in the sand fx himself if im right. So, Some tweak in the script needed for adjust to context of mission, but it's affect IA, as Bis smoke grenade.... After a lot of test, it seems for Close range mission, the script is not perfectly adjustable for now. Or maybe im just not doing this in the right way. You always can level down competence of ai, i've made a mix of this all, and my eyes have some stars inside... ( Sorry for langage, nativ French, bad english, not really time now for battle with ggleTrans..)

Share this post


Link to post
Share on other sites

Thanks for the positive feedback. 

 

Concerning the effect on AI, that is unknown for sure to me.... however, here is what I know (or think I know, always open for correction)

 

A particle comes in two types: spaceobject and billboard. A spaceobject would be like a piece of flying paper, that has dimension and is affected by physx/objects. A billboard is basically a flat image or a set of images. Smoke for example is a set of different images that is cycled. Thats how explosions also work. The next thing that is done is to start the image out with a certain opacity and size, and vary that, for effect.

 

Now, the typical way to create effects like this are to look at the "universal particle array" (as seen on the wiki) and choose a particle that matches what you want (ie. a cloud, a spot of dust, a smoke, a stick) and then start messing with how many of it to "drop" at once or how large or what color. And thats the way you do it.

 

However, I found a thread on the forum that had developers mentioning that if you were to spawn a particle emitter that was of a class found in CfgCloudlets (whose effect you might not want) and then used a script command to "set its class" (change the particle type and parameters) to what you wanted, the particle would inherit values/parameters from the original parent. And one of these values happens to be 

blockAIVisibility = true; //sets if particles are in the AI visibility tests (default true) - false for better performance but AI is able to see through particles

So, since I base this effect off of "HousePartDust" class, which does not have blockAIVisibility in its parameters, which means it should be default true, then, logically, one should think it affects AI visibility.

 

The real question is, and I have seen no answer yet for this, is does blockAIVisibility valid for client/server situations? Is it MP compliant? I don't know. I only know that most methods/examples/scripts I had looked at regarding particles were not using a parent, and I decided that since it was easy enough to do and more or less "guaranteed" that blockAIVisibility would be true, thats how I did it.

 

In regards to the effect and its strength, its quite complicated. I basically chose a square box in which to surround the player. The EFX needs to be both close and distance to look right. I tried emitters that were both close and far (as seen in some of the videos) but the effects seemed to all have issues remaining consistent. In the end it was a square, that always rotates towards the wind so that the particles blow with the wind. Its then a matter of how far out each side is, and coloring/sizing/randomizing. The dropIntervals are not that far apart on the different levels of EFX and indeed I have found that there are other factors that play perhaps a larger role than just how many particles you dump at once with the dropInterval.

 

I am quite sure that my snow effect will drastically improve when I apply what I have learned from sand to snow haha. Now, if only I had a complete tutorial beginning to end on how to create an addon step by step. I am no slouch in pc related things, but sometimes I lose desire when I know I will have to hunt and peck to find what I would think is a simple answer :)

 

EDIT: I still cannot get steam to accept the mission. It keeps telling me to agree to the workshop license which always shows as a green check "completed". lol, good thing Foxhound is a veritable machine, finding these things at gigahertz speeds and putting them up for others ;)

  • Like 2

Share this post


Link to post
Share on other sites

Great - thanks for yr work  :)

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

×