Able Ability System Info and Support Thread

Thanks for the discussion on cone collision @soctty and @ very informative.

Hi, I had updated my project to 4.26, and I found a problem, PreviewAsset canā€™t spawn, so I canā€™t do preview, please fix it, thanks!

Another problem: It will crash, when I can call CancelAbility after event OnAbilityEndBP called

Preview Asset definitely spawns. Open up the Able Ability Editor, go to the Settings tab on the far right, youā€™ll see some fields called ā€œAllowed Classesā€, make sure your preview asset is in that list and then you should see it in the drop down.

Check the Ability you are passing when you call CancelAbility. Or post the callstack of the crash and I can better help you diagnose whatā€™s going on.

No, Preview Asset definitely not spawn when using 4.26, The attachment is test project, run and press left mouse button it will crash. You can also find preview asset never spawn in this project, hoping your help.

I set the allowed classes to ā€œCharacterā€ and was able to spawn the P actor fine. You may want to nuke your intermediate folder if you are still seeing issues, I was able to spawn it just fine but BP only projects can get in funky states.

As for the crash, thatā€™s because you are cancelling the Active Ability (i.e., the Ability you are currently running in the Editor) during the Ability End - so you end up nuking it mid update (which, arguably, I should prevent you from blowing your foot off like that - so Iā€™ll look at putting in some safety measures there). Basically, you should never tell an Ability to cancel itself during the Ability End - as itā€™s already doing that.

EDIT: @MichaelLiew (Tagging since I forgot to quote).

Aha, I have successed spawn asset now, thanks, about crash I know the reason, I just let you know this bug, cause crash is always not a good thing

Able v3.52 submitted, notes below.

Hello; and Thank you for this plugin : it is now the core of the ability system of my project (in fact, used for almost all special move or action not related to locomotion).

I choose it over the GAS system especially because of the ease of configuration thanx to your editor (a huge time saver).

My questions / Requests :

  • is it possible to let the opportunity to skip some task in an ability, when a query returns no actor (in case of a query returning no overlap). I implemented the logic in BP, but this situation occured very often in my setting. The typical use case : in a ARPG setting, I query for target, and I need my character to turn in the direction of the target. If thereā€™s a target, no problem. If not, I want my character to be able to perform the animation in the direction of the forward cam vector (3rd person view). I used a ā€œTurn Toā€ task, which works well when a target exists, but turn to the Global Forward vector, if no target exists. I implemented all the necessary logic in code. I think it can be achieved with a complex branching scheme, using ability channeling,
    It may be simpler to have a ā€œskip if no targetsā€ check box in a task and/or a branching in case no targets are found after a query.
  • would it be possible to choose the ā€œpreviewā€ character using the ā€œuse the selected object in the content browserā€, without invoking the ā€œsearch boxā€, in the editor view ? in my workflow, when I work on a prototype, I start by installing many assets packs. I hand pick only what I need in the prototype, but meanwhile, thereā€™s a lot of content in the Content Folder. With the current implementation of the search box in the editor, it stucks my desktop until all the scan is performed, and also imply a huge shader compilation (even for assets I will never useā€¦).
  • I have a few bugs with the ā€œtimelineā€ control in the editor : moving the marker seems to have no effect (the animation stays where it was after the last play/pause). The step-by-step backward playback, also doesnā€™t work (it always go forward).

(I use 4.26, with last able uprade).

best regards,

For #1 you can just set your Ability to have Targeting and then mark the Ability as ā€œrequires Targetā€. That will prevent the Ability from executing if there is nothing found by the query.
#2 - You can limit the classes it uses when scanning for Assets by setting the ā€œAllowed Preview Classesā€ in the Ability Editor options. You can also just directly set the asset from there and avoid using the search box. Thereā€™s not a great way to set the assets without scanning. I can look at the ā€œUse Currently Selected Assetā€ but I recall that code being a bit special case.
#3 - Iā€™ll have to check on this one. Moving back/forward certainly was working previously, same with moving the marker. This all sounds like whatever animation mode you are using isnā€™t working with the commands from the timeline. Iā€™d need to know how your Play Animation task is setup to dive into this one.

First Iā€™d like to say I absolutely love able. Iā€™ve used it in just about every project since purchase, but recently Iā€™ve been having trouble packaging in 4.26 with the plugin installed. On a fresh install of 4.26 with a blank project I can package fine, but as soon as I enable the plugin I get this error.

(Windows (64-bit)): ERROR: Unable to rename C:\Users\snoog\Documents\Unreal Projects\SONB\PackageTesting\Intermediate\Build\Win64\PackageTesting\Development\Core\SharedPCH.Core.h.txt.tmp to C:\Users\snoog\Documents\Unreal Projects\SONB\PackageTesting\Intermediate\Build\Win64\PackageTesting\Development\Core\SharedPCH.Core.h.txt
PackagingResults: Error: Unable to rename C:\Users\snoog\Documents\Unreal Projects\SONB\PackageTesting\Intermediate\Build\Win64\PackageTesting\Development\Core\SharedPCH.Core.h.txt.tmp to C:\Users\snoog\Documents\Unreal Projects\SONB\PackageTesting\Intermediate\Build\Win64\PackageTesting\Development\Core\SharedPCH.Core.h.txt

Any help would be much appreciated.

That doesnā€™t look like anything to do with Able (not sure why enabling Able would cause the UHT to choke like that). It looks like you have either A.) A Windows permissions issue (try moving your project out of your User directory and into some simple thing like C:\MyProjects or something like that ), or B.) Some zombie process is holding on to that SharedPCH file, you could try manually deleting it and see if it lets you.

Hello!

For a melee ability, range is calculated based on the targeting setup. But if Iā€™m playing a montage and targeting should only occur at a certain time (ie, when a sword swing is happening), then I donā€™t want to have the target logic running right away and instead, Iā€™d probably use a custom collision query task (ie. ā€œcone traceā€).

But in that case, the ability wonā€™t have a range, since I have a ā€œcustom targeting strategyā€. Is there any way to have a collision task used for target acquisition, but also have the ability range set to a value? Or instead, have the default target logic only running at a later moment?

On C++ side, the getRange method is not virtual and I cannot write a custom logic there too.

What could I do in that case?

Range doesnā€™t do anything (besides the AI ā€œIs In Rangeā€ decorator ). The Range value is inherited and you can even overload it at runtime now and just toss in whatever Blueprint logic you want for the range.

Right, thatā€™s exactly why Iā€™m using it, for the AI Decorator! :slight_smile:

It seems to work just fine overriding the value, but now the Play Ability Task is a bit weird. Iā€™m not sure what Iā€™m doing wrong there. I do have an UClass* set in my blackboad, with a valid ability, but it always fails. The same ability works if I feed it directly into the task, w/o the blackboard.

Hereā€™s the AI BT info:

blackboard.png
https://forums.unrealengine.com/core/image/gif;base64
ā€‹

This is the code that sets that ability into the blackboard, pretty straigthforward:



// Get the pointer from the TSubclassOf, so we set the UClass directly.
Blackboard->SetValueAsClass(SelectedAbilityKey.SelectedKeyName, SelectedAbility.Get());


Any advice, please? :slight_smile:

Turn on the Verbose setting in the Able settings and see if thereā€™s anything in the output logs. Obviously the AI Owner needs to have an Able Ability Component on them, but thatā€™s about it as far as the flow goes for that task (Grab the Ability from the Key/Field -> Grab the Ability Component from the AI -> Execute the Ability).

@

I was just debugging that Task and it seems that Iā€™m getting a nullptr Ability from UBTTask_PlayAbility::GetAbility, line 38 (current version of Able). Very weird!

I also added a simple Blackboard Decorator to check if that property is set and it seems fine.

Iā€™ll have to keep looking.

I just tried moving it to another directory and that package error no longer shows up. Thanks for that! If i didnā€™t figure this out I was gonna painfully revert back to 4.25

Hi, Iā€™m new to UE4 and Iā€™m working on an RTS. The plugin is great and I really love it! But, Im having an issue when trying to run Abilities on different actorā€™s at the same timeā€¦ I have a Parent Unit class that I created to handle health, movement, and selection. Im using gameplay tags and enums to set up teams. abilities run fine when one sub-class is running them but when I I try to run them on another sub-class of the same parent it crashes. Iā€™ve been testing at 60 actors in a melee scene. Is it not possible to run multiple instances on actors sharing the same parent class? Also, when I load up abilities for different actors the meshes are not the same as when I first created them. They keep targeting the last one I created. Not sure if its a bug or more then likely Iā€™m doing something wrong :frowning:

I donā€™t quite understand your setup. You have multiple classes which inherit from a parent class for your units - correct? As long as your child classes have an Able Ability Component on them - they can run Abilities. Running it on 1 vs 200 shouldnā€™t matter. I will point out that, by default, Able SHARES the same Ability object for everyone running that Ability. So, you should treat Abilities as ā€œRead-onlyā€ during execution (meaning donā€™t have Blueprint variables on it - store those on the actors youā€™re dealing with, or set the instance policy to allocate a new instance for each execution).

If I had to guess, I imagine you likely have some casting operation happening that is failing (which is why it works for one sub class and not the other). If you post the callstack from the Crash, I can try and point you in the right direction.

Able shouldnā€™t be touching your mesh changes either, so Iā€™d need a screenshot to know what youā€™re talking about.

@ Hi! :slight_smile: Iā€™m making more ABLE videos soon!
2 new features to consideration:

  1. you have ā€œcan interrupt abilityā€ but it would be great to have a second gate-keep - ā€œcan be interruptedā€ and the possibility of making uninterruptable abilities (default false)
  2. ONLY PASSIVE abilities can be channeled abilities. Donā€™t know why. 4.26 latest update from the marketplace. Iā€™m pretty sure I had active channeled before and they worked fine.