MV Character Layer + Animations

I recently added MBS - Visual Equipment to my game so I can do character customization. I also have Galv's Character Animations for idle, walk, run and jump. I've seen a lot of threads asking for a way to make them compatible, but they never got an awnser (will I have a awnser, who knows???)
I don't know if it is necessary to make them fully compatible or if this can be achieved by checking if the player is walking,etc and changing the rows accordily (wich I tried in many ways but without coding knowledge it never got nowhere) inside the Visual Equipment plugin.
could someone kindly give some light for me and the whole community?


The part of the code that I tried to edit was Sprite_Equipment.prototype.updateCharacterFrame = function (), btw, and the creator will not update this plugin anymore.
As someone who's actually done it with SRD Character Creator and MOG_CharPoses, there's a reason why you never see anyone have an answer to this: It's an order of magnitude more work than just having custom walking poses, and it's game-dependent based on what poses the game has. It took me two months to pull off and I actually know how to code.

The quick rundown is that every time I change the character's equipment/clothes/hair/whatever, I have to generate all those poses, then tell the game to save them all as .png files for the walking, jumping, attacking, dead etc poses (which requires node.js knowledge because now you're messing with the game's files, and it won't work on web deployment). I also have to actually have all those extra images for each pose for each paper doll part so there's a ton of extra work on the graphics side, not just coding. I believe Galv's Character Animations is getting the poses from an image files the same way MOG_CharPoses is.

The alternative is to edit Galv Character Animations to instead of calling the poses from a file, call them from the generated bitmap data in game memory, the implementation of which is going to be dependent on the character generator plugin you're using because they all have their own data structures. This might be a little less work, I don't know, it's not the path I took.
I think I've found a way! it's sloppy and Idk if will cause lag, but it works!
the plugin I use calls the sprite by equipment and row, the whole time I was trying to modify the plugin code to read rows, but instead I've made a common event to check player movement and changed the weapon used.
1736469107941.png

I also added a new plugin command that refresh the player sprite in the end of the plugin:
JavaScript:
//-----------------------------------------------------------------------------
// Plugin Command
//-----------------------------------------------------------------------------
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;


Game_Interpreter.prototype.pluginCommand = function(command, args) {
    _Game_Interpreter_pluginCommand.call(this, command, args);


    if (command === "RefreshActorSprite") {
        var actorId = Number(args[0]); // First argument is the actor ID
        var actor = $gameActors.actor(actorId);
        if (actor) {
            // Refresh all character sprites to reflect updated equipment
            var sceneSprites = SceneManager._scene._spriteset._characterSprites;
            sceneSprites.forEach(function(sprite) {
                if (sprite._character instanceof Game_Player && actorId === $gameParty.leader().actorId()) {
                    clearEquipmentSprites(sprite);
                    sprite.setCharacter($gamePlayer);
                } else if (sprite._character instanceof Game_Follower) {
                    if (sprite._character.actor() && sprite._character.actor().actorId() === actorId) {
                        clearEquipmentSprites(sprite);
                        sprite.setCharacter(sprite._character);
                    }
                }
            });
        }
    }
};


//-----------------------------------------------------------------------------
// Helper Function: Clear Equipment Sprites
//-----------------------------------------------------------------------------
function clearEquipmentSprites(sprite) {
    if (sprite._equipments) {
        sprite._equipments.forEach(function(equipSprite) {
            sprite.removeChild(equipSprite);
        });
        sprite._equipments = [];
    }
}
I don't know why you're changing the player's equipment based on what they're doing but you do you.
Bcz it's a visual equipment plugin? 😅
What I asked from the beginning was for the Visual Equipment plugin to read charsets th same way Galv's Animation does, so the two could be compatible. but since I couldn't find a way to do it automatically, at least I found a way to do it manually! (by changing equips)
I hope thins helps people with similar issues, although I noticed some other Visual Equipment plugins don't ask for rows, so Idk the "solution" for those.
What I did was creating four equal weapons, but with different row calls, so I checked what the player is doing and called the corresponding weapon, updating constantly so the plugin will do it's job.
for character customization (the whole reason I'm using this) you can check a variable like this:
1736506853297.png

so no need for a thousand if/elses or a thousand (8000 in my case...) image combinations, yay for layers!

Original thread: https://forums.rpgmakerweb.com/threads/character-layer-animations.174538/