MV Battler assigned objects apparently... breaking?

I have absolutely no clue on this one, nearly everything involved is not working like everything else.

I have an object prototype being created and assigned to a battler when it's initialized. This object contains its own functions, its own constructor, and so on. The usual stuff. First odd thing happens immediately, though I've never had cause to notice before. Normally when I get an object's constructor's name, it gives me just that, the name of the constructor of the object. But for THIS object, it returns "Object". Not sure why, everything about its construction is patterned after every other object in MV's files. Not really important, just weird and I'd like an answer if there is one. COULD be related to the primary problem.

The main issue is that I'm calling functions contained in these objects, per battler. When I start a new game, it works fine. But if I save, and reload, suddenly the functions apparently aren't functions and I start getting errors. The objects are still attached to the battlers, along with the data each contains... but apparently the functions are gone. And when I console.log the object, it's type in the console log has vanished, which I'm sure is the cause of the missing functions. My question is.... what happened? Why is the object I assign when a battler is initialized no longer the object it's supposed to be after loading? It shows fine when the starting party is initialized on the main menu... but when the save is loaded, it's apparently breaking there. Is it saving the object, but not what KIND of object it is? Is the constructor issue the problem? (My theory there is, when created, it "kinda" knows what it's supposed to be, but since its constructer is returning "object" for some reason, it saves and then loads as a generic object containing only its data, and not its functions.)

I have a workaround set up at the moment, where it reassigns the objects if accessing a function of those objects fails... but I'd prefer to have the root problem addressed, especially if I have the need to create additional objects for other objects in a similar vein. I'd rather not have to have a workaround if I don't need one.

Thanks in advance!
It might be easier to help you if you show your code.

I'm sure I've seen someone else with a very similar issue before.
Actually, I believe I just figured it out. The CONSTRUCTOR was fine... it's CONSTRUCTION apparently wasn't. I took a shortcut when coding the object, and stuck all of its functions inside {} brackets, purely out of laziness because I didn't want to type in the object.prototype bit or copy/paste it for each line(also time constraints, I typed that part while on break at work), so it was basically this:
JavaScript:
Object.prototype {
    func1 = function (){}
    func2 = function (){}
}
It worked fine when I tried it, but I hadn't gotten to a point of needing to save and then load after that. After typing the original post, it got me thinking about the object thing more... The initialize function called by the constructor was IN the brackets. So I removed the brackets and put in the object.prototype on each line. Seems to work now. Now I know that isn't a viable shortcut. Time to go bang my head on the wall again... gotta love when an attempt to save time ends up COSTING you time and causing you frustration.

I'm still pretty noobish to javascript, so I'm not exactly sure WHY my shortcut attempt halfway worked until it didn't... I'm just glad I thought to check the constructor before making the post, and that typing the post made me realize the two problems might actually be directly related.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/battler-assigned-objects-apparently-breaking.136134/