Currently I'm creating a game with frontal not side battles in MZ, where the main boss uses a lot of expressions and emotions (50+) and it really feels like a pain in the ass to create 50+ enemies and transform the boss between them when I only need to change the sprite. Can a really small plugin be created, which uses plugin command to change the enemy's sprite with ease?
MZ Changing enemy sprites mid-battle without transformation
JS Plugin RequestsYou can use a common event in the boss's skill.
For example:
Or you can use battle event and use $gameTroop.members()[index] to get your boss character instead.
Though you have to code in the condition to actually make the change.
For example:
JavaScript:
var me = BattleManager._subject;
SceneManager._scene._spriteset._enemySprites.filter((s)=>{
return s._enemy==me;
})[0].loadBitmap('Demon',me.battlerHue())
Though you have to code in the condition to actually make the change.
Awh man, I just finished the plugin 😀
utunnels approach works fine, but if you don't want to script, I made a plugin.
Simply call the plugin command, set the ID and Image directory and it will update the sprite.
Edit : Removed the name change, since it's going to be the same I assume.
Only sprite will change
utunnels approach works fine, but if you don't want to script, I made a plugin.
Simply call the plugin command, set the ID and Image directory and it will update the sprite.
Edit : Removed the name change, since it's going to be the same I assume.
Only sprite will change
Hi! Thank you very much for making this plugin! Unfortunately, when I use plugin command and choose my new png sprite in the list and test, the main sprite remains the same 🙁 I don't know, what's the matter.
I'm quite new in RPG Maker so I'm not sure how exactly should I use this...
I tested it on my side and it works fine...
You need to call the plugin command "Change sprite" from "spriteEdit"
You also need to enable this plugin in pluginmanager
Can you show me your event (either common event if you are calling it via common event, or trooper event if you used it there)
I've enabled this plugin in plugin list and also used plugin command in trooper event here. Sorry for Russian Interface. After the first message there is a plugin command which uses prepared png picture in the same folder and the same format as the original sprite. And I've even opened console and your "running" log message is there, denoting that the plugin started. However, no sprite change.
You set your character ID2, but call for ID1
Try calling ID2? 😀
Try calling ID2? 😀
No.. it still didn't work..
I've noticed that the sprite changed during the short animation of enemy's death... but before that it stays the same
And now this... I just don't understand, what's going on.. Two sprites instead of one
It seems like in our previous attempts everything worked, sprite appeared. However, the current sprite remains and just blocks the new sprite.
I think you might have "added" multiple sprites/ennemies in your troops.
The plugin will only work on the ennemy ID, meaning if you add 2 ennemies in your troops, and try to affect ID 1, it will be hidden behind ennemy 2.
Try to remove all ennemies from your troops, and add just 1 of your boss.
Try dragging it around to be sure there is only 1.
Then, try again using ID 1.
The plugin will only work on the ennemy ID, meaning if you add 2 ennemies in your troops, and try to affect ID 1, it will be hidden behind ennemy 2.
Try to remove all ennemies from your troops, and add just 1 of your boss.
Try dragging it around to be sure there is only 1.
Then, try again using ID 1.
i've finally found the culprit. It's the other plugin called "VisuMZ_1_BattleCore". When I turn it off, everything works perfect. Seems like one of the options there gets in the way of your script.
Did you place this plugin below or above VisuMZ_1_BattleCore ?
Below. Even when I place it higher, the same problem appears.
In the plugin description it says "
Battle Sprite Updates
A lot of functions in Sprite_Battler, Sprite_Actor, and Sprite_Enemy have been overwritten to make the new Action Sequence system added by this plugin possible. These changes make it possible for the sprites to move anywhere on the screen, jump, float, change visibility, and more."
So it seems like this is what causes issues. These changes in functions regarding sprites.
Here is the new version, compatible with VisuMZ_1_BattleCore
WOW! IT REALLY WORKS NOW! Thank you! Thank you very much! You are just my hero! I've searched the whole Web for it and finally found the best solution! Thank you again! You are awesome, bro!
Umm, I thought it is MV.
Now I'm so embarrassed.
Now I'm so embarrassed.
Original thread: https://forums.rpgmakerweb.com/threads/changing-enemy-sprites-mid-battle-without-transformation.170898/