Skip to main content

B. Import Agate GAS Template

  • Follow the Step A until completed. Make sure to close Your Project first while doing this Step.
  • Download the latest Agate GAS and extract it.
  • You will find Content and Source folder, copy them to your project. It is optional whether you want to keep the Content/AgateGASExample or not, it just contains some example of Attribute, Ability, Character, etc.
  • Open YourProject.uproject (you can find it on root of Your Project) in Notepad or any text editor.
  • Add below code to Modules section.
    {
      "Name": "AgateGAS",
      "Type": "Runtime",
      "LoadingPhase": "Default",
      "AdditionalDependencies": [
        "Engine",
        "GameplayAbilities"
      ]
    }
  • It should become like this then:
    {
      ...
      "Modules": [
        {
          "Name": "MyProject",
          "Type": "Runtime",
          "LoadingPhase": "Default"
        },
        {
          "Name": "AgateGAS",
          "Type": "Runtime",
          "LoadingPhase": "Default",
          "AdditionalDependencies": [
            "Engine",
            "GameplayAbilities"
          ]
        }
      ],
      ...
    }
  • And then open YourProject.sln solution from Visual Studio.
  • Find YourProject.Build.cs from Solution Explorer, you should find it on Games/YourProject/Source/YourProject.

    image.png

  • Add "AgateGAS" at its PublicDependencyModuleNames, your code should be like this:
    PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AgateGAS" });
  • And then, select Build - Rebuild solution, wait until finished.
  • From Solution Explorer, move to Games/YourProject/Config/DefaultEngine.ini.
  • In the bottom of [/Script/Engine.Engine], add AssetManagerClassName=/Script/AgateGAS.AGASAssetManager.

    image.png

  • From File Explorer, find DefaultGameplayTags.ini at YourProject/Config.
  • Add these lines at the bottom to add some required tags. Tags used as identifier for any effect, ability, or many things, you'll become friendly with it later.
    +GameplayTagList=(Tag="Ability",DevComment="Ability Tag.")
    +GameplayTagList=(Tag="Ability.StillEvenStunned",DevComment="Ability Tag that means the ability will still run even the caster dead.")
    +GameplayTagList=(Tag="AnimEvent",DevComment="Parent Tag for every AnimNotify")
    +GameplayTagList=(Tag="AnimEvent.ExecDamage",DevComment="AnimEvent as signal for executing damage.")
    +GameplayTagList=(Tag="Cooldown",DevComment="Cooldown Tag.")
    +GameplayTagList=(Tag="Cooldown.Attack",DevComment="Attack Cooldown Tag.")
    +GameplayTagList=(Tag="Data.Cooldown",DevComment="Cooldown Data that could be passed from Ability.")
    +GameplayTagList=(Tag="Effect.RemovedOnDead",DevComment="Effect that needs to remove when character is dead.")
    +GameplayTagList=(Tag="State",DevComment="State that character has, including Buff or Debuff.")
    +GameplayTagList=(Tag="State.Dead",DevComment="State that means the character is dead.")
    +GameplayTagList=(Tag="State.Debuff",DevComment="State that means a negative effect to character.")
    +GameplayTagList=(Tag="Target",DevComment="Target Tag.")
    +GameplayTagList=(Tag="Target.Enemy",DevComment="Enemy Target Tag.")
  • Open Your Project in Unreal Engine again.
  • Click play and you should see AgateGas initialized in the Output Log.

    image.png

  • You can also see the AgateGAS content from C++ Classes in Content Browser.