Announcement

Collapse
No announcement yet.

Able Ability System Info and Support Thread

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

    Originally posted by Incom View Post
    Thanks a lot for taking the time to help. I will try to recreate what I can to more clearly explain the troubles I have run into. Let me start with the 4:th point.



    So to show what I have done I made this picture of what I experienced.
    https://ibb.co/6N7rLmy

    Top part of the image is a blueprint function library and I made a simple pure function without any logic in it.
    Left part is an ability damage calculation where I try to call this function, and it does not show up.
    Right part is a character blueprint in the event graph where I try to do the same and it shows up like expected.

    I assume I have done something fundamentally erroneous.
    Able abilities aren't Actors, they're Objects. It's likely you're running afoul of the issue outlined here: https://answers.unrealengine.com/que...in-an-obj.html and here: https://answers.unrealengine.com/que...nt-326679-form

    That first post has a few workarounds, but that's the core of it. Just an old issue nobody has gotten around to properly fixing yet. A less hacky solution, in my opinion, would be to use a Blueprint Interface instead, as this will give you the freedom to change the function's implementation per-class.
    Last edited by soctty; 12-06-2020, 07:08 PM.
    @thereisnoscotty
    Grand Marshal of the Parade of Madfellows

    Comment


      3.50 is LIVE.

      HUGE HEADS UP

      - Part of the delay for 3.50 is because the MacOS build was failing due to shadowed field warnings (meaning you have some local/global field named the same as an already existing field). This required changing the name of EVERY Task Realm and Task Target enum under the hood. In my local tests, UE seemed to handle that just fine - but I've already had at least one person who ended up with ATT_MAX as their Task Target type - which isn't valid and Able will crash on you. So, PLEASE DOUBLE CHECK ALL TASK TARGETS / TASK REALMS once you upgrade.
      - Again, as part of these changes, Ability Contexts, Ability Scratchpads and Task Scratchpads are re-used. Make sure you properly overload GetScratchPadClassName in the Ability BP AND overload the ResetScratchPad methods so you can clear our any data in your scratchpads between runs. If you don't do this, you'll get weird errors.

      Known Issues so far:
      - ResetAbilityScratchPad / GetAbilityScratchPadClass are showing up as "Create Ability Scratchpad" in the editor. Stupid copy and paste error. The one that wants a UCLASS returned is the GetAbilityScratchPadClass, the one that doesn't want a return (and passes in the Scratchpad ) is the reset.
      Able Ability System - A high performance, robust ability system for UE4. Now Available!

      Comment


        UPDATE:

        Real dumb bug with the Context re-use (it's not clearing out Targets from previous runs). Going to get a hotfix out with that change and the fixes for the known issues I mentioned above.

        Able 3.51 submitted.

        • Fix to bad names for Reset Ability Scratchpad and Get Ability Scratchpad Class in BP.
        • Fix to Context's not properly clearing all their fields during re-use.
        • Moved Custom Task's ResetTaskScratchpad function into the Able|CustomTask category.
        • Removed spurious Null Dependency check (Able will remove these anyway at runtime or when you attempt to resave the Ability).
        To work around the issues, you can disable Ability Context re-use in the Able settings, or just wait till this hotfix hits.
        Last edited by ExtraLifeMatt; 12-08-2020, 09:42 PM.
        Able Ability System - A high performance, robust ability system for UE4. Now Available!

        Comment


          Originally posted by ExtraLifeMatt View Post

          Good idea is a good idea. Thanks for suggesting it.
          Just saw the lock made it in, too. <33
          @thereisnoscotty
          Grand Marshal of the Parade of Madfellows

          Comment


            Can anyone get a Cone query shape to function properly? If I use a cone I rarely get a collision. If I use a sphere I get hits, same collision channel, same filters, drawing the collision query shows the query cone intersecting with objects.

            With the cone I also get some bizarre results if i use an FOV of 110. The edge points seem to extend a couple thousand units to the side.
            With cubes i get hits, but drawing the query in-game the size and orientation of the cube changes (generally a non cube shape) depending on the direction I'm facing.

            I dont know if this has something to do with my character/controller or if these collision shapes are just funky.

            Comment


              Hello! Is there any way to configure a raycast query to also return the Physical Material in the FHitResult?

              Comment


                Originally posted by urielninjabear View Post
                Hello! Is there any way to configure a raycast query to also return the Physical Material in the FHitResult?
                I'm seeing it returned by default. Does the component you're hitting (or trying to hit) not have it enabled under Collision?

                Originally posted by jhirsh View Post
                Can anyone get a Cone query shape to function properly? If I use a cone I rarely get a collision. If I use a sphere I get hits, same collision channel, same filters, drawing the collision query shows the query cone intersecting with objects.

                With the cone I also get some bizarre results if i use an FOV of 110. The edge points seem to extend a couple thousand units to the side.
                With cubes i get hits, but drawing the query in-game the size and orientation of the cube changes (generally a non cube shape) depending on the direction I'm facing.

                I dont know if this has something to do with my character/controller or if these collision shapes are just funky.
                I'm using 2D cones without issue, even with an FOV of 110. Is this a 3D query we're talking about?

                Update: 3D cones do seem to produce some weirdness, ExtraLifeMatt. Screens here: https://imgur.com/a/RcnlVuE
                Last edited by soctty; 12-14-2020, 08:37 PM.
                @thereisnoscotty
                Grand Marshal of the Parade of Madfellows

                Comment


                  Originally posted by soctty View Post

                  I'm seeing it returned by default. Does the component you're hitting (or trying to hit) not have it enabled under Collision?



                  I'm using 2D cones without issue, even with an FOV of 110. Is this a 3D query we're talking about?

                  Update: 3D cones do seem to produce some weirdness, ExtraLifeMatt. Screens here: https://imgur.com/a/RcnlVuE
                  Pretty sure that's just a visual bug, I tracked it initially but got swept up in other things. I'll take a peek again.
                  Able Ability System - A high performance, robust ability system for UE4. Now Available!

                  Comment


                    Originally posted by soctty View Post
                    I'm seeing it returned by default. Does the component you're hitting (or trying to hit) not have it enabled under Collision?
                    Thanks for the reply. But I believe yes, I tried checking for the collision properties for both actors, skeletal meshes and static meshes and the physical surface seems to always be empty.

                    But also, I created a simple trace from my player Blueprint and the Physical Material is returned normally from that one.

                    Not sure what I'm missing here! =(

                    Comment


                      Originally posted by ExtraLifeMatt View Post

                      Pretty sure that's just a visual bug, I tracked it initially but got swept up in other things. I'll take a peek again.
                      Didn't have a whole lot of time to test earlier, but having spent a few minutes on it now, it looks like 3D is just broken. Debug logs for 2D and 3D below, same ability, just with the toggle flipped.

                      LogAble: Warning: [TestMap (Play In Editor)] InternalStartAbility [TestAbility] Started
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - OnTaskStart called for Task AblCollisionQueryTask_0 at time 0.000000.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - Query found 2 results.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - Filter AblCollisionFilterSelf_0 executed. Entries remaining: 2
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - Copying 2 results into Context.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - OnTaskEnd called for Task AblCollisionQueryTask_0 at time 0.000000. Task Result = Successful.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - OnTaskStart called for Task AblDamageEventTask_0 at time 0.012434.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - Executing Damage calculations for 1 targets.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - CalculateDamageForActor with Actor BP_TestDummy_2 and Base Damage 10.00 returned 10.00.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - Applying 10.00 damage to BP_TestDummy_2.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - OnTaskEnd called for Task AblDamageEventTask_0 at time 0.012434. Task Result = Successful.
                      LogAble: Warning: [TestMap (Play In Editor)] TickComponent [TestAbility] IsDone

                      LogAble: Warning: [TestMap (Play In Editor)] InternalStartAbility [TestAbility] Started
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - OnTaskStart called for Task AblCollisionQueryTask_0 at time 0.000000.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - Query found 0 results.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - OnTaskEnd called for Task AblCollisionQueryTask_0 at time 0.000000. Task Result = Successful.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - OnTaskStart called for Task AblDamageEventTask_0 at time 0.000000.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - Executing Damage calculations for 0 targets.
                      LogBlueprintUserMessages: [TestMap] (World TestMap (Play In Editor)) TestAbility - OnTaskEnd called for Task AblDamageEventTask_0 at time 0.000000. Task Result = Successful.
                      LogAble: Warning: [TestMap (Play In Editor)] TickComponent [TestAbility] IsDone
                      @thereisnoscotty
                      Grand Marshal of the Parade of Madfellows

                      Comment


                        Originally posted by urielninjabear View Post

                        Thanks for the reply. But I believe yes, I tried checking for the collision properties for both actors, skeletal meshes and static meshes and the physical surface seems to always be empty.

                        But also, I created a simple trace from my player Blueprint and the Physical Material is returned normally from that one.

                        Not sure what I'm missing here! =(
                        Sorry, I misspoke earlier. I meant to say it's a part of the returned hit struct, not that values are being passed inherently. I did some experimentation with returning physical materials some time ago and found it to be a bit of a pain. It looks like, since they are Objects, Able Abilities don't have direct access to some of the things you need to make this work, so take a look at the screenshots here: https://imgur.com/a/WbPiwxU
                        @thereisnoscotty
                        Grand Marshal of the Parade of Madfellows

                        Comment


                          Originally posted by soctty View Post

                          Didn't have a whole lot of time to test earlier, but having spent a few minutes on it now, it looks like 3D is just broken. Debug logs for 2D and 3D below, same ability, just with the toggle flipped.
                          Hmm, 2D and 3D use the exact same code under the hood (except 3D has one extra check for height). I'll dig into it. What FOV are you using in your test?
                          Able Ability System - A high performance, robust ability system for UE4. Now Available!

                          Comment


                            Originally posted by ExtraLifeMatt View Post

                            Hmm, 2D and 3D use the exact same code under the hood (except 3D has one extra check for height). I'll dig into it. What FOV are you using in your test?
                            Captured some video. I can throw it in Dropbox or something if the quality is a problem, but it's just me scrubbing the FOV value back and forth, toggling 2D on midway through.

                            https://imgur.com/a/ADbZo0P

                            And now there's a clean 4.26 project here: https://drive.google.com/file/d/1AzI...ew?usp=sharing

                            There's a really interesting "stepper" sort of behavior going on that repeats over the FOV range of 1-179.9. More screens: https://imgur.com/a/VwsJzKU
                            Last edited by soctty; 12-15-2020, 03:00 PM.
                            @thereisnoscotty
                            Grand Marshal of the Parade of Madfellows

                            Comment


                              Originally posted by soctty View Post

                              Captured some video. I can throw it in Dropbox or something if the quality is a problem, but it's just me scrubbing the FOV value back and forth, toggling 2D on midway through.

                              https://imgur.com/a/ADbZo0P

                              And now there's a clean 4.26 project here: https://drive.google.com/file/d/1AzI...ew?usp=sharing

                              There's a really interesting "stepper" sort of behavior going on that repeats over the FOV range of 1-179.9. More screens: https://imgur.com/a/VwsJzKU
                              Yea, that's the visual behavior I was talking about. That draw method is junk (it uses the engine's draw cone - but something is off there or I'm passing it the wrong parameters), so I just need to write my own (which is what I did for 2D). Also one reason why a 2D query may find something, but 3D doesn't, is because the height check goes against the player's location (meaning their feet). so, if your location is outside of that cone (too close for example), despite that your body may be inside it - it would fail.
                              Last edited by ExtraLifeMatt; 12-15-2020, 03:47 PM.
                              Able Ability System - A high performance, robust ability system for UE4. Now Available!

                              Comment


                                Originally posted by ExtraLifeMatt View Post

                                Also one reason why a 2D query may find something, but 3D doesn't, is because the height check goes against the player's location (meaning their feet). so, if your location is outside of that cone (too close for example), despite that your body may be inside it - it would fail.
                                So if I'm understanding this correctly... assuming two character descendants in the transaction, the 3D cone is only going to detect a collision with what amounts to its leading bottom edge, and only if the other character's location is a point on that line?

                                E.g., Scotty stands at 0,0,0 and projects a cone (500 FOV, 100 length) forward, and it only detects Matt if Matt is standing at 100,0,0?

                                Or would the same cone catch Matt jumping in place from say, 90,0,0?


                                Silly question, answered it myself.

                                Something purpose-built probably isn't a bad idea. The obvious workaround that comes to mind would be a primitive attached somewhere center-mass for responding to 3D cones, possibly on their own channel, but that doesn't strike me as particularly scalable.
                                Last edited by soctty; 12-15-2020, 04:42 PM.
                                @thereisnoscotty
                                Grand Marshal of the Parade of Madfellows

                                Comment

                                Working...
                                X