- Joined
- Aug 22, 2021
- Messages
- 14
- Reaction score
- 6
- First Language
- English
- Primarily Uses
- RMMV
So, I'm ALMOST there with this, but figured I needed help with polish.
I've successfully implemented a Stealth mechanic in battle. The Actor becomes translucent (thanks to Mokusei Penguin), and gains a passive buff to Evasion, Critical Hit %, Attack, and a significantly lowered target rate. I set it to last for 2 turns, with the idea that it will cancel early if the actor attacks or is hit (50% chance), but more on that in a bit.
I've also made a Sneak Attack Skill that, if the Actor is not hidden, deals 50 damage; if he IS hidden, it deals 500. (I'll balance these numbers later, right now it's just proof of concept and debugging).
What I CAN'T seem to get done is to have the Sneak Attack (or any OTHER attack) cancel the Stealth after use. Either the stealth cancels before the attack hits (negating the buffs), OR, the damage ends up becoming 0 for some silly reason (probably because of where I'm putting a.removestate(11) in the damage formula).
So, how do I remove the Stealth state from the actor just after they attack (Sneak attack or any other attack)? I could just make Stealth last 1 turn, but it's conceivable that a player might want to stay stealthed for more than 1 turn without Sneak Attacking right away (say, to heal or because they don't have enough TP for SA), so I don't wanna do that unless absolutely necessary.
I'm also avoiding plugins until I'm more comfortable with what the program can do without them (it was hell in a handbasket getting the translucency plugin to work, because the author never mentioned you needed to make it a common event to work; either that, or they were unknowingly relying on other plugins to make it plug-and-play).
I tried this video: ,
but that relies on putting a state on a single enemy instead of the player, and he's using the yanfly plugin package, which, again, I'm trying to avoid for the moment.
Thanks in advance for any tips =)
EDIT: Finally got it sorted; here's the attack formula if anyone needs a tip in the future:
a.isStateAffected(11) ? (a.removeState(11), 500): 50;
I've successfully implemented a Stealth mechanic in battle. The Actor becomes translucent (thanks to Mokusei Penguin), and gains a passive buff to Evasion, Critical Hit %, Attack, and a significantly lowered target rate. I set it to last for 2 turns, with the idea that it will cancel early if the actor attacks or is hit (50% chance), but more on that in a bit.
I've also made a Sneak Attack Skill that, if the Actor is not hidden, deals 50 damage; if he IS hidden, it deals 500. (I'll balance these numbers later, right now it's just proof of concept and debugging).
What I CAN'T seem to get done is to have the Sneak Attack (or any OTHER attack) cancel the Stealth after use. Either the stealth cancels before the attack hits (negating the buffs), OR, the damage ends up becoming 0 for some silly reason (probably because of where I'm putting a.removestate(11) in the damage formula).
So, how do I remove the Stealth state from the actor just after they attack (Sneak attack or any other attack)? I could just make Stealth last 1 turn, but it's conceivable that a player might want to stay stealthed for more than 1 turn without Sneak Attacking right away (say, to heal or because they don't have enough TP for SA), so I don't wanna do that unless absolutely necessary.
I'm also avoiding plugins until I'm more comfortable with what the program can do without them (it was hell in a handbasket getting the translucency plugin to work, because the author never mentioned you needed to make it a common event to work; either that, or they were unknowingly relying on other plugins to make it plug-and-play).
I tried this video: ,
but that relies on putting a state on a single enemy instead of the player, and he's using the yanfly plugin package, which, again, I'm trying to avoid for the moment.
Thanks in advance for any tips =)
EDIT: Finally got it sorted; here's the attack formula if anyone needs a tip in the future:
a.isStateAffected(11) ? (a.removeState(11), 500): 50;
Last edited: