Able Ability System Info and Support Thread

It doesn’t seem that @TheQuiet1994 uses the Stamina hunger system because it’s not added in their component list. so it’s must be something else. @TheQuiet1994 i was able to determine the source of the problem by deleting chunks of my blueprints in my character and controller, after each chunk deleted i did a quick test by using a editable variable with a default value of 5 and a print string to print the value each time i press the letter “N”. I change the value for the variable from the details screen from 5 to lets say 9. so each time after deleting chunks of blueprints i try and see if the value is changed from 5 to 9. if not, then i restore the deleted chunk and delete another. Using this way i was able to determine a function that was in my blueprints that was initializing my character attributes from the server, so it was the one that prevent me from successfully changing the variable. After disconnecting the function Able was working fine.

Anyway @ , i have another question.
So i was able to successfully override the Damage function.
But in my game i need to apply physical and elemental damage, this where I’ve faced a problem.
Basically i need to return two values as a damage, one is physical damage and the other one is elemental damage.

Right now there’re two options that comes to my mind

First, i do all the damage calculations in the damage override damage function by casting the actor to my current target and getting the armor and resistance values and do the required math.
This solution works if i have small number of enemies, but in case i have something like 100 enemies in the game its not a practical solution.

Second, is that i return the elemental and physical damage as a floats to my target and i do the resistance calculations in the target blueprint. (I prefer this one)

This picture shows my setup for the first option, which is currently working for me. But for a lot of enemies it’s not very good.

Ah, my mistake. Sorry @TheQuiet1994 / @IronSuit. Got confused. @TheQuiet1994, follow @IronSuit 's advice - disable portions of your blueprint and try to find out where it’s failing. The variables being stomped by the server is a good catch, I hadn’t thought of that but that could totally do it. IronSuit and I were tracking down a similar issue and it’s (so far) always been some other blueprint system or logic that is causing the issue.
@IronSuit, regarding your question. There’s actually a big difference in your two approaches. Both require the same amount of math, but if you use the first approach and set Able to do “Async Damage Calculate” (it’s an option on the Apply Damage Task), Able will evenly distribute the damage calculations across the cores on your CPU. So, if you have to calculate damage for 100 actors, and you have 4 cores (most systems are 4 core systems now a days), then each core will do 25 actors. In your second option, it’s single threaded so one core is going to do all 100 calculations. As long as your Enemies have a common interface for getting their armor/resistence - it’s super simple.

I didn’t explain my problem clearly, my mistake.
I won’t be calculating the damage for 100 actors at the same time, because i won’t be finghting them all at the same time.
Imagine that i have 100 different bosses at the game, and i will be fighting the bosses seperatly. So at each ability i only require 1 target only, not 100.

If i used first approach, then i need to cast to all of the bosses and calculate for all of them, even when fighting one boss alone. Which is waste of resources.
So if there’s a way that i can get the parameters of targets in able without casting to the individual actors all at once it would be perfect. if you have any hints here i really appreciate it.

And for the second approach, i don’t really know how can i return two damage values and pass them to the actors. (I only know how to return 1 value only).

Thanks.

You can use a shared base class for all your Bosses/Enemies and just cast to that.

ACharacter -> AStatsCharacter (Resistances, stats, etc) -> WhateverBoss

Then you just cast to AStatsCharacter within Able, do your math, and return the result.

Unfortunately, Epic’s Damage system is limited to 1 damage value at a time. So, you’d either have to create a 2nd Apply Damage task for the elemental damage (which is a bit wasteful), or manually call ApplyDamage on your actor (in which case you likely don’t want it to use Async Calculate since that’s no longer thread safe behavior, or keep it Async but add a Custom Event that actually applies the damage), or create your own Damage method (DamageCreature(float damage, float elementalDamage, etc) on some base class and manually call that using a similar setup to the 2nd option.

I actually plan on showing how to setup a more diverse damage option in the next video that will likely touch on these various approaches.

I’m currently at work so I can’t test any fixes just yet but both of my pictures are from a freshly made top down template project. So unless the default code it starts with has issues that I couldn’t catch, it would be something else.

Are you setting the Test ability on the Actor once you place them in a level? One of my test stages is the Top Down project, so it definitely works with that basic template. :slight_smile:

EDIT: Just saw you have a variable named Test, and apparently an Ability named Test. That variable on your blueprint is just an empty class ID that happens to be called Test. It’s not a valid reference until you set it on the actor instance (i.e. when you’ve placed it in a level).

Great tip, i will be using a shared class for the Enemies.
And I’m looking forward the next video.

Thanks

Also i forgot to mention that it would be great if you can include in your next video how to blend in animations, right now i get weird movement when attacking and walking at the same time. Or when doing combo attacks.

Alright v1.5 has officially been submitted.

Sure I can look at doing something for that. That’s all going to come down to how your Animation State Machine(s) are setup and how you blend your results. Ideally you want your locomotion in its own state machine, then you can put Able’s Ability Animation Node in its own state machine, and just do a masked blend so Able’s results only apply to above the waist, and locomotion is below the waist.

v1.5 is now live. I’ll be working on 4.16 support next. I’m hoping that only takes me a day or two, but you never know with these major revisions.

So I’m pretty new to this but why is this error popping up when I try to launch the 4.15 showcase uproject file?

“Couldn’t set association for project. Check the file is writeable”

BAH, Sorry. Forgot to fix that. Just right click on the file -> Properties -> Uncheck “Read Only”

Duh. I was afraid it wasn’t that simple.
Just one more question for now. When an actor is placed in the level, I can make the abilities work. But how would I set the variable on an actor that is spawned from a player start, for example?
I’m also really sorry for so many simple questions. This is my first time using someone else’s stuff from the marketplace.

You could just manually set the variables using OnBeginPlay/ Construction Script portion of the Character Blueprint. Ideally you’d have a data table (CSV/Excel Spreadsheet basically) or something somewhere, so when your Player spawns, it uses its Class/Level/Whatever to find what Abilities it should set to whichever variables.

Okay well clearly I’m not ready to tackle this. I can’t get this to work at all. I’ll have to just come back when I’m better able to.

Hey ,

Reporting a bug,
When I add a Branch task on a brand new ability, the editor instantly crashes.

On older abilities that already have a branch task its no problem. From the stack trace it looks like it has to do with the new task descriptions feature.
Cheers

Unreal Engine 4.16 now released! :smiley:

Hi

This doesnt work. I fired it up in BTT But animation doesnt play.ed5cc2e74b4c8f859686d056ce483344e3a4c55a.jpeg

My NPC runs up to me then stands there
I put print string Attacking with delay of 5 and its doing it fine.
Anything special has to be done for AI to use this plugin?

@jwyuen

Did you set up the state machine and AnimGraph?