From 176482381ad2222502157933c0cd622f2a049da2 Mon Sep 17 00:00:00 2001 From: Hypoxic <60307173+hypoxia125@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:53:10 -0400 Subject: [PATCH] Field Manual - Add Framework (#9320) * Field Manual Framework Created barebones framework for addition of the Field Manual * Created Stringtable.xml Created Stringtable.xml Created a few strings... more to come * Update addons/fieldmanual/config.cpp Moved opening brace Co-authored-by: Mike-MF * Update addons/fieldmanual/config.cpp new lines at end of file Co-authored-by: Mike-MF * update stringtable.xml Added arguments to ACE_Field_Rations_Base Added strings for descriptions of subclasses * update stringtable.xml Added medical item documentation Added field ration documentation * Update stringtable.xml Added fortify tool documentation * updated stringtable.xml and cfgHints.hpp Added item documentation Cleaned up other strings Added additional arguments and made them universal * updated/reordered contents. added images Reordered CfgHints.hpp Added Range Tables string Reordered stringtable Added images for inline use * changed indentation style changed indentation style to guidelines added empty line to the end of each file * Update addons/fieldmanual/CfgHints.hpp remove redundant includes Co-authored-by: PabstMirror * Update addons/fieldmanual/CfgHintCategories.hpp remove redundant includes Co-authored-by: PabstMirror * Update stringtable.xml added explosives string - no image yet * Update stringtable.xml added dead man's switch - no image as of yet * Update addons/fieldmanual/script_component.hpp Co-authored-by: jonpas * Update addons/fieldmanual/script_component.hpp Co-authored-by: jonpas * Update addons/fieldmanual/stringtable.xml Co-authored-by: jonpas * Update stringtable.xml Removed containers Modified table to 4 space indentation Started using Tabler * update cfghints and stringtable moved the fortify tool to items and removed it's specialized class added DAGR and MicroDAGR strings - no image * restructure CfgHints.cpp - added additional arguments + placeholders for forward compatibility Removed images and img from strings - will add in a different PR Stringtable.xml - added 99% of content * update strings updated stringtables consolidated cfghint base classes * cfghints fixed multiline string code * Update CfgHints.hpp Missed trailing \ * update cfghints.hpp fixed leading \ still trying to get the pboproject to like it * Update stringtable.xml deleted original stringtable entry due to error with Arma/Vlidate (pull_request) * Update addons/fieldmanual/script_component.hpp Co-authored-by: Filip Maciejewski * Update addons/fieldmanual/CfgHintCategories.hpp Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/fieldmanual/stringtable.xml Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/fieldmanual/stringtable.xml Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/fieldmanual/stringtable.xml Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/fieldmanual/stringtable.xml Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/fieldmanual/stringtable.xml Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/fieldmanual/stringtable.xml Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/fieldmanual/stringtable.xml Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update stringtable.xml changed structures for spray paint to surfaces * Apply suggestions from code review Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Dynamically get item names * stringtables, better unbound key handling * disable preprocess (rip tools) * bound key change * standardize on medical keybinds * fix medial menu keybind --------- Co-authored-by: Hypoxic Co-authored-by: Mike-MF Co-authored-by: PabstMirror Co-authored-by: jonpas Co-authored-by: Filip Maciejewski Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: LinkIsGrim --- AUTHORS.txt | 1 + addons/fieldmanual/$PBOPREFIX$ | 1 + addons/fieldmanual/CfgEventHandlers.hpp | 5 + addons/fieldmanual/CfgHintCategories.hpp | 5 + addons/fieldmanual/CfgHints.hpp | 330 ++++++++++++++++++ addons/fieldmanual/XEH_PREP.hpp | 4 + addons/fieldmanual/XEH_preStart.sqf | 3 + addons/fieldmanual/addon.toml | 2 + addons/fieldmanual/config.cpp | 19 + .../fieldmanual/functions/fnc_getItemName.sqf | 23 ++ .../functions/fnc_getKeybindName.sqf | 34 ++ addons/fieldmanual/script_component.hpp | 19 + addons/fieldmanual/stringtable.xml | 293 ++++++++++++++++ 13 files changed, 739 insertions(+) create mode 100644 addons/fieldmanual/$PBOPREFIX$ create mode 100644 addons/fieldmanual/CfgEventHandlers.hpp create mode 100644 addons/fieldmanual/CfgHintCategories.hpp create mode 100644 addons/fieldmanual/CfgHints.hpp create mode 100644 addons/fieldmanual/XEH_PREP.hpp create mode 100644 addons/fieldmanual/XEH_preStart.sqf create mode 100644 addons/fieldmanual/addon.toml create mode 100644 addons/fieldmanual/config.cpp create mode 100644 addons/fieldmanual/functions/fnc_getItemName.sqf create mode 100644 addons/fieldmanual/functions/fnc_getKeybindName.sqf create mode 100644 addons/fieldmanual/script_component.hpp create mode 100644 addons/fieldmanual/stringtable.xml diff --git a/AUTHORS.txt b/AUTHORS.txt index c51fbe52fc..5e7d48af55 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -113,6 +113,7 @@ havena Hawkins Head Hybrid V +Hypoxic JasperRab JDT john681611 diff --git a/addons/fieldmanual/$PBOPREFIX$ b/addons/fieldmanual/$PBOPREFIX$ new file mode 100644 index 0000000000..b080a6d6b7 --- /dev/null +++ b/addons/fieldmanual/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\fieldmanual diff --git a/addons/fieldmanual/CfgEventHandlers.hpp b/addons/fieldmanual/CfgEventHandlers.hpp new file mode 100644 index 0000000000..0afdef638f --- /dev/null +++ b/addons/fieldmanual/CfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; diff --git a/addons/fieldmanual/CfgHintCategories.hpp b/addons/fieldmanual/CfgHintCategories.hpp new file mode 100644 index 0000000000..3a917c9c9c --- /dev/null +++ b/addons/fieldmanual/CfgHintCategories.hpp @@ -0,0 +1,5 @@ +class CfgHintCategories { + class ACE_FieldManual { + displayName = CSTRING(HintCategory_FieldManual_DisplayName); + }; +}; diff --git a/addons/fieldmanual/CfgHints.hpp b/addons/fieldmanual/CfgHints.hpp new file mode 100644 index 0000000000..7b86ba89b6 --- /dev/null +++ b/addons/fieldmanual/CfgHints.hpp @@ -0,0 +1,330 @@ + +/* + Preferred Image Size = 256x256 + Can Embed Images Into Description = 1024x512 + - Shadow = '0' + - Size = '9' +*/ + +class CfgHints { + class ACE_FieldManual_Base { + arguments[] = { + // INDENT - %11 + "' '", + // SELF INTERACT KEYBIND - %12 + QUOTE([ARR_2('ACE3 Common', QQEGVAR(interact_menu,selfInteractKey))] call FUNC(getKeybindName)), + // INTERACT KEYBIND - %13 + QUOTE([ARR_2('ACE3 Common', QQEGVAR(interact_menu,interactKey))] call FUNC(getKeybindName)) + }; + image = "\z\ace\addons\common\data\logo_ace3_ca.paa"; + tip = "ACE Wiki"; + }; + class ACE_Items { + displayName = CSTRING(Items_DisplayName); + category = "ACE_FieldManual"; + + class ACE_ATragMX: ACE_FieldManual_Base { + logicalOrder = 1; + arguments[] += {QUOTE('ACE_ATragMX' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_ATragMX_ShortName); + description = CSTRING(Items_ATragMX_Description); + tip = "ATragMX Wiki"; + }; + class ACE_BodyBag: ACE_FieldManual_Base { + logicalOrder = 2; + arguments[] += {QUOTE('ACE_BodyBag' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_BodyBag_ShortName); + description = CSTRING(Items_BodyBag_Description); + }; + class ACE_CableTie: ACE_FieldManual_Base { + logicalOrder = 3; + arguments[] += {QUOTE('ACE_CableTie' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_CableTie_ShortName); + description = CSTRING(Items_CableTie_Description); + tip = "Captives Wiki"; + }; + class ACE_Cellphone: ACE_FieldManual_Base { + logicalOrder = 4; + arguments[] += {QUOTE('ACE_Cellphone' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_Cellphone_ShortName); + description = CSTRING(Items_Cellphone_Description); + tip = "Explosives Wiki"; + }; + class ACE_Chemlight_Shield: ACE_FieldManual_Base { + logicalOrder = 5; + arguments[] += {QUOTE('ACE_Chemlight_Shield' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_Chemlight_Shield_ShortName); + description = CSTRING(Items_Chemlight_Shield_Description); + tip = "Chemlights Wiki"; + }; + class ACE_Clackers: ACE_FieldManual_Base { + logicalOrder = 6; + arguments[] += {QUOTE('ACE_Clacker' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_Clackers_ShortName); + description = CSTRING(Items_Clackers_Description); + tip = "Explosives Wiki"; + }; + class ACE_DAGR: ACE_FieldManual_Base { + logicalOrder = 7; + arguments[] += {QUOTE('ACE_DAGR' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_DAGR_ShortName); + description = CSTRING(Items_DAGR_Description); + tip = "DAGR Wiki"; + }; + class ACE_DeadManSwitch: ACE_FieldManual_Base { + logicalOrder = 8; + arguments[] += {QUOTE('ACE_DeadManSwitch' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_DeadManSwitch_ShortName); + description = CSTRING(Items_DeadManSwitch_Description); + tip = "Explosives Wiki"; + }; + class ACE_DefusalKit: ACE_FieldManual_Base { + logicalOrder = 9; + arguments[] += {QUOTE('ACE_DefusalKit' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_DefusalKit_ShortName); + description = CSTRING(Items_DefusalKit_Description); + tip = "Explosives Wiki"; + }; + class ACE_EarPlugs: ACE_FieldManual_Base { + logicalOrder = 10; + arguments[] += {QUOTE('ACE_EarPlugs' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_EarPlugs_ShortName); + description = CSTRING(Items_EarPlugs_Description); + tip = "Hearing Wiki"; + }; + class ACE_EntrenchingTool: ACE_FieldManual_Base { + logicalOrder = 11; + arguments[] += {QUOTE('ACE_EntrenchingTool' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_EntrenchingTool_ShortName); + description = CSTRING(Items_EntrenchingTool_Description); + }; + class ACE_Flashlights: ACE_FieldManual_Base { + logicalOrder = 12; + displayName = CSTRING(Items_Flashlights_DisplayName); + displayNameShort = CSTRING(Items_Flashlights_ShortName); + description = CSTRING(Items_Flashlights_Description); + tip = "Flashlights Wiki"; + }; + class ACE_FortifyTool: ACE_FieldManual_Base { + logicalOrder = 13; + arguments[] += {QUOTE('ACE_HuntIR_Monitor' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_FortifyTool_ShortName); + description = CSTRING(Items_FortifyTool_Description); + tip = "Fortify Wiki"; + }; + class ACE_HuntIR_Monitor: ACE_FieldManual_Base { + logicalOrder = 14; + arguments[] += {QUOTE('ACE_CableTie' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_HuntIR_Monitor_ShortName); + description = CSTRING(Items_HuntIR_Monitor_Description); + tip = "HuntIR Wiki"; + }; + class ACE_IR_Strobe: ACE_FieldManual_Base { + logicalOrder = 15; + arguments[] += {QUOTE('ACE_IR_Strobe_Item' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_IR_Strobe_ShortName); + description = CSTRING(Items_IR_Strobe_Description); + }; + class ACE_Kestrel4500: ACE_FieldManual_Base { + logicalOrder = 16; + arguments[] += {QUOTE('ACE_Kestrel4500' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_Kestrel4500_ShortName); + description = CSTRING(Items_Kestrel4500_Description); + tip = "Kestrel 4500 Wiki"; + }; + class ACE_Lockpick: ACE_FieldManual_Base { + logicalOrder = 17; + arguments[] += {QUOTE('ACE_key_lockpick' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_Lockpick_ShortName); + description = CSTRING(Items_Lockpick_Description); + tip = "Vehicle Lock Wiki"; + }; + class ACE_MapTools: ACE_FieldManual_Base { + logicalOrder = 18; + arguments[] += {QUOTE('ACE_MapTools' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_MapTools_ShortName); + description = CSTRING(Items_MapTools_Description); + }; + class ACE_MicroDAGR: ACE_FieldManual_Base { + logicalOrder = 19; + arguments[] += {QUOTE('ACE_microDAGR' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_MicroDAGR_ShortName); + description = CSTRING(Items_MicroDAGR_Description); + tip = "MicroDAGR Wiki"; + }; + // Combine all range tables under one roof [mortar, artillery, rifle] + class ACE_RangeTables: ACE_FieldManual_Base { + logicalOrder = 20; + displayName = CSTRING(Items_RangeTables_DisplayName); + displayNameShort = CSTRING(Items_RangeTables_ShortName); + description = CSTRING(Items_RangeTables_Description); + tip = "Rangecard Wiki"; + }; + class ACE_Ropes: ACE_FieldManual_Base { + logicalOrder = 21; + displayName = CSTRING(Items_Ropes_DisplayName); + displayNameShort = CSTRING(Items_Ropes_ShortName); + description = CSTRING(Items_Ropes_Description); + }; + class ACE_Sandbag: ACE_FieldManual_Base { + logicalOrder = 22; + arguments[] += {QUOTE('ACE_Sandbag_empty' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_Sandbag_ShortName); + description = CSTRING(Items_Sandbag_Description); + tip = "Sandbag Wiki"; + }; + class ACE_SpareBarrels: ACE_FieldManual_Base { + logicalOrder = 23; + arguments[] += {QUOTE('ACE_SpareBarrel_Item' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_SpareBarrels_ShortName); + description = CSTRING(Items_SpareBarrels_Description); + tip = "Overheating Wiki"; + }; + class ACE_SprayPaint: ACE_FieldManual_Base { + logicalOrder = 24; + displayName = CSTRING(Items_SprayPaint_DisplayName); + displayNameShort = CSTRING(Items_SprayPaint_ShortName); + description = CSTRING(Items_SprayPaint_Description); + tip = "Tagging Wiki"; + }; + class ACE_Tripod: ACE_FieldManual_Base { + logicalOrder = 25; + arguments[] += {QUOTE('ACE_Tripod' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_Tripod_ShortName); + description = CSTRING(Items_Tripod_Description); + tip = "Tripod Wiki"; + }; + class ACE_UAVBattery: ACE_FieldManual_Base { + logicalOrder = 26; + arguments[] += {QUOTE('ACE_UAVBattery' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_UAVBattery_ShortName); + description = CSTRING(Items_UAVBattery_Description); + tip = "UAV Battery Wiki"; + }; + class ACE_VehicleKey: ACE_FieldManual_Base { + logicalOrder = 27; + displayName = CSTRING(Items_VehicleKey_DisplayName); + displayNameShort = CSTRING(Items_VehicleKey_ShortName); + description = CSTRING(Items_VehicleKey_Description); + tip = "Vehicle Lock Wiki"; + }; + class ACE_Wirecutter: ACE_FieldManual_Base { + logicalOrder = 28; + arguments[] += {QUOTE('ACE_wirecutter' call FUNC(getItemName))}; + displayName = "%14"; + displayNameShort = CSTRING(Items_Wirecutter_ShortName); + description = CSTRING(Items_Wirecutter_Description); + tip = "Wirecutter Wiki"; + }; + }; + // ACE Field Rations + class ACE_Field_Rations { + displayName = CSTRING(Field_Rations_DisplayName); + category = "ACE_FieldManual"; + + class ACE_Field_Rations_Base: ACE_FieldManual_Base { + tip = "Field Rations Wiki"; + }; + + class Hunger: ACE_Field_Rations_Base { + logicalOrder = 1; + displayName = CSTRING(Field_Rations_Hunger_DisplayName); + description = CSTRING(Field_Rations_Hunger_Description); + }; + class Thirst: ACE_Field_Rations_Base { + logicalOrder = 2; + displayName = CSTRING(Field_Rations_Thirst_DisplayName); + description = CSTRING(Field_Rations_Thirst_Description); + }; + }; + // ACE Medical + class ACE_Medical_Treatment { + displayName = CSTRING(Medical_Treatment_DisplayName); + category = "ACE_FieldManual"; + + class ACE_Medical_Treatment_Base: ACE_FieldManual_Base { + arguments[] += { + // MEDICAL MENU KEYBIND - %14 + QUOTE([ARR_2('ACE3 Common', QQEGVAR(medical_gui,openMedicalMenuKey))] call FUNC(getKeybindName)) + }; + tip = "Medical Wiki"; + }; + + class ACE_Adenosine: ACE_Medical_Treatment_Base { + logicalOrder = 1; + arguments[] += {QUOTE('ACE_adenosine' call FUNC(getItemName))}; + displayName = "%15"; + displayNameShort = CSTRING(Medical_Treatment_Adenosine_ShortName); + description = CSTRING(Medical_Treatment_Adenosine_Description); + }; + class ACE_Bandages: ACE_Medical_Treatment_Base { + logicalOrder = 2; + displayName = CSTRING(Medical_Treatment_Bandages_DisplayName); + displayNameShort = CSTRING(Medical_Treatment_Bandages_ShortName); + description = CSTRING(Medical_Treatment_Bandages_Description); + }; + class ACE_Fluids: ACE_Medical_Treatment_Base { + logicalOrder = 3; + displayName = CSTRING(Medical_Treatment_IVFluids_DisplayName); + displayNameShort = CSTRING(Medical_Treatment_IVFluids_ShortName); + description = CSTRING(Medical_Treatment_IVFluids_Description); + }; + class ACE_Epinephrine: ACE_Medical_Treatment_Base { + logicalOrder = 4; + arguments[] += {QUOTE('ACE_epinephrine' call FUNC(getItemName))}; + displayName = "%15"; + displayNameShort = CSTRING(Medical_Treatment_Epinephrine_ShortName); + description = CSTRING(Medical_Treatment_Epinephrine_Description); + }; + class ACE_PAK: ACE_Medical_Treatment_Base { + logicalOrder = 5; + arguments[] += {QUOTE('ACE_personalAidKit' call FUNC(getItemName))}; + displayName = "%15"; + displayNameShort = CSTRING(Medical_Treatment_PAK_ShortName); + description = CSTRING(Medical_Treatment_PAK_Description); + }; + class ACE_Splint: ACE_Medical_Treatment_Base { + logicalOrder = 6; + arguments[] += {QUOTE('ACE_splint' call FUNC(getItemName))}; + displayName = "%15"; + displayNameShort = CSTRING(Medical_Treatment_Splint_ShortName); + description = CSTRING(Medical_Treatment_Splint_Description); + }; + class ACE_SurgicalKit: ACE_Medical_Treatment_Base { + logicalOrder = 7; + arguments[] += {QUOTE('ACE_surgicalKit' call FUNC(getItemName))}; + displayName = "%15"; + displayNameShort = CSTRING(Medical_Treatment_SurgicalKit_ShortName); + description = CSTRING(Medical_Treatment_SurgicalKit_Description); + }; + class ACE_Tourniquet: ACE_Medical_Treatment_Base { + logicalOrder = 8; + arguments[] += {QUOTE('ACE_tourniquet' call FUNC(getItemName))}; + displayName = "%15"; + displayNameShort = CSTRING(Medical_Treatment_CAT_ShortName); + description = CSTRING(Medical_Treatment_CAT_Description); + }; + }; +}; diff --git a/addons/fieldmanual/XEH_PREP.hpp b/addons/fieldmanual/XEH_PREP.hpp new file mode 100644 index 0000000000..425e79b6e9 --- /dev/null +++ b/addons/fieldmanual/XEH_PREP.hpp @@ -0,0 +1,4 @@ +TRACE_1("",QUOTE(ADDON)); + +PREP(getItemName); +PREP(getKeybindName); diff --git a/addons/fieldmanual/XEH_preStart.sqf b/addons/fieldmanual/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/fieldmanual/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/fieldmanual/addon.toml b/addons/fieldmanual/addon.toml new file mode 100644 index 0000000000..7cfef775ee --- /dev/null +++ b/addons/fieldmanual/addon.toml @@ -0,0 +1,2 @@ +[preprocess] +enabled = false diff --git a/addons/fieldmanual/config.cpp b/addons/fieldmanual/config.cpp new file mode 100644 index 0000000000..19cdbcbf17 --- /dev/null +++ b/addons/fieldmanual/config.cpp @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Hypoxic"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgHintCategories.hpp" +#include "CfgHints.hpp" diff --git a/addons/fieldmanual/functions/fnc_getItemName.sqf b/addons/fieldmanual/functions/fnc_getItemName.sqf new file mode 100644 index 0000000000..ed795ebd2c --- /dev/null +++ b/addons/fieldmanual/functions/fnc_getItemName.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror + * Gets item's localized name or indicates if not availabe + * + * Arguments: + * 0: Classname + * + * Return Value: + * + * + * Example: + * "ACE_Banana" call ace_fieldmanual_fnc_getItemName + * + * Public: No + */ +params ["_classname"]; +private _config = configFile >> "CfgWeapons" >> _classname; +if (isClass _config) then { + getText (_config >> "displayName") +} else { + format ["[N/A] - %1", _classname] +}; diff --git a/addons/fieldmanual/functions/fnc_getKeybindName.sqf b/addons/fieldmanual/functions/fnc_getKeybindName.sqf new file mode 100644 index 0000000000..726d411620 --- /dev/null +++ b/addons/fieldmanual/functions/fnc_getKeybindName.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" +/* + * Author: Hypoxic, PabstMirror + * Gets keybind name from CBA + * + * Arguments: + * 0: Addon + * 1: Key Name + * + * Return Value: + * + * + * Example: + * ["ACE3 Common", "ace_interact_menu_selfInteractKey"] call ace_fieldmanual_fnc_getKeybindName + * + * Public: No + */ + +params ["_addon", "_keyName"]; + +private _return = _keyName; +with missionNamespace do { // hint is calling from uiNamespace + private _keyInfo = [_addon, _keyName] call CBA_fnc_getKeybind; + if (!isNil "_keyInfo") then { + private _localizeInfo = _keyInfo select 8 param [0, []]; + if (_localizeInfo isEqualTo []) then { + _return = format ["%1 -> %2", _addon, _keyInfo select 2]; + } else { + _return = format ["%1 -> %2 (%3)", _addon, _keyInfo select 2, _localizeInfo call CBA_fnc_localizeKey]; + }; + }; +}; + +_return diff --git a/addons/fieldmanual/script_component.hpp b/addons/fieldmanual/script_component.hpp new file mode 100644 index 0000000000..35a77d25f9 --- /dev/null +++ b/addons/fieldmanual/script_component.hpp @@ -0,0 +1,19 @@ +#define COMPONENT fieldmanual +#define COMPONENT_BEAUTIFIED Field Manual +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_FIELDMANUAL + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_FIELDMANUAL + #define DEBUG_SETTINGS DEBUG_SETTINGS_FIELDMANUAL +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#include "\a3\ui_f\hpp\defineDIKCodes.inc" diff --git a/addons/fieldmanual/stringtable.xml b/addons/fieldmanual/stringtable.xml new file mode 100644 index 0000000000..73bff03d1c --- /dev/null +++ b/addons/fieldmanual/stringtable.xml @@ -0,0 +1,293 @@ + + + + + Field Rations + 戰地口糧 + 野战军粮 + Poměrové pole + Rations sur le terrain + Feld Rationen + Terepi adagok + Razioni di campo + フィールド レーション + 전투식량 + Racje polowe + Rações de campo + Полевые рационы + Raciones de campo + Gıda Ihtiyaçları + + + Hunger + + + %3Hunger%4 increases linearly with soldier's movement speed. Restore by eating food.<br/><br/>%3Usage:%4<br/>%2Pick up food.<br/>%2Use [%3%12%4] and select %3Survival%4.<br/>%2Choose an item to consume. + + + Thirst + + + %3Thirst%4 increases linearly with soldier's movement speed. Restore by drinking liquids.<br/><br/>%3Usage:%4<br/>%2Pick up a drink.<br/>%2Use [%3%12%4] and select %3Survival%4.<br/>%2Choose an item to consume. + + + Medical Treatment + + + Decrease Heart Rate + + + %3Adenosine%4 is used to decrease heart rate.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an appendage.<br/>%2Inject %3Adenosine%4. + + + Bandages + + + Close Wounds + + + %3Bandages%4 stop bleeding and close wounds. Depending on your settings, bandages may reopen if surgery is not performed.<br/><br/>%2%3Field Dressing:%4<br/>%11<t color='#D9D900'>Average</t> In All Categories<br/>%2%3Packing Bandage:%4<br/>%11<t color='#D9D900'>Average</t> Treatment<br/>%11<t color='#E60000'>Higher</t> Reopen Chance<br/>%11<t color='#00CC00'>Longer</t> Reopen Delay<br/>%2%3Elastic Bandage:%4<br/>%11<t color='#00CC00'>Higher</t> Treatment<br/>%11<t color='#E60000'>Higher</t> Reopen Chance<br/>%11<t color='#E60000'>Shorter</t> Reopen Delay<br/>%2%3Quickclot:%4<br/>%11<t color='#E60000'>Lower</t> Treatment<br/>%11<t color='#00CC00'>Lower</t> Reopen Chance<br/>%11<t color='#00CC00'>Longer</t> Reopening Delay<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select a injured body part.<br/>%2Bandage body part by selecting desired %3Bandage%4 type. + + + IV Fluids + + + Restore Blood Volume + + + %3IV fluids%4 restore lost blood volume. Blood, Plasma, and Saline are functionally the same.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an appendage.<br/>%2Restore blood volume by selecting desired %3IV Fluid%4 type. + + + Increase Heart Rate | Wake Up Faster + + + %3Epinephrine%4 increases a patient's pulse as well as potentially decreasing the time between consciousnesss checks (effectively reducing the time needed for the patient to wake up).<br/><br/>%3Usage%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an appendage.<br/>%2Inject %3Epinephrine%4. + + + Restore Like New + + + The %3Personal Aid Kit%4 is an item that allows a soldier to be fully healed. Independent of %3ACE Settings%4, it requires that the patient is in %3Stable Condition%4 before use.<br/><br/>%3Stable Condition%4 qualifies as:<br/>%2Unit is %3Alive%4.<br/>%2Unit is %3Conscious%4.<br/>%2Unit has no active %3Bleeding%4.<br/>%2Heart Rate >= 40.<br/>%2Systolic BP >= 60.<br/>%2Diastolic BP >= 50.<br/><br/>%3Usage:%4<br/>%2Move to appropriate location depending on %3ACE Settings%4.<br/>%2Use [%3%13%4] or [%3%14%4] and select %3Advanced Treatments%4<br/>%2Select %3Use Personal Aid Kit%4. + + + Fix Fractures + + + A %3Splint%4 is used to fix fractures. The %3Splint%4 is consumed when used.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an affected appendage.<br/>%2Select %3Apply Splint%4. + + + Prevent Wounds From Reopening + + + A %3Surgical Kit%4 is used to prevent wounds from reopening after being bandaged. Depending on settings, it can also clear trauma.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select %3Advanced Treatment%4.<br/>%2Select %3Use Surgical Kit%4. + + + Stop Bleeding + + + A %3Tourniquet%4 stops bleeding temporarily so that a wound(s) can be bandaged. Can only be used on limbs.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an affected appendage.<br/>%2Select %3Apply Tourniquet%4. + + + Portable, Precise, Rugged + + + The %3Horus ATragMX%4 considers atmospheric conditions, gun data, ammunition, range, speed, and muzzle velocity to calculate precise aiming solutions with %3Come-Up%4 results - and even accounts for %3Coriolis%4 and %3Spin Drift%4 effects. %3ATragMX%4, loaded on a handheld computer made by %3TDS Recon%4, is easy to use and lightning fast. The %3Recon%4 meets the rigorous %3MIL-STD-810F%4 military standard for drops, vibration, humidity, altitude and extreme temperatures.<br/><br/>%3Usage:%4<br/>Please visit the wiki page for more information. + + + Bring Out Your Dead + + + %3Body Bags%4 are used to transport dead bodies. They can be dragged and loaded into vehicles.<br/><br/>%3Usage:%4<br/>%2Approach a dead body.<br/>%2Use [%3%13%4] or [%3%14%4] and select %3Place Body In Bodybag%4. + + + Take Prisoners + + + %3Cable Ties%4 enable a soldier to capture and detain another soldier. Once apprehended, the captor gains the ability to inspect the prisoner's belongings, set them free, or accompany them to an alternate area. Transporting escorted prisoners is also possible, including loading them into vehicles if needed. Depending on your settings, units may need to surrender before being taken captive.<br/><br/>%3Usage:%4<br/>%2Approach the unit and use the [%3%13%4].<br/>%2The interaction is located around the hands in the form of a handcuffs icon.<br/>%2Repeat to release. + + + Phone In An Explosion + + + The %3Cellphone%4 is functionally a %3Clacker%4. Use it to connect and detonate an explosive device. Multiple devices can be linked to the cellphone and called within the phonebook.<br/><br/>%3Usage:%4<br/>%2Place an explosive.<br/>%2Use [%3%13%4], select %3Explosives%4, and select %3Cellphone%4.<br/>%2Open the cellphone interface with [%3%12%4].<br/>%2Navigate the phone book with the arrows and select your calling number.<br/>%2Call the number to detonate. + + + Portable Reading Lights + + + %3Chemlight Shields%4 give you the ability to read your map, even in dark environments. However, when using %3Chemlight Shields%4, you will have a slight glow around you.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2elect %3Chemlights%4 and %3Prepare Chemlight Shield (Color)%4.<br/>%2Open %3Map%4.<br/>%2Use [%3%12%4] and select %3Flashlights%4 where you will find your chemlight shield. + + + Remote Detonation + + + Use %3Clackers%4 to connect and detonate an explosive device. Multiple devices can be linked to a clacker and detonated on different channels.<br/><br/>%3Usage:%4<br/>%2Place an explosive.<br/>%2Use [%3%13%4], select %3Explosives%4, and select the %3Clacker%4 you wish to link to.<br/>%2Open the ACE interface with [%3%12%4].<br/>%2Select %3Explosives%4 and select a %3Clacker%4.<br/>%2Select the %3Explosive%4 you wish to detonate. + + + Navigate + + + The %3DAGR%4 is a simpler version of the %3MicroDAGR GPS%4. It has similar features but lacks the topographic and satellite imaging functions of the %3MicroDAGR GPS%4.<br/><br/>%3Usage:%4<br/>%2Equip a %3DAGR%4.<br/>%2Use [%3%12%4] and select %3Configure%4 or %3Toggle%4.<br/><br/>The following menus are available when configuring your %3DAGR:%4<br/>%11%2Data View: WIP<br/>%11%2GoTo WP: Select a waypoint to track.<br/>%11%2WP List: Add/Edit/Remove waypoints.<br/>%11%2Connect To: Connect %3DAGR%4 to the %3Vector 21 Rangefinder%4.<br/>%11%2Options + + + Explosive Revenge + + + The %3Dead Man's Switch%4 is a device that allows a soldier to detonate an %3Explosive%4 when the soldier dies.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Explosives%4.<br/>%2Select %3Dead Man's Switch%4 and connect the desired %3Explosive%4.<br/>%2Repeat the process and disconnect to reverse. + + + The %3Defusal Kit%4 allows defusal of explosives.<br/><br/>%3Usage:%4<br/>%2Equip a %3Defusal Kit%4.<br/>%2Safely approach an %3Explosive%4.<br/>%2Use [%3%13%4] and select %3Defuse%4. + + + Defuse Explosives + + + Protect Your Hearing + + + %3Ear Plugs%4 help prevent hearing damage from repeat loud noises near a soldier. Insert %3Ear Plugs%4 to lower volume of a soldier's environment and prevent %3Combat Deafness%4.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Insert %3Ear Plugs%4. + + + Get To Cover + + + The %3Entrenching Tool%4 allows soldiers to dig trenches to help defend their position. The soldier must be on soil in order to dig a trench.<br/><br/>%3Usage:%4<br/>%2Equip an %3Entrenching Tool%4.<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select the type of trench you wish to build. + + + Flashlights + + + Illuminate Your Map + + + %3Flashlights%4 give you the ability to read your map, even in dark environments. However, when using %3Flashlights%4, you will have a slight glow around you.<br/><br/>%3Usage:%4<br/>%2On the map screen, use [%3%12%4] and select %3Flashlights%4.<br/>%2Select the %3Flashlight%4 you want to use and select %3On%4.<br/><br/>%3Available Flashlight Items%4:<br/>%2 Fulton MX-991<br/>%2 KSF-1<br/>%2 Maglite XL50<br/><br/>%3NOTE:%4<br/>Flashlight states are persistent. + + + Observe From The Skies + + + The %3High-Altitude Unit Navigated Tactical Imaging Round (HuntIR)%4 is designed to be fired from a grenade launcher. After being fired in the air, the built-in parachute will be deployed and the IR CMOS camera will activate, providing a video stream until it touches the ground or is shot down.<br/><br/>%3Usage:%4<br/>%2Equip a %3HuntIR Monitor%4 and compatible ammunition.<br/>%2Fire the %3HuntIR Round%4 as high as possible over the area you want to observe.<br/>%2Open the %3HuntIR Monitor%4.<br/>%2Use [%3%12%4], select %3Equipment%4.<br/>%2Select %3Activate HuntIR Monitor%4. + + + Track Your Team With Stealth + + + The %3IR Strobe%4 is a throwable that emits an IR light pulse intermittently. The %3IR Strobe%4 can also be attached to a soldier, making it useful for tracking teammates under night vision devices.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select %3Attach%4 and select the %3IR Strobe%4. + + + Pocket Weatherstation + + + The %3Kestrel 4500 Pocket Weather Tracker%4 is a mini weather station useful for collecting the the following weather data:<br/>%2Heading and wind direction<br/>%2Crosswind and headwind<br/>%2Altitude and barometric pressure<br/>%2Wet bulb temperature<br/>%2Humidity and dewpoint<br/>%2Density altitude<br/>%2Wind chill and temperature<br/>%2Time and date<br/>%2Minimum, maximum, and average values<br/><br/>%3Usage:%4<br/>%2Equip a %3Kestrel%4.<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select %3Open%4. + + + Triangulate Your Position + + + The %3Map Tools%4 are a set of tools that allows a soldier to measure distances and angles. Useful for land, and calculating firing solutions for artillery.<br/><br/>%3Usage:%4<br/>%2Open %3Map%4.<br/>%2Use [%3%12%4] and select %3Map Tools%4.<br/>%2 The Tool can be moved by dragging with [%3Left-Click%4] while holding [%3ALT%4]. + + + Advanced DAGR + + + The %3MicroDAGR GPS%4 is an advanced version of the %3DAGR%4. It provides position, navigation, and timing (PNT) data to include:<br/>%2Compass and heading<br/>%2Date and hour synced to the mission<br/>%2Elevation (relative to sea level)<br/>%2Current speed<br/>%2GPS with topographic and satellite view<br/>%2Creating, naming, and deleting waypoints<br/>%2Friendly identification (Requires ACE BLUFOR Tracker Setting)<br/>Connection to the Vector-21 Rangefinder for data import (waypoint creation and grid reference of ranged targets)<br/><br/>%3Usage:%4<br/>%2For usage instructions, please visit the dedicated %3MicroDAGR%4 wiki. + + + Range Tables + + + Get A Firing Solution + + + %3Range Tables%4 allow for a soldier to estimate accurate shot placement on direct or indirect targets (depending on asset). The %3Range Table%4 will automatically fill depending on the soldiers selected weapon/vehicle.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select the desired %3Range Table%4. + + + Ropes + + + Tow With Ease + + + %3Ropes%4 have multiple uses including %3Towing%4 vehicles and %3Fast Roping%4 from helicopters.<br/><br/>%3Towing:%4<br/>%2Approach a vehicle.<br/>%2Use [%3%13%4] and select %3Towing%4.<br/>%2Select rope length.<br/>%2Select attachment point on towing vehicle.<br/>%2Select attachment on towed vehicle.<br/><br/>%3Available Rope Lengths:%4<br/>%2 3.2 meters<br/>%2 6.2 meters<br/>%2 12.2 meters<br/>%2 15.2 meters<br/>%2 18.3 meters<br/>%2 27.4 meters<br/>%2 36.6 meters + + + Expand Your Fortifications + + + %3Sandbags%4 are sacks made of sturdy material, filled with sand, used for a variety of purposes such as creating barriers or providing stability in construction projects. Useful in expanding larger placed fortifications.<br/><br/>%3Usage:%4<br/>%2Equip a %3Sandbag (Empty)%4.<br/>%2Use [%3%12%4] and select %3Deploy Sandbag%4.<br/>%2Follow on-screen instructions for placement. + + + Lower Firearm Temperature + + + %3Spare Barrels%4 allow a soldier to reduce their weapon's heat significantly. After a short delay, the weapon's barrel will be swapped and its heat reduced. A soldier may also check the temperature of any barrels within their inventory. Not all weapons support swapping barrels.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select %3Swap Barrel%4.<br/>%2Resume operation after barrel swap is complete. + + + Spray Paint + + + Tag Your Territory + + + %3Spray Paint%4 is used to tag surfaces with various symbols.<br/><br/>%3Usage:%4<br/>%2Move close to a surface (wall, vehicle, ground, etc).<br/>%2Use [%3%12%4] and select %3Tag%4.<br/>%2Choose a symbol.<br/><br/>%3Available Colors:%4<br/>%2Black<br/>%2Blue<br/>%2Green<br/>%2Red + + + Brace From Anywhere + + + The %3SSWT Kit%4 is a deployable tripod that allows a soldier to brace their aim when deployed. Use it when you need an elevated shooting position and there are no other objects around.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select %3SSWT Kit%4 and follow the on screen prompts to place. + + + Keep Eyes In The Sky + + + %3UAV Batteries%4 are used to recharge a UAV's energy storage. Especially useful for small UAVs.<br/><br/>%3Usage:%4<br/>%2Equip a %3UAV Battery%4<br/>%2Approach a %3UAV%4 with its %3Engine Off%4.<br/>%2Use [%3%13%4] and select %3Recharge%4. + + + Making An Entrance + + + %3Wirecutters%4 are a tool that allows a soldier to bypass wired fencing. Useful for creating backdoor entrances into secure areas.<br/><br/>%3Usage:%4<br/>%2Move close to a fence.<br/>%2Use [%3%12%4] and select %3Cut Fence%4. + + + Items + 物品 + Objets + Objetos + Oggetti + Przedmioty + Предметы + Gegenstände + Předměty + Itens + 물품 + 物品 + アイテム + Eşyalar + + + ACE3 + + + Build Fortifications + + + The %3Fortify Tool%4 allows soldiers to build fortifications provided by their mission creator.<br/><br/>%3Usage:%4<br/>%2Pick up a %3FortifyTool%4.<br/>%2Use [%3%12%4] and select %3Fortify%4.<br/>%2Select an available fortification and follow the on screen prompts for placement. + + + Breaking and Entering + + + %3Lockpicks%4 are used to gain access to locked vehicles.<br/><br/>%3Usage:%4<br/>%2Equip a %3Lockpick%4.<br/>%2Approach a %3Locked%4 vehicle.<br/>Use [%3%13%4] and select %3Lockpick Vehicle%4.<br/><br/><t underline='1'>%3Note:%4</t> Lockpicks and keys are only available via scripting or ACE Vehicle Key modules. + + + Vehicle Keys + + + Lock/Unlock Vehicles + + + %3Vehicle Keys%4 are used to lock/unlock your vehicles. Vehicle keys can exist for the whole side, or keys can be created for a particular vehicle itself.<br/><br/>%3Usage:%4<br/>%2Equip a %3Vehicle Key%4.<br/>%2Approach the vehicle that the key belongs to.<br/>Use [%3%13%4] and select %3Lock/Unlock Vehicle%4.<br/><br/><t underline='1'>%3Note:%4</t> Lockpicks and keys are only available via scripting or ACE Vehicle Key modules. + + +