Announcement

Collapse
No announcement yet.

Able Ability System Info and Support Thread

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

    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.
    Able Ability System - A high performance, robust ability system for UE4. Now Available!

    Comment


      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

      Comment


        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.
        Able Ability System - A high performance, robust ability system for UE4. Now Available!

        Comment


          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)

          Comment


            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?

            Comment


              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.
              Able Ability System - A high performance, robust ability system for UE4. Now Available!

              Comment


                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.

                Comment


                  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.
                  Able Ability System - A high performance, robust ability system for UE4. Now Available!

                  Comment


                    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!

                    Comment


                      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.
                      Able Ability System - A high performance, robust ability system for UE4. Now Available!

                      Comment


                        Originally posted by ExtraLifeMatt View Post


                        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.
                        1. Got you! I will just test with the most used BP node ever - print string if it works
                        3. 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?
                        4. 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.


                        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?
                        Last edited by AngeIV; 04-09-2020, 10:04 AM.

                        Comment


                          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?

                          Comment


                            Originally posted by AngeIV View Post
                            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.
                            Able Ability System - A high performance, robust ability system for UE4. Now Available!

                            Comment


                              Originally posted by ExtraLifeMatt View Post

                              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 this way even client only abilities (like "dark vision") wont trigger locally if a replicated tag container doesn't have specific tag

                              I like this system more and more the deeper I go

                              Comment


                                ExtraLifeMatt - I just wanted to say thank you for all the support 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
                                Once again - thank you!

                                Comment

                                Working...
                                X