Git Product home page Git Product logo

gameplayabilityextensions's Introduction

GameplayAbility Extensions

Fair Warning: This is a C++ plugin for UE5

Plugin for some common things I often find myself needing when working with the GameplayAbility plugin. It's broken up into modules so that you can pick and choose what you need.

Much of this is a mash-up of tranek's fantastic GASShooter and GASDocumentation, along with some parts from Epic's Valley of the Ancients demo, and the sample project ActionRPG.

The intent is to move a lot of common/useful functionality into a project agnostic plugin that can be re-used. I try to expose functionality to blueprints, but it's expected that a dev will be using both C++ and blueprints.

Documentation is poor. I'm working on it.

Module: AxCommon

Core functionality for the plugin. UAxAbilitySystemComponent and UAxGameplayAbility make up the bulk of this module, but there's also some helpers for attributes, animations, debugging, AI and the EnhancedInput.

Module: AxModularGameplay

A set of replacement actors for pawns, characters, game modes, player states, ai and player controllers that support the ModularGameplay features added in UE5, and are also set up out of the box for working with gameplay abilities.

The controller and pawn actors register themselves with the UGameFrameworkComponentManager so they can be used with ModularGameplay.

For players, the ability system component exists on the AModularPlayerState, and for AI it's on AModularAIController. The pawns, AModularPawn and AModularCharacter, pick these up from either the controller or the player state and re-expose them for ease of use.

Pawns also have a startup ability set that is automatically applied when they receive their ability system.

Other modules: AxInteractions and AxWeapons

These are still very much in flux, and I don't really recommend using them. I move code from my main project into these if I can abstract them away from the game sufficiently, but they're very volatile.

Helpers (in no particular order)

still working on updating this list ;)

AnimNotify_SendGameplayEvent

Animation notify for sending a gameplay event to the owning actor.

Animation notify exampel

When prototyping, I have a GameplayAbility that forwards the event to the actor's blueprint for easy testing. In my actual game, I use this for things like equip/unequip.

AxGameplayAbilitySet

A data asset that is collection of GameplayAbilities and effects that can easily be given to a character. Make sure you choose AxGameplayAbilitySet and not GameplayAbilitySet.

Add Data Asset Pick AxGameplayAbilitySet Add GameplayAbilities and GameplayEffects

I often use these to grant collections of abilities on character startup or when equipping a weapon, but they can also be used to apply multiple effects from a GameplayAbility. GameplayTags can be granted to a character this way as well through the use of a startup GameplayEffect that grants the tags.

/** Called by ::PossessedBy(...) or ::OnRep_Controller() */
void APrototypeCharacter::AddStartupGameplayAbilities()
{
	check(AbilitySystemComponent);

	if (GetLocalRole() == ROLE_Authority && StartupAbilitySet && !StartupAbilitySetHandles.Any())
	{
		StartupAbilitySet->Give(GetAbilitySystemComponent(), this, GetCharacterLevel(), StartupAbilitySetHandles);
	}
}

gameplayabilityextensions's People

Contributors

dakitten2358 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.