BG3-Community-Library-Team / BG3-Community-Library

Baldur's Gate 3 Community Library exists to provide a common collection of Spells, Scripts, Items, Statuses, Passives, and other useful material that will assist modders in creating new content.
MIT License
92 stars 207 forks source link

Cannot use CL_ApplyStatusBulk #156

Open Mythalar opened 4 months ago

Mythalar commented 4 months ago

Hey,

Must be missing something simple but as of now I cannot make CL_ApplyStatusBulk work...

I would like to use it in Passives since I'm doing a long one and reduce multiple calls would be very nice.

An example (trimmed down since there is an IF for each damage type) :

new entry "WearingMagic0"
type "PassiveData"
data "StatsFunctorContext" "OnDamage"
data "Conditions" "SpellPowerLevelEqualTo(0) and Enemy() and not Item() and not Self() and not HasStatus('WEARING_MAGIC_TECHNICAL',context.Target) and not HasDamageEffectFlag(DamageFlags.SavingThrow)"
data "StatsFunctors" "IF(IsDamageTypeLightning() and RollDieAgainstDC(DiceType.d100,51) and SkillCheck(Skill.Arcana, WearingMagicArcanaCheckDC())):CL_ApplyStatusBulk({'MENTALSLAM', 'WEARING_MAGIC_TECHNICAL'}, {context.Target, context.Target}, {100, 100}, {2, 0});IF(IsDamageTypeThunder() and RollDieAgainstDC(DiceType.d100,51) and SkillCheck(Skill.Arcana, WearingMagicArcanaCheckDC())):CL_ApplyStatusBulk({'MAG_THUNDER_REVERBERATION', 'MAG_THUNDER_REVERBERATION_DURATION_TECHNICAL', 'WEARING_MAGIC_TECHNICAL'}, {context.Target, context.Target, context.Target}, {100, 100, 100}, {2, 1, 0});IF(IsDamageTypeFire() and RollDieAgainstDC(DiceType.d100,51) and SkillCheck(Skill.Arcana, WearingMagicArcanaCheckDC())):CL_ApplyStatusBulk({'DAZED', 'WEARING_MAGIC_TECHNICAL'}, {context.Target, context.Target}, {100, 100}, {1, 0}))"

It just does not work at all, but by swapping CL_ApplyStatusBulk with a simple ApplyStatus it does work so the logic is good enough but it would be so much better with bulks =)