Incorrect battler sprite showing

I've reached the stage of development where actor 5 has joined the party. I put him in the active party, replacing actor 3.

When it comes to battle, his face shows up in the CTB turn order display at the top of the screen. I'm using the side view UI which does not show the actor faces. When it's his turn, his skills show up correctly. But the battler sprite is still that of actor 3.

I have not given the wrong battler in the database. Here is what I have, first for actor 3 and then for actor 5.

1691421091473.png
1691421134111.png


These battlers have been in the database since before I began the current playthrough. If I start a new game with him already in the party, the correct sprite is displayed. However, that doesn't help me as he joins the party a couple of hours in.

Can anyone suggest what might be happening? I'm using the VS core plugins and the CTB plugin, but I can see nothing which alters what should be the default mechanism for showing the battle sprite of the active party members.

Thanks.
I think you need to show how you're making this actor "replace" actor 3. Clearly something either isn't done correctly or isn't refreshing the display.
@ATT_Turan I'm doing it using the 'formation' option arising from the VS party system plugin. It's just the usual way of doing Yanfly/VS formation swaps using this screen where I have swapped them:

1691422428002.png
There are only three ways I can think of how this might be caused:
1) the switch happens during a battle and the plugins you use keep the picture from battlesetup
2) the filepath to the picture is constructed from variable parts (not neccessarily game variables) inside whatever plugin you're using, and one of those values is not updated correctly
3) something prevents your savefile from using the new data

Please make the following test:
- create a new test map inside your game
- redirect the player starting point to that test map (remember to put it back where it belongs after the tests)
- in the test map, only have a few events for adding or removing actors and for test battles, nothing fancy.

then go and add all the actors there in a new game, and test if formation and battles and pictures work that way or not.
@Andar I have already done this as part of my bug hunting before posting. As I said above, everything works as it should.

I use an event to add actors to the party, and then the formation screen to change who is in the first 4.
And to be clear, is this swap happening during or outside of battle?
@ATT_Turan Outside of battle.
Then you'll have no choice but to start a new game.
Your old savefile contains old data and that isn't updated correctly from the new database.

You can try to "fix" the savefile by creating a temporary event on your next map that forces reinitialization of the actor by removing and re-adding it, but that is NOT a good idea in the long term.

Yes, I know that playing hours again is boring - that is why many developers include cheats in their games.
My suggestion would be to turn the test map into a cheat map, adding EXP+ events, gold+ events, shops and teleports to other maps there. Then on your starting map place a cheat portal that brings you to that map (or gives a cheat scroll that teleports by common event, that way you can always return to the cheat map.

you might also want to include story-speedup-events on that map that set the switches and variables for the story to work correctly there.
@Andar was afraid that would be the only answer.

Oh well, time to bite the bullet and get stuck in.

Thanks.
These battlers have been in the database since before I began the current playthrough.
I guess I misunderstood this. I thought this meant you had not changed the database during the current playthrough.

I just took it as kind of common knowledge that, while some things will reload, when you make changes to the database you need to expect that you'll have to start a new game to see everything reflected correctly.

Good luck!
Then you'll have no choice but to start a new game.
I have done that, and the problem is still there. Actor face and skills are correct, but not the battler.

is this swap happening during or outside of battle?
As a test I tried swapping actor 5 in during the battle. Once more the face and skills are correct, but I now had 2 copies of actor 3 battler.

I have turned off every single plugin I have (even including Fossil) and it makes no difference.

I am at a loss as to what I could do now.
Have you considered the possibility that you have a 'Change Actor Images' event command (or script) somewhere in your game? 😀
and that happens even with a new game?

then we have to look for the less likely causes that are possible.

1) please check the actor list for double entries with the same name etc.
I don't kn ow how many actors you have but if the list is longer or if you have multiple actors without names (not even placeholder names) then it is possible to click the wrong one in the drop-down lists of the editor.

2) in the editor, click on the menu game - open folder. Is there a www folder in the new window?
it should not be especially as you're using MZ, but it was one of the more hidden problems with MV, and there should never be one such folder in the project.
Have you considered the possibility that you have a 'Change Actor Images' event command
I haven't actually used that command, either from the event command menu or as a script call.

please check the actor list for double entries with the same name etc.
I have 6 actors, and they have been in the list since early in development. The list maximum is 6, so there can't be any hidden actors in it.

1691511581917.png


There is no www folder - I haven't deployed the game yet.

I have tried inserting him into the party at 3 much earlier stages, and the same problem occurs, so it is not the event where he joins.
Ok, but does it work as a fix? If you use the 'Change Actor Images' (battler sprite) before the first fight he's in?
If you use the 'Change Actor Images' (battler sprite) before the first fight he's in?
I've just tried it, and it makes no difference.
I have turned off every single plugin I have (even including Fossil) and it makes no difference.
You were originally doing this change with the VisuStella Party Manager or whatever, right? You're saying with everything turned off and using the normal event commands to change party members, one is displaying the wrong images?

I'd suggest checking it out in your database - you don't have any duplicate entries or anything, right? If you look up the JSON entry for the actor in question, does it have the correct filenames associated with it?

Can you duplicate any of this in a new project?
If you look up the JSON entry for the actor in question, does it have the correct filenames associated with it?
Where would I find this?

I'm trying a different way of playing through. I deleted the existing config.rmmzsave and the global.rmmzsave files in case there was something being saved in them, especially the config one.
The files in your data folder. There's one for each database tab.

They're pretty readable if you open them in a text editor - do the entries for actor 5 or whatever look correct?

You checked what Andar suggested - that there's no www folder in your project from accidentally deploying there?
@ATT_Turan Everything in the JSON file looks correct.

{"id":5,"battlerName":"Garen_normal","characterIndex":4,"characterName":"Actor1_x100","classId":5,"equips":[50,58,43,13,75,126],"faceIndex":4,"faceName":"Actor1","traits":[{"code":14,"dataId":18,"value":1},{"code":22,"dataId":8,"value":0.02},{"code":35,"dataId":83,"value":1}],"initialLevel":1,"maxLevel":99,"name":"Garen","nickname":"","note":"<Battle Portrait: Actor1_5_Battle>\n<Menu Portrait: Actor1_5_Battle>\n<Passive State: 112>\n<Element: Eldrich>\n<Dealt Element 10 Plus: +10%>\n<Biography>\n<Wordwrap><center>\nPersonal victories: \\v[605] Defeats: \\v[615]\n</Biography>","profile":""},

As for the www folder, as I said, I have never deployed to generate one. However, here is a screenie of my folders:

1691520311006.png

Original thread: https://forums.rpgmakerweb.com/threads/incorrect-battler-sprite-showing.160108/