Announcement

Collapse
No announcement yet.

GameplayAbilitiesModule?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GameplayAbilitiesModule?

    Hello!

    While building the UE4 source, I noticed an interesting module being built: GameplayAbilitiesModule.

    Could anyone shed any light on what this is? Searching the googles and forums yielded nothing...

    Sounds like it could be a pretty cool tool...

    #2
    Originally posted by Syntaks View Post
    Hello!

    While building the UE4 source, I noticed an interesting module being built: GameplayAbilitiesModule.

    Could anyone shed any light on what this is? Searching the googles and forums yielded nothing...

    Sounds like it could be a pretty cool tool...
    As no one else has replied, I will try to answer as best as I can. I'm still looking through the source code and that module is very much still under development. Some quite big changes have been added in the last few weeks (the module has actually be in the source in one form or another since 4.0).

    The basic building blocks of the module are: GameplayAbilities ,GameplayEffects and GameplayAttributes (there are also GameplayCues and GameplayCueNotifies , but I haven't looked into them much yet).

    GameplayAttribues are as the names suggests, a set of attributes that a actor can have (You can actually have multiple sets of attributes). So the example set, has things like health , max health, damage , strenght etc.

    GameplayEffects act on the attributes. So when a gameplayeffect is applied, it will have some effect on the attributes. A simple example is a GameplayEffect that simple lowers health by some amount.

    Some gameplayeffects are applied instantly and then that effect has no further function to play. While other effects are applied and their lifetime can either be until they are removed or until a certain duration is over. If you applied one of these longer living effects that lowered the health by x amount, and then later removed that effect, the health would regain that x amount when you removed the effect. These lingering gameplayeffects can also effect other GameplayEffects that have either already been applied or are applied later. A simple example here could be a effect that multiples the effect of any health related gameplayeffects that are applied after it. So if a player had some curse spell applied to them, then that could be a gameplayeffect that multiples any further damage the player takes by 2 (until the curse gameplayeffect is removed).

    GameplayEffects can also have extension method that do some further processing when either they or other gameplayeffects are applied. One of the examples is a shield effect, that when applied will intercept any further gameplayeffects that lower health, and instead of letting those effects alter the health attribute, will first apply the damage to it's own shield strength. Once it's shield strength is depleted then it removes itself, so that further effects will preform their normal function.

    Now going back to the attributes, each set of these can also have functions that can do processing when any gameplayeffect is applied to one of the attributes. Again one of the examples is that instead of letting the effects alter the health attribute, the effects will alter the damage one, the attribute set will process each of those gameplayeffects so that it can apply that damage to the health itself.

    GameplayAbilities are the classes that normally apply the gameplayeffects. GameplayAbilities then can be "given" to a actor, and can either bind to some input or bind to a gameplayevent. Once either the input or event triggers the ability, then the ability is activated (some abilities will have just one static instance, while others will have one instance per actor, while others will create a new instance every time they are activated). Once a ability is activated it can do things like apply gameplayeffects, play a animation, start a abilityTask. AbilityTasks are latent tasks that can send events back to the abilities.

    One of the example abilities is one that simple applies a gameplayeffect to a actor, then plays a Montage on that actor, then waits until the montage has finished (which triggers a callback to the ability), and then removes the gameplayeffect.

    The module also uses the GameplayTag module a lot. GameplayAbilities and GameplayEffects can have tags added to them, that can have various effects. Like a GameplayAbility can have tags added that block other abilities from activating at the same time, if they have a matching tag. Or they can have tags that cancel other already activated abilities if they have a matching tag.

    GameplayEffects can also have tags. For example a effect could have a tag that means once that effect is applied to a actor, then that actor is "immune" to effects that have a matching tag.

    Not sure if that helps much or not, but it is quite a complex module and I've only just recently started looking at it, but it is a very useful module.
    Last edited by MattW; 11-18-2014, 03:36 PM.

    Comment


      #3
      That helps thanks! That's kind of the jist I got from it as well. It does look like a work-in-progress. Now that I think about it, I *think* I remember a while ago an epic dev saying it's used it Fortnight, but I could be mistaken. Definitely looks like a really useful module.

      Anyway, thanks for the info!

      Comment


        #4
        YOu might read as well this thread. It's about the skill system.
        Part of it is used for Fortnite. I didn't know if it's still WIP or not, if changes have been made since the thread.

        In all case, it seems that all those stuffs are WIP, but could be a start for you to look on How Epic thinks about managing those stuff.

        Comment


          #5
          Originally posted by Elvince View Post
          YOu might read as well this thread. It's about the skill system.
          Part of it is used for Fortnite. I didn't know if it's still WIP or not, if changes have been made since the thread.

          In all case, it seems that all those stuffs are WIP, but could be a start for you to look on How Epic thinks about managing those stuff.
          The GameplayAbilities system is the skills system. They renamed it a few months ago.

          Comment


            #6
            @Mattw

            Thanks for the Explanation on this system. It's clearly powerful but also complex to learn & analyse.

            It could be great to have a Epix feedback on the state of the code and it will reach a "non wip" state in the next months. I'm sure this code will be really useful in many situations.

            Thanks,

            Comment

            Working...
            X