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 Maxilos View Post

    So, it took me some time to get back to all this. I downloaded your setup and it actually has the same problem if I launch the project as a standalone game, giving the cast of nullptr error.
    Standalone Game does some weird things with BPs. Does this occur in a packaged project? I'll keep poking at it.

    Able 3.29 Submitted. Notes below:

    • Fixed a crash when adding Instanced Parameters to Play Particle Effect Task (h/t Roland)
    • Added an option to enable Preview Asset rotation. It's defaulted to OFF so, if your mesh is suddenly twisted, just turn the option back on - but hopefully this fixes the reverse case which seemed more prevalent.
    • Added an option to Play Animation Task to reset the Ability Instance Mode at the end of the Task or not. Previously this was always on, but it does cause an issue for some instances given that resetting the mode also resets the animation tick, so if you see some weirdness at the end of your Play Animation, try disabling this. This is defaulted to ON.
    • Re-added the Timeline Marker and Scrubbing the Timeline to the Ability Editor. (Whoops, no idea how this got removed, h/t Jeremy for bringing it to my attention).
    • Removed deprecated Collision Channel field from Query/Sweep Tasks to reduce confusion.
    • Fix to flickering on Collision shapes when in the Editor. (h/t Jeremy)
    • Made the Ability Editor a bit smarter about how to watch new Abilities / Custom Tasks for compilation in-case it needs to recreate them.
    • NEW FEATURE BETA:
      • Instancing Support - Like GAS, Able now let's you select how you want an Ability to be instanced. You can find this option under the "Misc" section on the Ability itself.
        • Default - Uses the current behavior which means Abilities are basically read only and all state needs to be in the ScratchPad structure. This has the benefit of only ever needing 1 Ability object in memory at a time, even if there are 100 people using it. However, it does have it's limits.
        • Instanced - Creates a new Ability Object at the time of the Ability Execution. That Ability can be written to, state can be stored in it, etc. It will be destroyed/GC'd at the end of the execution. Note that BOTH the Client/Server both get their own unique object, so variables ARE NOT shared in this mode.
        • Instanced (Replicated) - Creates a new Ability Object on the Server, which then gets replicated down to the Client. Variables that are marked for replication should come down with it, update as expected, etc. Once the Server finishes execution, the object is cleaned up (which will clean it up on the client as well). The Client cannot locally predict Abilities marked with this tag, so I'd avoid using this on anything that isn't started on the server, or you can live with RTT lag for the Client to start playing it.
      • This feature is very much in Beta. I have done some small testing to make sure everything isn't on fire, but it needs a lot more testing before I'm happy with it. Use at your own risk, in which case please send me any bugs you find.

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post

    I was Able to get it working locally, right now I have a Custom Task that just picks a random number, stores it in the custom scratch pad, and then displays that number when the task is done.

    You can check my setup here:
    https://www.dropbox.com/s/gbawgn9koh...omTask.7z?dl=0

    I was also able to reproduce the crash when recompiling Custom Tasks in Abilities. I'm still working on that fix however.

    EDIT: Looks like there is a new BP Reinstancer, going to look at setting that up for Able Blueprints.
    So, it took me some time to get back to all this. I downloaded your setup and it actually has the same problem if I launch the project as a standalone game, giving the cast of nullptr error.

    Leave a comment:


  • replied

    left one long time ago. But it doesn't show my name as it is bought on my another account. This is my personal forum account. I also use 2 company accounts.

    Leave a comment:


  • replied
    Originally posted by AngeIV View Post
    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!
    No problem AngelV. I hope it helps you make an amazing game(s). Feel free to leave a review if you haven't already as that really helps.

    Cheers!

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


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

Working...
X