Able Ability System Info and Support Thread

And regard my other question - if ability could listen do event dispatcher? So in case my “armor” falls to zero - I end ability and damage reduction ends with it.

I’m not 100% how I would set that up. The other way is when your Player is damaged, it looks for executing Abilities running a certain tag and removes them that way.

Able 3.27 submitted.

Fixes a crash with Custom Tasks that have a dependency. This would crash as soon as the Ability tried to load (during editor start up, etc).

Big shout out to @Roland_Price for his help in putting Custom Tasks through some heavy usage and giving me feedback / bug reports.

Thanks a lot for a fast investigation and fixing, will try the fix asap

That would actually work :slight_smile: Though It requires to put much effort into an actor component that would keep track of everything and cooperate with ability component, but doesn’t require to make dramatic changes into way ABLE works right now.

Able v3.28 has been submitted.

Notes:

Got few questions .
1 . Is there any fix about playing animation on able editor. ? Everytime i have to click stop then click backward then click stop and click play to get it work ?
2 . Again at the same able editor my collision Query is not looking front of the character . Its always left side of the character .
how can i fix those issues?

  1. Make sure you have an Able Ability Component on your actor, that’s the only reason I can think the animation would play weird. If Able tries to add it at runtime, it doesn’t seem to always take (although I put a hopeful fix in for that in the patch that is currently under review).
  2. Your character is actually pointing down the direction of the arrow. It’s just the skeletal mesh that is rotated wrong. You can change that rotation in the Able Editor settings to fix things up.

if you had setup everything right - just reset the preview asset the on top menu - that usually does the trick for me.
Also - its only the preview thats going wrong. if you see collision done to right side it means it will trigger in front of the character (like the arrow in capsule suggests)

@ Just to be sure… Ability blueprint as a whole CAN have variables, but only if they are for internal logic use only right? but I can make an ability as template with series of variables, than series of events and executions. after taht make child abilities and jsut change the variables hoping they will execute the same way in same order just with different outcome… RIGHT?

Remember that all running instances of an Ability are technically pointing to the same instance, the Class Default Object. So, any variable you change in one run, is shown on all the others(not across the network obviously) - and it’s never reset. If you want to store per-execution data, that’s what the Ability Scratchpads are for. Those are allocated/destroyed each time an Ability is activated.

Hmmm seems like this Scatchpad solves my problem with “Stoneskin” from earlier :wink:
But getting back to issue at hand… I made a template ability. it has variables and a function “start”. This function do stuff from the variables without really making much on it and not SET anything in the ability itself. It got as well a basic “can trigger” check.
Now… I’ve made a child ability and I though I could just run “on ability start” and do same function “start”. I cant run it on ability start - because it seems the function “start” even though is inherited in this class, it still refers to parent only and is read only, so it would “modify state” accordingly to error message.
So my question - Is this function still running if it was in the parent execution tree? And most importantly is it running with child variables or parent variables setup?
If I have repeating logic that does same thing over and over again for multiple abilities, how to execute it properly not breaking the abilities?

Second - are scratchpads part of the documentation? I haven’t looked into it for a while. if so - I will just read about them before asking stupid-*** questions :wink:

edit.
3rd question - How to make sure you can trigger an ability ONCE? In example I want the racial traits to be able to apply once. It doesn’t have any “cost” so a client whom gets into code and cheats could apply racial traits over and over again gaining for example infinite skill points. I could make it run in a infinite loop, so maybe check if component has this ability running already? to avoid stacking? or maybe there’s a simpler way? I dont mind it running in a loop (also is I have passive that are infinite loop, whats the best “Ability time” for such ability? as long as possible? few seconds? one minute?

edit.
4th - Can I for example improve on how ability works based on stacks? So each time it gets reapplied I add another effect base don number of stacks? How to do that? For example I have ability “human” I want it to have 20 stacks. On each stack (level) I want it to do “something” but every 3 levels I want to do “something else” ? Whats the best approach?

  1. You should be able to right click on the event and “Add call to Parent Function” if you want to chain up to your parent class. Other than that, I’m not 100% sure how BPs use inheritence, but it should be that simple.

  2. They should be under the Custom Task section. The documentation is (finally) get some love during this fun lockdown, which is why you’re starting to see new art and such in a handful of pages.

  3. Once ever, or you don’t want it to stack? The former you’d just have to give it a hidden cost. Set some bool on your character that you persist and that bool being false is the cost basically, once the Ability is activated, you set the bool to true and save out the character data. If you just don’t want it to stack, then you don’t have to do anything. By default, Abilities can’t stack on each other. You have to mark them as passive and set a stack count if you want stacks (note: there isn’t really any difference between Active and Passive abilities under the hood, so having a Passive that works like an active is fine, and vice-versa).

  4. Just apply the stacks, when you go to calculate damage, or apply some secondary effect, just grab the total stacks on the Ability and do some simple math like by dividing the total stacks by 3, or use modular division, etc. You could also use a Datatable where the row is the stack(1 through whatever) and the column (5 do X, 7 do Y, 12 do Z) is what to do.

  1. Will it call on the parent object though or it will use the default class variables that i seted up for the child? :slight_smile:
  2. I look into it.
  3. Main difference is that you can have only 1 active ability t a time so no need to do pesky tests “if has ability running” or something as it will not trigger a new one. It could branch though. It was easy… for example race abiltiy gives character a tag race.NAME and i just check if he has tag “race.” at all … if so - one of racial abilities are applied. so i don’t need to keep it alive and no other race ability will trigger. But I jsut figured I can make race an ability all together and just stack it with every level…
  4. Can I for example get from context ability component create ability of specific class and run ability? I mean i can do it without error in BP, but will it work without breaking?

I must say… So far I deleted 16 Structures and 27 enums. Deleted 3 interfaces, and countless objects… As I can do ANYTHING thru abilities and abilities component and few replicated tag containers to store values. :smiley:
And thanks to that I can run almost any ability (any without specific animation) on any object if it has proper components!

  1. That’s only for functions. Variables should be inherited if you set them to be (I assume BP allows that).
  2. Yes, Actives are limited to “one at a time” because it’s such a common use case. Rather than have some looping ability for Race, I would likely just have an Ability that runs when the Player starts (OnBeginPlay or some such), and just have it apply the tag. You can re-apply the Ability on level up if you expect it to do something fancy on certain levels, etc.
  3. I don’t understand this question. You should be passing in an Ability Class -> Get Ability Object From Class -> Create Context -> Activate Ability. Are you asking if you can do it in C++? Sure. Everything that runs in BP is actually just C++ under the hood. Just grab the UClass for the Ability -> Grab the CDO -> Create Context -> Call Activate Ability on the Ability Component.
  1. Got you! I will just test with the most used BP node ever - print string if it works :smiley:
  2. So obvious! Thanks for the tip! I can apply level * stacks, and just do single check on the tag to avoid general application.but does it mean i need to make tag for every level? To avoid all reapplying?
  3. I just wanted to know if I can trigger abilities from context in ability BP just like I would do outside of ability. But I think… why wouldn’t it work. :slight_smile:

Edit:
5. Can I somehow make ability trigerable ONLY on authority? to check if ability is being called by owning client or the server? and deny clients to run the ability?

To think of it… What stops a hacker to get all ability objects from code, and owning a character ability component trigger ANY ability that doesn’t have cost? is that why every ability has to have cost? Or I might have to register tags allowing triggering of specific abilities. Every ability has tag container. But if you dont trust your players should I follow this path of logic? or there is something different guarding the natural law order of clients triggering abiities?

All Abilities are sent to the server and only predicted locally (unless they’re set to client only). So as long as your server is secure, the rest is fine. A Client could cheat and somehow allow for spamming abilities, but the server would reject them all since it’s authoritative - so only the “hacker” gets a bad experience.

Ok but still - every single ability shod have a “cost”. and can be “owner has tag” - and a tag that allows me to use the ability. When learning new abilities - just add tags :slight_smile: this way even client only abilities (like “dark vision”) wont trigger locally if a replicated tag container doesn’t have specific tag :slight_smile:

I like this system more and more the deeper I go :slight_smile:

@ - I just wanted to say thank you for all the support :slight_smile: It as a great help. I have tested the entire system yesterday and everything seems to work as expected of the setup that is my game specific.
Ease of use of ABLE is incomparable with for example standard ability system. It’s a 10/10 product! I cant imagine starting a new project now in other way than activating this plugin on it :slight_smile:
Once again - thank you!