This shows how it looks and works in the game (ignore the Gun Buggy, that's not part of any what I posted):
Note:
-CommandButtons moving +1 slot to the right per experience level is not part of the posted code, it merely shows that each unit uses it's own CommandSet on experience level 0/1/2/3
-changing or re-applying a RIDER by pressing either the "hold fire" or "fire at will" button always resets the unit's experience back to 0/3; thus I had to spawn levelup crates inside the units, re-applying their experience level whenever that was the case
-> the issue remaining with that is that partial experience gained by the unit towards it's next level is being lost upon toggling the firemode; unfixable while using this method
-another issue is that each RIDER demands another CommandSet for spawning the matching number of levelup crates; that makes toggling firemodes for large groups of units with different experience levels clunky but works without issues on units sharing the same experience level
-the "StealthUpdate" module I used in the video was still flawed. Fixed module:
Behavior = StealthUpdate ModuleTag_StealthQuadCannon
StealthDelay = 2000 ; msec
UseRiderStealth = No
InnateStealth = No
StealthForbiddenConditions = FIRING_PRIMARY FIRING_SECONDARY
OrderIdleEnemiesToAttackMeUponReveal = Yes
End
Another thing I found out during testing:
WeaponSet "Conditions" are indeed treated as OR conditions, meaning any single can be true to make use of that WeaponSet. However: the WeaponSet offering more exact matches in it's Conditions is more likely to be chosen than a WeaponSet with less exact matches either due to less conditions being listed or due to more conditions being listed but less being met.
Conditions = HERO PLAYER_UPGRADE CRATEUPGRADE_ONE
and
Conditions = HERO CRATEUPGRADE_ONE
with a GLA unit of 3/3 experience level (hero) and a single crate turret upgrade the WeaponSet using "Conditions = HERO CRATEUPGRADE_ONE" is prefered as more exact match.
If I just have the same unit, lacking a crate turret upgrade and also lacking the proper experience rank but then just and only research it's upgrade it'll use the "Conditions = HERO PLAYER_UPGRADE CRATEUPGRADE_ONE" WeaponSet because no other WeaponSets exist that have "PLAYER_UPGRADE" among their Conditions even though the unit doesn't match the other requirements.
This means I can define WeaponSet Conditions with missing Conditions if I intend so to save me from adding a million WeaponSets under all Conditions and they'll still be used properly if I make use of the other Conditions properly.
That also means if I forget to add proper conditions on the way, like for this example-GLA-unit with only 2 WeaponSets:
WeaponSet
Conditions = None
Weapon = PRIMARY BoringWeapon
End
WeaponSet
Conditions = HERO CRATEUPGRADE_TWO PLAYER_UPGRADE
Weapon = PRIMARY UltimateWeapon
End
...then the unit would receive the "UltimateWeapon" upon either reaching 3/3 unit experience or crate-upgrading it's turret twice or the player researches the unit's upgrade because other WeaponSets taking care of individual condition states are missing, like:
Conditions = CRATEUPGRADE_ONE
Conditions = CRATEUPGRADE_TWO
Conditions = PLAYER_UPGRADE
Conditions = VETERAN
Conditions = ELITE
Conditions = HERO
Conditions = CRATEUPGRADE_ONE PLAYER_UPGRADE
Conditions = CRATEUPGRADE_ONE PLAYER_UPGRADE
Conditions = CRATEUPGRADE_ONE PLAYER_UPGRADE
Conditions = CRATEUPGRADE_TWO PLAYER_UPGRADE
Conditions = CRATEUPGRADE_TWO PLAYER_UPGRADE
Conditions = CRATEUPGRADE_TWO PLAYER_UPGRADE
Conditions = VETERAN CRATEUPGRADE_ONE
Conditions = ELITE CRATEUPGRADE_ONE
Conditions = HERO CRATEUPGRADE_ONE
Conditions = VETERAN CRATEUPGRADE_TWO
Conditions = ELITE CRATEUPGRADE_TWO
Conditions = HERO CRATEUPGRADE_TWO
Conditions = VETERAN PLAYER_UPGRADE
Conditions = ELITE PLAYER_UPGRADE
Conditions = HERO PLAYER_UPGRADE
Conditions = VETERAN CRATEUPGRADE_ONE PLAYER_UPGRADE
Conditions = ELITE CRATEUPGRADE_ONE PLAYER_UPGRADE
Conditions = HERO CRATEUPGRADE_ONE PLAYER_UPGRADE
Conditions = VETERAN CRATEUPGRADE_TWO PLAYER_UPGRADE
Conditions = ELITE CRATEUPGRADE_TWO PLAYER_UPGRADE
Conditions = HERO CRATEUPGRADE_TWO PLAYER_UPGRADE
...to cover all possible WeaponSet upgrade stages. Thus the unit uses the most matching WeaponSet instead. I haven't figured out yet what's the priority, like if there's only 1 WeaponSet adressing the proper experience rank, another WeaponSet solely adressnig the proper PLAYER_UPGRADE and another WeaponSet solely adressing the proper CRATE_UPGRADE_[ONE / TWO].
Edited by UsernameUsername, 24 August 2017 - 09:22 AM.