MV Saving ._Data across saves?

So I just noticed that when assigning database objects additional data, it does not get saved when saving the game.

For instance, if wrote:

$dataSkills[102]._power = 2;
$dataSkills[102]._power would return 2.

It works perfectly well.
But if I were to save the game, close the game, and then return to the game,

$dataSkills[102]._power would return "undefined".

Is there any way to save ._ data when saving a game?

And if not, is there any other method to add data to a database object?

My last resort would be to use variables, but that's kinda messy, as we are talking about A LOT of objects.
To make it easier to understand, let's change $dataSkills to $dataActors.

You know you can change the actor name like $dataActors[1].name = "Custom Name".
But the same thing happens. it did not get saved. Instead, the game uses $gameActors.
This $gameActors is saved in the save contents, not the $dataActors (it refers to the database, it has static value).

So, if you were to change the database object, you have to include it in the saved content.
But just plainly save the $dataSkills in the saved content would be wrong. Because it will not get updated if you change the database from the editor. This is why all of the skill usages usually use the ID of the skill, so it refers to the $dataSkills (it is updated when you update it from the editor). So please do not edit the data object directly. Use another way.

Technically, your idea of using variables is the right, simplest, safest way, without needing much technical skill. Depending on how would you use this custom variable (.power in this case), I would personally save the extra variable somewhere not tied in the data object. For example, I can just use $gameVariables.setValue(1, {}) when a new game initializes (Btw, I forgot the syntax).

Then I expand it further
Code:
loop through all skillid
$gameVariables.value(1)[id] = {}
end

To refers to the .power stat
$gameVariables.value(1)[skill_id]._power $gameVariables.value(1)[skill_id]._power = 10

Too much typing? make it simpler
Code:
window.skillAttr = function(){
   return $gameVariables.value(1)
}
So you can just use skillAttr[1]._power
@TheoAllen
Yeah, that's probably for the best to do it like that.

Loading the additional data into variables as objects { } was my alternative approach anyways.
I thought it might get messy at first, but it's a lot cleaner and easier to handle as I thought.

At the very least the potential of bugs and other risks is pretty small with this method.
Well thank you for your time anyways!

Original thread: https://forums.rpgmakerweb.com/threads/saving-_data-across-saves.146477/