From 084a285f0f78d102fa801f3daf71f4dea18b95e9 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Oct 2023 18:10:45 +0200 Subject: [PATCH 1/8] Update CBA macros to 3.16.0 SUBCOMPONENT support --- .../cba/addons/main/script_macros_common.hpp | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/include/x/cba/addons/main/script_macros_common.hpp b/include/x/cba/addons/main/script_macros_common.hpp index be13021..2683f3b 100644 --- a/include/x/cba/addons/main/script_macros_common.hpp +++ b/include/x/cba/addons/main/script_macros_common.hpp @@ -15,7 +15,7 @@ - Provide a solid structure that can be dynamic and easy editable (Which sometimes means we cannot adhere to Aim #1 ;-) An example is the path that is built from defines. Some available in this file, others in mods and addons. - Follows Standard: + Follows Standard: Object variables: PREFIX_COMPONENT Main-object variables: PREFIX_main Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf @@ -29,6 +29,10 @@ and include your mod's script_macros.hpp In your scripts you can then include the addon's component.hpp with relative path) + use in subcomponents (subconfigs) + define SUBCOMPONENT and include parent component's script_component.hpp + currently only supported by SUBADDON, additional macros may be added in the future + TODO: - Try only to use 1 string type " vs ' - Evaluate double functions, and simplification @@ -54,6 +58,10 @@ #define ADDON DOUBLES(PREFIX,COMPONENT) #define MAIN_ADDON DOUBLES(PREFIX,main) +#ifdef SUBCOMPONENT + #define SUBADDON DOUBLES(ADDON,SUBCOMPONENT) +#endif + /* ------------------------------------------- Macro: VERSION_CONFIG Define CBA Versioning System config entries. @@ -857,15 +865,10 @@ Macro: ISNILS() #define COMPILE_SCRIPT(var1) compileScript ['PATHTO_SYS(PREFIX,COMPONENT_F,var1)'] -#define VERSIONING_SYS(var1) class CfgSettings \ -{ \ - class CBA \ - { \ - class Versioning \ - { \ - class var1 \ - { \ - }; \ +#define VERSIONING_SYS(var1) class CfgSettings { \ + class CBA { \ + class Versioning { \ + class var1 {}; \ }; \ }; \ }; @@ -1032,12 +1035,9 @@ Macro: PATHTO_FNC() #define QQEFUNC(var1,var2) QUOTE(QEFUNC(var1,var2)) #ifndef PRELOAD_ADDONS - #define PRELOAD_ADDONS class CfgAddons \ -{ \ - class PreloadAddons \ - { \ - class ADDON \ - { \ + #define PRELOAD_ADDONS class CfgAddons { \ + class PreloadAddons { \ + class ADDON { \ list[]={ QUOTE(ADDON) }; \ }; \ }; \ @@ -1275,9 +1275,11 @@ Macro: xSTRING() #define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) + #define SUBCSTRING(var1) QUOTE(TRIPLES($STR,SUBADDON,var1)) #define LLSTRING(var1) localize QUOTE(TRIPLES(STR,ADDON,var1)) #define LELSTRING(var1,var2) localize QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define LSUBLSTRING(var1) localize QUOTE(TRIPLES(STR,SUBADDON,var1)) #endif From 09e6d4bcd25827c56b6252fc54a4b013ad690045 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Oct 2023 18:19:27 +0200 Subject: [PATCH 2/8] Add Compatibility component --- addons/compatibility/$PBOPREFIX$ | 1 + addons/compatibility/README.md | 3 +++ addons/compatibility/config.cpp | 15 +++++++++++++++ addons/compatibility/script_component.hpp | 14 ++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 addons/compatibility/$PBOPREFIX$ create mode 100644 addons/compatibility/README.md create mode 100644 addons/compatibility/config.cpp create mode 100644 addons/compatibility/script_component.hpp diff --git a/addons/compatibility/$PBOPREFIX$ b/addons/compatibility/$PBOPREFIX$ new file mode 100644 index 0000000..8a85caa --- /dev/null +++ b/addons/compatibility/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afm\addons\compatibility diff --git a/addons/compatibility/README.md b/addons/compatibility/README.md new file mode 100644 index 0000000..06e6eef --- /dev/null +++ b/addons/compatibility/README.md @@ -0,0 +1,3 @@ +# Compatiblity + +Adds compatiblity for various mods, loaded as needen thanks to `skipWhenMissingDependencies` diff --git a/addons/compatibility/config.cpp b/addons/compatibility/config.cpp new file mode 100644 index 0000000..65c3d59 --- /dev/null +++ b/addons/compatibility/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "A3_Data_F_Decade_Loadorder" + }; + author = "veteran29"; + VERSION_CONFIG; + }; +}; diff --git a/addons/compatibility/script_component.hpp b/addons/compatibility/script_component.hpp new file mode 100644 index 0000000..e363173 --- /dev/null +++ b/addons/compatibility/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT compatibility +#include "\z\afm\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_COMPATIBILITY + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_COMPATIBILITY + #define DEBUG_SETTINGS DEBUG_SETTINGS_COMPATIBILITY +#endif + +#include "\z\afm\addons\main\script_macros.hpp" From c1043d765f3392dda3b9f1ffff9ef4209c67adea Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Oct 2023 18:28:02 +0200 Subject: [PATCH 3/8] Fix errors caused by KKA3_ACE_Extension 766491311 --- addons/compatibility/config.cpp | 3 +- .../kka3_ace_extension/CfgMoves.hpp | 47 +++++++++++++++++++ .../kka3_ace_extension/config.cpp | 19 ++++++++ .../kka3_ace_extension/script_component.hpp | 2 + 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 addons/compatibility/kka3_ace_extension/CfgMoves.hpp create mode 100644 addons/compatibility/kka3_ace_extension/config.cpp create mode 100644 addons/compatibility/kka3_ace_extension/script_component.hpp diff --git a/addons/compatibility/config.cpp b/addons/compatibility/config.cpp index 65c3d59..c426baa 100644 --- a/addons/compatibility/config.cpp +++ b/addons/compatibility/config.cpp @@ -9,7 +9,8 @@ class CfgPatches { requiredAddons[] = { "A3_Data_F_Decade_Loadorder" }; - author = "veteran29"; + author = "ArmaForces"; + authors[] = {"veteran29"}; VERSION_CONFIG; }; }; diff --git a/addons/compatibility/kka3_ace_extension/CfgMoves.hpp b/addons/compatibility/kka3_ace_extension/CfgMoves.hpp new file mode 100644 index 0000000..cb9db49 --- /dev/null +++ b/addons/compatibility/kka3_ace_extension/CfgMoves.hpp @@ -0,0 +1,47 @@ + +class CfgMovesBasic; +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + class AmovPercMstpSnonWnonDnon; + class CutSceneAnimationBase; + class relax_44: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class relax_45: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class attention1: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class attention2: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class attention3: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class relax_tes: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class relax_21: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class relax_24: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class relax_3: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class relax_32: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class relax_8: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class relax_7: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + class rattention2: CutSceneAnimationBase { + actions = "RifleStandActions"; + }; + }; +}; diff --git a/addons/compatibility/kka3_ace_extension/config.cpp b/addons/compatibility/kka3_ace_extension/config.cpp new file mode 100644 index 0000000..933530b --- /dev/null +++ b/addons/compatibility/kka3_ace_extension/config.cpp @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "KKA3_ACE_Extension_Anim" + }; + skipWhenMissingDependencies = 1; + author = "ArmaForces"; + authors[] = {"veteran29"}; + VERSION_CONFIG; + }; +}; + +#include "CfgMoves.hpp" diff --git a/addons/compatibility/kka3_ace_extension/script_component.hpp b/addons/compatibility/kka3_ace_extension/script_component.hpp new file mode 100644 index 0000000..e54253e --- /dev/null +++ b/addons/compatibility/kka3_ace_extension/script_component.hpp @@ -0,0 +1,2 @@ +#define SUBCOMPONENT kka3_ace_extension +#include "..\script_component.hpp" From 1bae0ff382f1c96683b9e45e9a4808d4b21deee7 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Oct 2023 18:32:51 +0200 Subject: [PATCH 4/8] Fix being able to move in static animations --- .../kka3_ace_extension/CfgMoves.hpp | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/compatibility/kka3_ace_extension/CfgMoves.hpp b/addons/compatibility/kka3_ace_extension/CfgMoves.hpp index cb9db49..c06a249 100644 --- a/addons/compatibility/kka3_ace_extension/CfgMoves.hpp +++ b/addons/compatibility/kka3_ace_extension/CfgMoves.hpp @@ -5,43 +5,43 @@ class CfgMovesMaleSdr: CfgMovesBasic { class AmovPercMstpSnonWnonDnon; class CutSceneAnimationBase; class relax_44: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class relax_45: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class attention1: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class attention2: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class attention3: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class relax_tes: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class relax_21: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class relax_24: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class relax_3: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class relax_32: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class relax_8: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class relax_7: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; class rattention2: CutSceneAnimationBase { - actions = "RifleStandActions"; + actions = "CivilStandActions"; }; }; }; From 941c074f18ccd3cd2cec94fde611cd0c27b64605 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Oct 2023 18:33:17 +0200 Subject: [PATCH 5/8] Add KKA3 (commented) to launch config --- .hemtt/project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.hemtt/project.toml b/.hemtt/project.toml index e9ee339..0c2309e 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -41,6 +41,7 @@ workshop = [ "450814997", # CBA_A3 "2369477168", # ADT "463939057", # ACE +# "766491311", # KKA3 ACE Extension ] parameters = [ "-name=dev", From 65ec2a55b5e54ed902d184ab2a70c07515252de3 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Oct 2023 18:35:22 +0200 Subject: [PATCH 6/8] Depend on AFM main, bump min version to 2.14 --- addons/compatibility/config.cpp | 1 + addons/main/script_mod.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/compatibility/config.cpp b/addons/compatibility/config.cpp index c426baa..763f4b4 100644 --- a/addons/compatibility/config.cpp +++ b/addons/compatibility/config.cpp @@ -7,6 +7,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { + "afm_main", "A3_Data_F_Decade_Loadorder" }; author = "ArmaForces"; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 264ae73..3a3c3b3 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -7,7 +7,7 @@ #define VERSION_STR MAJOR.MINOR.PATCH #define VERSION_AR MAJOR,MINOR,PATCH -#define REQUIRED_VERSION 2.00 +#define REQUIRED_VERSION 2.14 #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(AFM - COMPONENT_BEAUTIFIED) From ffcfe3aa475723542dbb52205f5b05adcf4180b0 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Oct 2023 18:39:52 +0200 Subject: [PATCH 7/8] Remove tabs --- .../kka3_ace_extension/CfgMoves.hpp | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/addons/compatibility/kka3_ace_extension/CfgMoves.hpp b/addons/compatibility/kka3_ace_extension/CfgMoves.hpp index c06a249..2ee2eb9 100644 --- a/addons/compatibility/kka3_ace_extension/CfgMoves.hpp +++ b/addons/compatibility/kka3_ace_extension/CfgMoves.hpp @@ -1,47 +1,47 @@ class CfgMovesBasic; class CfgMovesMaleSdr: CfgMovesBasic { - class States { - class AmovPercMstpSnonWnonDnon; - class CutSceneAnimationBase; - class relax_44: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class relax_45: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class attention1: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class attention2: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class attention3: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class relax_tes: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class relax_21: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class relax_24: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class relax_3: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class relax_32: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class relax_8: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class relax_7: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - class rattention2: CutSceneAnimationBase { - actions = "CivilStandActions"; - }; - }; + class States { + class AmovPercMstpSnonWnonDnon; + class CutSceneAnimationBase; + class relax_44: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_45: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class attention1: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class attention2: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class attention3: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_tes: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_21: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_24: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_3: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_32: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_8: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_7: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class rattention2: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + }; }; From cb4594bb59fb7ce5278b2d6056d858d77213a870 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Oct 2023 18:45:59 +0200 Subject: [PATCH 8/8] Fix typo --- addons/compatibility/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/compatibility/README.md b/addons/compatibility/README.md index 06e6eef..ecbc442 100644 --- a/addons/compatibility/README.md +++ b/addons/compatibility/README.md @@ -1,3 +1,3 @@ # Compatiblity -Adds compatiblity for various mods, loaded as needen thanks to `skipWhenMissingDependencies` +Adds compatiblity for various mods, loaded as needed thanks to `skipWhenMissingDependencies`