Preemptive-Surprise Event Battle

Preemptive-Surprise Event Battle​
Version 1.1.1​
By Jeneeus Guruman​
 ​
Introduction
 
     This plugin allows to make evented encounters have preemptive and surprise encounters.
 
Features

  • Having the evented encounters to have preemptive and surprise attacks.
  • Triggering the event enemy at his back will have a guaranteed preemptive attack.
  • Triggering the event enemy by having it in the character's back will have a guaranteed surprise attack.
  • Triggering the event through sides will have a chance to have preemptive or surprise attack depending on the facing and position of both the enemy and character.
  • Can be disabled them completely, exempt some enemies from this function, and set the chance on triggering the event sideways all at your own settings.
  • All events around are automatically stopped if the events are tagged to have a preemptive and surprise battles while the event is running, unless its settings is disabled.
Screenshots
 
     Soon... When my internet connection and my energy will both be perfectly fine.
 
How to Use

  • Just insert it below movement-related plugins.
  • Not recommended if followers are shown, unless there are any follower-through plugins (plugins that make events pass though followers).
  • "Encounter Half" and "Encounter None" party abilities do not work for evented encounters but "Raise Preemptive" and "Cancel Surprise" does work.
Demo
 
Not needed.
 
Script
 
Pastebin

GitHub
 
Known Bugs

  • Tested with some pixel/8D movement plugin (Orange Movement) and it's somehow works.
Update

  • v1.1.1: Renamed parameters to be readable easily.
  • v1.1.0: Added "stopEvent" parameter to help stop events from moving while the current event is running. No more moving enemies while encountering enemies unless disabled. 🙂
Author's Notes

  • This script is free to use commercially or not. If commercially, you must credit me. If not, just don't claim this as your own but not crediting me is okay if you don't want to.
  • This is my first MV plugin made. You are very welcome to report any bugs or typos found, specially in relation with pixel and 8D movement plugins.
Aww. I'm using a pixel movement and 8-D scripts.
Hoping the pixel and 8D issues can be resolved in the future but it's good to have, so thanks.
Update

  • v1.1.0: Added "stopEvent" parameter to help stop events from moving while the current event is running. No more moving enemies while encountering enemies unless disabled. 🙂

Aww. I'm using a pixel movement and 8-D scripts.
Hoping the pixel and 8D issues can be resolved in the future but it's good to have, so thanks.
You may try to test the plugin if it works or not since I myself haven't tested it yet. What pixel and/or 8D plugin/s you guys used by the way? Maybe I can work this out if I can.

EDIT: I just tested as of now that it's somehow works with one of the pixel and 8D movement plugin. Please let me know if there are still any problems and what kind of this specific plugin did you use. Thanks again. 😀
You may try to test the plugin if it works or not since I myself haven't tested it yet. What pixel and/or 8D plugin/s you guys used by the way? Maybe I can work this out if I can.

EDIT: I just tested as of now that it's somehow works with one of the pixel and 8D movement plugin. Please let me know if there are still any problems and what kind of this specific plugin did you use. Thanks again. 😀
I'm using Yami's, and thanks!
I'm using Yami's, and thanks!
You're welcome. If some problems occurs using with her plugin, please let me know. So far I only found, saw, and tested Hudell's (as of yesterday) and somehow works but I'm not sure about Yami's.
Update

  • v1.1.1: Renamed parameters to be readable easily.
  • Added GitHub link.
Hi,

Can you put some more info how to setup it so we can try it? Because right now I copy/paste this pluging under Yami_8DIR plugin and try it ON/OFF and nothing seem to work 🙁

Because yes I would really like!! to have the chance to do a pre emptive strike on enemy or them a surprise attack on my team! 

I hope your plugin will continue to evole to something well customizable 🙂

Question: Someone was able to do an event with a Monster who touch your back start a combat with surprise on your team?

Battle won't start on my side even if I put the trigger on touch. Can someone help me please?
Bump! 😉  Ohh I'm stupid... I find and corrected my error... sorry! Great Plugins I hope you will improve and upgrade it someday 😀
I found a bug in this plugin

If you set an event <enemy> trigger from the back (you will get the surprise attack)

but if you trigger another monster with the same event (but this time in front of him)

You will still get a surprise attack. It get stock on the event in the surprise attack,

And I want to know if there is a command or something to use to stop the event to be able to check if it's a surprise attack or not.

thank you 😀
I found a bug in this plugin


If you set an event <enemy> trigger from the back (you will get the surprise attack)


but if you trigger another monster with the same event (but this time in front of him)


You will still get a surprise attack. It get stock on the event in the surprise attack,



Yes, this happens to me as well! It's a really great plugin on paper, though, but how could it be fixed?


I have another, more-or-less related, question too, I don't know if anyone knows this... Is it possible to make the "Escape" option available in a scripted battle? Like, if there are wandering enemies on a map, via pre-programmed events and battles, and by mistake, I touch someone and trigger an encounter; sometimes I'd like to be able to escape from it, maybe freezing the event 1 second (to prevent it from creating another encounter super fast) after succesfully fleeing (of course, there would be a defined % chance of escaping, just like in regular random encounters). Is there any plugin out there that does this? Enormous thanks in advance! Ok, never mind, I'm stupid. I didn't realize you could set a "can escape" option in those events  🙂
It's working great however whenever I get a preemptive strike, my first actor's ATB bar displays half full, but then empties out. This also happens even when I switch his place in the party. The rest of the party however is fine. I'm using Yanfly's ATB.


Edit:


Huh weird, the moment I leave the 1st spot empty in the Actors database and move him down to the 2nd spot, it worked. Anyways thanks for such a great plugin!
It works if the enemy approaches player's behind, will fall into surprise attack. But if I approach the enemy at the back, gets first strike. But facing both player and enemy front to front, I still get first strike and should not get first strike nor surprise attack. Any how to make front to front not getting preemptive strike?
Does anyone know if it's possible to edit this to get it to work with followers on?

Original thread: https://forums.rpgmakerweb.com/threads/preemptive-surprise-event-battle.46769/