This issue here is most people only need to modify one or two formulas at most, like me. I only need to modify the CalculateAttackDamage formula, but because how your mod works, I cannot do that without including all the other checks and routines. This is because your mod not only changes almost every formula, but it adds tons of checks that are interdependent on other properties and objects that are hidden/set to private in the namespace.
So, I went through, did this, and then created and tried an auto patcher. It works now. Now, I and other modders can add your script file to our daggerfall build folder, add your mods public properties and objects through its name space, and then update whatever formula we want without having to rebuild all the private properties and objects from scratch to ensure it works with your mod.
Instead, as seen in my patcher, you can merely call the namespace, like so:
Code: Select all
if (PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul.softMatRequireModuleCheck) // Only run if "Soft Material Requirements" module is active.
{
...
}
Code: Select all
PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul.ToHitAndDamageMods swingMods = PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul.CalculateSwingModifiers(GameManager.Instance.WeaponManager.ScreenWeapon);
I've built an auto patcher for my shield and ambidexterity module for this mod. However, the autopatcher will not work until you update this mod using my script changes; until then, your properties and objects are set to private, and I can't access them using your mods namespace. Please update and push it, so I can push my updates.
I'll do a write up for newer coders/modders at some point on the proper way to setup and use namespace access to ensure mods are developed with easy access to properties and objects needed for cross mod support/patching.
I want to reiterrate that my changes do nothing to the functioning of your mod. It merely allows other modders access whatever they need to create patches.
Here is your mod with public property and object access
https://github.com/l3lessed/l3lessed-DFUnity-Mods/tree/main/PhysicalCombatArmorPatchFriendly