Voici un joli petit script qui permet de conserver votre map en fond de combat ^^
Screen :
Remplacer le script "Spriteset_Battle" par le suivant:
[code]#============================================
# ¦ Spriteset_Battle modifier par boushy
#----------------------------------------------
# ???????????????????????????? Scene_Battle ??
# ????????????
#============================================
class Spriteset_Battle# #------------------------------------------
# ? ??????????
#------------------------------------------
attr_reader :viewport1 # ????????????
attr_reader :viewport2 # ????????????
#------------------------------------------
# ? ?????????
#------------------------------------------
def initialize
# ?????????
@viewport1 = Viewport.new(0, 0, 640, 320)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport4 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 101
@viewport3.z = 200
@viewport4.z = 5000
# ?????????
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names[i]
@tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
# ???????????
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
# ??????????
@fog = Plane.new(@viewport1)
@fog.z = 3000
# ??????????????
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
# ?????
@weather = RPG::Weather.new(@viewport1)
# ???????
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
# ?????????
# ??????????????
#@battleback_sprite = Sprite.new(@viewport1)
# ????????????
@enemy_sprites = []
for enemy in $game_troop.enemies.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
# ????????????
@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
# ?????
@weather = RPG::Weather.new(@viewport1)
# ????????????
@picture_sprites = []
for i in 51..100
@picture_sprites.push(Sprite_Picture.new(@viewport3,
$game_screen.pictures[i]))
end
# ????????????
@timer_sprite = Sprite_Timer.new
# ??????
update
end
#------------------------------------------
# ? ??
#------------------------------------------
def dispose
# ??????????????????????
#if @battleback_sprite.bitmap != nil
#@battleback_sprite.bitmap.dispose
# end
# ??????????????
#@battleback_sprite.dispose
# ??????????????????????
for sprite in @enemy_sprites + @actor_sprites
sprite.dispose
end
# ?????
@weather.dispose
# ????????????
for sprite in @picture_sprites
sprite.dispose
end
# ????????????
@timer_sprite.dispose
# ?????????
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
@viewport4.dispose
end
#------------------------------------------
# ? ??????????
#------------------------------------------
def effect?
# ??????????????? true ???
for sprite in @enemy_sprites + @actor_sprites
return true if sprite.effect?
end
return false
end
#------------------------------------------
# ? ??????
#------------------------------------------
def update
# ??????????????? (????????????)
@actor_sprites[0].battler = $game_party.actors[0]
@actor_sprites[1].battler = $game_party.actors[1]
@actor_sprites[2].battler = $game_party.actors[2]
@actor_sprites[3].battler = $game_party.actors[3]
# ???????????????????????
#if @battleback_name != $game_temp.battleback_name
#@battleback_name = $game_temp.battleback_name
#if @battleback_sprite.bitmap != nil
#@battleback_sprite.bitmap.dispose
#end
#@battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
#@battleback_sprite.src_rect.set(0, 0, 640, 320)
#end
# ????????????
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
for sprite in @enemy_sprites + @actor_sprites
sprite.update
end
# ???????????
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.update
# ????????????
for sprite in @picture_sprites
sprite.update
end
# ????????????
@timer_sprite.update
# ???????????????
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# ????????????
@viewport4.color = $game_screen.flash_color
# ?????????
@viewport1.update
@viewport2.update
@viewport4.update
end
end