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
986
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

I'm currently being attacked by the RPG Maker Hydra: fixing one problem only to have two more rise to take its place.
Hey you! Yeah YOU! Whatcha doin' not backing up your projects? You a masochist or sumthin'? GO BACK UP YOUR PROJECTS! Sheeesh... Didn't think I'd hafta spell it out for yas.
now I need to determine, how MV determines if an auto tile is complete or not.
Edit:From what I can tell it uses Autotile kinds to do that.
Edit 2: The editor determines it and packs picture data for the engine....
Finished with the ground work for my class system, using Ellye's Class Change Equipment and Yanfly's Class Change Core plugins to implement an equip based subclass feature!
Hi people! I was wondering... Here in Brazil, we have a whats app group for we talk about rpg maker and our projects. A more informal way for we meet each other. Is there any whats app group out there? :)

Forum statistics

Threads
94,281
Messages
919,638
Members
124,014
Latest member
AnnuRavi
Top