Accessing battle's end events

Hi,


i'd like to know how can i access a battle end event? It can be through js code, i don't mind. What i want to do is change some variables after the end of some battles in my mv game.


If you know, let me know. Thanks.
Are you using evented(on map) or random battles?
Are you using evented(on map) or random battles?



Both, actually. I guess it's somewhere Battle_scene but i'm afraid of messing with it without first know what to do.
In the evented battles you just change the variables under the if win part, for random you would need to have battle events for each troop that changes the variables at the start of the battle.  If the player loses it is game over and the variables won't change.
In the evented battles you just change the variables under the if win part, for random you would need to have battle events for each troop that changes the variables at the start of the battle.  If the player loses it is game over and the variables won't change.



@Dalamar can't this be done automatically through code? I mean, somewhere in battle processing that states the group was victorious?
It may be possible, but would require more coding experience than I have and I haven't seen anyone post where that line(s) would be so someone would need to go through a lot of code to find where to make those changes.

Original thread: https://forums.rpgmakerweb.com/threads/accessing-battles-end-events.63061/