Forcing Victory in Battle?

Lynvia

Veteran
Veteran
Joined
Oct 14, 2015
Messages
88
Reaction score
45
First Language
English
Primarily Uses
RMMV
The basic premise of battle in my game is twofold - in one scenario, you have a conversation with the enemy, and select skills to answer their statements.

When you are done answering the questions, I would like to execute a script statement or something to force victory, but looking through the MV Script call list I don't see a call to BattleManager.victory(). Tried that anyway, but it doesn't work.

The only option I have is to either use 'Abort Battle' which loses all XP, and isn't a solution and doesn't have a reward and eye candy, OR, I could slay the individual you are having a conversation with, but with the sideview battlers etc. I don't like that either, as the player would watch their mom die just before getting rewarded...

Is there a solution to force a victory without slaying the enemy?
 

Agente Fuego

Villager
Member
Joined
Apr 22, 2015
Messages
6
Reaction score
0
Primarily Uses
I think you can just abort the battle and then reward the player via an event.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,483
Reaction score
987
First Language
English
Primarily Uses
What you want is

Code:
$gameTroop.members().forEach(function(enemy) {
  enemy.addState(1);
});
Just calling BattleManager.processVictory() doesn't work because rewards are only given out for dead enemies. If you add the death state to them with code, you'll end the battle in victory but there will be no graphical effect.
 
Last edited:

Lynvia

Veteran
Veteran
Joined
Oct 14, 2015
Messages
88
Reaction score
45
First Language
English
Primarily Uses
RMMV
Ok, @Trihan, used your code snippet but the enemy actor still fell, as I'm using Yanfly's animated SV Enemies plugin.
So what I ended up doing is issuing a fade out, and then forcing the victory by 'slaying' mom.

Works like a charm. You don't get to see your characters celebrating but you get the extended victory with rewards screen immediately.
I also had to put a fade in after the forced battle on the event that started it.

Of course that wouldn't work on random encounters, but I really don't have those in this game.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Okay, that's the best I can do. Looks a little strange but..err.. it's my style, yeah, very original style..
being an extreme introvert with massive anxiety... I forget this is really, REALLY frustrating for people who are the exact opposite. still, wait this out and stay home...
I hope you all are keeping safe. <3 If you need a shoulder or an ear, I have two of both and am more than willing to listen & support you! Times are weird.
My dad, super frustrated by seclusion, asking me how I live like this. I shrug. "It helps to not like what is outside."
Apparently it's not just people who are hit by corona virus. My phone has set itself to English language on its own. Not that I'm complaining... :D

Forum statistics

Threads
95,444
Messages
929,188
Members
125,685
Latest member
imnotanepicgamer
Top