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

Another room (actually other half of previous room)
What should I focus on today?

Character Portraits?
OR
Mapping?
Alright, I think I've got tired of VXAce. I guess I will jump to MV.
Just had a stranger SPRINT away from me in the grocery store. Talk about overreaction...
...I don't think I'm that ugly! ^-^
I wonder if I can go outside ye-

Government: lemme stop you right there

Forum statistics

Threads
95,512
Messages
929,727
Members
125,773
Latest member
cld35
Top