Mission Conditions Selector

From F2 EN
Jump to: navigation, search

Description

In order to allow different time and weather conditions to be selected each time the mission is played, two selectors are made available in the mission parameters screen.

Required files

All the code associated with this component is found in:

  • description.ext
  • init.sqf
  • stringtable.xml
  • f\common\f_processParamsArray.sqf
  • f\common\f_setMissionConditions.sqf

How to use

Available conditions: Time of Day

By default, the following time of day options are available:

OptionTime of Day
0Dawn
1Early Morning
2Morning
3Noon
4Afternoon
5Evening
6Dusk
7Night

Available conditions: Weather

By default, the following weather options are available:

OptionWeather
0Clear
1Overcast
2Light Fog
3Heavy Fog
4Storm

Default selections

The default selections are Noon and Clear.

Changing the default selection: Time of Day

Open the file description.ext and look for the following lines:

class f_param_timeOfDay
{
title = "$STR_f_param_timeOfDay";
values[] = {0,1,2,3,4,5,6,7};
texts[] = {$STR_f_param_timeOfDay_Option0 ...
default = 3;
code = "f_param_timeOfDay = %1";
};   

Change the value of default to the desired option number (see table above).

Changing the default selection: Weather

Open the file description.ext and look for the following lines:

class f_param_weather
{
title = "$STR_f_param_weather";
values[] = {0,1,2,3,4};
texts[] = {$STR_f_param_weather_Option0 ...
default = 0;
code = "f_param_weather = %1";
};  

Change the value of default to the desired option number (see table above).

Tips

  • The options have also been translated into English, Czech, German, Polish, Spanish, French and Russian (using text strings contained in the file stringtable.xml); players using copies of ArmA2 released in those languages will automatically see the options in translated form.

How to disable

Open the file description.ext and look for the code segment entitled:

// F2 - Mission Conditions Selector

Delete everything from the above line (including the line itself), to the next instance of:

// ===================================================================

Open the file init.sqf and look for the code segment entitled:

// F2 - Mission Conditions Selector

Delete everything from the above line (including the line itself), to the next instance of:

// ===================================================================

In the editor, open the Intel: dialog (by clicking on the date in the top-right) and change the values for the Date: and Time: fields, as well as the Weather: and Fog: sliders, to reflect your desired mission conditions.

Credits

  • Fer
  • Messiah2
  • white angel
  • Mike84
  • Donnervogel (translator)
  • Serclaes (translator)
  • Messiah2 (translator)
  • Gaia (translator)
  • FireflyPL (translator)
  • Kanotson (translator)
  • Varry (translator)
  • Mike