Announcement

Collapse
No announcement yet.

Able Ability System Info and Support Thread

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

  • replied
    Originally posted by AngeIV View Post

    1. Will it call on the parent object though or it will use the default class variables that i seted up for the child?
    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?

    1. That's only for functions. Variables should be inherited if you set them to be (I assume BP allows that).
    3. 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.
    4. 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.

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post

    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?
    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.
    And thanks to that I can run almost any ability (any without specific animation) on any object if it has proper components!

    Leave a comment:


  • replied
    Originally posted by AngeIV View Post
    Hmmm seems like this Scatchpad solves my problem with "Stoneskin" from earlier
    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

    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.

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post

    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
    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

    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?
    Last edited by AngeIV; 04-08-2020, 07:25 PM.

    Leave a comment:


  • replied
    Originally posted by AngeIV View Post
    ExtraLifeMatt 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.

    Leave a comment:


  • replied
    ExtraLifeMatt 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?

    Leave a comment:


  • replied
    Originally posted by GeoBoyka View Post
    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?
    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)

    Leave a comment:


  • replied
    Originally posted by GeoBoyka View Post
    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.

    Leave a comment:


  • replied
    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?
    Attached Files

    Leave a comment:


  • replied
    Able v3.28 has been submitted.

    Notes:
    • Added Task check system.
      • OVERVIEW: The past few patches have been aimed at making Custom Tasks references less fragile. UE4 has a hard time replacing Custom Task references in the Abilities (when you recompile the Custom Task in Blueprints, the system needs to fix up all the old class instances to point to the new class instances). There's a couple reasons why I think this is happening, but all of them require engine level changes - so that's out. Instead, Able tries to catch the bad references after the fact and fix things itself. While the current system of hot swapping works for me, other users haven't been as fortunate due to what I think is a timing issue based on peoples CPU / HDD speeds and the async nature of BP compiling. This additional system gives another layer of hopefully catching these bad references and fixing them.
      • HOW IT WORKS: The new system is transparent to the user. Whenever any type of Custom Task is added to an Ability (or already exists on an Ability) - that Ability will store a bit of data about that Task. The Class name, start/end times, etc. Occasionally (every 1s currently, or on Save/Play), the Ability will check for any out of date references - if detected, it'll re-create the Task in place and the user should be none the wiser. This data is only used by the Editor, so it won't bloat your cooked assets. If you open up an Ability with a Custom Task and it gets marked as "dirty" despite you not changing anything - that's because it's trying to cache some of that Task data. Just save it or ignore it (but it'll keep doing it till you save it with the cached data).
    • Added "Clear Context Targets" option to Collision Sweep / Query Tasks, this option will clear out Targets in the context before adding new ones.

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post

    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.
    That would actually work 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.

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    Originally posted by AngeIV View Post

    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.

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post

    The way to do stone skin right now is to store it on the player. Make a function on the player called "ApplyStoneSkin" or something which adds Level * 10 "armor" to a variable, then when you go to apply damage, subtract it from your armor first.
    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.

    Leave a comment:

Working...
X