0 of 0

File information

Last updated

Original upload

Created by

3XC4L1B3R

Uploaded by

3XC4L1B3R

Virus scan

Safe to use

About this mod

Allows multiple mods to include or exclude spells and abilities from extra attack without compatibility patches.

Requirements
Permissions and credits
Changelogs
Allows multiple mods to include or exclude spells and abilities from extra attack without compatibility patches.
This is accomplished using new condition functions which check whether particular strings are included in the "SpellRoll" field of a spell.

Users
If another mod requires this one, you only need to download and include the mod in your load order like any other. That's all!

Load Order
Its place in the load order shouldn't matter. However, mods which modify extra attack without using the tools included in this mod will overwrite my changes if they are loaded after this mod. Therefore, placing this mod at the very bottom of your load order will minimize any possible incompatibilities.

Modders
In order to use the tools provided in this compatibility mod, you only need to include particular strings in the "SpellRoll" fields of spells you wish to include or exclude from extra attack. The best way to do this without breaking the spell is to add a dummy HasStatus() functor that includes the string.
To make a spell work with extra attack, add
and not HasStatus('ModdedExtraAttack')
to the end of its "SpellRoll" field. Like so:
data "SpellRoll" " not SavingThrow(Ability.Dexterity, CalculateSpellDC(Ability.Constitution, context.Source)) and not HasStatus('ModdedExtraAttack')"
Likewise, to make sure a spell doesn't work with extra attack, add
and not HasStatus('ModdedNonExtraAttack')
Like so:
data "SpellRoll" " not SavingThrow(Ability.Dexterity, CalculateSpellDC(Ability.Constitution, context.Source)) and not HasStatus('ModdedNonExtraAttack')"
You don't need to add this to every spell that doesn't trigger extra attack, just those that would trigger it by default if you didn't include it.
A HasStatus() which checks for a status which doesn't exist will always evaluate to false, so this extra bit will not have any effect on the result of the spell, besides including or excluding it from extra attack. Even if EAC isn't in the load order, including this won't break anything!
Make sure not to modify the "ExtraAttack" PassiveData or "EXTRA_ATTACK" StatusData in your own mod. And, of course, make sure the users of your mod know that EAC is required for your mod's extra attack functionality to function properly!

Why do I need it?
The spells and abilities that trigger extra attack are defined the "ExtraAttack" PassiveData entry, and the "EXTRA_ATTACK" StatusData entry. Unfortunately, due to the way modded Stats entries overwrite each other, every mod that changes these entries would overwrite all other changes to the same fields higher in the load order. This means that for two mods to work together, their changes to these entries would have to be combined together (i.e. a compatibility patch). This would be required for every combination of mods that change extra attack.
So, Mod A and Mod B might work together with Patch Z, but Mod A and Mod C might require Patch Y, Mod B and Mod C together require Patch X, and Mods A B and C together would require Patch W. And these patches would not be compatible, as they modify the same fields.

How does it work?
The logic at work in EAC is very simple. I added functions to extra attack that check for particular strings in the SpellRoll field of spells. If the string is found, the spell will be considered a valid extra attack ability (or explicitly invalid, depending on the string).
These strings can be anywhere in the SpellRoll field of spells, but as noted above, HasStatus() is an effective way to include the string without changing the result of the spell. In theory, any functor with a string argument that doesn't check if that string is a valid instance of whatever the functor is checking before giving its return value would work. Or really, any way to include a string without invalidating the expression field.

Including EAC in your own mod(s)
You are allowed to include EAC's changes in your own mod(s), as opposed to requiring EAC. I only ask that you credit me if you do!
I've included an unpackaged version of the mod files to make including EAC in your mod easier. Merge the Scripts and Stats folders into your own mod to include everything needed for EAC to work.
  翻译: