Spearhead 1944 Arsenal (WW2): Difference between revisions
Jump to navigation
Jump to search
(Added more info) |
m (code formatting) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | |||
[[Spearhead 1944]] comes with a custom [[Arma 3: Arsenal|Arsenal]]. It automatically filters out non WW2 content (based on author tag, modfolder name and cfgPatches class naming). | [[Spearhead 1944]] comes with a custom [[Arma 3: Arsenal|Arsenal]]. It automatically filters out non WW2 content (based on author tag, modfolder name and cfgPatches class naming). | ||
Line 22: | Line 24: | ||
["Preload"] call SPE_Arsenal_fnc_arsenal; | ["Preload"] call SPE_Arsenal_fnc_arsenal; | ||
["Open",false] spawn SPE_Arsenal_fnc_arsenal; | ["Open", false] spawn SPE_Arsenal_fnc_arsenal; | ||
["Open",true] spawn SPE_Arsenal_fnc_arsenal; | ["Open", true] spawn SPE_Arsenal_fnc_arsenal; | ||
["Open",[_full,_cargo,_unit]] call SPE_Arsenal_fnc_arsenal; | ["Open", [_full, _cargo, _unit]] call SPE_Arsenal_fnc_arsenal; | ||
["AmmoboxInit",[_ammobox, false]] call SPE_Arsenal_fnc_arsenal; | ["AmmoboxInit", [_ammobox, false]] call SPE_Arsenal_fnc_arsenal; | ||
["AmmoboxInit",[_ammobox, true,{side group player == west}]] call SPE_Arsenal_fnc_arsenal; | ["AmmoboxInit", [_ammobox, true, {side group player == west}]] call SPE_Arsenal_fnc_arsenal; | ||
</sqf> | </sqf> | ||
Line 34: | Line 36: | ||
=== Per Side/faction === | === Per Side/faction === | ||
The equipment available can be filtered based on [[Side|side]] or [[faction]] by assigning values to '''BIS_fnc_arsenal_sides''' or ''' | The equipment available can be filtered based on [[Side|side]] or [[faction]] by assigning values to '''BIS_fnc_arsenal_sides''' or '''BIS_fnc_arsenal_factions'''. | ||
The filters can be combined and one can provide multiple sides or factions too. | |||
<sqf> | <sqf> | ||
Line 51: | Line 55: | ||
<sqf> | <sqf> | ||
SPE_Arsenal_WhiteListedClasses = ["SPE_Arsenal_WhiteListedClasses",nil] call BIS_fnc_getParamValue; | SPE_Arsenal_WhiteListedClasses = ["SPE_Arsenal_WhiteListedClasses", nil] call BIS_fnc_getParamValue; | ||
SPE_Arsenal_ModFilterTags = ["SPE_Arsenal_ModFilterTags",nil] call BIS_fnc_getParamValue; | SPE_Arsenal_ModFilterTags = ["SPE_Arsenal_ModFilterTags", nil] call BIS_fnc_getParamValue; | ||
SPE_Arsenal_AuthorsFilters = ["SPE_Arsenal_AuthorsFilters",nil] call BIS_fnc_getParamValue; | SPE_Arsenal_AuthorsFilters = ["SPE_Arsenal_AuthorsFilters", nil] call BIS_fnc_getParamValue; | ||
SPE_Arsenal_ModFolderFilters = ["SPE_Arsenal_ModFolderFilters",nil] call BIS_fnc_getParamValue; | SPE_Arsenal_ModFolderFilters = ["SPE_Arsenal_ModFolderFilters", nil] call BIS_fnc_getParamValue; | ||
SPE_Arsenal_MinimumScopeGear = ["SPE_Arsenal_MinimumScopeGear",2] call BIS_fnc_getParamValue; | SPE_Arsenal_MinimumScopeGear = ["SPE_Arsenal_MinimumScopeGear", 2] call BIS_fnc_getParamValue; | ||
SPE_Arsenal_MinimumScopeRandomGear = ["SPE_Arsenal_MinimumScopeRandomGear",1] call BIS_fnc_getParamValue; | SPE_Arsenal_MinimumScopeRandomGear = ["SPE_Arsenal_MinimumScopeRandomGear", 1] call BIS_fnc_getParamValue; | ||
</sqf> | </sqf> | ||
You can check the defaults via console/logging above parameters or loadFile | You can check the defaults via console/logging above parameters or loadFile.<pre>\WW2\SPE_Missions_p\Arsenal_p\Functions\fn_postInit.sqf</pre> | ||
=== Mid Mission Adjustment === | === Mid-Mission Adjustment === | ||
You can adjust the WW2 content filter mid mission via the following variable in the uiNamespace. | You can adjust the WW2 content filter mid mission via the following variable in the uiNamespace. | ||
<sqf> | <sqf> | ||
uiNamespace setVariable ["SPE_Arsenal_WhiteListedClasses",SPE_Arsenal_WhiteListedClasses]; | uiNamespace setVariable ["SPE_Arsenal_WhiteListedClasses", SPE_Arsenal_WhiteListedClasses]; | ||
uiNamespace setVariable ["SPE_Arsenal_ModFilterTags",SPE_Arsenal_ModFilterTags]; | uiNamespace setVariable ["SPE_Arsenal_ModFilterTags", SPE_Arsenal_ModFilterTags]; | ||
uiNamespace setVariable ["SPE_Arsenal_AuthorsFilters",SPE_Arsenal_AuthorsFilters]; | uiNamespace setVariable ["SPE_Arsenal_AuthorsFilters", SPE_Arsenal_AuthorsFilters]; | ||
uiNamespace setVariable ["SPE_Arsenal_ModFolderFilters",SPE_Arsenal_ModFolderFilters]; | uiNamespace setVariable ["SPE_Arsenal_ModFolderFilters", SPE_Arsenal_ModFolderFilters]; | ||
uiNamespace setVariable ["SPE_Arsenal_MinimumScopeGear",SPE_Arsenal_MinimumScopeGear]; | uiNamespace setVariable ["SPE_Arsenal_MinimumScopeGear", SPE_Arsenal_MinimumScopeGear]; | ||
uiNamespace setVariable ["SPE_Arsenal_MinimumScopeRandomGear",SPE_Arsenal_MinimumScopeRandomGear]; | uiNamespace setVariable ["SPE_Arsenal_MinimumScopeRandomGear", SPE_Arsenal_MinimumScopeRandomGear]; | ||
uiNamespace setVariable ["SPE_ArsenalMissionNames",SPE_ArsenalMissionNames]; | uiNamespace setVariable ["SPE_ArsenalMissionNames", SPE_ArsenalMissionNames]; | ||
</sqf> | </sqf> | ||
[[Category: Spearhead 1944]] | [[Category: Spearhead 1944]] |
Latest revision as of 09:52, 11 August 2024
Spearhead 1944 comes with a custom Arsenal. It automatically filters out non WW2 content (based on author tag, modfolder name and cfgPatches class naming).
/*
Modes:
"Preload" - Preload item configs for Arsenal (without preloading, configs are parsed the first time Arsenal is opened)
No params
"Open" - Open the Arsenal
0 (Optional): BOOL - true to open full Arsenal, with all categories and items available (default: false)
"AmmoboxInit" - Add virtual ammobox. Action to access the Arsenal will be added automatically on all clients.
0: OBJECT - ammobox
1 (Optional): BOOL - true to make all weapons and items in the game available in the box (default: false)
2 (Optional): Condition for showing the Arsenal action (default: {true})
Passed arguments are the same as in addAction condition, i.e., _target - the box, _this - caller
"AmmoboxExit" - Remove virtual ammobox
0: OBJECT - ammobox
*/
["Preload"] call SPE_Arsenal_fnc_arsenal;
["Open", false] spawn SPE_Arsenal_fnc_arsenal;
["Open", true] spawn SPE_Arsenal_fnc_arsenal;
["Open", [_full, _cargo, _unit]] call SPE_Arsenal_fnc_arsenal;
["AmmoboxInit", [_ammobox, false]] call SPE_Arsenal_fnc_arsenal;
["AmmoboxInit", [_ammobox, true, {side group player == west}]] call SPE_Arsenal_fnc_arsenal;
Filtering
Per Side/faction
The equipment available can be filtered based on side or faction by assigning values to BIS_fnc_arsenal_sides or BIS_fnc_arsenal_factions.
The filters can be combined and one can provide multiple sides or factions too.
Mission Parameters
SPE_Arsenal_WhiteListedClasses = ["SPE_Arsenal_WhiteListedClasses", nil] call BIS_fnc_getParamValue;
SPE_Arsenal_ModFilterTags = ["SPE_Arsenal_ModFilterTags", nil] call BIS_fnc_getParamValue;
SPE_Arsenal_AuthorsFilters = ["SPE_Arsenal_AuthorsFilters", nil] call BIS_fnc_getParamValue;
SPE_Arsenal_ModFolderFilters = ["SPE_Arsenal_ModFolderFilters", nil] call BIS_fnc_getParamValue;
SPE_Arsenal_MinimumScopeGear = ["SPE_Arsenal_MinimumScopeGear", 2] call BIS_fnc_getParamValue;
SPE_Arsenal_MinimumScopeRandomGear = ["SPE_Arsenal_MinimumScopeRandomGear", 1] call BIS_fnc_getParamValue;
You can check the defaults via console/logging above parameters or loadFile.
\WW2\SPE_Missions_p\Arsenal_p\Functions\fn_postInit.sqf
Mid-Mission Adjustment
You can adjust the WW2 content filter mid mission via the following variable in the uiNamespace.
uiNamespace setVariable ["SPE_Arsenal_WhiteListedClasses", SPE_Arsenal_WhiteListedClasses];
uiNamespace setVariable ["SPE_Arsenal_ModFilterTags", SPE_Arsenal_ModFilterTags];
uiNamespace setVariable ["SPE_Arsenal_AuthorsFilters", SPE_Arsenal_AuthorsFilters];
uiNamespace setVariable ["SPE_Arsenal_ModFolderFilters", SPE_Arsenal_ModFolderFilters];
uiNamespace setVariable ["SPE_Arsenal_MinimumScopeGear", SPE_Arsenal_MinimumScopeGear];
uiNamespace setVariable ["SPE_Arsenal_MinimumScopeRandomGear", SPE_Arsenal_MinimumScopeRandomGear];
uiNamespace setVariable ["SPE_ArsenalMissionNames", SPE_ArsenalMissionNames];