WASTED
Workaround for a ModifyHealthAction bug v2 (ARMOR_REDUCTION adds extra damage)
In case somebody else has also experienced the glitch where a ModifyHealthAction will directly add ARMOR_REDUCTION on top of damage dealt if the expression is a negative value.

(snip, see the second post for the improved version)

Just BuffAddAction this buff and then BuffRemoveAction it when the damage is done. I needed this myself for a consumable that damaged the player over time, because if they had, say, an Emma Grand, the damage over time would be quadruple what it should have been. Actvating this buff for the duration of the damage over time fixed the problem.
Last edited by king bore haha; Jul 10, 2017 @ 10:41pm
< >
Showing 1-1 of 1 comments
king bore haha Jul 10, 2017 @ 1:07pm 
I was extremely unsatisfied with the previous workaround so I came up with a MUCH BETTER solution that works pretty similarly, but it only activates the ARMOR_REDUCTION null buff during the self damage, so the player will always retain the proper amount of ARMOR_REDUCTION on all of their weapons at all times.

local buff_gameobject = CreateGameObject("buff_null_armor_reduction") local buff = buff_gameobject.AddComponent("BaseBuff") buff.buffName = "hidden null armor reduction" buff.buffFlavorText = "" buff.buffDescription = "" buff.requiredTags = "" buff.attributeEffects = {BuffAttribute.Create("ARMOR_REDUCTION", "-1", true,"selfdamage"),} buff.conditionEffects = {} buff.maxStacks = 1 buff.levelClass = -1; buff.buffType = BuffType.Normal buff.buffPriority = BuffPriority.Normal buff.hideInConditionsList = false buff.nonSerialized = false buff.contextTags = "" buff.Register();

For this one to work, the ModifyHealthAction needs to contain
condition.contextTags = "selfdamage"
That makes the ARMOR_REDUCTION only be nullified during that single attack.

As before, whatever condition you have should BuffAddAction when the condition is added, and BuffRemoveAction it when the condition is removed.
Last edited by king bore haha; Jul 10, 2017 @ 1:10pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50