MV MOG_SceneFile "Property of '10' undefined" Quickfix

**Disclaimer: The best way to deal with this error is simply deleting the old save made by default rmmv, just making note of that here. While this will be safe to use with the default RMMV saves, I doubt it will work harmoniously with a save from any other plugin system out there. There's a chance it might still load the save from one but vital data may be missing on load that the plugin baked into that save.
Again, this is only meant to check for MOG_SceneFile added data and skill displaying and load the save in a DEFAULT RMMV save.

Ran into an issue with save files made before the plugin was installed.
Took a look at it and MOG's plugin errors due to attempting to access data that won't exist in default saves or other
saves from other plugins. Made a quick error handler for it and figured I'd share it.

JavaScript:
//==============================
// * draw Data
//==============================
Window_FileData.prototype.drawData = function() {
    var actor = this.data().actor;
    var x = Moghunter.scFile_ParX;
    var y = Moghunter.scFile_ParY;
    var s = Moghunter.scFile_ParS;
    var w1 = this.width - 120 + x;
 
    // Checking for data that indicates save made without this plugin...
    if (actor && actor.length >= 11) {
        this._actorID = actor[10];
        this.changeTextColor(this.textColor(Moghunter.scFile_TextColor));
        this.drawText(String(Moghunter.scFile_PlayTimeWord), x, 80, 120, 'left');
        this.drawText(String(Moghunter.scFile_LocationWord), x, 112, 120, 'left');
        this.drawText(TextManager.levelA, w1, y, 120, 'left');
        this.drawText(TextManager.param(0), x, y + s * 1, 120, 'left');
        this.drawText(TextManager.param(1), x, y + s * 2, 120, 'left');
        this.drawText(TextManager.param(2), x, y + s * 3, 120, 'left');
        this.drawText(TextManager.param(3), x, y + s * 4, 120, 'left');
        this.drawText(TextManager.param(4), x, y + s * 5, 120, 'left');
        this.drawText(TextManager.param(5), x, y + s * 6, 120, 'left');
        this.drawText(TextManager.param(6), x, y + s * 7, 120, 'left');
        this.drawText(TextManager.param(7), x, y + s * 8, 120, 'left');
        if (this._gold) {this.drawText(TextManager.currencyUnit, x, y + s * 9, 120, 'left')};
        this.resetTextColor(); 
        this.drawText(this.data().playtime, w1 - 40, 80, 120, 'right');
        this.drawText(this.data().location, w1 - 80, 112, 160, 'right');
        this.drawText(actor[0], x, y, 120, 'left'); 
        this.drawText(actor[1], w1, y, 80, 'right');   
        this.drawText(actor[2], w1, y + s * 1, 80, 'right');
        this.drawText(actor[3], w1, y + s * 2, 80, 'right');
        this.drawText(actor[4], w1, y + s * 3, 80, 'right'); 
        this.drawText(actor[5], w1, y + s * 4, 80, 'right');
        this.drawText(actor[6], w1, y + s * 5, 80, 'right'); 
        this.drawText(actor[7], w1, y + s * 6, 80, 'right');       
        this.drawText(actor[8], w1, y + s * 7, 80, 'right');
        this.drawText(actor[9], w1, y + s * 8, 80, 'right');
        if (this._gold) {this.drawText(this.data().gold, w1 - 40, y + s * 9, 120, 'right')};
    } else {
        // If save does not contain expected data...
        this.drawText("- Incorrect Save Structure -", x, y, 200, 'left');
    }
};

Replace your drawData with this version.
you basically explained the reason why we tell everyone that you have to start new games after changes to the plugin manager.

any plugin that adds its own data to saves (and most of the more complex ones do as they need that data during gameplay) will make all older savefiles incompatible due to missing data.

"Quick fixes" like the one above can always only account for a single plugin that needs its data - and even in those cases there can be problems depending on what data is needed as that can't always be guessed.

as a result most plugin programmers either don't have the knowledge to or don't bother with providing such a "quick fix", especially as you would still have the same problem and be required to start a new game when adding the next plugin after this one.

Just think about it: even professional AAA companies have updates where they either tell their players that they need to start a new game or that the update only works for new games.
Do you think they like doing that? No, but some form of updates will always cause such problems for older saves.
@ Andar That is a fair point and one I hadn't considered thoroughly in that aspect. When I made the check originally it was just due to it only having parameter's displayed about an actor and a few other properties. Just to get passed that point if you are importing the plugin but were not aware this would happen I let it skip the display of values since I that shouldn't harm anything on it's own but it is checking for that specifically and not generally so I gave a disclaimer at the end of the post. In hindsight I'll up the disclaimer and move it to the beginning.
In further hindsight it's probably best just to take the post down
I don't think that's the case. People who run into this error and google it might now find this thread, and will learn that all they need to do is playtest on a fresh save.

And sometimes people do make updates to their games and want to support existing saves, in which case it should prove rather useful.
I don't think that's the case. People who run into this error and google it might now find this thread, and will learn that all they need to do is playtest on a fresh save.

And sometimes people do make updates to their games and want to support existing saves, in which case it should prove rather useful.
Roger that, I suppose for the time being then I'll let it stand with the disclaimer. Mainly, I made it for the strict purpose that I didn't run into that again during testing and development of what I'm currently working on. It was going to be updated as progress went along and I added new things into the save files(If I did). It would eventually serve to remind me, "Hey you added something to the save file the last time you messed around in here, you might want to account for that since you didn't".

Original thread: https://forums.rpgmakerweb.com/threads/mog_scenefile-property-of-10-undefined-quickfix.168198/