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

Well, looks like I need to build myself a quest system. Or really just a system for "Helpful voices" to talk to the player. I'm sure nothing will go wrong listening to them.... They're "helpful". :LZSwink:

Should be pretty easy with PIXI just letting me write all over the screen. :LZSexcite:
I'm starting to think I just dont like anime since the last one I enjoyed was none of them.
It's still here...
Hi guys, Im new here. Im using RPGMMV. In this community i would like to learn more and become better rpg developer.
The main character for the first game was originally going to become a member of the party in the third game but I'm probably changing him to an important NPC instead. That brings the third game's total ensemble roster down to nine with one optional secret character.

Forum statistics

Threads
95,591
Messages
930,301
Members
125,896
Latest member
Yilou
Top