[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 »

Okay got it. As long as users are using shield module 3.2, there should not be any cross mod issues, I checked both in editor and in the base dfunity game. I didn't have an issue no matter load order. However, users need to be told to load your mod after mine if they want your changes to your CalculcateAttackDamage formuia/method.

Here is the patched script file for your mod. This one should be used as an alternative file to your main file. The user should not use both.

If you want a single file that uses mod settings instead, let me know, and I will throw it together for you.

Patched script file.
https://www.dropbox.com/s/lt7kxzhzz5h68 ... ul.cs?dl=0
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 »

Capture.JPG
Capture.JPG (34.34 KiB) Viewed 2561 times
Capture12.JPG
Capture12.JPG (194.38 KiB) Viewed 2561 times
Untitled12.png
Untitled12.png (1.4 MiB) Viewed 2561 times
I built the altered script you just linked into a .dfmod. Launched it with your mod not in the load-out, worked fine with my mod, no problem. When I relaunched and had your mod active the second photo is the error that came up, which is one that was coming up from my last post as well, but in a different attempt I gave. When I loaded a save your mod was working fine, but my mod was not functioning, at least none of the de-bug text I had in my override of the damage formula were present.

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

Re: [Mod] Physical Combat And Armor Overhaul

Post by l3lessed »

Rgr. I'll dig into this. I didn't see this on my build, but I could of overlooked something.
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.

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

Re: [Mod] Physical Combat And Armor Overhaul

Post by l3lessed »

Why does your formula helper reference your mod object twice? It does not show this in my script or compiler.

Specifically, it should not say in your error output. "PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul.CalculateAttackDamage"

this here: "PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul" is a double object reference. You are telling your mod to reference itself from within itself, which yeah, logically programs don't like.

It should reference like so "PhysicalCombatAndArmorOverhaul.CalculateAttackDamage" to pull the CalculateAttackDamage method from your mod. For some reason, it is referencing itself before it references the CalculateAttackDamage, which I think is causing the problem.

You just copy and pasted my script completely, without changes?

I'll see if I can replicate this, but I can't replicate this in my build right now with the script file I gave you.
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 »

l3lessed wrote: Sun Jul 05, 2020 2:16 am Why does your formula helper reference your mod object twice? It does not show this in my script or compiler.

Specifically, it should not say in your error output. "PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul.CalculateAttackDamage"

this here: "PhysicalCombatAndArmorOverhaul.PhysicalCombatAndArmorOverhaul" is a double object reference. You are telling your mod to reference itself from within itself, which yeah, logically programs don't like.

It should reference like so "PhysicalCombatAndArmorOverhaul.CalculateAttackDamage" to pull the CalculateAttackDamage method from your mod. For some reason, it is referencing itself before it references the CalculateAttackDamage, which I think is causing the problem.

You just copy and pasted my script completely, without changes?

I'll see if I can replicate this, but I can't replicate this in my build right now with the script file I gave you.
Did not change anything from the script you most recently linked. Then used that to build the .dfmod and what happened was what I posted afterward.

Edit: Also, remember that my mod has the Namespace and the main Class having the same name.

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

Re: [Mod] Physical Combat And Armor Overhaul

Post by Magicono43 »

The Current Version is still be compatible with DFU V0.10.24, I did a decent amount of testing just now to make sure of this, however if you find anything strange going on, feel free to make a post about it, thanks.

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

Re: [Mod] Physical Combat And Armor Overhaul

Post by l3lessed »

Duh, should of checked the namespace. Forgot to. I would recommend using unique namespace, so it isn't the same as any of the class objects/scripts it contains. Just good coding practice to get into.

Let me give you the compiled json, and see if that works with your DFU base build. If it does, we can release that until I can sort out what the difference is causing the error. Give me a little bit, hanging with friends and fam still.

Yeah, 10.24 should be fine. I don't believe they touched anything we are coding around.
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 »

l3lessed wrote: Sun Jul 05, 2020 7:15 pm Duh, should of checked the namespace. Forgot to. I would recommend using unique namespace, so it isn't the same as any of the class objects/scripts it contains. Just good coding practice to get into.

Let me give you the compiled json, and see if that works with your DFU base build. If it does, we can release that until I can sort out what the difference is causing the error. Give me a little bit, hanging with friends and fam still.

Yeah, 10.24 should be fine. I don't believe they touched anything we are coding around.
I just tested and 10.24 seems to work fine with this mod (for now at least.) Take your time, i'm just getting my own mods and a new release all sorted out. Also yeah, if you can give me something, even if it does not work in my environment, but it does work in your and others, or just live in general, I could not really care if my side is not working for whatever reason, i'd be alright just releasing a second compatible version, as long as it works for others.

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

Re: [Mod] Physical Combat And Armor Overhaul

Post by l3lessed »

Transferred shield module to 10.24 and your mod with my code patches. Everything works in editor and base. I put in debug logs to ensure your code was still executing, and it showed up.

I think I might know your issue. When I looked at your mod settings, I realized you are putting your script file in the mod folder. My mod requires me to develop in the engine script folder, so it loads into the base engine script environment. My memory tells me I did this to get access to certain things I couldn't get to in the base engine.

The base script directory is "daggerfall-unity-master\Assets\Scripts." When script files are dropped in there, it loads them into the base engine in the editor like all the other base script files. In the editor, there is a clear difference between having them in the base script file directory versus outside it, anywhere else.

Maybe, if you move your script file anywhere into the assets/scripts folder, it may fix your issue? not 100% sure, but this is for sure a difference in our builds that may be causing it.

Anyways, I've pm'ed you all the files so you can provide the patch and try it yourself.
Last edited by l3lessed on Sun Jul 05, 2020 11:37 pm, edited 1 time in total.
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 »

l3lessed wrote: Sun Jul 05, 2020 11:18 pm Transferred shield module to 10.24 and your mod with my code patches. Everything works in editor and base. I put in debug logs to ensure your code was still executing, and it showed up.

I think I might know your issue. When I looked at your mod settings, I realized you are putting your script file in the mod folder. My mod requires me to develop in the engine script folder, so it loads into the base engine script environment. I think this gave me access to certain things I couldn't get to, if I remember why I did this correctly.

Maybe, if you move your script file anywhere into the assets/scripts folder, it may fix your issue? not 100% sure, but this is for sure a difference in our builds that could cause it.

Anyways, I've pm'ed you all the files so you can provide the patch and try it yourself.
Yeah, it does appear to be working in live, so yeah it could very likely be an inconsistency between your and my Unity environment that was causing that issue. So for now, i'm just going to release this compatibility patched version that you sent me and hopefully that works well enough for people that wish to use both our mods. Thanks for doing most of the work there, I was honestly getting pretty confused after I started getting errors that you were not seeing on your side as well, lol.

Post Reply