Jump to content
 EO

Mission Parameters: Winter, Spring, Summer, Autumn possible?

Recommended Posts

Like the title says, is it possible to give the player a choice of what time of the year (Winter, Spring, Summer, Autumn) the mission is played out in.

I've searched through the Mission Parameters wiki but there doesn't seem to be any options for dates.

From the available templates only time of day is supported....

class Params
{
	class Daytime
	{
		title = "Time";
		texts[] = { "Morning", "Day", "Evening", "Night" };
		values[] = { 6, 12, 18, 0 };
		default = 12;
		function = "BIS_fnc_paramDaytime";
	};
};

Would it be possible to create a new parameter for seasons of the year, maybe utilizing setDate/date commands?  

Share this post


Link to post
Share on other sites
6 hours ago, EO said:

Like the title says, is it possible to give the player a choice of what time of the year (Winter, Spring, Summer, Autumn) the mission is played out in.

I've searched through the Mission Parameters wiki but there doesn't seem to be any options for dates.

From the available templates only time of day is supported....


class Params
{
	class Daytime
	{
		title = "Time";
		texts[] = { "Morning", "Day", "Evening", "Night" };
		values[] = { 6, 12, 18, 0 };
		default = 12;
		function = "BIS_fnc_paramDaytime";
	};
};

Would it be possible to create a new parameter for seasons of the year, maybe utilizing setDate/date commands?  

 

there are no seasons in arma (spring, autumn, etc)

 

green trees are green trees.

 

the most you'll get is the sun position and sunrise/sunset time, and that the thermal imaging contrast changes with ambient temperature (winter is high contrast white/black while summer is lower contrast grey scale)

Share this post


Link to post
Share on other sites
8 hours ago, EO said:

Would it be possible to create a new parameter for seasons of the year, maybe utilizing setDate/date commands?  

 

Sure! Sort of. We can define "season" as "month" and go from there:

//description.ext

class Params
{
	class Month
	{
		title = "Month";
		texts[] = {"January","April","July","October"};
		values[] = {1,4,7,10};
		default = 4;
		file = "setMonth.sqf";
		isGlobal = 1;
	};
};
//setMonth.sqf

params ["_month"];
private _date = date;
_date set [1, _month];
setDate _date;

 

  • Like 1

Share this post


Link to post
Share on other sites

If you want to be able to set full time & date, something like this:

//description.ext

class Params
{
	class year
	{
		title = "Year";
		texts[] = { "2021", "2022", "2023" };
		values[] = { 2021, 2022, 2023 };
		default = 1;
	};
	class month
	{
		title = "Month";
		texts[] = { "January", "April", "July", "October" };
		values[] = { 1, 4, 7, 10 };
		default = 7;
	};
	class day
	{
		title = "Day";
		texts[] = { "1", "2", "3" };
		values[] = { 1, 2, 3 };
		default = 1;
	};
	class hour
	{
		title = "Hour";
		texts[] = { "0000", "0800", "1600" };
		values[] = { 0, 8, 16 };
		default = 8;
	};
	class minute
	{
		title = "Minute";
		texts[] = { ":00", ":15", ":30" };
		values[] = { 0, 15, 30 };
		default = 0;
	};
};
//initServer.sqf

private _year = (paramsArray select 0);
private _month = (paramsArray select 1); 
private _day = (paramsArray select 2);
private _hour = (paramsArray select 3); 
private _minute = (paramsArray select 4);

setDate [_year, _month, _day, _hour, _minute];

InitServer should work here, as all players will sync to the server time/date, but I haven't tested in a dedi environment.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@Harzach Perfect for what I need and works a treat, much appreciated. :rthumb:

 

2 hours ago, fn_Quiksilver said:

the most you'll get is the sun position and sunrise/sunset time....

 

Sun position, sunrise/sunset is exactly what I need for the mission.

It takes place on an Island where the long/lats are set near the Arctic Region, Polar Nights in the winter months, Twilight in the Spring months and Midnight Sun in summer months so having those parameters to change the month effectively allows the player to choose which "season" he plays out the mission.

 

Poor topic title and description on my part, I'm aware Arma doesn't support seasons. 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, EO said:

long/lats are set near the Arctic Region

 

I must tell you, Sullen Skies and Arctic Latitudes are on my essential list, along with Gorkas 'n' Gear when I'm playing Pilgrimage or some Ravage concoction. All the atmosphere!

  • Like 1

Share this post


Link to post
Share on other sites

Aww man I'm super stoked to hear that and there's a bit of SS/AL action going on in my upcoming mission.

Just want to thank you again for making something that wasn't initially possible 'possible', your code has literally added a new spin and feature to the Arctic Latitudes angle of the mission. :respekt:

  • Like 2

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

×