From c44247061af6c5df4554fb7c666355e81489ab7f Mon Sep 17 00:00:00 2001 From: IndigoFox Date: Tue, 6 Feb 2024 20:56:42 -0800 Subject: [PATCH] bug fixes from dedicated testing --- README.md | 25 ++++++++++++++----- defines/BattalionInfo.hpp | 2 +- .../client/functions/fn_addZenModules.sqf | 18 +++++++++---- .../functions/fn_checkPlayerInventory.sqf | 2 +- .../functions/fn_calculateServerStats.sqf | 4 +-- .../fn_addArsenalObjectSpawnBoxActions.sqf | 10 ++++++++ framework/script_macros.hpp | 1 + .../vehicleFlags/functions/fn_initClient.sqf | 10 ++++++-- 8 files changed, 55 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 655431a..d48d6bd 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,27 @@ # Installation Instructions -Once your mission has been created and saved in the Arma 3 Eden Editor, download the latest mission template zip and copy its contents to the folder where your mission file lives. +The only file which should be pre-existing in your mission folder is `mission.sqm`, once freshly saved from Arma 3's EDEN Editor. -The only file which should be pre-existing in your mission folder is `mission.sqm` +Download the latest mission template zip from the [latest release](https://17th-gs.iceberg-gaming.com:5443/hizumi/MissionTemplate/releases/latest) and copy its contents to the folder where your mission file lives. Once copied, the final structure should appear similar to the following: ```markdown -├── functions/ +├── aaFrameworkUtils/ +├── defines/ +├── framework/ ├── images/ ├── scripts/ ├── sounds/ ├── textures/ +├── CHANGELOG.md ├── description.ext +├── mission_settings.hpp ├── mission.jpg ├── mission.sqm -├── mission_settings.hpp ``` +If you're building a mission for use in an op, please delete "aaFrameworkUtils" and "framework\x". These are for the purposes of development and add size bloat to the mission download when players connect to your mission. + After the requisite configuration file edits have been made, your mission is ready to be packed into a pbo for deployment. # Files @@ -46,7 +51,7 @@ This directory is for organizational purposes for any images you wish to use in ## scripts/ -This directory is for organizational purposes for any custom scripts you wish to use in your mission. +This directory is for organizational purposes for any custom scripts you wish to use in your mission. > **Note**: Scripts may need to be edited to account for their new location ## sounds/ @@ -56,4 +61,12 @@ This directory is for organizational purposes for any custom scripts you wish to ## textures/ -This directory is for organizational purposes for textures files used by mission scripts \ No newline at end of file +This directory is for organizational purposes for textures files used by mission scripts. + +## DEV NOTES + +All modules are broken apart as such in /framework. Client and server inits are managed in /framework/init. + +Pay attention to framework/script_mod.hpp prior to deployment of releases, as the debug settings within will determine what is logged during prod missions. + +CfgFunctions is sensitive to the folder/script_component.hpp of each module. \ No newline at end of file diff --git a/defines/BattalionInfo.hpp b/defines/BattalionInfo.hpp index 58920bc..bcb4f8b 100644 --- a/defines/BattalionInfo.hpp +++ b/defines/BattalionInfo.hpp @@ -8,7 +8,7 @@ #define RRC_CALLSIGN TIGER #define MEDIC_CALLSIGN LIFELINE #define ALPHA_CALLSIGN BLACKJACK -#define ECHO_CALLSIGN ZOOMER +#define ECHO_CALLSIGN FIREBRAND #define WPN_CALLSIGN BLACKFOOT // Define the frequencies for the Battalion diff --git a/framework/client/functions/fn_addZenModules.sqf b/framework/client/functions/fn_addZenModules.sqf index 211aa43..0aeb533 100644 --- a/framework/client/functions/fn_addZenModules.sqf +++ b/framework/client/functions/fn_addZenModules.sqf @@ -1,12 +1,14 @@ +#include "..\script_component.hpp" + if ( !hasInterface ) exitWith {}; [ - "17th Battalion", + QUOTE(MODULE_CATEGORY_NAME), "Create Resupply Box", { params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]]; // get parent definition - private _supplyCratesCfg = call milsim_resupply_fnc_getSupplyCratesCfg; + private _supplyCratesCfg = call EFUNC(resupply,getSupplyCratesCfg); // get the subclass names private _boxTypesAvailable = _supplyCratesCfg call BIS_fnc_getCfgSubClasses; @@ -36,11 +38,17 @@ if ( !hasInterface ) exitWith {}; _args params ["_pos", "_target", "_keysSorted"]; - private _box = [_target, _typeOptionSelected, _pos] call milsim_resupply_fnc_createBox; + private _box = [_target, _typeOptionSelected, _pos] call EFUNC(resupply,createBox); if (isNull _box) exitWith { ["Resupply Box", "WARNING: Failed to locate or create box!"] call BIS_fnc_curatorHint; }; - ["Resupply Box", format["Created box from class %1", _typeOptionSelected]] call BIS_fnc_curatorHint; + [ + "Resupply Box", + format[ + "Created %1", + getText((call EFUNC(resupply,getSupplyCratesCfg)) >> _typeOptionSelected >> "displayName") + ] + ] call BIS_fnc_curatorHint; }, {}, [_pos, _target] @@ -50,7 +58,7 @@ if ( !hasInterface ) exitWith {}; [ - "17th Battalion", + QUOTE(MODULE_CATEGORY_NAME), "Grounds Cleanup", { params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]]; diff --git a/framework/common/functions/fn_checkPlayerInventory.sqf b/framework/common/functions/fn_checkPlayerInventory.sqf index 14874ae..ab30d33 100644 --- a/framework/common/functions/fn_checkPlayerInventory.sqf +++ b/framework/common/functions/fn_checkPlayerInventory.sqf @@ -56,7 +56,7 @@ _playerItems pushBack (uniform _player); [ - LEVEL_INFO, + LEVEL_DEBUG, QUOTE(COMPONENT), "CHECKING PLAYER INVENTORY", [_player] call EFUNC(common,addPlayerInfoToArray) diff --git a/framework/performance/functions/fn_calculateServerStats.sqf b/framework/performance/functions/fn_calculateServerStats.sqf index b0ec77d..f4a0a46 100644 --- a/framework/performance/functions/fn_calculateServerStats.sqf +++ b/framework/performance/functions/fn_calculateServerStats.sqf @@ -45,8 +45,8 @@ [QGVARMAIN(serverEfficiency), [ [ - ["float", QGVAR(server_raw_cps), missionNamespace getVariable [QGVAR(server_raw_cps), -1]], - ["float", QGVAR(server_cps), missionNamespace getVariable [QGVAR(server_cps), -1]] + ["float", QGVARMAIN(raw_cps), missionNamespace getVariable [QGVAR(server_raw_cps), -1]], + ["float", QGVARMAIN(cps), missionNamespace getVariable [QGVAR(server_cps), -1]] ] ]] call CBA_fnc_localEvent; }; diff --git a/framework/resupply/functions/fn_addArsenalObjectSpawnBoxActions.sqf b/framework/resupply/functions/fn_addArsenalObjectSpawnBoxActions.sqf index 299b1b5..74977f9 100644 --- a/framework/resupply/functions/fn_addArsenalObjectSpawnBoxActions.sqf +++ b/framework/resupply/functions/fn_addArsenalObjectSpawnBoxActions.sqf @@ -46,6 +46,16 @@ private _supplyCrateTypesCfgs = _supplyCratesCfg call BIS_fnc_returnChildren; configName _supplyCrateCfg, getPos _target ] call FUNC(createBox); + // log action use in server RPT + [ + LEVEL_INFO, + QUOTE(COMPONENT), + "Supply crate spawned", + [player, [ + ["supplyCrateType", _supplyCrateDisplayName], + ["position", getPos _target] + ]] call EFUNC(common,addPlayerInfoToArray) + ] remoteExec [QEFUNC(common,log), 2]; }, [_cfg], 0, false, true, "", ""]; (_arsenalBox getVariable [QGVAR(supplyCrateActionIDs), []]) pushBack _actionID; } forEach _supplyCrateTypesCfgs; diff --git a/framework/script_macros.hpp b/framework/script_macros.hpp index 430b810..09f2599 100644 --- a/framework/script_macros.hpp +++ b/framework/script_macros.hpp @@ -1,5 +1,6 @@ // all text before cba include #define SETTINGS_GROUP_NAME 17th Battalion +#define MODULE_CATEGORY_NAME 17th Battalion #define LEVEL_TRACE -1 #define LEVEL_DEBUG 0 diff --git a/framework/vehicleFlags/functions/fn_initClient.sqf b/framework/vehicleFlags/functions/fn_initClient.sqf index 061b456..7ebe0fd 100644 --- a/framework/vehicleFlags/functions/fn_initClient.sqf +++ b/framework/vehicleFlags/functions/fn_initClient.sqf @@ -22,6 +22,8 @@ private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_ //////////////////////////////////////////////////////////////////////// [_parentClass, "InitPost", { + + //////////////////////////////////////////////////////////////////////// // create the root action //////////////////////////////////////////////////////////////////////// @@ -46,13 +48,17 @@ private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_ // create the flag category actions (with nested flag actions) //////////////////////////////////////////////////////////////////////// params ["_target", "_player", "_params"]; - _params params ["_rootActionID", "_flagCategoryCfgs"]; + _params params ["_rootActionID"]; + + private _vehicleFlagsCfg = call FUNC(getVehicleFlagsCfg); + if (isNull _vehicleFlagsCfg) exitWith {[]}; + private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_returnChildren; // return category child actions with individual flag actions nested as children [_rootActionID, _flagCategoryCfgs] call FUNC(getActionsFlagCategories); }, // child code - [_rootActionID, _flagCategoryCfgs], // params + [_rootActionID], // params nil, // position 4, // distance [false, false, false, false, false], // other params