Advanced Hints (Field Manual) – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Edited duration values in accordance with fnc_advHint.)
m (Some wiki formatting)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Summary==
[[File:Arma_3_advHint_1.PNG|right|180px|example]]
Advanced hints are system of educative/informative hints. There are two place where you can see these hints:
Advanced hints are system of educative/informative hints. There are two place where you can see these hints:
* Field Manual - list of all advanced hints, you can open it from main menu or pause menu
* Field Manual - list of all advanced hints, you can open it from main menu or pause menu
* In Game - mission designer can call any advanced hint by function [[BIS_fnc_advHint]]
* In Game - mission designer can call any advanced hint through [[BIS_fnc_advHint]]


Specifications:
Specifications:
Line 11: Line 11:




==Calling of hint in mission==
== Calling of hint in mission ==
 
* Simple function triggered by the designer at any needed point in the mission flow
* Simple function triggered by the designer at any needed point in the mission flow
* Syntax: <code>[classes, duration1, condition1, duration2, condition2, showing, onlyFullHint, onlyOnce, Sound] call [[BIS_fnc_advHint]];</code>where:
* Syntax: <sqf inline>[classes, duration1, condition1, duration2, condition2, showing, onlyFullHint, onlyOnce, Sound] call BIS_fnc_advHint;</sqf> where:
** '''Classes''' - [Array] in format [main class, class] or [main class, class, sub-class]. Main class, class and sub-class are classes in a config (see [[Arma_3_Advanced_Hints_(Field_Manual)#Config|Config definition]] part) that includes title, image, description text possibly including keybinds (html formatted); required parameter
** '''Classes''' - [Array] in format [main class, class] or [main class, class, sub-class]. Main class, class and sub-class are classes in a config (see [[Arma_3:_Advanced_Hints_(Field_Manual)#Config|Config definition]] part) that includes title, image, description text possibly including keybinds (html formatted); required parameter
** '''Duration1''' - [Number] An amount of time the SHORT version of hint is shown; optional - default 15 s
** '''Duration1''' - [Number] An amount of time the SHORT version of hint is shown; optional - default 15 s
** '''Condition1''' - [String] A condition that hide the SHORT version of hint when becomes true; optional - default nothing
** '''Condition1''' - [String] A condition that hide the SHORT version of hint when becomes true; optional - default nothing
Line 25: Line 26:




==Config==
== Config ==
 
* System can read definitions from [[configFile]], [[campaignConfigFile]] and [[missionConfigFile]] (so mission/campaign specific hints are possible).
* System can read definitions from [[configFile]], [[campaignConfigFile]] and [[missionConfigFile]] (so mission/campaign specific hints are possible).
* Hint must by defined in class ''CfgHints''.
* Hint must by defined in class ''CfgHints''.
Line 31: Line 33:


Definition:
Definition:
class CfgHints
<syntaxhighlight lang="cpp">
{
class CfgHints
class InfantryMovement
{
{
class InfantryMovement
{{codecomment|// Topic title (displayed only in topic listbox in Field Manual)}}
{
displayName = "Infantry Controls";
// Topic title (displayed only in topic listbox in Field Manual)
class SteppingOver
displayName = "Infantry Controls";
{
class SteppingOver
{{codecomment|// Hint title, filled by arguments from 'arguments' param}}
{
displayName = "Stepping over obstacles";
// Hint title, filled by arguments from 'arguments' param
                        {{codecomment|// Optional hint subtitle, filled by arguments from 'arguments' param}}
displayName = "Stepping over obstacles";
displayNameShort = "Stepping over obstacles";
// Optional hint subtitle, filled by arguments from 'arguments' param
{{codecomment|// Structured text, filled by arguments from 'arguments' param}}
displayNameShort = "Stepping over";
description = "Press %11 to step over low obstacle. Your %13 is %14";
// Structured text, filled by arguments from 'arguments' param
                        {{codecomment|// Optional structured text, filled by arguments from 'arguments' param (first argument
description = "Press %11 to step over low obstacle. Your %12 is %13.";
                        // is %11, see notes bellow), grey color of text}}
// Optional structured text, filled by arguments from 'arguments' param (first argument is %11, see notes below), grey color of text
                        tip = "The free look represents turning the head sideways and up or down.";
tip = "The free look represents turning the head sideways and up or down.";
arguments[] = {
arguments[] = {
<nowiki>{{"getOver"}}</nowiki>, {{codecomment|// Double nested array means assigned key (will be specially formatted)}}
{ { "getOver" } }, // Double nested array means assigned key (will be specially formatted)
                                {"name"}, {{codecomment|// Nested array means element (specially formatted part of text)}}
{ "name" }, // Nested array means element (specially formatted part of text)
"name player" {{codecomment|// Simple string will be simply compiled and called
"name player" // Simple string will be simply compiled and called, String can also link to localization database in case it starts by str_
                                              // String is used as a link to localization database in case it starts by str_}}
};
};
// Optional image
{{codecomment|// Optional image}}
image = "\a3\ui_f\data\gui\cfg\hints\steppingover_ca.paa";
image = "\path\image_ca.paa";
// optional parameter for not showing of image in context hint in mission (default false)
{{codecomment|// optional parameter for not showing of image in context hint in mission (default false))}}
noImage = false;
noImage = false;
// -1 Creates no log in player diary, 0 Creates diary log (default when not provided)
// if a dlc's appID Number is used (see command getDLCs) and the user does not have the required dlc installed then the advHint will be replaced with
                        class SteppingOver_subHint
// configfile >> "CfgHints" >> "DlcMessage" >> "Dlc#"; where # is this properties (dlc appID) number
                        {
dlc = -1;
                {{codecomment|// Sub-hint title, filled by arguments from 'arguments' param}}
 
                        displayName = "Stepping over obstacles";
class SteppingOver_subHint
                                        {{codecomment|// Optional sub-hint subtitle, filled by arguments from 'arguments' param}}
{
                        displayNameShort = "Stepping over obstacles";
// Sub-hint title, filled by arguments from 'arguments' param
                        {{codecomment|// Structured text, filled by arguments from 'arguments' param}}
displayName = "Stepping over obstacles";
                        description = "Press %11 to step over low obstacle. Your %13 is %14";
// Optional sub-hint subtitle, filled by arguments from 'arguments' param
                                        {{codecomment|// Optional structured text, filled by arguments from 'arguments' param (first argument
displayNameShort = "Stepping over";
                                        // is %11, see notes bellow), grey color of text}}
// Structured text, filled by arguments from 'arguments' param
                                        tip = "The free look represents turning the head sideways and up or down.";
description = "Press %11 to step over low obstacle. Your %12 is %13.";
                        arguments[] = {
// Optional structured text, filled by arguments from 'arguments' param (first argument is %11, see notes below), grey color of text
                        <nowiki>{{"getOver"}}</nowiki>, {{codecomment|// Double nested array means assigned key (will be specially formatted)}}
tip = "The free look represents turning the head sideways and up or down.";
                                                {"name"}, {{codecomment|// Nested array means element (specially formatted part of text)}}
arguments[] = {
                        "name player" {{codecomment|// Simple string will be simply compiled and called
{ { "getOver" } }, // Double nested array means assigned key (will be specially formatted)
                                              // String is used as a link to localization database in case it starts by str_}}
{ "name" }, // Nested array means element (specially formatted part of text)
                        };
"name player" // Simple string will be simply compiled and called, String can also link to localization database in case it starts by str_
                {{codecomment|// Optional image}}
};
                        image = "\path\image_ca.paa";
// Optional image
                {{codecomment|// optional parameter for not showing of image in context hint in mission (default false))}}
image = "\a3\ui_f\data\gui\cfg\hints\steppingover_ca.paa";
                        noImage = false;
// optional parameter for not showing of image in context hint in mission (default false)
                        };
noImage = false;
};
// -1 Creates no log in player diary, 0 Creates diary log (default when not provided)
};
// if a dlc's appID Number is used (see [[getDLCs]]) and the user does not have the required dlc installed then the advHint will be replaced with
};
// configfile >> "CfgHints" >> "DlcMessage" >> "Dlc#"; where # is this properties (dlc appID) number
dlc = -1;
};
};
};
};
</syntaxhighlight>


Definition notes:
{{Feature|informative|
* First item from arguments field in config is inserted in text via variable %11, second item via %12, etc.
* Only the first topic class is used from [[missionConfigFile]] and [[campaignConfigFile]], all other topic classes are ignored. This class is renamed automatically to ''<Mission>''. This applies only to the Field Manual.
* First item from arguments field in config is inserted in text ''via'' variable {{hl|%11}}, second item ''via'' {{hl|%12}}, etc.
* Variables %1 - %10 are hardcoded:
* Variables %1 - %10 are hardcoded:
** %1 - small empty line
** %1 - small empty line
Line 92: Line 101:
** %3 - highlight start
** %3 - highlight start
** %4 - highlight end
** %4 - highlight end
** %5 - warning color formated for using in structured text tag
** %5 - warning color formatted for using in structured text tag
** %6 - BLUFOR color attribute
** %6 - BLUFOR color attribute
** %7 - OPFOR color attribute
** %7 - OPFOR color attribute
Line 98: Line 107:
** %9 - Civilian color attribute
** %9 - Civilian color attribute
** %10 - Unknown side color attribute
** %10 - Unknown side color attribute
* color formated for using in structured text is string: "color = 'given_color'"
* color formatted for using in structured text is string: "color {{=}} 'given_color'"
}}
 


[[Category:Arma 3: Editing|Advanced Hints (Field Manual)]]
{{GameCategory|arma3|Editing}}

Latest revision as of 13:46, 21 March 2024

example

Advanced hints are system of educative/informative hints. There are two place where you can see these hints:

  • Field Manual - list of all advanced hints, you can open it from main menu or pause menu
  • In Game - mission designer can call any advanced hint through BIS_fnc_advHint

Specifications:

  • There is a set of default advanced hints in the game. Players are able to add own hints.
  • Hints can be related only to a mission, campaign or the whole game. Hints related to any mission/campaign are not accessible in other missions/campaigns.
  • Showing of advanced hints in mission can be disabled by player in game options.
  • If player creates its own hint in config, this hint is added into Field Manual automatically (hint just needs to be defined in the right class, see Config definition)


Calling of hint in mission

  • Simple function triggered by the designer at any needed point in the mission flow
  • Syntax: [classes, duration1, condition1, duration2, condition2, showing, onlyFullHint, onlyOnce, Sound] call BIS_fnc_advHint; where:
    • Classes - [Array] in format [main class, class] or [main class, class, sub-class]. Main class, class and sub-class are classes in a config (see Config definition part) that includes title, image, description text possibly including keybinds (html formatted); required parameter
    • Duration1 - [Number] An amount of time the SHORT version of hint is shown; optional - default 15 s
    • Condition1 - [String] A condition that hide the SHORT version of hint when becomes true; optional - default nothing
    • Duration2 - [Number] An amount of time the FULL version of hint is shown; optional - default 35 s
    • Condition2 - [String] A condition that hide the FULL version of hint when becomes true; optional - default nothing
    • Showing - [Bool] true show hint even if tutorial hints are disabled via game settings; optional - default false
    • OnlyFullHint - [Bool] true show directly the full hint without using of the short hint, optional - default false
    • OnlyOnce - [Bool] show the hint in a mission only once (true) or multiple times (false), optional - default false
    • Sound - [Bool] show hint with (true) or without (false) sound effect, optional - default true


Config

  • System can read definitions from configFile, campaignConfigFile and missionConfigFile (so mission/campaign specific hints are possible).
  • Hint must by defined in class CfgHints.
  • There can be used sub-hint. Sub-hint is not shown in the Field Manual, but it can be called via BIS_fnc_advHint function. This way you can divide one hint into more hints for showing during mission.

Definition:

class CfgHints
{
	class InfantryMovement
	{
		// Topic title (displayed only in topic listbox in Field Manual)
		displayName = "Infantry Controls";
		class SteppingOver
		{
			// Hint title, filled by arguments from 'arguments' param
			displayName = "Stepping over obstacles";
			// Optional hint subtitle, filled by arguments from 'arguments' param
			displayNameShort = "Stepping over";
			// Structured text, filled by arguments from 'arguments' param
			description = "Press %11 to step over low obstacle. Your %12 is %13.";
			// Optional structured text, filled by arguments from 'arguments' param (first argument is %11, see notes below), grey color of text
			tip = "The free look represents turning the head sideways and up or down.";
			arguments[] = {
				{ { "getOver" } }, // Double nested array means assigned key (will be specially formatted)
				{ "name" }, // Nested array means element (specially formatted part of text)
				"name player" // Simple string will be simply compiled and called, String can also link to localization database in case it starts by str_
			};
			// Optional image
			image = "\a3\ui_f\data\gui\cfg\hints\steppingover_ca.paa";
			// optional parameter for not showing of image in context hint in mission (default false)
			noImage = false;
			// -1 Creates no log in player diary, 0 Creates diary log (default when not provided)
			// if a dlc's appID Number is used (see command getDLCs) and the user does not have the required dlc installed then the advHint will be replaced with
			// configfile >> "CfgHints" >> "DlcMessage" >> "Dlc#"; where # is this properties (dlc appID) number
			dlc = -1;

			class SteppingOver_subHint
			{
				// Sub-hint title, filled by arguments from 'arguments' param
				displayName = "Stepping over obstacles";
				// Optional sub-hint subtitle, filled by arguments from 'arguments' param
				displayNameShort = "Stepping over";
				// Structured text, filled by arguments from 'arguments' param
				description = "Press %11 to step over low obstacle. Your %12 is %13.";
				// Optional structured text, filled by arguments from 'arguments' param (first argument is %11, see notes below), grey color of text
				tip = "The free look represents turning the head sideways and up or down.";
				arguments[] = {
					{ { "getOver" } }, // Double nested array means assigned key (will be specially formatted)
					{ "name" }, // Nested array means element (specially formatted part of text)
					"name player" // Simple string will be simply compiled and called, String can also link to localization database in case it starts by str_
				};
				// Optional image
				image = "\a3\ui_f\data\gui\cfg\hints\steppingover_ca.paa";
				// optional parameter for not showing of image in context hint in mission (default false)
				noImage = false;
				// -1 Creates no log in player diary, 0 Creates diary log (default when not provided)
				// if a dlc's appID Number is used (see [[getDLCs]]) and the user does not have the required dlc installed then the advHint will be replaced with
				// configfile >> "CfgHints" >> "DlcMessage" >> "Dlc#"; where # is this properties (dlc appID) number
				dlc = -1;
			};
		};
	};
};
  • Only the first topic class is used from missionConfigFile and campaignConfigFile, all other topic classes are ignored. This class is renamed automatically to <Mission>. This applies only to the Field Manual.
  • First item from arguments field in config is inserted in text via variable %11, second item via %12, etc.
  • Variables %1 - %10 are hardcoded:
    • %1 - small empty line
    • %2 - bullet (for item in list)
    • %3 - highlight start
    • %4 - highlight end
    • %5 - warning color formatted for using in structured text tag
    • %6 - BLUFOR color attribute
    • %7 - OPFOR color attribute
    • %8 - Independent color attribute
    • %9 - Civilian color attribute
    • %10 - Unknown side color attribute
  • color formatted for using in structured text is string: "color = 'given_color'"