looping victory BGM RMXP?

Ive been working on sound tracks for my game i was wondering if its possible to have a separate looping victory BGM to play after the victory jingle but stop when you return to the map? if this isn’t possible in base RMXP is there any scripts to allow this to happen?

Not possible by default but doable with scripts.

Did this in a bit, at least with default scripts it seems to work fine.

class Scene_Battle
  # ----- CONFIG ------
  #                                   name, volume, pitch
  BATTLE_END_BGM = RPG::AudioFile.new("033-Ship01", 100, 100)
  # -- End of config --
  
  alias oz_battleendsong_start_phase5 start_phase5 unless $@
  def start_phase5
    # Replace song for now, to be played during battle end
    _old_map_bgm = $game_temp.map_bgm
    $game_temp.map_bgm = BATTLE_END_BGM
    # Old method
    oz_battleendsong_start_phase5
    # Return old song
    $game_temp.map_bgm = _old_map_bgm
  end
  
  alias oz_battleendsong_battle_end battle_end unless $@
  def battle_end(result)
    # Replay map BGM
    $game_system.bgm_play($game_temp.map_bgm)
    # Old method call
    oz_battleendsong_battle_end(result)
  end
end

Thanks this works really well!