Sign in to follow this  
Followers 0
Emton

Can I set current date and a fixed time?

12 posts in this topic

Could anyone help I want to have the mission start using the current date (month and day) and a fixed time 6:00am. I can use static time and set 6:00am easy but I want the day to change so that the moon cycles. I use 6:00 am because with 4 hour restarts and setTimeMultiplier set to 6 the game goes through 24 hours in 4 hours. Works good to match the restart of 4 hours. Can I use real time for the month and day and also set the time or the other way around (use static time and set the month day)?

Share this post


Link to post
Share on other sites
Advertisement

yes sir I'm aware of the file I'm asking if I can have the Day and Month change while keeping the time static. So the mission starts at 6:00 am and the day is whatever the current date is... So I can have a moon cycle and keep the time multiplier and so the mission always starts same time and the restart comes at the same time...

Share this post


Link to post
Share on other sites

If you want the time to be static then just set the multiplier to 0

Still not quite sure what you are trying to do, but to change the date every day, it's doable, but not fun.

Personally I would set up some automation, windows DS for the game server and pbo compiler, and a linux vm, or (shit i just reformatted and cant remember) a nix shell for windows (as long as it can sed)

From there you need to set up some bash scripts, and some batch scripts to trigger the bash scripts, use sed or equivalent to change the day and month in the config file, then pbo it with a batch file, then restart server.

Share this post


Link to post
Share on other sites

Real simple what I'm saying here. I need the time static with the setTimeMultiplier set to 6. This makes 24 hours = 4 hours. Server restarts are 4 hours, so the time starts where it left off at the restart (not possible with realtime). I just want the day and month set to the current day and month when the mission starts so that I'll have the moon cycle.

The code in the file says "staticTime[] = {2016,1,23,6,0};  Is there something I can put in there to make it set the current day and month and set 6:00am. The example page only has 2 examples, just wondering if other options can be used. https://community.bistudio.com/wiki/setDate

Share this post


Link to post
Share on other sites
3 hours ago, Emton said:

I just want the day and month set to the current day and month when the mission starts so that I'll have the moon cycle.

is the server you are using windows or linux based? I only ask because I'm assuming you want this to be automated so you don't have to manually change it every day.

 

Sadly, you might be chasing a dragon so to speak.

http://feedback.arma3.com/print_bug_page.php?bug_id=2291

Share this post


Link to post
Share on other sites

Yea I'm not interested in manually setting the date each day or setting up scripts and VM linux servers just to have a moon cycle. Only looking for a simple command to put in the "staticTime[] = {2016,1,23,6,0}" if one is available. I'm in Windows 8.1 I'm not so concerned about the accuracy of the moon phase, I just think it would be more interesting for the moon to go through it's phases (even if it's not accurate). If this isn't possible I'm just gonna leave it on a full moon date...

Share this post


Link to post
Share on other sites

I only mentioned a vm linux because sed is so awesome at changing text. I'm sure there is a windows equivalent that could probably work.

 

I haven't tested this or played with the setdate command, it looks to be exactly what you need to change the date without editing the mission pbo (which we don't want to do for numerous reasons) I would test this approach first by just logging into rcon and issuing the setdate command just to make sure everything will work correctly before spending time making a script to automate it.

You could possibly do this from within your restart script. Not sure if this would be the correct way to do it, but you could create a script to log into rcon, and run the setdate command. In linux it would look something like this (and I'm paraphrasing here)

#1/bin/bash

year=`date +%Y\`

month=`date +%M\`

day=`date +%D\`

./rcon
echo 'setdate [$year, $month, $day, 16, 0];'

Edited by wasti

Share this post


Link to post
Share on other sites

Oh my it seems the moon phase is indeed way off, I set it for 1-23-2016 which is a full moon and this is what it gives

http://imgur.com/OUfUJL7 This is a travesty now I'm so ashamed of Arma I feel like I'm playing an arcade game

Thanks wasti that script idea seems interesting I wish I knew enough to make it work. Here's the restart script I use:

@echo off
title Super Vanilla Exile

set /a var=1

:start
:: shutdown all other arma 3 process including the Headless client 
taskkill /IM arma3server.exe > NUL:

echo Boot #%var%

:: Launch command. EDIT THIS !
:: DO NOT REMOVE --> START "" /WAIT <--
Start "" /wait "S:\Arma 3 Server\arma3server.exe" -port=2302 "-bepath=S:\Arma 3 Server\battleye" "-config=S:\Arma 3 Server\cfg\config.cfg" "-cfg=S:\Arma 3 Server\cfg\basic.cfg" "-profiles=S:\Arma 3 Server\profiles" -name=SuperVanilla "-mod=heli;kart;mark;@Exile" "-servermod=@ExileServer" -enableHT -high -world=empty -noPause -skipIntro -nosplash -noSound -loadMissionToMemory -autoInit

set /a var+=1
cls
goto start

So you think something might work by sending the rcon command after the serer inits? Dang I wish I was smarter about these things

Edited by Emton

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.