Announcement

Collapse
No announcement yet.

Able Ability System Info and Support Thread

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

    Originally posted by GrumbleBunny View Post
    [MENTION=172958]ExtraLifeMatt[/MENTION]

    Hi! Just downloaded the plugin yesterday and it's great.

    I'm wondering if you could help with a design question. I'm working on a game that's heavily based on a weapon and combo system that I think this will really help with but I'm not sure of the best way to structure everything. Here's an example:

    One of the weapons fires a projectile. If 2 of these projectiles collide, they combine to make a larger, faster projectile heading in the direction of the projectile that was fired first. My initial design is:
    1. Pawn has Action ability that fires a projectile
    2. Projectile has passive ability that checks for collision with other projectile and branches to 3.
    3. Action ability that spawns new projectile

    Does this sound like a good idea? I'm not sure how to destroy the original 2 projectiles, is there a task that would do this? Or should I make a hook in blueprint?
    Hi

    Yea, that sounds fine. To destroy the projectiles you need to find a way to call DestroyActor and it'll have to be done via blueprints. If you override the OnAbilityEnd method and check the result, it'll tell you if the ability was ended because it branched to another. If that's the case, simply call DestroyActor on the projectile (Self Actor).

    Originally posted by Hitsugen View Post
    Hey [MENTION=172958]ExtraLifeMatt[/MENTION]

    I'm trying to create a new task that extends your ability task.
    The goal is to create a new "variable branch task", that has the m_BranchAbility defined at runtime through another function that can be defined in blueprints.

    I've run into a wall since everything is a const function so I can't perform any assignments to m_BranchAbility.
    Is there perhaps a way I can work-around this?
    Branch Ability's parameter can't be changed at run-time because, if you watch the Burning Man tutorial I did, all Abilities are pretty much static/stateless once created. However, you can store that data on your character and simply have the Ability poll that. I'll see if I can't add a simple method you can override to grab that Branch Ability at runtime (default will just return the parameter). Branch Ability is admittedly a special task and I could see wanting it to be more flexible.
    Able Ability System - A high performance, robust ability system for UE4. Now Available!

    Comment


      Thanks for the info, I'll have the ability poll the character to get the data.

      Comment


        Also I'd like to suggest two quality of life features for the task editor:
        • Duplication of tasks, through either context menu or hotkey, (not sure which is easier)
        • Re-ordering of tasks (Makes it easier to keep track of tasks after adding/removing them) (Nevermind I see that re-opening the ability re-orders tasks already)
        Last edited by Hitsugen; 07-04-2017, 05:01 PM. Reason: epiphany

        Comment


          Able v1.65 has been submitted to Epic, it has a couple fixes/features:

          - Added an option to interrupt Animations that are playing when the Ability is interrupted (Must be using the Ability Animation Node option). You can find this new option in the Play Animation Task.
          - Added "Dynamic Branch" option to Branch Ability Task. If checked, this option will call "OnGetBranchAbility" on the Ability itself which can query the player or whatever else you need and return the appropriate Ability to use for the Branch.

          Originally posted by Hitsugen View Post
          Also I'd like to suggest two quality of life features for the task editor:
          • Duplication of tasks, through either context menu or hotkey, (not sure which is easier)
          • Re-ordering of tasks (Makes it easier to keep track of tasks after adding/removing them) (Nevermind I see that re-opening the ability re-orders tasks already)
          I believe CTRL+A will auto bring up the Add Task window (I had that in a super early build... may have gotten nuked though). I can check later tonight. Duping Tasks isn't too terrible, but there are a few things to be careful about - I"ll look into it.

          With regard to Task order, that's a bigger issue. Tasks are always sorted by time on save (which optimizes things during runtime) - so I'd be extremely hesitant to add manual sorting. If re-opening the editor fixed the issue you were seeing, then that works as well.
          Able Ability System - A high performance, robust ability system for UE4. Now Available!

          Comment


            Originally posted by ExtraLifeMatt View Post
            Able v1.65 has been submitted to Epic, it has a couple fixes/features:

            - Added an option to interrupt Animations that are playing when the Ability is interrupted (Must be using the Ability Animation Node option). You can find this new option in the Play Animation Task.
            - Added "Dynamic Branch" option to Branch Ability Task. If checked, this option will call "OnGetBranchAbility" on the Ability itself which can query the player or whatever else you need and return the appropriate Ability to use for the Branch.



            I believe CTRL+A will auto bring up the Add Task window (I had that in a super early build... may have gotten nuked though). I can check later tonight. Duping Tasks isn't too terrible, but there are a few things to be careful about - I"ll look into it.

            With regard to Task order, that's a bigger issue. Tasks are always sorted by time on save (which optimizes things during runtime) - so I'd be extremely hesitant to add manual sorting. If re-opening the editor fixed the issue you were seeing, then that works as well.
            Thanks for the excellent support!

            Comment


              Originally posted by Hitsugen View Post
              Thanks for the excellent support!
              NP. The holidays put a damper on my normal testing though, so please report any issues you run into with the new features. I gave them a quick once over, but you never know.
              Able Ability System - A high performance, robust ability system for UE4. Now Available!

              Comment


                [MENTION=172958]ExtraLifeMatt[/MENTION]

                Hello, thanks for the new options in the update

                Just a few things:
                The Cancel Ability node doesn't seem to be functioning correctly, it always seems to assume "interrupted" as the "Result to Use" no matter what I set it to. (I'm assuming such as now the animations are interrupted during cool down now when I haven't changed any of that BP logic before this update or the previous one)

                The new interrupt bool doesn't seem to affect this issue at all.

                Also this minor bug still persists.
                Originally posted by Aumaan Anubis View Post
                Anyway:
                While doing this I did find a legit bug with the cancel ability node (more like a mismatch label):
                The tool tips in the drop down list don't match their items:
                [ATTACH=CONFIG]147460[/ATTACH]
                Attached Files
                Last edited by Aumaan Anubis; 07-06-2017, 04:50 AM.

                Comment


                  Hmm, I'll dig into that [MENTION=33476]Aumaan Anubis[/MENTION]. Looking at the code real quick, we do pass the result - but the new code should only happen if we are passed an interrupt so if you're seeing that then its getting told its an interrupt somewhere...

                  Unfortunately I checked the text that enum and its just a bug in UE itself (the tooltip shows for the currently selected value, not the one you are hovering over). I have no control over that unfortunately.
                  Able Ability System - A high performance, robust ability system for UE4. Now Available!

                  Comment


                    Originally posted by ExtraLifeMatt View Post
                    Unfortunately I checked the text that enum and its just a bug in UE itself (the tooltip shows for the currently selected value, not the one you are hovering over). I have no control over that unfortunately.
                    That's not what it's doing.
                    It actually does show the value of the one you hover over, it's just the tool tips are all offset by 1.

                    Like this

                    Result to Use: > (on hover, tool tip reads: "select enum values from the list") <<< That's fine.
                    • Successful > (on hover, tool tip reads: "____")
                    • Branched > (on hover, tool tip reads: "Task Finished Normally (e.g. reach end of its time)")
                    • interrupted > (on hover, tool tip reads: "Ability is being branched to another ability")


                    It's the only abl node I've used that behaves that way.
                    Last edited by Aumaan Anubis; 07-07-2017, 04:51 AM.

                    Comment


                      On designing this system how did you envision stamina/mana use?

                      I've run into a slight snag on branching abilities using up energy/stamina/mana and I'm not sure which is the right approach. I've started caching the character BP with On Ability Start and firing the character's UseStamina/Energy function from there but was getting inconsistent results so I decided to try from a Custom Event with Realm set to Server. The troubles range from sometimes it fires multiple times to not at all with tracking the UseStamina call for GetWorld->GetNetMode() sometimes having a server and sometimes not. I feel like I'm going about this in the wrong fashion but blind from staring at this too long =)

                      Thanks!

                      Comment


                        Originally posted by ExtraLifeMatt View Post
                        Alright, so if you are using 4.16, there is currently a bug with Default Spawned Event Nodes causing crashes when called from the CDO (which Able relies on to keep memory down).

                        Here's the Bug reference.

                        The work around is to simply turn off Default Spawned Event Nodes (Open up the Blueprint Editor, View -> Editor Preferences, Uncheck Spawn Default Event Nodes). Unfortunately you'll have to re-create any Abilities that you used before hand until this bug is fixed (which will hopefully be soon).
                        I've tried switching over to 4.16 and ran into several problems so decided to rebuild from scratch. The trouble I'm running into is with any reference to the Ability Event Graph causes UE to crash. I've attempted the above as seen below but if I add any event references and play the ability UE crashes. Overriding the functions in the ability won't work as it will not allow changing variables which I like to be able to do. Any suggestions?

                        Click image for larger version

Name:	DefaultSpawnEvent.PNG
Views:	1
Size:	2.9 KB
ID:	1130779

                        Comment


                          Originally posted by RodentGames View Post
                          On designing this system how did you envision stamina/mana use?

                          I've run into a slight snag on branching abilities using up energy/stamina/mana and I'm not sure which is the right approach. I've started caching the character BP with On Ability Start and firing the character's UseStamina/Energy function from there but was getting inconsistent results so I decided to try from a Custom Event with Realm set to Server. The troubles range from sometimes it fires multiple times to not at all with tracking the UseStamina call for GetWorld->GetNetMode() sometimes having a server and sometimes not. I feel like I'm going about this in the wrong fashion but blind from staring at this too long =)

                          Thanks!
                          To continue this discussion with the new rebuilt project for testing I've wired up a Custom Event for debugging as such:

                          Click image for larger version

Name:	CustomEventDebug.PNG
Views:	1
Size:	127.5 KB
ID:	1130780

                          The DebugCustomTask is just a call into the C++ class to output debug information for testing:
                          Code:
                          void ABaseCharacter::DebugCustomTask(const FString& string, int amount) {
                          	UWorld* world = GetWorld();
                          	FString mode = FString(TEXT("Unknown"));
                          	if (world) {
                          		switch (world->GetNetMode())
                          		{
                          		case NM_Client:
                          			mode = FString(TEXT("Client"));
                          			break;
                          		case NM_Standalone:
                          			mode = FString(TEXT("Standalone"));
                          			break;
                          		case NM_DedicatedServer:
                          			mode = FString(TEXT("DedicatedServer"));
                          			break;
                          		case NM_ListenServer:
                          			mode = FString(TEXT("ListenServer"));
                          			break;
                          		}
                          	}
                          	bool locallyControlled = IsLocallyControlled();
                          	UE_LOG(LogTemp, Warning, TEXT("[%s] DebugCustomTask- Mode: %s %s"), *string, *mode, (locallyControlled ? TEXT("True") : TEXT("False")));
                          
                          }
                          Under a dedicated server setup it is always responds with the following no matter what Realm setup is chosen for the CustomEvent task for the first ability is:
                          LogTemp:Warning: [LightAttackA] DebugCustomTask- Mode: Client True
                          LogTemp:Warning: [LightAttackA] DebugCustomTask- Mode: DedicatedServer False
                          LogTemp:Warning: [LightAttackA] DebugCustomTask- Mode: Client False

                          For any branching abilities no matter the realm set up I seem to receive:
                          LogTemp:Warning: [LightAttackA] DebugCustomTask- Mode: DedicatedServer False
                          LogTemp:Warning: [LightAttackA] DebugCustomTask- Mode: Client True

                          Is this the expected behaviour? If I set Realm to Server I was thinking that it would only ever process on the Server side and not show up for the clients.

                          Comment


                            [MENTION=741122]RodentGames[/MENTION],

                            With regard to Stamina/Mana, there is a BP method you can override called "CustomCanAbilityExecute" that is always called before an Ability is allowed to start, there you would check they have the available Stamina/Mana/Whatever and then in OnAbilityStart you would actually decrement the resource cost from the player.

                            I'll double check the Custom Event code and get back to you. I had another report of some weird behavior with dedicated servers so I'll probably just do a dive into that today and see what's going on.

                            With regard to 4.16 and the crash, my only advice is to wait for 4.17 and upgrade ASAP. I was hoping that bug fix would make it as a hotfix, but it looks like they're going to just toss it in 4.17 instead - so, my hands are tied. Again, this was a core behavior that Able relies on that was changed so it breaks things badly. If you have Engine source I can give you the code to fix the issue until 4.17 is released.
                            Able Ability System - A high performance, robust ability system for UE4. Now Available!

                            Comment


                              I just stumbled upon this (and purchased!) and I have to say this is the coolest system I've run across. Just in awe at how awesome this plugin is... Goodness! Great work!

                              teak
                              "A little bit of nonsense now and then is cherished by the wisest men..."
                              -- Willy Wonka

                              Smooth Zoom Camera Plugin for 4.24 here.

                              Comment


                                Originally posted by teak421 View Post
                                I just stumbled upon this (and purchased!) and I have to say this is the coolest system I've run across. Just in awe at how awesome this plugin is... Goodness! Great work!

                                teak
                                Thanks Teak. Really appreciate the kind words.

                                [MENTION=741122]RodentGames[/MENTION], so I found a rather big bug with network realm not being respected for most tasks (it respected actors within those Tasks, but things like CustomEvent which don't have Actors to check would get called on all realms despite being set to 1 or the other). This probably is what is causing the issues with branching in multiplayer as well since it has a similar behavior. I'm testing a fix right now and will have it out ASAP (hopefully Monday/Tuesday).
                                Able Ability System - A high performance, robust ability system for UE4. Now Available!

                                Comment

                                Working...
                                X