Skip to content

Custom Ability Base Class

Jared Taylor edited this page Mar 21, 2025 · 14 revisions

Important

This guide will assist you if you need your abilities to inherit from an ability base class that isn't UGameplayAbility

Note

PushPawn handles ability activation itself, you only need to GiveAbility(ScanAbility)
So long as you don't specifically error/assert/check for non-base class ability then this is always the case

Lyra requires all abilities extend from ULyraGameplayAbility, which the abilities included in PushPawn cannot do, as PushPawn is a plugin. Lyra is primarily why this guide exists.

Easy Difficulty Option [ Recommended ]

Tip

You can simply provide consideration in your code-base to allow abilities derived from UPushPawn_Ability
How difficult, and how much of a chore that is, really depends on your own project
This is generally the recommended solution if available to you, because it requires no changes to PushPawn

Normal Difficulty Option

Note

If you can define your custom base ability in a plugin then you can fork Push Pawn and have it inherit that

Hard Difficulty Option

Caution

The final option is to move all abilities and tasks out of PushPawn and into your own project
You may wish to fork Push Pawn to provide a version free of the original abilities and tasks, or you may use different names in your own project
This will make updating PushPawn a tedious and time-consuming process, it should be a last resort

Change API macros from PUSHPAWN_API.

Unless your relative paths are identical, you will need to go through each .cpp and update to the appropriate include path for the corresponding .h.

If you use different names, you will need to update any references to abilities and tasks.

Warning

You will likely want to reparent the blueprint content to the new classes before removing the originals

Clone this wiki locally