Effects

The Effects configuration is where you create or link global effects which will will be applied to ABC entities. Effects are applied from ability hits/collisions. There is over 50 effects you can choose from including inflicting damage, healing an ally or pushing an enemy away.

New effects can be added from selecting the 'Add New Effect' dropdown or by linking/copying an effect from the 'Add Global Effect' dropdown.

A list of what each ability effect does can be found here: Effect Breakdown

Objects require both the ABC State Manager and a Unity collider for effects to be applied by abilities.

Effects will be inflicted one by one to the entity in the order that they appear and the effects can be reordered by clicking the 'Up' and 'Down' button next to each effect.

Applying Effects

Ability effects can be added to an entity if they do not already have the same effect applied by the ability. unless the effect has the “Allow Duplicate Effect Activation” setting enabled. This only applies per character.

For example: if a character has a Fireball ability and a Lightning ability and both abilities have a Adjust Health effect setup. Even though the 2 effects do the same thing they are unique.

If the character activates 2 Fireball abilities and 1 Lightning ability and all 3 abilities hits an enemy at the exact same time then the enemy will be inflicted with the Adjust Health effect from the Lightning and the Adjust Health from only 1 Fireball ability. The effect from the second Fireball ability will not be applied as the enemy already has the Fireball effect active from this character.

In this same example another character can apply their own Fireball Adjust Health even though the enemy has a Fireball Adjust Health from the first character.

Effect Settings

Each effect comes with settings to customise what happens when the effect activates or how it activates. This ranges from what effect to activate, the delay and duration of the effect, who the effect will apply on, potency modification from stats, if the effect should stop movement or prevent/interrupt ability activation and any graphics or text which should display.

When adding an effect you can access all the settings by clicking the 'More Settings' button.

It is recommended that you copy or follow from the Global Effects library from ABC to get an idea of the kind of effects you can make

Modify Potency Using Stats

It's possible to use stats from the entity hit by the ability and/or the originator who activated the ability to modify the potency value of an effect. Stats can be created in the State Manager component.

This settings allows for entities stats to affect the power/force/value etc behind an effect. For example with an “AdjustHealth” effect the originators strength stat may modify the potency reducing more health (doing more damage) to the enemy hit, however the effect may also have it’s potency modified again depending on the enemies defence so it doesn’t reduce as much as it would have.

There is no limit to how many Stat Modifications that can be added to an effect. The stat modifications will be applied one by one in order of the list.

Modifications can be added by pressing the “+” button. The modifications can be removed from the list by hitting the “X” button at the end of the row. Modifications can be ordered using the up and down arrows at the end of the row of each ability.

Once a modification has been added the following settings appear in a line:

  • Add/Minus/Divide/Multiply the stat

    • The atheromatic being applied to the potency (increase/decrease potency etc)

  • Percentage Of

    • What percentage of the stat will be used in the calculation. I.e Add 30% of the Attack stat for example If Attack stat is 100 it will add 30 to the potency.

  • Originator (entity that activates the ability) / Entity (entity hit by the ability) / Both Simultaneously

    • Who’s stat is being used in the calculation. A choice of Originator, Entity or Both can be used. For example use 30% of the Originators Attack stat.

  • Integration type

  • Stat

    • The name of the stat to use. The string needs to match the stat which has been setup in the State Manager configuration or it will be ignored.

An example of these settings being used can be found below. 2 Stat modifications are shown which take into account the originators attack stat and the target entities defence stat to work out how much health is reduced from the target entity.

Starting Potency -100 (reduce health by 100 as a base)

Modification 1: Minus 30% of Originators Attack (100) (-100) - (30) = -130

Modification 2: Add 100% of Entity Defence (20)

(-100) - (30) + (20) = -110

The potency is decreased by 30% of the originator attack (negative value/decreased as effect is adjusting health) but then is then increased by 100% of the entity defence making it -110 adjusted health i.e 110 damage the target will receive.

Subscribing to an Effect Event

Within each effect is a setting called 'Event Type' which determines what happens when activating and deactivating effects. “Standard” will run the normal code integrated with the ABC system. “RaiseEvent” will only invoke the event delegate and “Both” will raise the event and run the normal code.

If set to "Raise Event" then it is possible to subscribe to a character's State Manager component to get notification of effects when they are raised. This can also be achieved using the Effect Subscriber Component.

    private void OnEnable() {
        //Record transform
        meTransform = transform;

        //Get Statemanger script
        if (playerStateManager == null)
            playerStateManager = meTransform.GetComponent<ABC_StateManager>();

        //Subscribe to event
        playerStateManager.onEffectActivation += EffectListener;   
    }

    private void EffectListener(Effect effect, ABC_IEntity Target, ABC_IEntity Originator) {
        switch (effect.effectName) {
            case "CustomEffect":
                //add custom effect here
                break;
        }
    }

    private void OnDisable() {
        //unsubscribe from event
        playerStateManager.onEffectActivation -= EffectListener;
    }

Notable Settings

It is highly recommended to read the tooltips in the blue boxes for a full description on what each setting does

Last updated