gruppe-adler / grad-loadout Goto Github PK
View Code? Open in Web Editor NEWDeclarative loadout system
Declarative loadout system
RHS allows the player to choose which type of weapon optic he prefers (3D
/ 2D
/ PiP
), which can lead to issues with custom gear.
Take the following example:
In my mission I allow a series of primary weapon optics to choose from:
primaryWeaponOptics[] = { /* [...] */ "rhsusf_acc_su230", /* [...] */};
The player has chosen 3D
as his preferred optic type in the RHS settings.
He chooses - or gets randomly assigned - the SU-230/PVS (rhsusf_acc_su230
).
RHS instantly switches his optic to rhsusf_acc_su230_3d
, which is the 3D version of the SU-230/PVS.
Custom gear checks if the player has an "allowed item", before letting him change it via custom gear. rhsusf_acc_su230_3d
is not one of the allowed items, so he won't be able to switch his weapon optics.
I haven't had a deeper look, but it seems like RHS has a config value (rhs_optic_base
) in all its optics, to reference the "base" optic. For our example rhsusf_acc_su230_3d
has the config entry:
rhs_optic_base = "rhsusf_acc_su230";
We could check if the item has such a config value and if it does, we would check if that base optic is included in the list of allowed optics.
esp see here: https://github.com/CBATeam/CBA_A3/pull/1406/files
the locality event handler that ensures loadouts are applied after locality switch might break the part where I do remoteExec #2
do use CBA_fnc_setLoadout
which will trigger a nice event. nice.
20:37:54 [GRAD] (loadout) INFO: no loadout config values could be found for <NULL-object>
20:37:54 [GRAD] (loadout) INFO: no loadout config values could be found for <NULL-object>
^ this being logged at the end of the "find loadout for X" routine is a bit…late
setUnitLoadout
works in 3DEN, testing the loadout inside it would save a lot of game starts.
{[_x] call grad_loadout_fnc_doLoadoutForUnit; } forEach switchableunits
does not work out of the box (even when setting faction manually) so needs some deeper understanding of the code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.