MV Add Actor Face Graphic in Message Display

I'm using this plugin FELevelUpMV I'm having a hard time figuring out how to place the actor face graphic... I'm looking at this part of the code

JavaScript:
var _Game_Actor_ChangeExp = Game_Actor.prototype.changeExp;
    Game_Actor.prototype.changeExp = function(exp, show) {
        if (pluginParams.DisplayLevelUp < 0) {
            var display = false;
        } else if (pluginParams.DisplayLevelUp === 0) {
            var display = true;
        } else {
            var display = $gameSwitches.value(pluginParams.DisplayLevelUp);
        }
        if (display && this._feParams != undefined) {
            var prevFeParams = this._feParams.clone();
            _Game_Actor_ChangeExp.apply(this, arguments);
            var nextFeParams = this._feParams.clone();
            if (show) {
                this.displayFeParamsUp(prevFeParams, nextFeParams);
                // <--- insert command to show actor face graphics here
            }
        }
        else {
            _Game_Actor_ChangeExp.apply(this, arguments);
        }
    };

then I want to show all 8 parameters at once and not if there was a change in the stat.
Try replacing this line (339)
JavaScript:
this.displayFeParamsUp(prevFeParams, nextFeParams);
...with these two lines:
JavaScript:
$gameMessage.setFaceImage(this.faceName(), this.faceIndex());
this.displayFeParamsUp(prevFeParams, nextFeParams);
It worked! Thank you very much! where can i insert the Actor Class?
1636909665854.png


So it will be like "Harold (Hero) is now Level 2!
1636909343454.png
(srpg core related solutions)
About the first request

JavaScript:
Window_Base.prototype.drawActorFace = function(actor, x, y, width, height) {
    this.drawFace(actor.faceName(), actor.faceIndex(), x, y, width, height);
};
//this is from "rpg_windows"
// but using "call.(this)" on that function, makes a bit complicated array
//easier is the next solution below

this.drawActorFace(this._battler, 4, lineHeight * 1);
// this is used in the srpg core, it needs to be in a "window.prototype" function

Window_SrpgTest.prototype.addBattlerFace = function() {
      var lineHeight = this.lineHeight();
      this.drawActorFace(this._battler, 4, lineHeight * 1);
};
// this is a selfmade test function,put that into the plugin,
// and make sure the plugin is somewhere under the srpgCore,just incase..
// => this should work on enemys and actors if needed..

Window_SrpgTest.prototype.addBattlerFace.call(this);
// this code should be used to trigger the function above


Edit:
Actor class is the following script in the srpg core:
JavaScript:
this.drawActorClass(this._battler, 12, lineHeight * 5);
// same as the other solution this needs a "window.prototype"

Window_SrpgTest.prototype.addActorClass = function() {
      var lineHeight = this.lineHeight();
      this.drawActorClass(this._battler, 12, lineHeight * 5);
};
// thats the function to store it,..similar to the example above

Window_SrpgTest.prototype.addActorClass.call(this);
// this is the trigger code for the storage function above

if you search in the srpg core for those 2 codes:
JavaScript:
this.drawActorFace
//&
this.drawActorClass
you should find most other related codes aswell..
example: search for
Window_SrpgStatus.prototype.drawContentsActor = function() {
and finds these
Screenshot_3.png

(thats the code stuff on which i am working currently on the other topic)
-> Mapbattle Status window,thats where most part of the status window can be changed/rearanged ect
It worked! Thank you very much! where can i insert the Actor Class...like "Harold (Hero) is now Level 2!
You could import this as a plugin (untested):
JavaScript:
// Override! Add %4 = class in level-up message.
Game_Actor.prototype.displayLevelUp = function(newSkills) {
    var text = TextManager.levelUp.format(
        this.name(), TextManager.level, this.level, this.currentClass().name
    );
    $gameMessage.newPage();
    $gameMessage.add(text);
    newSkills.forEach(function(skill) {
        $gameMessage.add(TextManager.obtainSkill.format(skill.name));
    });
};
Then use something like %1 (%4) is now %2 %3! for the Level Up message. 👋
You could import this as a plugin (untested):
JavaScript:
// Override! Add %4 = class in level-up message.
Game_Actor.prototype.displayLevelUp = function(newSkills) {
    var text = TextManager.levelUp.format(
        this.name(), TextManager.level, this.level, this.currentClass().name
    );
    $gameMessage.newPage();
    $gameMessage.add(text);
    newSkills.forEach(function(skill) {
        $gameMessage.add(TextManager.obtainSkill.format(skill.name));
    });
};
Then use something like %1 (%4) is now %2 %3! for the Level Up message. 👋

it doesn't work. and it removes the previous display.
1636932460783.png
it doesn't work. and it removes the previous display.
I just tested in a project with no other plugins active and it works OK for me. Try loading it before your other plugins, i.e. put it near the top of the load order, then save your project to apply Plugin Manager changes and test again.

If that doesn't help, then one or more of your other plugins are overriding (rather than extending) that method. You'll need to identify which one(s) are responsible and probably edit the change in manually. As seen in my example, the only difference is that you need to pass a fourth argument, this.currentClass().name, in to that TextManager.levelUp.format function.
I just tested in a project with no other plugins active and it works OK for me. Try loading it before your other plugins, i.e. put it near the top of the load order, then save your project to apply Plugin Manager changes and test again.

If that doesn't help, then one or more of your other plugins are overriding (rather than extending) that method. You'll need to identify which one(s) are responsible and probably edit the change in manually. As seen in my example, the only difference is that you need to pass a fourth argument, this.currentClass().name, in to that TextManager.levelUp.format function.
1636938574848.png

thanks it now works! i placed it on top most.
Nice! Happy RPG Making~ 😂

(If you'd like the thread closed, you can report your post with a reason like "Solved".)

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/add-actor-face-graphic-in-message-display.142121/