Jump to content
sexacutioner

Serious problem with server setting time to fix day/night issue

Recommended Posts

So last night I noticed a big problem in the time of day setting for a few servers.

I joined a server after dark in my timezone (TEX3) and noticed it was still daylight. The time in the game was just before sunset. I played for a couple hours and had to restart a few times because of death. After awhile I realized it just wasn't getting dark out.

The next character I played lasted longer and during this playthough it DID start to get dark out. I noticed someone on local chat mentioning how every server they join is daytime which years of Operation Flashpoint scripting made me think something was wrong here.

So while it was still dark for me I restarted my character on the SAME server (TEX3) and as I guessed the time was once again just before sunset. I asked in local chat if it was night or daytime for the other players in-game. Most people thought I was joking but a few reponded with varied results. The ones who just started it was just before sunset and for some playing longer it was dark out. One person said they had been playing for hours in the dark now.

I decided they messed up their script and joined another server. This one started up at the same time (just before sunset). I checked another and another and all servers began at the exact same time of day. I tried asking what time other people had in the game on these servers but people thought I was dumb and kept trying to explain timezones and different server times. It's probably a hard concept to realize if you've never scripted any Arma engine games but I assure you this is easily possible to mess up.

Every client on the server was running their own time of day. Night for some; Day for others.

So with the problem of people getting tired of always having to play day or always having to play night the server admins took it upon themselves to set the time. My guess is they put in code in the ini that players run when they start that sets the time which isn't synced throughout all clients. You need to keep the master time variable on the server and sync it with the clients when they join otherwise it won't work.

This is a hard problem to catch if you aren't looking for it because most people don't realize it's even possible for two players to have different times on the same server.

So keep an eye out. You could be playing in dark while the bandit down the road is in sunshine. This mod needs to implement a sped up time of day. People have normal life schedules and don't always want to have in-game time the exact same time. If it's not put in the mod the server admins will try to fix it themselves and break everything.

Share this post


Link to post
Share on other sites

Had this happen to me several times actually

No idea why, how or what to do to replicate it though :|

Share this post


Link to post
Share on other sites

No idea why' date=' how or what to do to replicate it though :|

[/quote']

It's not your game that's the problem, it's the server. My guess is they are using skipTime or something in the init that sets the time for new joins to a certain time of day. I saw someone say on a server that it runs 4x normal time, so they could be starting the server at a certain time and then adding a time amount in a loop to speed it up. What will happen though is new joins will be set to the starting time and their game will locally update time from their on out.

From the arma scripting wiki:

http://community.bistudio.com/wiki/skipTime

I cannot confirm this for OA 1.60 beta (85889):

MP: Even though the immediate effect of skipTime is only local,

the new time will propagate through the network after 30 seconds or so.

Instead the date, which includes time, is synced automatically for new JIP clients - NOT for present instances. So one has to apply skipTime on all instances in MP (server + all present clients).

They need to keep the time information on the server and sync clients on join. If speeding up time you need to sync the new time every so often too because of lag.

Share this post


Link to post
Share on other sites

I think the fact that server admins are using ugly scripting methods to avoid nighttime is a pretty good indication that something has to be done.

Share this post


Link to post
Share on other sites

There is only ONE time that is saved. This is done in the same moment when a server starts up.

Lets say a server restarted 6 PM. Now new players join and the time begins 6 PM.

But the server time does not change until you restart it again. That means that for first-time joiners the time moves like normal. But lets they after 4 hours (10PM) ppl can join and its 6 PM again for them.

Servers need to be restarted. I played on EU9 and they restart every 6 hours :P

The time is just not synced.

PS: If you find grammaticals errors, sorry, I'm German :P

Share this post


Link to post
Share on other sites

There is only ONE time that is saved. This is done in the same moment when a server starts up.

So is this an Arma II Join in Progress problem?

If so I suppose the fix would be to use something like this:

http://community.bistudio.com/wiki/6thSense.eu:EG#Determining_if_machine_is_Ingame_Server.2C_Ded_Server.2C_Player_or_JIP_Player

To determine if the player is a JIP in the init and then set the time for them.

Share this post


Link to post
Share on other sites

Exactly what I was thinking, a JIP issue. This problem can be solved very easily I would imagine.

Share this post


Link to post
Share on other sites

Also this:

http://community.bistudio.com/wiki/6thSense.eu:EG#Join_in_Progress

What is not synchronized at JIP

time or weather that was artificially changed; by skipTime, setDate, setOvercast and setFog

Which looks to me if you change the time through scripting it won't get synced unless you do something about it yourself. So if servers are trying to speed up time they need to sync the JIP people. Makes me wonder if it's raining for everyone at the same time too.

Share this post


Link to post
Share on other sites

I would prefer if every server writes their real timezone in their name cause somtimes they use an other timezone than their location

for example i live in germany and i joined an german server the time was about 11:30 am but as i spawned it was deep night and thats a real problem cause when i want to play at daytime i don't want to join freakin 5 servers only to realize it's night even if it should be daytime (sorry i don't remember the names of the server and about the whining)

Share this post


Link to post
Share on other sites

According to what I've just discovered that wouldn't matter since the time it will be when you join is only the time when the server was started, not the current time in their timezone.

Share this post


Link to post
Share on other sites

Another thing to consider is what time it is for the zombies. If there is a discrepancy between clients time, then server time is probably different too. So if the server time is dark then sometimes during the day the zombie's line of site is probably not always correct.

Too bad this is such an easy thing to fix, but not obvious enough to bother.

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

×