GASify - Gameplay Ability System for Unity

Asset Store Page

GASify - Gameplay Ability System for Unity

What is it?

A Gameplay Ability System (GAS) is a framework/toolkit to create any game mechanic.
A GAS is like a collection of gears to build any kind of ability.
It uses Attributes, Tags, Effects and Modifiers to model any imaginable interaction.

You can build MMO/Action RPG abilities, crazy roguelike upgrades/effects, soulslike poise/stamina/dodge/animation synced systems and immersive sim objects and elemental interactions.

GASify is inspired by Unreal’s Gameplay Ability System.

DOCS: Introduction | GASify

Examples:

  • A spell ability that lasts 10s and heals your target every 2s for 20% of your total Mana.
  • A passive that increases your CriticalChance by 5% of your MaxHealth but reduces your Armor by 30% your CriticalChance.
  • A buff that increases your AttackSpeed by 10% of your missing Health for 5s every time you receive damage.
  • A fireball spell that sets objects on fire, causes instant 120% of your MaxDamage as fire damage and 50% your MinDamage as burning damage over 60s.
  • A water spell that stops any fire effect and converts any remaining damage over time into healing.
  • A projectile ability that disables any Healing effect on a given target, reduces his Armor by 10% of your total Mana, and makes anyone in a 10m radius get poisoned for 50s.
  • A mind control spell that allows a player to take control of another character (We use a calculation to put your custom code to change camera/control input)
  • You can combine and stack effects, attributes and tags to create any crazy mechanic!
  • Abilities can also represent a wide array of ingame actions, and are not limited to powers or spells that players explicitly use. Hit reactions, object interaction, animations, vfx/sfx cues are also easily handled.

DOCS: Introduction | GASify

Features:

Networking/Multiplayer.
Mirror integration with ability Prediction and Replication!

VERY performant.
Nothing runs on Update().
Handles up to 200k ability activations per second.
9180899--1355518--performanceBenchmark.png

Easy workflow.
Setup abilities/effects workflow via code or editor (SriptableObjects).

Overview:

  • Ability System Component: Main component to put on any entity. Holds the entity’s attributes, abilities that can be used, and Gameplay Effects/Tags currently applied to it.
  • Attributes: Numeric values e.g. Health, Mana, MaxHealth, MaxMana, MovementSpeed, AttackDamage, CriticalChance, Armor.
  • Modifiers: Change the value of attributes (Add, Multiply, Override). Modifiers come in 4 flavors: Simple (a constant value), Scalable (Scales it’s output by a function e.g. Curve), AttributeBased (Uses another attribute to compute the modifier output) and SetByCaller (Set by some external data)
  • Gameplay Tags: Can be used to categorize effects/abilities or define states. e.g. Element.Fire, Stats.Buff.Stun or State.Movement.Sprinting
  • Gameplay Effect: Apply a set of modifiers and Calculations to an AbilitySystemComponent (asc). These effects can have different durations: Instant, Duration, Infinite and Periodic.
  • Calculations: Adds the capability to create any custom behavior/effect. Needs custom code. Executed with the GameplayEffect that has it attached.
  • Gameplay Ability: Abilities with cost, cooldown, activation/blockage tags. Included: Instant, Passive, Toggle, Ability Tasks (Abilities that are async and need to wait for external events, like animation triggers). Melee and projectile ability example included. Any other custom, non general ability can be created by extending this class.
  • Gameplay Cues: Play sounds, particle effects, animations by just adding a tag to the effect/ability and the prefab on CueLibrary.
  • Asset Store Page*
  • Questions? Suggestions?* Hit me up at feliperoddd@gmail.com

.

3 Likes

Hi guys, thanks for all the emails.

I’ve just submitted the package to the asset store.

Here is an overview video:

Finally released:

If you guys have any feature suggestion, please send it my way.

One of the main advantages of Unreals GAS system was how easy it was to network sync. Is this built with similar ideology in mind? Would love to try syncing this with something like FishNet

Absolutely! It is designed with multiplayer in mind. A Mirror integration is on the roadmap, so its gonna have it out of the box soon™.
If you want another networking or dont want to wait, it’s actually super simple to synchronize:
Everything has handles you can subscribe to (e.g. OnGameplayEffectApplied, or OnGameplayTagsChanged) you can just synchronize the data when these happens.

1 Like

Is there a reason it needs to overwrite project settings? Do you have a discord or some other place to contact for simple questions as well?

Not at all. You can skip it. (I think there is some setup for the tests suit that needs it. But as an user you can skip it.)

We can have it. Just made a Gasify channel on my discord, if anyone is interested
https://discord.com/invite/cgY3RwH

Hi guys, thanks for the emails/reports.

Quick patch incoming:
v1.0.1
-fixes crashes on 2022.3+ when auto-refreshing attributes/tags happens when also loading new scene.
-additional attributeLibrary dictionary syncing without auto-refresh

Incoming features for v1.1.0:
-TriggerAbility, a generic ability that is automatically triggered when tags are applied. Supports triggering for any multitude of cases, on application of Instant Effect, on application or removal of Duration/Infinite effect and any combination in between.

-Initial Mirror integration supporting basic server authoritative synchronization.

I can’t seem to build. It can’t seem to find your ReadOnly attribute as its tagged to compile in Editor only. Are there other scripts that should be in the editor folder?

Forgot to add some compiling directives. That’s patched now for v1.0.2, should be in the asset store in a few days.

Meanwhile, I’ll send the new files to your inbox, so you can build it immediately.

Hi guys, I’ve been working on a integration with Mirror.
Here is a little progress video, showcasing:

  1. Replication: Abilities are automatically replicated across clients.
  2. Prediction: Abilities fire immediately on client, even with latency, then are validated on server and replicated to clients.
  3. Performance: In the video, each Unity instance has 100 networked enemies. Each Ability activation produces one projectile targeting each enemy (100 projectiles). We can have thousands of projectiles with very low performance impact. We can also have dozens of thousands of active abilities with minimal performance impact.

Hello guys, update incoming.

1.1.0:

  • Passive Ability,
  • Trigger Ability,
  • Chance to Apply GameplayEffects,
  • Multiplayer/Networking Integration with Mirror. (Replication + Prediction),
  • Input Buffering (Buffers ability activation)
  • Data Groups (Reuse, Compose ASC data)

We also have a docs page now:

Free version available on github: GitHub - felipeggrod/gasify: A Gameplay Ability System for Unity

FREE VERSION INCLUDES:

  • Abilities, Effects, GameplayCues, GameplayTags, Attributes.
  • Networking/Multiplayer Integration using Mirror.
  • 3 types of Abilities: Instant, Projectile, TargetedProjectile. (Full version: Instant, Projectile, TargetedProjectile, Toggle, Passive, Trigger)
  • Input buffering

FREE VERSION LIMITATIONS:

  • Duration and Infinite GEs have a fixed duration.
  • No Calculations (Can’t add custom code/attribute formulas to GameplayEffects)
  • Only Add/Subtract Attributes Operator (Fullversion: Multiply and Override)
  • Only Basic Modifier (constant Value) (Fullversion: Basic, ScalableModifier, AttributeBasedModifier CSVModifier)
  • No Tag filters. (Full version: filter ability and effect activation/removal using tags).

Incoming in 1.2.0:

  • GameplayEffect Behaviour (drag and drop code behaviour to any gameplay effect e.g. Physics functionality)
  • Targetting System module
  • GameplayEffect stacking constraints
  • AnimationAbility (A simple implementation to trigger effects using animation events)
  • GameplayCues refactoring

Hello, when can we get the 1.2.0, i am looking forward to gameplay effect behavior and animationability.
@akuno

Soon :slight_smile: These features are not very stable yet, But if you want to try it out, shoot me an email and I’ll send you the version with them.

Will it support netcode for entites?

Integration with netcode could happen in the future if it becomes widely adopted, but, for now, it’s not planned in the near future.