MZ Enemy Battler Sprites spawn on top of Actor Battler Sprites

Hi, so I'm using TAA_EnemyReinforcements in RMMZ and it's working perfectly except that when the enemies are spawned their sprites appear on top of the Actor sprites.

Is there any way I can force Actor Sprites to always be top of all other sprites in battle or change the priority of the sprites? I've looked everywhere I know where to look, but I haven't been able to find an answer!
Hi, so I'm using TAA_EnemyReinforcements in RMMZ and it's working perfectly except that when the enemies are spawned their sprites appear on top of the Actor sprites.

Is there any way I can force Actor Sprites to always be top of all other sprites in battle or change the priority of the sprites? I've looked everywhere I know where to look, but I haven't been able to find an answer!
Open the game folder of your RPG Maker MZ project.

Open up "index.html " file in a text editor.

Find the line that looks like this:
Code:
<div id="gameCanvas"></div>
Add a new line right before the line "GameCanvas":
Code:
<div id="canvasArea"></div>

Save "index.html "file and close it.

Open the "css" folder and open the "rpg_ * .css" file, which corresponds to the type of game you are creating. For example, if you are creating a side-scrolling game, open "rpg_sc.css".

Add the following CSS rule to the end of the file:
Code:
#canvasArea canvas {
  z-index: 1;
}
This will set the z-index of all canvases in the "canvasArea" div to 1. You can adjust the z-index value to make it higher or lower depending on your needs.

Save the CSS file and close it.

By setting the z-index of the actor's sprites higher than that of the opponent's sprites, the actor's sprites should now always appear on top of the opponent's sprites in battle.
Open the game folder of your RPG Maker MZ project.

Open up "index.html " file in a text editor.

Find the line that looks like this:
Code:
<div id="gameCanvas"></div>
Add a new line right before the line "GameCanvas":
Code:
<div id="canvasArea"></div>

Save "index.html "file and close it.

Open the "css" folder and open the "rpg_ * .css" file, which corresponds to the type of game you are creating. For example, if you are creating a side-scrolling game, open "rpg_sc.css".

Add the following CSS rule to the end of the file:
Code:
#canvasArea canvas {
  z-index: 1;
}
This will set the z-index of all canvases in the "canvasArea" div to 1. You can adjust the z-index value to make it higher or lower depending on your needs.

Save the CSS file and close it.

By setting the z-index of the actor's sprites higher than that of the opponent's sprites, the actor's sprites should now always appear on top of the opponent's sprites in battle.
Thank you so much! I'll give it a try!
Open the game folder of your RPG Maker MZ project.

Open up "index.html " file in a text editor.

Find the line that looks like this:
Code:
<div id="gameCanvas"></div>
Add a new line right before the line "GameCanvas":
Code:
<div id="canvasArea"></div>

Save "index.html "file and close it.

Open the "css" folder and open the "rpg_ * .css" file, which corresponds to the type of game you are creating. For example, if you are creating a side-scrolling game, open "rpg_sc.css".

Add the following CSS rule to the end of the file:
Code:
#canvasArea canvas {
  z-index: 1;
}
This will set the z-index of all canvases in the "canvasArea" div to 1. You can adjust the z-index value to make it higher or lower depending on your needs.

Save the CSS file and close it.

By setting the z-index of the actor's sprites higher than that of the opponent's sprites, the actor's sprites should now always appear on top of the opponent's sprites in battle.
Index.PNG

I can't seem to find <div id="gameCanvas"></div> in the index.html file.
Is there any reason why <div id="gameCanvas"></div> wouldn't show up in the index.html? I've also taken a look at other RMMZ game index.html files, but I can't find any mention of <div id="gameCanvas"></div> am I looking in the wrong place?
Is there any reason why <div id="gameCanvas"></div> wouldn't show up in the index.html? I've also taken a look at other RMMZ game index.html files, but I can't find any mention of <div id="gameCanvas"></div> am I looking in the wrong place?
Sorry. The computer failed yesterday.
Try copying it and replacing it Index.html.
Replace the "Name Game" field with the name of your game

HTML:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Name Game</title>
    <link rel="stylesheet" type="text/css" href="css/game.css">
    <script type="text/javascript" src="js/libs/pixi.js"></script>
    <script type="text/javascript" src="js/libs/pixi-picture.js"></script>
    <script type="text/javascript" src="js/rpg_core.js"></script>
    <script type="text/javascript" src="js/rpg_managers.js"></script>
    <script type="text/javascript" src="js/rpg_objects.js"></script>
    <script type="text/javascript" src="js/rpg_scenes.js"></script>
    <script type="text/javascript" src="js/rpg_sprites.js"></script>
    <script type="text/javascript" src="js/rpg_windows.js"></script>
    <script type="text/javascript" src="js/plugins.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
  </head>
  <body>
  <canvas id="GameCanvas"></canvas>
  <div id="loadingSpinner">
    <div class="loadingSpinnerAnimation"></div>
  </div>
</body>
</html>

Original thread: https://forums.rpgmakerweb.com/threads/enemy-battler-sprites-spawn-on-top-of-actor-battler-sprites.154995/