Jump to content
Sign in to follow this  
ColonelSandersLite

ARMA Script:Dynamic Weather and Time Flow Modifier

Recommended Posts

Dynamic Weather:

Weather is randomised and changes depending on the interval specified by the calling script.

Time Flow Modifier:

Environmental time is accelerated by whatever degree the is passed to the script. This only effects the environmentals, and not the actual game play speed.

CSL_Dynamic_Weather_and_Time_Flow.Sara.rar

Been pretty busy. Just thought I'd put this small release out there, for the benefit of any who wish to use it.

Tested as single player compatible only. Untested in MP, since I don't have 2 machines capable of running arma, I'm unable to do the requisit testing. My *guess* is that the time flow accelerator will be mp compatible, but the weather randomiser isn't.

Update:

I foolishly left some debugging output in one of the scripts. It's removed now. Simply redownload it if your version does this.

Share this post


Link to post
Share on other sites

That link you gave, we need to register and the bottom button of the registration page isn't working.

Can you host it somewhere else?

Share this post


Link to post
Share on other sites

That place sucks. Put it up on armamods or something similar. Or simply show the script.

Marcus

Share this post


Link to post
Share on other sites
That place sucks.

OFPEC sucks? I should think not. They're currently rebuilding, but by no means does OFPEC suck. No matter though, if there's more demand for it, I'll look into setting up an account with someone like armamods. Frankly though, it's never actually come up before.

If you're having problems getting an ofpec user name, be sure and email admin@ofpec.com. Could be that they're working on the user signup area right now.

For any of my work though, if you'd like it e-mailed to you, just drop me a PM with your e-mail address and what you're wanting.

Share this post


Link to post
Share on other sites

I thought this was a script? Why not just post it here.

Tastes are different, i liked the old site, the "modified" is different. Now ArmaMods is the best.

Marcus

Share this post


Link to post
Share on other sites

Tested as single player compatible only guys. Untested in MP. Since I don't have 2 machines capable of running arma, I'm unable to do the requisit testing. My *guess* is that the time flow accelerator will be mp compatible, but the weather randomiser isn't. This is now noted above.

@marcusm_uk

It's actually 2 scripts, an init sqs, a supporting function, and a demo mission. It's just a little bulky to just post here in text format. As I said though, anyone can feel free to PM me an e-mail address, and I'll be sure and send them anything they like.

Share this post


Link to post
Share on other sites

I glanced at the script it isn't MP compatiable.

The weather will be inconsistent between clients and the time accel will eventually get out of sync between clients.

In the weather you need to setup a section for the server to run the random numbers and publicvariable the results to the clients.

For the time accel you need to have the server broadcast when the time skips are performed so all the clients do it at the same time. Due to network lag you would need to keep the updates further apart as well.

Share this post


Link to post
Share on other sites

Here's a MP compatible time accelerator i've written for OpF:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

SkipTime (random 22);

Stime = daytime

#timeloop

~0.1

;Daycycle

?((local Server) AND (daytime >= 5.5) AND (daytime <= 18.5)): goto "dayskip"

;Nightcycle

?((local Server) AND (daytime > 18.5) OR (daytime < 5.5)): goto "nightskip"

;Client timeshift to keep up with the server

?(Stime > daytime):skiptime (Stime - daytime);

goto "timeloop"

#dayskip

skiptime 0.00036

Stime = daytime

publicVariable "Stime"

timephase = "Day"

goto "timeloop"

#nightskip

skiptime 0.00036

Stime = daytime

publicVariable "Stime"

timephase = "Night"

goto "timeloop"

Untested for ArmA yet. A gamelogic named "Server" is needed. If someone wants to rewrite it/ include random weather changes be my guest.  smile_o.gif

Share this post


Link to post
Share on other sites
)rStrangelove @ Jan. 10 2007,10:27)]Here's a MP compatible time accelerator i've written for OpF:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

?!(local Server):EXIT;

;Skips Daytime and Nighttime at different intervals (to raise fun a bit)

;Day and Night will last 1 hour each

~1

timephase = ""

#timeloop

~0.1

;Daycycle

?((daytime >= 5.5) AND (daytime <= 18.5)): goto "dayskip"

;Nightcycle

?((daytime > 18.5) OR (daytime < 5.5)): goto "nightskip"

goto "timeloop"

#dayskip

skiptime 0.00036

timephase = "Day"

goto "timeloop"

#nightskip

skiptime 0.00036

timephase = "Night"

goto "timeloop"

Untested for ArmA yet. A gamelogic named "Server" is needed. If someone wants to rewrite it/ include random weather changes be my guest.  smile_o.gif

Works in arma.

Share this post


Link to post
Share on other sites
Works in arma.

Did you test this on a dedicated server?

I was under the impression that skiptime is a command that has to be run locally on clients. This script appears to just run the commands on the server and not on the clients.

For JIP I would guess a 1-time skip would need to be performed to catch up with the server and other clients and then get in sync with everyone else.

Share this post


Link to post
Share on other sites

Surley if its running from the server people that join into the game will be running on the servers time anyways right?

Share this post


Link to post
Share on other sites

Sorry guys, i'm such an idiot. I've edited my post with the right version of the script. It should run fine in MP this time. tounge2.gif

Share this post


Link to post
Share on other sites
Surley if its running from the server people that join into the game will be running on the servers time anyways right?

No, clients do not synchronise constantly their time with the server smile_o.gif

My findings up and until now is that when you join the server.... the time is synchronised with the server, after that.. it's all for themselves smile_o.gif

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
Sign in to follow this  

×