-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtered Loadouts #1270
Filtered Loadouts #1270
Conversation
Explain the purpose of this in CBA in 500 words or less. |
Filtered Loadouts: A Case ForLoadouts are an integral aspect of the Arma 3 gameplay, an aspect that players of any game mode are familiar. Persistent MissionsThere are several communities and game modes that take advantage of persistence spanning multiple sessions. These missions rely on utilities like Loadout ManagementVarious popular modifications have implemented various forms of loadout management. Take ACE 3's ACE Arsenal, even such a well developed and managed community project suffers from the inability to properly handle ID'd items. Loadouts are saved, loaded, and exported with ID'd items causing potential instability and unexpected behavior. Filtered loadouts specified by mod makers could assure that these issues are avoided both during saving and loading, instantly resolving any previous issues as poisoned loadouts are repaired during load. Dynamic Role SelectionGame modes that implement dynamic role selection may rely on user-generated or config loadouts. These loadouts can change over time introducing potential mission breaking changes. Imagine a mission based on inserting, retrieving an item, and extracting back to the start. This could be a potential issue as future loadouts or config changes by additional modifications could result in missions ending instantly if players receive a loadout containing the item they are intended to retrieve. While this scenario is less likely that the two previously discussed, it is still an element that will be improved by the addition of filtered loadouts. ConclusionFiltered loadouts may not be as sexy as weapon optics or face wear randomization in the eyes of everyone, but they provide another tool in the toolbox that creators can use to increase dependability, durability, persistence, permanence, perseverance, stableness, cohesion, constancy, stability, and functionality. The simplicity of implementation for creators compared to current solutions being created will allow these benefits to be realized with ease. Arma has a rich community of creators, builders, and dreamers. Adding this utility to the already vast abilities of CBA would unlock more possibilities than this amazing project already has. It would be impossible to cover the potential of this amazing community in such a brief analysis. Historically CBA has stood for stability, functionality, and user experience. Filtered loadouts stand for the same three principals. CBA should stand with filtered loadouts. |
This will definitely be a useful addition, however, I think this can be simplified to just two functions:
|
Totally agree with what mharis001 wrote. Removal makes no sense (here and I argue in general). If you need to disable it on the fly, turn it off by condition in the filter script.
2 functions are enough.
lol nice dig |
Let's just appreciate his post is exactly 500 words long. :D |
505 according to MS Word. |
Don't count the title. |
So in TFAR I iterate all BI Arsenal loadouts after you close arsenal, and remove the ID from TFAR radios, |
I guess that could be added to CBA as part of this PR? Then that functionality would be part of every mod that would use this. That would potentially cause an issue though as mod defined filters should be used, but not mission defined filters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What @mharis001 wrote.
@@ -0,0 +1,32 @@ | |||
#include "script_component.hpp" | |||
/* ---------------------------------------------------------------------------- | |||
Function: CBA_fnc_addLoadoutFilter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add blank lines between different header sections.
@@ -0,0 +1,25 @@ | |||
#include "script_component.hpp" | |||
/* ---------------------------------------------------------------------------- | |||
Function: CBA_fnc_filterLoadout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add blank lines between different header sections.
@@ -0,0 +1,3 @@ | |||
#include "script_component.hpp" | |||
|
|||
GVAR(loadoutFilters) = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this directly in XEH_preInit.sqf
; one line does not need a separate file.
|
||
params [["_function", {}, [{}]]]; | ||
|
||
if (_function isEqualTo {}) exitWith {-1}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove -1
and add nil
at the end of file since header says function returns nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could return false, and true if it worked.
---------------------------------------------------------------------------- */ | ||
SCRIPT(filterLoadout); | ||
|
||
params [["_loadout", [], [[]]]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should handle receiving the different inputs (OBJECT, STRING, CONFIG) for the getUnitLoadout
command as well as a normal loadout array.
Close in favour of #1503 |
When merged this pull request will:
CBA_fnc_getUnitLoadout
CBA_fnc_filterLoadout
CBA_fnc_addLoadoutFilter
CBA_fnc_removeLoadoutFilter