Announcement

Collapse
No announcement yet.

Able Ability System Info and Support Thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Another bug is that math behind your CONE targetting and queries is valid only for Cones 2D. 3D cones draw proper debug shape but the math you do later to filter targets is just wrong.
    Basically if something is to the left or to the right (is not aligned to X axis of the world) it will get filtered out.

    That's because you base your vertical filter on X and Z axis, but when instigator that you base your cone rotation on, will be rotated in a way the he alignes himself to Y axis, your X is 0 and you get nothing.
    I fixed it locally by adding my own Cone implementation, but basically what you want to do, for vertical part, is to, instead of taking X, take length of 2D Vector from X and Y as first axis and then add Z axis.

    So instead of doing:
    Code:
    FVector2D toTargetXZ = FVector2D(toTarget.X, toTarget.Z);
    you want something like:
    Code:
    float firstAxis = FVector2D(toTarget.X, toTarget.Y).Size();
    FVector2D toTargetXZ = FVector2D(firstAxis, toTarget.Z);
    Last edited by Pablo1517; 03-14-2019, 07:57 AM.

    Comment


      Originally posted by Pablo1517 View Post
      Another bug is that math behind your CONE targetting and queries is valid only for Cones 2D. 3D cones draw proper debug shape but the math you do later to filter targets is just wrong.
      Basically if something is to the left or to the right (is not aligned to X axis of the world) it will get filtered out.

      That's because you base your vertical filter on X and Z axis, but when instigator that you base your cone rotation on, will be rotated in a way the he alignes himself to Y axis, your X is 0 and you get nothing.
      I fixed it locally by adding my own Cone implementation, but basically what you want to do, for vertical part, is to, instead of taking X, take length of 2D Vector from X and Y as first axis and then add Z axis.

      So instead of doing:
      Code:
      FVector2D toTargetXZ = FVector2D(toTarget.X, toTarget.Z);
      you want something like:
      Code:
      float firstAxis = FVector2D(toTarget.X, toTarget.Y).Size();
      FVector2D toTargetXZ = FVector2D(firstAxis, toTarget.Z);
      Ah, good catch. I'll fix that up.
      Able Ability System - A high performance, robust ability system for UE4. Now Available!

      Comment


        Actually now when I started testing all the queries they seem to be broken. Even the debug shapes seem to be translated badly.
        Mostly likely in this function:
        Code:
        void FAblAbilityTargetTypeLocation::GetTransform(const UAblAbilityContext& Context, FTransform& OutTransform) const
        There is this line:
        Code:
        OutTransform *= FTransform(m_Rotation);
        If I understand correctly, you wanted to rotate the shape itself but since you transform OutTransform you end up rotating the entire OutTransform taken from the source actor, along with it's world space location.

        Try using this instead:
        Code:
        OutTransform.ConcatenateRotation(m_Rotation);

        Comment


          Originally posted by Pablo1517 View Post
          Actually now when I started testing all the queries they seem to be broken. Even the debug shapes seem to be translated badly.
          Mostly likely in this function:
          Code:
          void FAblAbilityTargetTypeLocation::GetTransform(const UAblAbilityContext& Context, FTransform& OutTransform) const
          There is this line:
          Code:
          OutTransform *= FTransform(m_Rotation);
          If I understand correctly, you wanted to rotate the shape itself but since you transform OutTransform you end up rotating the entire OutTransform taken from the source actor, along with it's world space location.

          Try using this instead:
          Code:
          OutTransform.ConcatenateRotation(m_Rotation);
          There should be no difference (unless that changed recently). TransformA *= TransformB breaks out into A.Rotation *= B.Rotation, A.Translation += B.Translation.
          Able Ability System - A high performance, robust ability system for UE4. Now Available!

          Comment


            Well I dunno what's under the transforms as I get easily lost in there, but it seems to be working correctly with ConcatenateRotation and with *= it doesnt.
            Anyway the bug can be reproduced with cone or box (anything but sphere ofc) by simply adding some kind of rotation in Targeting>TargetLogic->Query Location->Rotation

            Then enable debug shapes, start walking around and keep activating ability to see the shapes. As you get further from 0.0.0 point of the world, it gets more and more offset from the character

            Comment


              Originally posted by Pablo1517 View Post
              Well I dunno what's under the transforms as I get easily lost in there, but it seems to be working correctly with ConcatenateRotation and with *= it doesnt.
              Anyway the bug can be reproduced with cone or box (anything but sphere ofc) by simply adding some kind of rotation in Targeting>TargetLogic->Query Location->Rotation

              Then enable debug shapes, start walking around and keep activating ability to see the shapes. As you get further from 0.0.0 point of the world, it gets more and more offset from the character
              I'm curious if that's actually a bug with the debug draw... Either way I'll investigate once I wrap up Move To / Jump To (almost done with both).
              Able Ability System - A high performance, robust ability system for UE4. Now Available!

              Comment


                ExtraLifeMatt Hey, I was just wondering how this plugin differs from the Gamplay Ability System. Does this plugin expand that builtin system's functionality? Does this plugin offer anything notably different? Would this plugin support dynamically creating abilities at runtime and then using them?

                I'm also wondering if it would be possible to allow multiple passive abilities to be activated simultaneously. A simple use case could be like in Morrowind where you have a list of buffs and debuffs on your character.

                Comment


                  Originally posted by Decriment View Post
                  ExtraLifeMatt Hey, I was just wondering how this plugin differs from the Gamplay Ability System. Does this plugin expand that builtin system's functionality? Does this plugin offer anything notably different? Would this plugin support dynamically creating abilities at runtime and then using them?

                  I'm also wondering if it would be possible to allow multiple passive abilities to be activated simultaneously. A simple use case could be like in Morrowind where you have a list of buffs and debuffs on your character.
                  As much as I fiddled with it and it's source it looks like this plugin completely ignores Gameplay Ability System that's built-in unreal engine.
                  It's a separate system.
                  What's different is how abilities are executed and probably most notable difference and a nice addition overall is the ability timeline that you can setup tasks on, deciding over which part of ability (time wise) which tasks do their job.

                  You could somewhat create abilities at runtime but you would need c++ knowledge to expand on this plugin's system for that.

                  I haven't used passives yet, but I assume 1 AbilityComponent can have multiple passives at once but only 1 active ability at a time

                  Comment


                    Originally posted by Decriment View Post
                    ExtraLifeMatt Hey, I was just wondering how this plugin differs from the Gamplay Ability System. Does this plugin expand that builtin system's functionality? Does this plugin offer anything notably different? Would this plugin support dynamically creating abilities at runtime and then using them?

                    I'm also wondering if it would be possible to allow multiple passive abilities to be activated simultaneously. A simple use case could be like in Morrowind where you have a list of buffs and debuffs on your character.
                    Pablo1517 Pretty much nailed it but to elaborate:

                    Able was built as my replacement for Gameplay Ability System since that system was heavily built around Paragon at the time and it was really difficult to quickly throw together a simple Ability. That doesn't mean the two systems (Able and GAS) can't work side by side, but it was definitely meant as a way to replace GAS.

                    You can create Abilities at runtime, but you would have to do it in C++. However, Able allows for various runtime parameters so if you can create a basic framework of an Ability (I know I need to play some animation and then do a query and apply some amount of damage), then you can use those runtime parameters to fill in the details (play X animation, use this logic for my query, and then here's the damage based on my stats/etc).

                    And yes, you can an unlimited amount of Passives active. The whole Active vs Passive separation is entirely a design one that fits with most games, but under the hood the two are treated almost identically.
                    Able Ability System - A high performance, robust ability system for UE4. Now Available!

                    Comment


                      I have a problem with cooking the game while using Able. Apparently it makes UE4 build editor stuff when packaging a game (so no editor code there) and we get a bunch of errors.
                      In
                      Code:
                      Able.uplugin
                      Somethnig like this exists:
                      Code:
                      "Plugins": [
                              {
                                  "Name": "GameplayTagsEditor",
                                  "Enabled": true
                              }
                          ]
                      And we aren't sure if this isn't causing the problem.
                      Because for example in
                      AbleCore.Build.cs
                      you have this if
                      Code:
                      if (Target.bBuildEditor == true)
                      {
                         ...
                         PrivateDependencyModuleNames.Add("GameplayTagsEditor");
                      }
                      Here is a log from Unreal Build Tool thrown out from Packaging process:
                      https://pastebin.com/b4pLsYBF

                      EDIT:
                      Additionally I just now went to editor->Settings->Plugins, Found GameplayTagsEditor plugin and clicked "Package" only to get instantly interrupted by an error saying this
                      Code:
                      UATHelper: Package Plugin Task (Windows):   ERROR: Engine module 'Engine\Plugins\Marketing\Able\Source\AbleCore\AbleCore.Build.cs' should not depend on game module 'D:\RogueOvercooked\GameplayTagsEditor\HostProject\Plugins\GameplayTagsEditor\Source\GameplayTagsEditor\GameplayTagsEditor.Build.cs'
                      UATHelper: Package Plugin Task (Windows):          (see D:\UE4_Projects\RogueEngine\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE4Editor-Win64-Development.txt for full exception trace)
                      UATHelper: Package Plugin Task (Windows): Took 2,2769716s to run UnrealBuildTool.exe, ExitCode=5
                      Last edited by Pablo1517; 03-19-2019, 11:35 AM.

                      Comment


                        Originally posted by Pablo1517 View Post
                        I have a problem with cooking the game while using Able. Apparently it makes UE4 build editor stuff when packaging a game (so no editor code there) and we get a bunch of errors.
                        In
                        Code:
                        Able.uplugin
                        Somethnig like this exists:
                        Code:
                        "Plugins": [
                        {
                        "Name": "GameplayTagsEditor",
                        "Enabled": true
                        }
                        ]
                        And we aren't sure if this isn't causing the problem.
                        Because for example in
                        AbleCore.Build.cs
                        you have this if
                        Code:
                        if (Target.bBuildEditor == true)
                        {
                        ...
                        PrivateDependencyModuleNames.Add("GameplayTagsEditor");
                        }
                        Here is a log from Unreal Build Tool thrown out from Packaging process:
                        https://pastebin.com/b4pLsYBF

                        EDIT:
                        Additionally I just now went to editor->Settings->Plugins, Found GameplayTagsEditor plugin and clicked "Package" only to get instantly interrupted by an error saying this
                        Code:
                        UATHelper: Package Plugin Task (Windows): ERROR: Engine module 'Engine\Plugins\Marketing\Able\Source\AbleCore\AbleCore.Build.cs' should not depend on game module 'D:\RogueOvercooked\GameplayTagsEditor\HostProject\Plugins\GameplayTagsEditor\Source\GameplayTagsEditor\GameplayTagsEditor.Build.cs'
                        UATHelper: Package Plugin Task (Windows): (see D:\UE4_Projects\RogueEngine\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE4Editor-Win64-Development.txt for full exception trace)
                        UATHelper: Package Plugin Task (Windows): Took 2,2769716s to run UnrealBuildTool.exe, ExitCode=5
                        You can likely just move GameplayTagsEditor to AbleEditor.build.cs. GameplayTags used to have some weird dependencies even if you were just using the simple data types.

                        If I remove this from AbleCore.Build.cs

                        Code:
                        PrivateDependencyModuleNames.Add("GameplayTagsEditor");
                        and just add that reference in AbleEditor.Build.cs
                        Code:
                                    PrivateDependencyModuleNames.AddRange(
                                        new string[]
                                        {
                                            // ...
                                            "GameplayTagsEditor",
                                        }
                                        );
                        It seems to build fine. Give that a shot and let me know if you have any issues.
                        Able Ability System - A high performance, robust ability system for UE4. Now Available!

                        Comment


                          Originally posted by ExtraLifeMatt View Post

                          It seems to build fine. Give that a shot and let me know if you have any issues.
                          It builds fine by us too. It's the packaging that's problematic. The packaging process starts building for cooking and suddenly starts compiling editor code for no reason.

                          EDIT: We're trying to cook now an empty project with just able to confirm if it really is the problem.
                          Last edited by Pablo1517; 03-19-2019, 01:04 PM.

                          Comment


                            FALSE ALARM.
                            We confirmed it was one of the other plugins and NOT Able that prevented cooking our game.

                            Thank you for your response and sorry for the trouble.

                            Comment


                              Originally posted by Pablo1517 View Post
                              FALSE ALARM.
                              We confirmed it was one of the other plugins and NOT Able that prevented cooking our game.

                              Thank you for your response and sorry for the trouble.
                              Awesome. Glad you guys got things working.
                              Able Ability System - A high performance, robust ability system for UE4. Now Available!

                              Comment


                                Originally posted by ExtraLifeMatt View Post

                                Pablo1517 Pretty much nailed it but to elaborate:

                                Able was built as my replacement for Gameplay Ability System since that system was heavily built around Paragon at the time and it was really difficult to quickly throw together a simple Ability. That doesn't mean the two systems (Able and GAS) can't work side by side, but it was definitely meant as a way to replace GAS.

                                You can create Abilities at runtime, but you would have to do it in C++. However, Able allows for various runtime parameters so if you can create a basic framework of an Ability (I know I need to play some animation and then do a query and apply some amount of damage), then you can use those runtime parameters to fill in the details (play X animation, use this logic for my query, and then here's the damage based on my stats/etc).

                                And yes, you can an unlimited amount of Passives active. The whole Active vs Passive separation is entirely a design one that fits with most games, but under the hood the two are treated almost identically.
                                Thanks for the elaboration ExtraLifeMatt. I'm taking my time figuring out how I want to use this plugin, but the end goal is to use C++ and be able to create abilities at runtime. I'm hoping to use Able as an interpreter for a domain specific language. Abilities will be able to be created with that language and then executed using Able (all without recompiling).

                                I'm still inspecting the Able codebase and trying to figure out how I should go about constructing the DSL still. It looks like I should create some generic UAblAbility classes and then programmatically add tasks to the m_Tasks property based on what is written with the DSL. After creating the ability, it also looks like there is a validator that can be used to check for things like circular dependencies. That doesn't seem too complicated, but as the author of the plugin do you have any tips/suggestions for my use case?

                                I'm probably not going to make the DSL too open ended. A single component of an ability may be a group of components that all do something. There may also be a chain of Able abilities that make up the ability that will be expressed with the DSL as well. I'd like to support things similar to the chain lightning tutorial, except the ability will be created at runtime. That'll take a bit of thought to get figured out, but it's probably possible.

                                Comment

                                Working...
                                X