Announcement

Collapse
No announcement yet.

Able Ability System Info and Support Thread

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

  • replied
    And you will fix ability anim montage blend?

    Leave a comment:


  • replied
    Originally posted by jfaztk View Post
    Hello,

    OnAbilityStart() is a BlueprintImplementableEvent; does this mean I can't override/define it in a C++ ability?
    There is a C++ version on the AbilityComponent that is called whenever an Ability is started (FOnAbilityStart). On the Ability itself, there is no C++ version to override. I'm adding that in the next update for people who don't want to use a Blueprint version (or require some extra work done in C++ before tossing things to BP).

    Next update will be out shortly after 4.19 is available.

    Leave a comment:


  • replied
    Hello,

    OnAbilityStart() is a BlueprintImplementableEvent; does this mean I can't override/define it in a C++ ability?

    Leave a comment:


  • replied
    I fixed it, thanks!

    Leave a comment:


  • replied
    Originally posted by fernmerc View Post

    Well I'm not sure how the system works so I just assumed I needed them since they're referenced a few times in the original AblPlayParticleEffectTask... I added AbleCore to the PrivateIncludePaths and that got rid of most errors, all that I get now is:

    Code:
    Error LNK2019 unresolved external symbol "private: static class UClass * __cdecl UAblParticleEffectParamContextActor::GetPrivateStaticClass(void)" (?GetPrivateStaticClass@UAblParticleEffectParamContextActor@@CAPEAVUClass@@XZ) referenced in function "public: virtual void __cdecl UAblPlayParticleEffectAutoScaled::OnTaskStart(struct TWeakObjectPtr<class UAblAbilityContext const ,struct FWeakObjectPtr> const &)const " (?OnTaskStart@UAblPlayParticleEffectAutoScaled@@UEBAXAEBU?$TWeakObjectPtr@$$CBVUAblAbilityContext@@UFWeakObjectPtr@@@@@Z)
    The error happens thanks to this code:
    Code:
    // Set our Parameters.
    for (UAblParticleEffectParam* Parameter : m_Parameters)
    {
    if (Parameter->IsA<UAblParticleEffectParamContextActor>())
    {
    UAblParticleEffectParamContextActor* ContextActorParam = Cast<UAblParticleEffectParamContextActor>(Parameter);
    if (AActor* FoundActor = GetSingleActorFromTargetType(Context, ContextActorParam->GetContextActorType()))
    {
    SpawnedEffect->SetActorParameter(ContextActorParam->GetParameterName(), FoundActor);
    }
    }
    if (Parameter->IsA<UAblParticleEffectParamLocation>())
    {
    UAblParticleEffectParamLocation* LocationParam = Cast<UAblParticleEffectParamLocation>(Parameter);
    FTransform outTransform;
    LocationParam->GetLocation().GetTransform(*Context.Get(), outTransform);
    SpawnedEffect->SetVectorParameter(LocationParam->GetParameterName(), outTransform.GetTranslation());
    }
    }
    The error specifically mentions UAblParticleEffectParamLocation and UAblParticleEffectParamContextActor, any clue what it could be?

    Thanks!
    I assume those are the classes you added? When you see "GetPrivateStaticClass" that means you likely don't have the class exported(e.g. class MYGAME_API UMyClass).

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post

    Why are you using my Logging macros? You can use your own if that's the only thing you're trying to pull from the AbleCorePrivate.h, otherwise you'll need to add AbleCore to your PrivateIncludePaths in your .build.cs.
    Well I'm not sure how the system works so I just assumed I needed them since they're referenced a few times in the original AblPlayParticleEffectTask... I added AbleCore to the PrivateIncludePaths and that got rid of most errors, all that I get now is:

    Code:
    Error    LNK2019    unresolved external symbol "private: static class UClass * __cdecl UAblParticleEffectParamContextActor::GetPrivateStaticClass(void)" (?GetPrivateStaticClass@UAblParticleEffectParamContextActor@@CAPEAVUClass@@XZ) referenced in function "public: virtual void __cdecl UAblPlayParticleEffectAutoScaled::OnTaskStart(struct TWeakObjectPtr<class UAblAbilityContext const ,struct FWeakObjectPtr> const &)const " (?OnTaskStart@UAblPlayParticleEffectAutoScaled@@UEBAXAEBU?$TWeakObjectPtr@$$CBVUAblAbilityContext@@UFWeakObjectPtr@@@@@Z)
    The error happens thanks to this code:
    Code:
           
    // Set our Parameters.
            for (UAblParticleEffectParam* Parameter : m_Parameters)
            {
                if (Parameter->IsA<UAblParticleEffectParamContextActor>())
                {
                    UAblParticleEffectParamContextActor* ContextActorParam = Cast<UAblParticleEffectParamContextActor>(Parameter);
                    if (AActor* FoundActor = GetSingleActorFromTargetType(Context, ContextActorParam->GetContextActorType()))
                    {
                        SpawnedEffect->SetActorParameter(ContextActorParam->GetParameterName(), FoundActor);
                    }
                }
                if (Parameter->IsA<UAblParticleEffectParamLocation>())
                {
                    UAblParticleEffectParamLocation* LocationParam = Cast<UAblParticleEffectParamLocation>(Parameter);
                    FTransform outTransform;
                    LocationParam->GetLocation().GetTransform(*Context.Get(), outTransform);
                    SpawnedEffect->SetVectorParameter(LocationParam->GetParameterName(), outTransform.GetTranslation());
                }
            }
    The error specifically mentions UAblParticleEffectParamLocation and UAblParticleEffectParamContextActor, any clue what it could be?

    Thanks!

    Leave a comment:


  • replied
    Originally posted by fernmerc View Post

    I might end up going with the first approach, but the second approach sounds a bit cleaner to me so I want to try to it out (might even do both). I created the C++ task and I more or less duplicated the contents of AblPlayParticleEffectTask but I can't get it to work. I can't #include AbleCorePrivate.h, so I tried moving the logging Macros you set up in it into the task itself but I get compiler errors. Is there a specific way I should approach this? Thanks.
    Why are you using my Logging macros? You can use your own if that's the only thing you're trying to pull from the AbleCorePrivate.h, otherwise you'll need to add AbleCore to your PrivateIncludePaths in your .build.cs.

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post

    You could make a small/medium/large burn ability and choose which one to apply when you go to apply it. You could also just modify the AblPlayParticleEffectTask (or duplicate it and make a AblAutoScalePlayParticleEffect) and have it query table somewhere with the size (or do some simple math) when it goes to scale the particle template.

    Honestly, I'd go with the 1st approach - no particle effect is going to be 100% perfect for all body types (even if scaled perfectly), so breaking it up into simple categories and using a "best fit" approach is probably the best.
    I might end up going with the first approach, but the second approach sounds a bit cleaner to me so I want to try to it out (might even do both). I created the C++ task and I more or less duplicated the contents of AblPlayParticleEffectTask but I can't get it to work. I can't #include AbleCorePrivate.h, so I tried moving the logging Macros you set up in it into the task itself but I get compiler errors. Is there a specific way I should approach this? Thanks.

    Leave a comment:


  • replied
    Originally posted by fernmerc View Post
    Another question if you don't mind... Something I completely missed was the scaling of particle effects for status damages (burn, poison) depending on the actor's size. Is there any recommended way of approaching this? Not all burnable actors are the same size, and some are drastically different in size; how can I scale the particle system in the passive ability according to the actor's size? Thanks again!
    You could make a small/medium/large burn ability and choose which one to apply when you go to apply it. You could also just modify the AblPlayParticleEffectTask (or duplicate it and make a AblAutoScalePlayParticleEffect) and have it query table somewhere with the size (or do some simple math) when it goes to scale the particle template.

    Honestly, I'd go with the 1st approach - no particle effect is going to be 100% perfect for all body types (even if scaled perfectly), so breaking it up into simple categories and using a "best fit" approach is probably the best.

    Leave a comment:


  • replied
    Originally posted by ExtraLifeMatt View Post

    To be honest, I've never dug into Blueprint Function Libraries (I simply make C++ versions). I'm not sure how you would reference one blueprint to a BP library function. Also I'm not sure what you mean by "having to set the Ability's physical location".


    Right now Stacks have 3 different rules:

    - Refresh Duration (resets the Ability time back to 0, effectively playing it again).
    - Increase Stack Count (increases an internal counter for that Ability. You can get that value when calculating damage via GetCurrentStackCountForPassiveAbility on the Ability Component).
    - Refresh Duration and Increase Stack Count (does both of the previous options).

    There is no way to dynamically increase the iterations in a exponential (or whatever) way, if you wanted that you'd need to cancel the current passive Ability and apply a new one with the loop count you want.

    I can see about adding a more dynamic loop count that lets you script how many loops you want an Ability to play for. That's an easy add.
    Thanks for the stack explanation! Blueprint Function Libraries in blueprint are the same thing as the C++ ones. After you make the function it's pretty much accessible within any Blueprint. And in my case it is for all blueprints except Able ones. By the Ability's physical location I mean having to use FindObject and include the path to the physical Blueprint location in Content. I just made a parent Able class that has the function and it works just fine, so thanks anyways.

    I would really appreciate it if you add the dynamic loop count!

    Another question if you don't mind... Something I completely missed was the scaling of particle effects for status damages (burn, poison) depending on the actor's size. Is there any recommended way of approaching this? Not all burnable actors are the same size, and some are drastically different in size; how can I scale the particle system in the passive ability according to the actor's size? Thanks again!
    Last edited by fernmerc; 02-16-2018, 02:30 PM.

    Leave a comment:

Working...
X