Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

GASify - Gameplay Ability System for Unity

Discussion in 'Assets and Asset Store' started by akuno, Jul 10, 2023.

  1. akuno

    akuno

    Joined:
    Dec 14, 2015
    Posts:
    73
    socialMediaImage.png




    GASify - Gameplay Ability System for Unity

    What is it?

    A Gameplay Ability System (GAS) is a toolkit that you can use to create any game mechanic.
    Using an analogy, 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 modelled after Unreal's Gameplay Ability System.



    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.

    Features:

    VERY performant.
    Nothing runs on Update().
    Handles up to 200k ability activations per second.

    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

    .
    ss1.PNG ss2.png
     
    Last edited: Sep 27, 2023
    henry_unity434, BetaMark and mbussidk like this.
  2. akuno

    akuno

    Joined:
    Dec 14, 2015
    Posts:
    73
    Hi guys, thanks for all the emails.

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

    Here is an overview video:

     
  3. akuno

    akuno

    Joined:
    Dec 14, 2015
    Posts:
    73
  4. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    137
    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
     
  5. akuno

    akuno

    Joined:
    Dec 14, 2015
    Posts:
    73
    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.
     
    BlankMauser likes this.
  6. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    137
    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?
     
  7. akuno

    akuno

    Joined:
    Dec 14, 2015
    Posts:
    73
    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
    If I take too long to answer, please send me a dm on discord.
     
    Last edited: Oct 15, 2023
  8. akuno

    akuno

    Joined:
    Dec 14, 2015
    Posts:
    73
    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.
     
  9. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    137
    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?
     
  10. akuno

    akuno

    Joined:
    Dec 14, 2015
    Posts:
    73
    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.