- Joined
- May 29, 2017
- Messages
- 155
- Reaction score
- 32
- First Language
- English
- Primarily Uses
- RMMZ
I was searching around trying to figure out how to get this exact feature to work when I came across this post. I tried it, but I couldn't get it to work. However, a breakthrough in another area of my game gave me an inspiration and I figured out an easy way to do this as well. I figured I'd share it here in case it could help anybody else.Create a new skill called "Paralyzed" with the following notetag:
Code:<Cast animation: 64> <JS Post-Apply> const text = user.name() + " is paralyzed and can't attack!"; const window = SceneManager._scene._logWindow; if (text) { window._lines.push(text + '<CENTER>'); window.refresh(); } </JS Post-Apply>
Then instead of user.clearActions(), do user.currentAction().setSkill(id of your paralyzed skill);
This will replace the action with the paralyzed one, which will use 64 as its cast animation and output a message to the log similar to the one you get in Pokémon.
To do this you'll need VisuStella's Battle Core plugin, duh, and I highly recommend, but it's not "necessary", their Visual States & Effects plugin as well. The process is simple, you only need 2 things:
State A, the "dot", which I called Paralysis, but you can call it whatever you want.
State B, the 'proc" which I called Paralyzed, but again, you can call it whatever you want.
In State A, give it no restrictions, normal motions, and no overlay. Leave the removal conditions unchecked and set the auto-removal timing to "Turn End". Set the duration to whatever you want, personally, I set mines 1~5. In the notes section, paste (I just modified Yanfly's original code):
Code:
<JS Pre-Start Turn>
var paralyzeRate = 0.25;
if (Math.random() < paralyzeRate) {
$gameMessage.add(user.name() + " is paralyzed and cannot move!");
user.addState(16); }
</JS Pre-Start Turn>
In State B, set the restriction to "Cannot move" and motion/overlay on normal/no. Leave the removal conditions unchecked and set the auto-removal timing to Turn End. Set the duration to 1~1 and in the notes, if you have the Visual States & Effects plugin, add <Add Animation: 122>. 122 being whatever animation you want to play when the actual paralysis procs. If you don't have that plugin, you can set the overlay to paralysis but no sound effect will play.
So as you can see, State A causes the paralysis, but State B is what stops the actor from attacking. Takes a bit to explain, but it's stupid simple to setup. If this helps anybody out, enjoy!