Trudging through the default battle system - Ace

I am trying to get my head around the start-to-finish processing of the RTP battle scripts. I'm sure I'm going to have a lot of questions. So I'll keep them all in the one thread, which might be handy for others down the track too.

Question 1:

Code:
class Scene_Battle  def battle_start    BattleManager.battle_start    process_event    start_party_command_selection  end  def process_event    while !scene_changing?      $game_troop.interpreter.update      $game_troop.setup_battle_event      wait_for_message      wait_for_effect if $game_troop.all_dead?      process_forced_action      BattleManager.judge_win_loss      break unless $game_troop.interpreter.running?      update_for_wait    end  endend
Why does battle_start call process_event? At this point, the (Enemy) Emerged! message has been displayed. The party has not been given the chance to fight or escape. What could happen between these two things that would require that method to run? Is there something in troop events that could happen before the player's even been given the chance to escape?
With invisible enemies, you may be 'surprised' and the enemy will attack before you are given the option to fight or escape.

I suppose any forced pre-emptive enemy attack would also count as that comes before the fight/escape option as well.
So if I remove the surprise/pre-emptive options, that would pretty much do nothing?
It allows you to have troop events activating on turn 0, aka the turn before anything happens. I've used this for a few different things: battle tutorials, dialogue for a special encounter, and applying required states to actors/enemies.


P.S. Analysing scripts is fun. I'll definitely be watching to see what else comes from this thread.

Original thread: https://forums.rpgmakerweb.com/threads/trudging-through-the-default-battle-system-ace.21260/