Originally posted by Pablo1517
View Post
Announcement
Collapse
No announcement yet.
Able Ability System Info and Support Thread
Collapse
X
-
Able Ability System - A high performance, robust ability system for UE4. Now Available!
-
Originally posted by ExtraLifeMatt View PostAre you activating this via the C++ call? Or BP?
Ideally the context is valid, yet for some reason when you hit ESC while an ability is playing you will get a crash because context is messed up. The same would happen with your built-in abilities, but I can see your code clearly adds a Context.IsValid() check inside OnTaskEnd()
Comment
-
Originally posted by Pablo1517 View Post
Task is activated with ActivateAbility Blueprint node.
Ideally the context is valid, yet for some reason when you hit ESC while an ability is playing you will get a crash because context is messed up. The same would happen with your built-in abilities, but I can see your code clearly adds a Context.IsValid() check inside OnTaskEnd()Able Ability System - A high performance, robust ability system for UE4. Now Available!
Comment
-
Originally posted by Pablo1517 View PostOk, here is a question. Why in the hell is BranchAbility marked as PURE ^^?
It's an execution node, exposed to blueprint yet it has no exec input and output? Is this a mistake?
I mean this makes literally no sense
Even if you take PURE as a const for Blueprint, it would fail that test as branching inherently changes the state of the Ability Component.
EDIT: Did an entire pass on the Ability component and moved most things from BlueprintPure to BlueprintCallable.Last edited by ExtraLifeMatt; 03-06-2019, 11:49 AM.Able Ability System - A high performance, robust ability system for UE4. Now Available!
Comment
-
Another problem with networked branching abilities.
Setup:
BaseAbility - the only task it has is a branch task with custom ability chosen by GetBranchAbilityBP(). This branch is immidiate (the task is the only thing on full timeline). The ability duration is something short or even zero. Im using 0.01 just to make sure.
Now the abilities to which this can branch can be whatever, for example play a montage, just make sure they have some cooldown. Im using 0.1f
I put a PrintString inside "GetBranchAbilityBP" to see what's calling it.
Now trying to activate it from server/client, sometimes it gets called twice, once for server and once for client and then the ability and then those abilities kinda get canceled and doesnt work.
Log is saying something like "Activating ability X" and immidately after "Could not activate ability X because it is on cooldown"
It seems to happen randomly. 50% of the time it works as intended and the other half it drops this into the log and doesn't work as it should
Shouldn't Branch Task be called on server only?Last edited by Pablo1517; 03-06-2019, 12:09 PM.
Comment
-
Originally posted by Pablo1517 View PostAnother problem with networked branching abilities.
Setup:
BaseAbility - the only task it has is a branch task with custom ability chosen by GetBranchAbilityBP(). This branch is immidiate (the task is the only thing on full timeline). The ability duration is something short or even zero. Im using 0.01 just to make sure.
Now the abilities to which this can branch can be whatever, for example play a montage, just make sure they have some cooldown. Im using 0.1f
I put a PrintString inside "GetBranchAbilityBP" to see what's calling it.
Now trying to activate it from server/client, sometimes it gets called twice, once for server and once for client and then the ability and then those abilities kinda get canceled and doesnt work.
Log is saying something like "Activating ability X" and immidately after "Could not activate ability X because it is on cooldown"Able Ability System - A high performance, robust ability system for UE4. Now Available!
Comment
-
An update on the networked branching problem with cooldowns.
I'm not 100% sure, but (since branch task isnt exported :/) I had to recreate your branch ability giving myself possibility to change realm of that task.
Upon changing the realm to server only the bug is gone, which leads me to believe that branches should happen only on server as they seem to be replicated by the AbilityComponent itself. Though I might not be correct
Comment
-
Originally posted by Pablo1517 View Post
Shouldn't Branch Task be called on server only?
Is this a listen server? Or dedicated server?
Able Ability System - A high performance, robust ability system for UE4. Now Available!
Comment
-
It is a listen server (if that's what you mean by when you press play in editor and get 2 game windows).
It might be the thing you are saying though I just tried my more cases with branching and cooldowns. All my branches get messed up if i add any cooldown to the branched-to abilities.
Once I change branches to my own (server only ones) it works perfect.
Anyway for some reason if this warning happens then the ability isn't playing out correctly. Animations get cancelled and other tasks kinda seem like only play out Task Started but not going anywhere as my own debug lines are drawn out, but the logic in tick isnt happening.
EDIT: I have a combo attack made just like in your video tutorial for sword combo, but adding cooldowns to second attack of the combo ability brings out the result i am talking about and the ability doesnt start on the server as I am able to walk normally on the server and the same character on the client plays out the ability but gets dragged aroundLast edited by Pablo1517; 03-06-2019, 01:04 PM.
Comment
-
Adding a log to the previous case
Again, about 50% of the time it eithre plays out correctly or i get this in my log and it fails on the server aka just doesnt play the ability.
Now the ----- logs are just PrintString nodes attached to OnTaskStartedBP and OnTaskEndedBP
EDIT:
Code:void UAblAbilityComponent::HandlePendingContexts() ... if (const UAblAbility* PendingAbility = m_PendingContext[i]->GetAbility())
Last edited by Pablo1517; 03-06-2019, 01:29 PM.
Comment
-
Ok, I THINK found it. It's exactly as you said. The Ability gets fired on both Server and Client exactly at the same moment since on a local machine there is zero lag, and it would work exactly the way you said, the server would play out the ability anyway BUT in
Code:HandlePendingContexts()
Everytime you have some pending Context you do this:
ablAbilityComponent.cpp : 891
Code:ablAbilityComponent.cpp : 891 m_ActiveAbilityInstance = nullptr;
And then continue to play out the ability from the pending context - except this time the ability is on cooldown so it prints a warning to the log and doesn't fire.
So in the end I assume you should only play the real branch on the server while on the client you should do some kinda fake branch as part of the "prediction" or not do it at all.Last edited by Pablo1517; 03-06-2019, 01:43 PM.
Comment
-
Originally posted by Pablo1517 View PostOk, I THINK found it. It's exactly as you said. The Ability gets fired on both Server and Client exactly at the same moment since on a local machine there is zero lag, and it would work exactly the way you said, the server would play out the ability anyway BUT in
Code:HandlePendingContexts()
Everytime you have some pending Context you do this:
ablAbilityComponent.cpp : 891
Code:ablAbilityComponent.cpp : 891 m_ActiveAbilityInstance = nullptr;
And then continue to play out the ability from the pending context - except this time the ability is on cooldown so it prints a warning to the log and doesn't fire.
So in the end I assume you should only play the real branch on the server while on the client you should do some kinda fake branch as part of the "prediction" or not do it at all.Able Ability System - A high performance, robust ability system for UE4. Now Available!
Comment
-
Well, I assume that for the system these are 2 completely separate and new instances on the list, as one was generated locally and the other one was requested from client.
I think instead of just avoiding duplicates you should check if you can start a new ability and only assign null to m_ActiveAbilityInstance if you indeed can, maybe?
Can I ask when will you be submitting new version of Able?Last edited by Pablo1517; 03-07-2019, 07:05 AM.
Comment
-
Originally posted by Pablo1517 View PostWell, I assume that for the system these are 2 completely separate and new instances on the list, as one was generated locally and the other one was requested from client.
I think instead of just avoiding duplicates you should check if you can start a new ability and only assign null to m_ActiveAbilityInstance if you indeed can, maybe?
Can I ask when will you be submitting new version of Able?
3.0 has taken me a long time and has no ETA yet. I make progress on it every day but there's still a lot to iron out. I've completely reskinned the editor and added the ability to dynamically override various fields (much like you can do in UMG), so no more "I wish I could overload this field at runtime", you'll just pick the field, mark it as dynamic, and it'll automatically create the binding and populate a method on the Ability blueprint for you to pass it when the Ability is executed.Able Ability System - A high performance, robust ability system for UE4. Now Available!
- 3 likes
Comment
Comment