I am currently implementing GAS into my project, and hit of a roadblock when it comes to a rogue-like ability system that adds or adjusts to base abilities.
Adding to attributes for stronger attacks etc is no problem. But I am not sure how to approach Adding more to the base abilities. For example Adding an Explosive damage to a base Melee attack ability.
Apart from Adding tags and checking for them. If there a better way to do this?
i havent used GAS much but i have my own similar system, so my advice would be to treat it a Gameplay Effect. So the ability could be FireWeapon and on hit you could add any number of Effects such as explosive or fire/cold etc
Because of how flexible GAS is, there’s actually quite a lot of different ways to do it and the “best” or simplest way will probably depend heavily on exactly what sort of mutations means your abilities can be subjective.
One way could be to continuously add tags onto your character and then your abilities are classed by their base functionality i.e. fire a bullet and the effect of when the bullet is spawned you can do lots of checks and switches depending on the tags that your character has. E.g. if you want to change your damage from point to AOE from a projectile, then you can do a switch and spawn a different projectile class if you have the explosive power, for example.
If you have a mutation system that will affect multiple abilities in similar ways, then perhaps there’s parent gameplay ability classes you can maybe define some of that branching functionality on, so you don’t have to repeat the implementation on all the children.
If you’re doing more subtle mutations, i.e. just changing damage calculation or modifiers, then that’s a good opportunity where you can use gameplay effects only to either listen for tags and you can perform some basic logic checking in gameplay abilities or get more advanced in C++ with gameplay effect execution calculations and then do some advance checking there.
you’re just getting comfortable with gas my recommendation would be to take what I would describe as the first simplistic step forward that supports a system like this try making your power ability modifiers add tags to your actor persistently via a persistent gameplay effect or otherwise where the effect of the effect is adds a tag and then in your abilities itself when your ability is activated do a branching switch check does actor have tag and if yes then perform a different logic path or add to the logic path of your core approach this will give you a feel for how this looks and works and you can either define this behavior in C++ to make it more robust or you can update your implementation to suit your mutation’s needs.