Touch Surprise Battles

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
821
First Language
English
Primarily Uses
Touch Surprise Battles v1.4
By DreamX

 
Introduction/Features
Events labeled with <enemy:1> will use their direction and the player's direction to decide whether their battle processing command results in a preemptive, surprise, or normal battle. You can also force the next evented battle to be preemptive, surprise or normal.


Patch Notes


v1.4a (1/23/16): Fixed compatibility for Orange Custom Events.


v1.4 (1/23/16): Added compatibility for Orange Custom Events.


v1.3 (1/16/16): Added parameters for back preemptive/surprise battles chance.


v1.2 (1/14/16): Plugin commands now apply to touch <enemy:1> events.


v.1.1 1/12/16: Fixed bug with maps that don't have all events sequentially ordered (for example, if you delete an event) and added compatibility for Sanshiro's Map Generator.


How to Use
Right click the script link and select save link as.


Make sure to set the switches in the parameters or the script won't do anything.
Put <enemy:1> into an event so that when the player and it touches, it'll set the next battle type depending on how they touched (you touch their back = preemptive, they touch your back =  surprise, otherwise = normal). In addition, surprise battles may occur when the enemy touches the player from the side or preemptive battles if vice versa. Set the chance of this occuring in the parameters.

The following plugin commands do not apply to random battle encounters you get from walking around on the map (it does apply to battle processing event commands that are "same as random encounter," though).


Plugin Commands:
ForceSurpriseBattle - Forces the next battle to be surprise.
ForcePreemptiveBattle - Forces the next battle to be preemptive.
ForceNormalBattle - Forces the next battle to be normal.


ResetBattleType - Removes the forced state. If the event is labeled <enemy:1>, the battle type will be decided by direction again.


Script


Credit and Thanks
- DreamX


 Script portions used, modified or referenced in this plugin: Jeneeus Guruman - Preemptive-Surprise Event Battle:
        Jene.gameInterpreterCommand301
        Jene.gameCharacterBaseSetDirection
        Game_Interpreter.prototype.preemptiveOrSurprise


Author's Notes/Terms of Use
Free to use and modify for commercial and noncommercial games, with credit.


You should credit Jeneeus Guruman for the referenced script.
 
Last edited by a moderator:

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
82
Reaction score
31
First Language
English
Primarily Uses
Thank you for sharing, it works perfectly so far.
 

Val

Veteran
Veteran
Joined
Oct 12, 2015
Messages
281
Reaction score
168
First Language
Français
Primarily Uses
Sorry to ask but what need to be set in the plugin to make it work? 

I tried to add the number of switch to use but this seem not to work :(  

What I'm missing? thank you 
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
821
First Language
English
Primarily Uses
Sorry to ask but what need to be set in the plugin to make it work? 

I tried to add the number of switch to use but this seem not to work :(

What I'm missing? thank you 
Put in the switch numbers and make sure <enemy:1> is in the notetag of the event and that you have a Battle Processing in the event.
 
  • Like
Reactions: Val

Val

Veteran
Veteran
Joined
Oct 12, 2015
Messages
281
Reaction score
168
First Language
Français
Primarily Uses
It's working WONDERFUL!!! My game will be so much awesome now another great mechanic :D

Humm I think I have found a bug

I trying with the plugin command : ForceNormalBattle on a event who got the tag <enemy:1> but the fight never trigger normal if I touch the event in the back. Is it normal? 

thx!
 
Last edited by a moderator:

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
821
First Language
English
Primarily Uses
-outdated-
 
Last edited by a moderator:
  • Like
Reactions: Val

Val

Veteran
Veteran
Joined
Oct 12, 2015
Messages
281
Reaction score
168
First Language
Français
Primarily Uses
Hi

Its because im using the same event for more then one battle and sometime I Want to be sure the 2nd or 3rd battle is normal or other event if its labelled enemy:1.

Can you please update your script so the plugins command overwrite the system for the next battle event please? :)
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
821
First Language
English
Primarily Uses
Hi

Its because im using the same event for more then one battle and sometime I Want to be sure the 2nd or 3rd battle is normal or other event if its labelled enemy:1.

Can you please update your script so the plugins command overwrite the system for the next battle event please? :)
A new version has been uploaded. The plugin commands will apply to events labeled with <enemy:1> too now. Make sure to go into the parameters and set the new parameter "Force Switch" to a switch id (that isn't being used for anything else).
 
  • Like
Reactions: Val

Val

Veteran
Veteran
Joined
Oct 12, 2015
Messages
281
Reaction score
168
First Language
Français
Primarily Uses
Awesome!! it's work perfectly :) thx again for you time and sharing skill coding ultimate helper :)  

It's really cool to have the good feeling now in my project, I will let you know when I will have updated everything ;)  

Good job!
 

Val

Veteran
Veteran
Joined
Oct 12, 2015
Messages
281
Reaction score
168
First Language
Français
Primarily Uses
A new version has been uploaded. The plugin commands will apply to events labeled with <enemy:1> too now. Make sure to go into the parameters and set the new parameter "Force Switch" to a switch id (that isn't being used for anything else).
Question DreamX ?

Is it possible for you to add a parameter where we can set a % to the battle to be ForceNormal even if the player have touched the Event on the Back?

Because I want to not Always give the player the big advantage of Surprise Attack on enemy if he touch them on the back. (More like 55%-75%)

thank you in advance :D  
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
821
First Language
English
Primarily Uses
Question DreamX ?

Is it possible for you to add a parameter where we can set a % to the battle to be ForceNormal even if the player have touched the Event on the Back?

Because I want to not Always give the player the big advantage of Surprise Attack on enemy if he touch them on the back. (More like 55%-75%)

thank you in advance :D
The plugin has been updated with parameters to set the % chance of causing a surprise or preemptive battle when touched from the back. You might need to delete the plugin from the plugin list and reenable it to get it to work.
 
  • Like
Reactions: Val

Val

Veteran
Veteran
Joined
Oct 12, 2015
Messages
281
Reaction score
168
First Language
Français
Primarily Uses
The plugin has been updated with parameters to set the % chance of causing a surprise or preemptive battle when touched from the back. You might need to delete the plugin from the plugin list and reenable it to get it to work.
Thank you that a really nice to have for your plugins! I hope you will continue develop great plugins for RPG Maker MV :)  
 

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
82
Reaction score
31
First Language
English
Primarily Uses
Thank you for the plugin.


I may have found an incompatibility or bug. I set up an event spanner using Orange Custom Events and it crashes. This error did was not occurring before. It seems to only happen with events spawned from other maps. This happens with all battle events spawned this way, not just ones with the "enemy:1" notetag.


View attachment Suprise Spawn Crash.PNG


If you have the time I uploaded an image of the crash and error. It would be greatly appreciated if you can fix this.
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
821
First Language
English
Primarily Uses
Thank you for the plugin.


I may have found an incompatibility or bug. I set up an event spanner using Orange Custom Events and it crashes. This error did was not occurring before. It seems to only happen with events spawned from other maps. This happens with all battle events spawned this way, not just ones with the "enemy:1" notetag.


View attachment 29608


If you have the time I uploaded an image of the crash and error. It would be greatly appreciated if you can fix this.
Thank you for the plugin.


I may have found an incompatibility or bug. I set up an event spanner using Orange Custom Events and it crashes. This error did was not occurring before. It seems to only happen with events spawned from other maps. This happens with all battle events spawned this way, not just ones with the "enemy:1" notetag.


View attachment 29608


If you have the time I uploaded an image of the crash and error. It would be greatly appreciated if you can fix this.
This was an incompatibility rather than a bug. I have made the plugin compatible with the new version. Thank you for finding this and let me know if you have any other issues.


Make sure that this plugin is below Orange Custom Events in the plugin list order.
 
Last edited by a moderator:

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
82
Reaction score
31
First Language
English
Primarily Uses
This was an incompatibility rather than a bug. I have made the plugin compatible with the new version. Thank you for finding this and let me know if you have any other issues.


Make sure that this plugin is below Orange Custom Events in the plugin list order.
Thank you for the quick reply, it still does not seem to be working, but I am still getting bugs on my end.


Suprise Spawn Crash.PNG
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
821
First Language
English
Primarily Uses
Thank you for the quick reply, it still does not seem to be working, but I am still getting bugs on my end.
This time I tested the plugin with an event from another map. It appears to be working now as of the latest update.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Hi, there.
I'm Creta Park, as Software engineer and Indie game developer.

Profile : creft.me/cretapark
GitHub : github.com/creta5164
Blog : creta5164.tumblr.com


My stuff

Who shares/sells their scripts/plugins on itch.io? Can I pick your brain?
If you ever need fantasy names and you're bored, make a fictional alphabet. Switch around the letters and see what you get :p
I JUST GOT PROMOTED TO 9TH GRADE BOIS!

Forum statistics

Threads
98,168
Messages
949,923
Members
129,455
Latest member
DeathByPiercing
Top