It's hard to explain... I added a property to both actors and enemies in a plugin I'm trying to make. I tried to give it values for different enemies and actors with notetags, from the database, but everytime I try to check the length of Game_Actors, or $gameActors, it returns 0 or undefined in the main function. Dev Tools snipped for me that it's trying to do it before clicking "New Game" or "Load Game".
As I said before, I tried every combination I could think of, using that online spreadsheet for reference, and devTools to have a guess on what's what.
I know that the parameter is applied perfectly fine on every character, as $gameActors.actor(2).personalizedIntParam returns 0, both in dev tools and in-game, instead undefined, even before "New Game".
So I want to know how to check the size/length of the database on running the game.
(function() {
[...]
Game_Actor.prototype.personalizedIntParam=0; //Pre-initialized just in case
Game_Enemy.prototype.personalizedIntParam=0;
[...]
for (var i = 0; i < $gameActors.length; i++) //Crash
{
if ($gameActors.actor.meta.personalizedIntParam)
$gameActors.actor.personalizedIntParam=parseInt($gameActors.actor.meta.personalizedIntParam)
}
[...]
})();
[...]
Game_Actor.prototype.personalizedIntParam=0; //Pre-initialized just in case
Game_Enemy.prototype.personalizedIntParam=0;
[...]
for (var i = 0; i < $gameActors.length; i++) //Crash
{
if ($gameActors.actor.meta.personalizedIntParam)
$gameActors.actor.personalizedIntParam=parseInt($gameActors.actor.meta.personalizedIntParam)
}
[...]
})();
As I said before, I tried every combination I could think of, using that online spreadsheet for reference, and devTools to have a guess on what's what.
I know that the parameter is applied perfectly fine on every character, as $gameActors.actor(2).personalizedIntParam returns 0, both in dev tools and in-game, instead undefined, even before "New Game".
So I want to know how to check the size/length of the database on running the game.