The transition effect plays on the scene you're switching over to. So when leaving the battle scene, you're probably heading back to the map scene. Thus we need to introduce our code changes to Scene_Map.
You should already be aware that this is what we need to change in Scene_Map:
# Transition run
Graphics.transition
In Scene_Battle, it handles the transition like so
# Execute transition
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
We need to copy some of this over, but we also need to make Scene_Map aware that we're coming from Scene_Battle.
I would suggest adding a new method to Scene_Map:
def initialize(last_scene = nil)
@_last_scene = last_scene
end
Replace the Graphics.transition code called out above with this:
# Transition run
if @_last_scene == :battle
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
else
Graphics.transition
end
Then find "def battle_end" in Scene_Battle 1 and make the following change:
# Switch to map screen
$scene = Scene_Map.new(:battle)
All of this assumes you're using the default scripts, of course.