Custom Info – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(created - WIP -)
 
(Added examples)
Line 7: Line 7:
Forum topic: [https://forums.bistudio.com/topic/200468-jets-custom-info/ Main thread]
Forum topic: [https://forums.bistudio.com/topic/200468-jets-custom-info/ Main thread]
=User Interface=
=User Interface=
[[File: Arma_3_Custom_Info_overview.jpeg|frameless|upright=1.5]]
====Action keybinds (default)====
{| class="wikitable"
|-
| ''' [''' || next module on left display
|-
| '''RCTRL + [''' || previous module on left display
|-
| ''' ]''' || next module on right display
|-
| '''RCTRL + ]''' || previous module on right display
|-
| '''RALT + [''' || close left display
|-
| '''RALT + ]''' || close right display
|-
|}


=Configuration=
=Configuration=
== Example ==
The new Sensor system gets enabled by defining a VehicleSystemsDisplayManagerComponentLeft (left display) or VehicleSystemsDisplayManagerComponentRight (right display) class inside the vehicle's [[Arma_3_Components|Components]] class.
<syntaxhighlight lang="c">
class MyVehicle_F : MyBaseVehicle_F
{
      class Components : Components                 
      {
            class VehicleSystemsDisplayManagerComponentLeft : DefaultVehicleSystemsDisplayManagerLeft
            {
            };
            class VehicleSystemsDisplayManagerComponentRight : DefaultVehicleSystemsDisplayManagerRight
            {
            };                                                                                                       
      };
};
</syntaxhighlight>
 
For simplicity the class can inherit from one of the templates that are available in the configFile root.
<syntaxhighlight lang="c">
VehicleSystemsTemplateLeftDriver
VehicleSystemsTemplateRightDriver
VehicleSystemsTemplateLeftCommander
VehicleSystemsTemplateRightCommander
VehicleSystemsTemplateLeftGunner
VehicleSystemsTemplateRightGunner
VehicleSystemsTemplateLeftSensorsCommander
VehicleSystemsTemplateRightSensorsCommander
VehicleSystemsTemplateLeftSensorsGunner
VehicleSystemsTemplateRightSensorsGunner
</syntaxhighlight>
 
==Automatic usage & backwards compatibility==
If the Vehicle doesn't have the VehicleSystemsDisplayManagerComponent defined one of the two default pairs is used.
<syntaxhighlight lang="c">
// core definitions, do not override
DefaultVehicleSystemsDisplayManagerLeft
DefaultVehicleSystemsDisplayManagerRight
DefaultVehicleSystemsDisplayManagerLeftSensors 
DefaultVehicleSystemsDisplayManagerRightSensors 
</syntaxhighlight>
The pair of defaults with Sensors suffix is used whenever the vehicle had [[A3_Targeting_config_reference#radarType|radarType]] defined as ''air radar'' or ''ground radar''.
 
== Modules and properties ==
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
class VehicleSystemsDisplayManagerLeft
{
componentType = "VehicleSystemsDisplayManager"; //mandatory
x = (safezoneX + 0.5 * (((safezoneW / safezoneH) min 1.2) / 40));
y = (safezoneY + safezoneH - 21 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
left = 1;
defaultDisplay = "CrewDisplay";  //display to be selected when player changes vehicle and had "empty" previously selected
class Components
{
class MinimapDisplay        //GPS
{
componentType = "MinimapDisplayComponent";
resource = "RscCustomInfoMiniMap";
};
class SlingLoadDisplay      //Slingload Assistant
{
componentType = "SlingLoadDisplayComponent";
resource = "RscCustomInfoSlingLoad";
};
class SensorsDisplayClose  //Combined display showing sensors, detected and tracked targets, info about marked target and threats
{
componentType = "SensorsDisplayComponent";
range = 1000;
resource = "RscCustomInfoSensor";
};
class SensorsDisplayFar    //Combined display showing sensors, detected and tracked targets, info about marked target and threats - this time with a different range setting
{
componentType = "SensorsDisplayComponent";
range = 4000;
resource = "RscCustomInfoSensor";
};
class UAVFeedDisplay        //Drone camera feed
{
componentType = "UAVFeedDisplayComponent";
// resource = "RscCustomInfoAVCamera"; // hardcoded
};
class VehicleDriverDisplay  //Camera feed from driver's optics
{
componentType = "TransportFeedDisplayComponent";
source = "Driver";
// resource = "RscTransportCameraComponentDriver"; // hardcoded
};
class VehicleGunnerDisplay  //Camera feed from gunner's optics
{
componentType = "TransportFeedDisplayComponent";
source = "PrimaryGunner";
// resource = "RscTransportCameraComponentPrimaryGunner"; // hardcoded
};
class VehicleCommanderDisplay //Camera feed from commander's optics
{
componentType = "TransportFeedDisplayComponent";
source = "Commander";
// resource = "RscTransportCameraComponentCommander"; // hardcoded
};
class MissileDisplay        //Camera feed from missile's warhead
{
componentType = "TransportFeedDisplayComponent";
source = "Missile";
resource = "RscTransportCameraComponentMissile"; // hardcoded in the engine - here just fyi where is the resource
};
class CrewDisplay          //List of all crew members, cargo and transported or slingloaded vehicle
{
componentType = "CrewDisplayComponent";
resource = "RscCustomInfoCrew";
};
class CustomDisplayXY      //Custom display using custom resource
{
componentType = "CustomDisplayComponent";
resource = "RscCustomInfoLeftOnly";
};
class EmptyDisplay          //Empty display - hide panel
{
componentType = "EmptyDisplayComponent";
};
};
};


class VehicleSystemsDisplayManagerRight : VehicleSystemsDisplayManagerLeft
{
x = ((10 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.5 * (((safezoneW / safezoneH) min 1.2) / 40)));
left = 0;
right = 1;
forcedDisplay = "SensorsDisplayFar";      //display to be selected when player enters the vehicle no matter what was selected before
}
</syntaxhighlight>
</syntaxhighlight>



Revision as of 15:24, 22 December 2016

Template:Cfg ref

Overview

UI window elements that encompass various display modules and gadgets (Navigation, Camera feeds, Radar...)

Forum topic: Main thread

User Interface

Arma 3 Custom Info overview.jpeg

Action keybinds (default)

[ next module on left display
RCTRL + [ previous module on left display
] next module on right display
RCTRL + ] previous module on right display
RALT + [ close left display
RALT + ] close right display


Configuration

The new Sensor system gets enabled by defining a VehicleSystemsDisplayManagerComponentLeft (left display) or VehicleSystemsDisplayManagerComponentRight (right display) class inside the vehicle's Components class.

class MyVehicle_F : MyBaseVehicle_F
{
       class Components : Components                   
      {
            class VehicleSystemsDisplayManagerComponentLeft : DefaultVehicleSystemsDisplayManagerLeft
            {
            }; 
            class VehicleSystemsDisplayManagerComponentRight : DefaultVehicleSystemsDisplayManagerRight
            {
            };                                                                                                        
      };
};

For simplicity the class can inherit from one of the templates that are available in the configFile root.

VehicleSystemsTemplateLeftDriver
VehicleSystemsTemplateRightDriver
VehicleSystemsTemplateLeftCommander
VehicleSystemsTemplateRightCommander
VehicleSystemsTemplateLeftGunner
VehicleSystemsTemplateRightGunner
VehicleSystemsTemplateLeftSensorsCommander 
VehicleSystemsTemplateRightSensorsCommander 
VehicleSystemsTemplateLeftSensorsGunner
VehicleSystemsTemplateRightSensorsGunner

Automatic usage & backwards compatibility

If the Vehicle doesn't have the VehicleSystemsDisplayManagerComponent defined one of the two default pairs is used.

// core definitions, do not override
DefaultVehicleSystemsDisplayManagerLeft
DefaultVehicleSystemsDisplayManagerRight
DefaultVehicleSystemsDisplayManagerLeftSensors  
DefaultVehicleSystemsDisplayManagerRightSensors

The pair of defaults with Sensors suffix is used whenever the vehicle had radarType defined as air radar or ground radar.

Modules and properties

class VehicleSystemsDisplayManagerLeft
{
	componentType = "VehicleSystemsDisplayManager"; //mandatory
	x = (safezoneX + 0.5 * (((safezoneW / safezoneH) min 1.2) / 40));
	y = (safezoneY + safezoneH - 21 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
	left = 1;
	defaultDisplay = "CrewDisplay";   //display to be selected when player changes vehicle and had "empty" previously selected

	class Components
	{
		class MinimapDisplay        //GPS
		{
			componentType = "MinimapDisplayComponent";
			resource = "RscCustomInfoMiniMap";
		};
		class SlingLoadDisplay      //Slingload Assistant
		{
			componentType = "SlingLoadDisplayComponent";
			resource = "RscCustomInfoSlingLoad";
		};
		class SensorsDisplayClose   //Combined display showing sensors, detected and tracked targets, info about marked target and threats
		{
			componentType = "SensorsDisplayComponent";
			range = 1000;
			resource = "RscCustomInfoSensor";
		};
		class SensorsDisplayFar     //Combined display showing sensors, detected and tracked targets, info about marked target and threats - this time with a different range setting
		{
			componentType = "SensorsDisplayComponent";
			range = 4000;
			resource = "RscCustomInfoSensor";
		};
		class UAVFeedDisplay        //Drone camera feed
		{
			componentType = "UAVFeedDisplayComponent";
			// resource = "RscCustomInfoAVCamera"; // hardcoded
		};
		class VehicleDriverDisplay  //Camera feed from driver's optics
		{
			componentType = "TransportFeedDisplayComponent";
			source = "Driver";
			// resource = "RscTransportCameraComponentDriver"; // hardcoded 
		};
		class VehicleGunnerDisplay  //Camera feed from gunner's optics
		{
			componentType = "TransportFeedDisplayComponent";
			source = "PrimaryGunner";
			// resource = "RscTransportCameraComponentPrimaryGunner"; // hardcoded 
		};
		class VehicleCommanderDisplay //Camera feed from commander's optics
		{
			componentType = "TransportFeedDisplayComponent";
			source = "Commander";
			// resource = "RscTransportCameraComponentCommander"; // hardcoded
		};
		class MissileDisplay        //Camera feed from missile's warhead
		{
			componentType = "TransportFeedDisplayComponent";
			source = "Missile";
			resource = "RscTransportCameraComponentMissile"; // hardcoded in the engine - here just fyi where is the resource
		};
		class CrewDisplay           //List of all crew members, cargo and transported or slingloaded vehicle
		{
			componentType = "CrewDisplayComponent";
			resource = "RscCustomInfoCrew";
		};
		class CustomDisplayXY       //Custom display using custom resource
		{
			componentType = "CustomDisplayComponent";
			resource = "RscCustomInfoLeftOnly";
		};
		class EmptyDisplay          //Empty display - hide panel
		{
			componentType = "EmptyDisplayComponent";
		};
	};
};

class VehicleSystemsDisplayManagerRight : VehicleSystemsDisplayManagerLeft
{
	x = ((10 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.5 * (((safezoneW / safezoneH) min 1.2) / 40)));
	left = 0;
	right = 1;
	forcedDisplay = "SensorsDisplayFar";      //display to be selected when player enters the vehicle no matter what was selected before
}

Related