Battle Result Switches

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,543
Reaction score
12,059
First Language
English
Primarily Uses
RMMV
Battle Result Switches

2015.11.05

by Shaz

Introduction

This plugin allows you to turn on switches when a battle is won, lost, escaped or aborted, which you can then use to trigger common events or map events.  This makes it possible to trigger actions based on the results of random encounters, similar to what's possible when calling battles from map events.

How to use

Add to your plugins folder (file name should be BattleResultSwitches.js).

For each outcome you wish to monitor, enter the id of a switch to be turned on when that result occurs.  Remember to name your switch so you don't accidentally use it for another purpose.

Plugin

download from pastebin

Credit

- Shaz

Terms

- free for use in commercial games
 

Wavelength

Pre-Merge Boot
Global Mod
Joined
Jul 22, 2014
Messages
4,623
Reaction score
3,886
First Language
English
Primarily Uses
RMVXA
Very cool, Shaz!

I was thinking about directly attaching Common Events to battle results.  This is another great solution to the problem.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,543
Reaction score
12,059
First Language
English
Primarily Uses
RMMV
That would require more processing - well, I suppose queuing a common event would be about the same amount of work.  But this has the flexibility that it doesn't have to be a common event - could be a map event set to parallel/autorun, which means you can have different things happen depending on the map.

I suppose to make it REALLY flexible, I could also allow the switch ID to be overridden at map level, so if you win a battle on that map, the switch always stays on and it could be used in event conditions.  But I'm not going to change it to do that unless people really want it.
 

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

Latest Threads

Latest Profile Posts

40 card deck size, the plugin seems more sluggish.
Village theme I composed for a commission!
Stream will be live shortly with some Haunting Ground! Feel free to drop by!
welp, the stock market went down by 7% because of corona today. Time to buy stocks?

Forum statistics

Threads
94,563
Messages
921,921
Members
124,429
Latest member
sheepman
Top