[Mod] Physical Combat And Armor Overhaul

A curated forum for compatible and maintained mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
Post Reply
l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [Mod] Physical Combat And Armor Overhaul

Post by l3lessed »

Hey, so after hammering my head against your mod again, I decided the easiest route for future patching for this mod would be to setup the proper public property access for the namespace properties and objects.

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.
                {
                ...
                }
Or, like this:

Code: Select all

PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul.ToHitAndDamageMods swingMods = PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul.CalculateSwingModifiers(GameManager.Instance.WeaponManager.ScreenWeapon);
In both above instances, the modder is merely calling whatever property or object they need to make their specific formula compatible/patchable with your mod. This was not possible before because you hid them behind private access.

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
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Physical Combat And Armor Overhaul

Post by Magicono43 »

So from the changes I see, can I literally just change all the private accessed methods to public and your patching process would work? I did not make the stuff private for any reason, maybe just because those methods were private in their original class so I figured I had to give the same access level or something.

Do you need me to release the mod with the updated methods, or do you just wanted it changed in the main github fork for now?

l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [Mod] Physical Combat And Armor Overhaul

Post by l3lessed »

Exactly, that was all that was needed. Once public, they can be access through the engine and the namespace once the mod is loaded into the game.

It needs updated, compiled, and resubmitted. Until you recompile it, the private methods won't be accessible.

If you don't want to recompile it, I added a compiled version of your mod ; I compiled it for testing on my end, but feel free to use it. You can name it whatever and use it.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Physical Combat And Armor Overhaul

Post by Magicono43 »

Is this commit good enough for the access modifier changes? I changed a few more than you had listed, but hopefully that won't cause any problems.

https://github.com/magicono43/DFU-Mod_P ... 7bb26e7652

l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [Mod] Physical Combat And Armor Overhaul

Post by l3lessed »

Yes, I didn't notice those because I didn't need them for my patching. I recommend making them public for other modders who want to patch any of them for their mod.

Thanks as always for being so responsive to requests about this mod.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Physical Combat And Armor Overhaul

Post by Magicono43 »

Yeah, I read your post as if I did the private access mods consciously or something, lol. I don't do stuff like that, otherwise I would not have my code in a github repo open and available, etc. I just thought at the time that maybe that was proper practice or something from examples I was going by, well hopefully changes those does not cause issues in some way. I'll try and upload the "patch friendly" version on the nexus later tonight if I remember, if it goes fine on the next version update I'll just make that into the main mod download file.

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Physical Combat And Armor Overhaul

Post by Magicono43 »

Released updated version 1.42, This small update was by request from fellow mod creator l3lessed in order to hopefully make it easier for other mod authors to make patches for their own mods that may have compatibility issues with this mod. Not necessary, but recommended to use now.

Regnier
Posts: 374
Joined: Wed Oct 02, 2019 6:26 am

Re: [Mod] Physical Combat And Armor Overhaul

Post by Regnier »

does this mod make different weapon selections more impactful? or just material type and condition?

for example would a blade on a nymph work better as it is flesh but a blunt weapon would work better on a skeleton? Would axes be highly effective against spriggans?

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Physical Combat And Armor Overhaul

Post by Magicono43 »

Regnier wrote: Thu Oct 07, 2021 2:50 am does this mod make different weapon selections more impactful? or just material type and condition?

for example would a blade on a nymph work better as it is flesh but a blunt weapon would work better on a skeleton? Would axes be highly effective against spriggans?
Yes it does to a degree, but only for certain enemies. Like the Gargoyles are much less effected by bladed weapons, but much more effected by blunt. The Iron Atronachs are much less effected by blunt weapons and while still somewhat resistant overall, take more damage from bladed than blunt. Spriggans as well in a similar way, skeletons too I believe.

It's not perfect, as I went into much more detail in this regard in my overhaul project that is been on hiatus for a while, but yeah it does work this way in my mod.

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Physical Combat And Armor Overhaul

Post by Magicono43 »

Updated mod details with an overly simplified summary of the features in the mod.
Check under "Overly Simplified Mod Features List" for a more simple (but less useful, imo) list of the features.

Post Reply