ComparableName

Description

The ComparableName scriptable object can be used in multiple ways. It can be used to remove effects, but is mainly used by non-stacking Status Effects because duplicate effects are compared by the ComparableName and not the StatusEffectData. The reason for this is to allow different Status Effects to differentiate their values while still being labeled as the same Status Effect.

For example, lets say you have a 'Weak Poison' and a 'Strong Poison', their ComparableNames would both be 'Poison' since they are the same Status Effect but with different values. Now if they aren't stackable it can properly calculate the duration if the non-stacking behaviour is set to match highest value.

Last updated