Jump to content
  • 0

[Solved] Another day/night question. (Custom day/night without many hive.inis)


Sandbird

Question

I am trying to tweak the date/time in my test server to achieve the following.

Morning starts around 6-7ish and the day last all day till about 22:00..

I've been reading everything i could get my hands on but all i find that come close to that are 3, 4 hive.inis that you switch on restarts.

Is there an easy way of doing this ? Like set the date of the server somewhere in July and just let it work its magic on its own....since summer has the longest days.

-thanks

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Hello, why do you want to have day light until  22.00?

 

Cause now set up on Local time (GMT+0) it gets dark at 4:30, and setting it up on Custom, cant get a good value to achieve the above.

Players want night...they just dont want it that soon.

Link to comment
Share on other sites

  • 0

Why not using a time control mangament like @Donovan?

 

You can either increase or decraese the time's speed.

 

 I would recommand just going static at some hours and you can do the math to make day light : starting hour -> 4pm30 or so

Link to comment
Share on other sites

  • 0

 

Yeah i know about the real date thing. I think though that time doesnt dynamically change once the mission has started unless i use a mod like Jey says.

 

Why not using a time control mangament like @Donovan?

 

You can either increase or decraese the time's speed.

 

 I would recommand just going static at some hours and you can do the math to make day light : starting hour -> 4pm30 or so

 

So basically the only solution is having different hiveext.inis right?

During the day have it at static and towards the night switch to a regular local time

 

If set to static the day/night is stuck to that time right ? Or does it continue the day/night cycle from 'that' hour ?

Link to comment
Share on other sites

  • 0

 

Right, i forgot about that one....so i could make it static lets say at 10:00.

And make a check in server init.sqf using kk's .dll to see about what 'real' time it is....so when the next server starts in 3h i could switch it to 12:00

After 3h again, when it would normally start to get dark in game, i could setDate to 14:00 and so on and so on, till i get my loooonger day and shorter night :)

Right?

Link to comment
Share on other sites

  • 0

Yeah i know about the real date thing. I think though that time doesnt dynamically change once the mission has started unless i use a mod like Jey says.

 

 

So basically the only solution is having different hiveext.inis right?

During the day have it at static and towards the night switch to a regular local time

 

If set to static the day/night is stuck to that time right ? Or does it continue the day/night cycle from 'that' hour ?

 

What I have on our server is Donovan script. Server starts at 8 AM and after 3H it is 5PM or so( so night starting) and then the 1sec RT <=> 6.666 sec.

Link to comment
Share on other sites

  • 0

I ended up using the real_date.dll by KK, and changed my server_timeSync to this:

// Day till 21:00 then fullmoon nights

server_timeSync = {
    //Send request
    private ["_hour","_minute","_date"];
    
        //Get real server time
        _date = call compile ("real_date" callExtension "");
        _hour = _date select 3;
        _minute = _date select 4;
    
        if (_hour >= 0 and _hour < 10) then {     //Fullmoon
            _date = [2013,8,3,_hour,_minute];
        };
        
        if (_hour >= 10 and _hour < 21) then {   //Day till 21:00
            _date = [2013,8,3,10,_minute];
        };
        
        if (_hour >= 21 and _hour <= 23) then {  //Night starts at 21:00
            _date = [2013,8,3,15,_minute];
        };
            
        setDate _date;
        PVDZE_plr_SetDate = _date;
        publicVariable "PVDZE_plr_SetDate";
        diag_log ("TIME SYNC: Local Time set to " + str(_date));    
};
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...