MV Help editing AltMenuScreen to work on Classes rather then Actors

I'm looking for some help editing the code for AltMenuScreen3 so that the notetag:

<stand_picture:img>

will work in Classes rather then Actors. Main reason for doing so is because the project I'm working on will have an Ascension Mechanic to it, with the Actors Menu Portrait changing after they ascend. Unfortunately, with six ranks of ascension (Rank 0 - 5), that means I have six of the same Actors in my system, and I worry that could be a massive amount of data bloating up the file size.

I tried to alter the code myself, but my knowledge of coding is limited to very basic Python statements. And even then, I haven't worked with the language in quiet sometime so I'm rusty to say the least.

AltMenuScreen3 is shipped with RMMV from the start, but I'll include the js file here to save someone the trouble of having to look it up.

Wasn't sure if a thread was necessary for this problem so I apologize in advance if that's the case, but if anyone could help me out, I'd really appreciate it.
Main reason for doing so is because the project I'm working on will have an Ascension Mechanic to it, with the Actors Menu Portrait changing after they ascend. Unfortunately, with six ranks of ascension (Rank 0 - 5), that means I have six of the same Actors in my system, and I worry that could be a massive amount of data bloating up the file size.
I think you're grossly overestimating how much space an entry in a database table takes.
I mean, I guess if you really wanted to, it's a one-line edit. You just need to make the script look for a <stand_picture:x> notetag in the notebox of the actor's current class, rather than the actor itself.

There is only one line in the script where it looks for such a notetag, if you Ctrl-F, you will find this line:
Code:
       // load stand_picture
        var bitmapName = $dataActors[actor.actorId()].meta.stand_picture;
Which has helpfully been commented with "load stand picture" just above that.

The engine automatically loads notetags inside <> brackets in the database noteboxes into that object's "meta" property when it starts the game. So this line is telling it to retrieve the value of the "<stand_picture: xxx>" notetag from the notebox of the actor whose id is the one being processed.

You just need to make it look at the "meta" property (the notetags) of the actor's class instead.

Character classes and all associated data including meta/notetags are loaded into the $dataClasses variable by the engine.

The current class ids of party members is stored in $gameParty.members()[x]._classId, but the plugin already loads the currently processed actor into a local variable "actor" at the very start of the function. So you can just use "actor._classId" to get the class ID of the actor being processed.
I mean, I guess if you really wanted to, it's a one-line edit. You just need to make the script look for a <stand_picture:x> notetag in the notebox of the actor's current class, rather than the actor itself.

There is only one line in the script where it looks for such a notetag, if you Ctrl-F, you will find this line:
Code:
       // load stand_picture
        var bitmapName = $dataActors[actor.actorId()].meta.stand_picture;
Which has helpfully been commented with "load stand picture" just above that.

The engine automatically loads notetags inside <> brackets in the database noteboxes into that object's "meta" property when it starts the game. So this line is telling it to retrieve the value of the "<stand_picture: xxx>" notetag from the notebox of the actor whose id is the one being processed.

You just need to make it look at the "meta" property (the notetags) of the actor's class instead.

Character classes and all associated data including meta/notetags are loaded into the $dataClasses variable by the engine.

The current class ids of party members is stored in $gameParty.members()[x]._classId, but the plugin already loads the currently processed actor into a local variable "actor" at the very start of the function. So you can just use "actor._classId" to get the class ID of the actor being processed.
so I tried doing what you suggested and I ran into some issues.

First off, I changed that line of code you mentioned to:

Code:
 // load stand_picture
        var bitmapName = $dataClasses[actor._classId()].meta.stand_picture;

I saved the js file and then ran the game, but when I tried opening the menu, I got this error message.

actor._classID is not a funtion.png
You didn't correctly copy the code that Traverse gave you. There's no underscore in front of classId()
You didn't correctly copy the code that Traverse gave you. There's no underscore in front of classId()

In his post he did put an underscore in front of it though. Even so, when I took it away, it still gives me the same error message as in the image provided.
In his post he did put an underscore in front of it though.
No, he put an underscore in front of _classId 😉

JavaScript (and all coding languages) are syntax-specific - _classId is an entirely different thing from classId(), with parentheses like you have it in your post.

It should work correctly if you have the underscore and no parentheses.
No, he put an underscore in front of _classId 😉

JavaScript (and all coding languages) are syntax-specific - _classId is an entirely different thing from classId(), with parentheses like you have it in your post.

It should work correctly if you have the underscore and no parentheses.
Okay, I think I got it to work. Still need to do some testing, but so far it looks like the altered code works fine.

Original thread: https://forums.rpgmakerweb.com/threads/help-editing-altmenuscreen-to-work-on-classes-rather-then-actors.157613/