MV Actor's party defeated but still recieve EXP, Gold and loots from defeated troops?

BattleManager.processDefeat = function() {
$gameParty.removeBattleStates();
$gameParty.performVictory();
this.playVictoryMe();
this.replayBgmAndBgs();
this.makeRewards();
this.displayVictoryMessage();
this.displayRewards();
this.gainRewards();
this.endBattle(2);
};

I've made the processing defeat like this but it gives the full reward (the game thinks I've defeated every enemy troops) rather than only the defeated troops.
you should give more details and explanations of what exactly you want from us, especially since it looks as if you are in the wrong subforum. It sounds as if you want help with javascript code, not requesting a finished plugin.

and even in that case it would help to get better descriptions of the game mechanic you're aiming for.
Oh, sorry about that!

I wanted to make the player's party still earned EXP and Gold even when defeated (all knockout state), I copied the victory processing script to the defeat processing, and it worked, it gave the EXP and Gold but the game thought that I've won, it gave the full rewards.
giving exp on defeated is something default, if you want halve the exp and gold for knocked
out party members, than it require a plugin to modify that part.

there is already some of those available in the victory after match how the exp should go, full,
halve or none at all or custom.

while there are plugins out there and different features, there is many ways HOW exactly
you want them to go.

but from the first post, it's more "Learning Javascript" than requesting like andar said.
Moved to: JS/Plugin Support

Original thread: https://forums.rpgmakerweb.com/threads/actors-party-defeated-but-still-recieve-exp-gold-and-loots-from-defeated-troops.131688/