Why Is Overriding And Hiding Not Working For Mod?

Discuss modding questions and implementation details.
User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: Why Is Overriding And Hiding Not Working For Mod?

Post by Magicono43 »

Yeah, I "think" I mostly understand inheritance at this point as I dealt with the concept in my just last mod, but in that case, I was using the UIWindowFactory that allowed me to easily register the "override" for the specific UIWindow class I was changing. In this case however, it seems i'm forced to make my own override register in a sense.

I only copied over the entire class because when I tried to do the same deal as with my last mod, nothing that I overrode was showing up in-game, such as the debug.log strings I set to run, instead the one from the default class were running. After that I had no more ideas on what I could do next to make it override, so I just did the copy-paste of the entire thing thinking maybe that would do something different.

Basically was going by the logic that my class was going to override the entirety of the original class, so I did not derive my class from PlayerEntity, but instead derived it from "DaggerfallEntity" as the original PlayerEntity is derived from.

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

Re: Why Is Overriding And Hiding Not Working For Mod?

Post by Magicono43 »

Hold up, I just tried to make my mod derived from PlayerEntity this time instead of DaggerfallEntity, and most of the errors went away this time, so i'll see if this time it works.

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

Re: Why Is Overriding And Hiding Not Working For Mod?

Post by Magicono43 »

Ehhh, nope I got my hopes up there. When I tried to hit "Play" on the launch screen with the mod enabled it would crash Unity itself. Tried removing everything but the method I changed and the constructor necessary to derive from PlayerEntity and there were no errors, but my mod also did not override what I expected it to, as was the case in my previous attempts.

Post Reply