Lynvia

Veteran
Veteran
Joined
Oct 14, 2015
Messages
87
Reaction score
46
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
3,052
Reaction score
2,313
First Language
English
Primarily Uses
RMMV
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
87
Reaction score
46
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Another Friday and another Zoom call that could have been an email. Working from home is awesome.
Finished with the semester; finally have some time to play around with MV :kaopride:
Started work on the fishing Mini-Game
The Dark Toon art style is now available as Steam branches. (Both for the main game and the demo)
Battle.jpgCaptain.jpgCutsene.jpg
There are 2 versions. One only affects combat, cutscene, and portraits. The other one changes more.
So, technically, the game now has 7 versions on steam.

Forum statistics

Threads
111,356
Messages
1,060,447
Members
144,686
Latest member
jhanmorris94
Top