Prepping the Gameplay Ability System for use with Paper2D

Poking at the ability system for Ludum Dare 41 trying to make the gameplay ability system ready for 2D.
(I’m not making much progress, so I decided to at least record what I’ve learned)

resources:
https://wiki.unrealengine.com/GameplayAbilities_and_You#AttributeSet
https://forums.unrealengine.com/community/community-content-tools-and-tutorials/116578-comprehensive-gameplayabilities-analysis-series

So it looked like task #1 was to make a gameplay task that played a flipbook instead of an anim montage.

To do that properly, I needed to add my own data to the ActorInfo variable that’s passed around throughout the ability system.

So let’s chase down some code!

First spots to look are here:

and here:

So this says can be configured per project, and that you can override UAbilitySystemGlobals::AllocAbilityActorInfo. What it means is you can add an entry like this to your defaultgame.ini

This tells the ability system globals to use the class here for its globals instance – which you can subclass like so:

This lets you define your own AllocAbilityActorInfo() which you can stuff a custom FGameplayAbilityActorInfo into like so:

And now in your new subclass of FGameplayAbilityActorInfo you can override InitFromActor() to init your new variable:

More on this later