Bonsoir, l'heure est grave, j'ai un bug...
Plus d'un an que cela ne m'étais pas arrivé...
Mon script Scene_Title dans la partie système général s'est taper un kiff et a planter comme ça...
Je teste Jaspe, je perd un combat de dresseur, je retourne sur la route, je déglingue le Dresseur, je veux save et la il me balance un bug, bon ok, bug connu qui peut arrivé, je relance le jeu et la je fais Entré plus échape, normal quoi, il me relance un bug du Scene_Title, je suprr le script et colle celui de ma version vierge, je relance le projet, et la sa replante une fois passer mon écran-titre...
Script : Scene_Title | Ligne : 405 | Méthode : in `wachunga_autofontinstall_st_main'
#==============================================================================
# ■ Scene_Title (Version Pokémon)
# Pokemon Script Project - Krosk
# 01/08/07
#------------------------------------------------------------------------------
# Scène modifiable
#------------------------------------------------------------------------------
# Intègre le menu de chargement
#------------------------------------------------------------------------------
class Scene_Title
include POKEMON_S
def main
if $BTEST
battle_test
return
end
def cry_pokemon(id_data)
if id_data.type == String
id = id_conversion(id_data)
elsif id_data.type == Fixnum
id = id_data
end
ida = sprintf("%03d", id)
filename = "Audio/SE/Cries/" + ida + "Cry.wav"
if FileTest.exist?(filename)
Audio.se_play(filename)
end
return true
end
if FileTest.exist?("SaveAuto.rxdata")
print("Sauvegarde de secours détectée.\n\nAppuyez sur Entrée, puis sur Echap pour charger, ou Entrée pour continuer.")
loop do
Input.update
if Input.trigger?(Input::C)
File.delete("SaveAuto.rxdata")
break
end
if Input.trigger?(Input::B)
@auto_load = true
break
end
end
end
if $game_system == nil
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$picture_data = load_data("Data/Library.rxdata")
$game_system = Game_System.new
end
if not @auto_load and not MAPINTRO
# -----------------------------------------------------------------
# La scène d'intro commence ici (non MAPINTRO)
# -----------------------------------------------------------------
# Elle est bien sûr modifiable à votre goût.
# -----------------------------------------------------------------
view = Viewport.new(0,0,640,480)
view.z = -5
background = Sprite.new
background.bitmap = RPG::Cache.title("Opening1.png")
background.x = 13
background.y = 13
background.z = 0
background2 = Sprite.new
background2.bitmap = RPG::Cache.title("Opening Lugia26.png")
background2.x = 13
background2.y = 227
background2.z = 0
start = Sprite.new
start.bitmap = RPG::Cache.title("Opening3.png")
start.x = 66
start.y = 167 + 215
start.z = 5
start.visible = false
Graphics.transition(5)
$game_system.bgm_play($data_system.title_bgm)
Audio.me_stop
Audio.bgs_stop
timer = 0
frame = 0
loop do
Graphics.update
Input.update
timer += 1
frame += 0.5
if timer > 20 and timer%35 == 0
start.visible = !start.visible
end
if (frame*2) < 27
background2.bitmap = RPG::Cache.title("Opening Lugia" + sprintf("%01d", frame*2) + ".png")
else
frame = 0
end
if timer > 20
if Input.trigger?(Input::C)
cry_pokemon(249)
break
end
end
end
Graphics.freeze
background.dispose
background2.dispose
start.dispose
Audio.bgm_stop
=begin
#view = Viewport.new(0,25,640,430)
#view.z = 0
background = Plane.new(view)
background.bitmap = RPG::Cache.title("Opening2.jpg")
#background.oy += 25
background.z = 0
background.tone = Tone.new(0,0,0,255)
#view = Viewport.new(0,0,640,480)
#view.z = -5
#background_bis = Plane.new(view)
#background_bis.bitmap = RPG::Cache.title("Opening2.jpg")
#background_bis.z = -5
band_top = Sprite.new
band_top.bitmap = RPG::Cache.title("Opening3.png")
band_top.z = 5
band_bottom = Sprite.new
band_bottom.bitmap = RPG::Cache.title("Opening3.png")
band_bottom.z = 5
band_bottom.y = 450
band_mid = Plane.new(Viewport.new(0,0,640,480))
band_mid.bitmap = RPG::Cache.title("Opening4.png")
band_mid.z = 5
middle = Sprite.new
middle.bitmap = RPG::Cache.title("Opening1.png")
middle.z = 2
title1 = Sprite.new
title1.bitmap = RPG::Cache.title("Opening6.png")
title1.z = 3
title1.opacity = 0
title1.color = Color.new(255,255,255,255)
title2 = Sprite.new
title2.bitmap = RPG::Cache.title("Opening7.png")
title2.z = 4
title2.opacity = 0
title2.color = Color.new(255,255,255,255)
flash = Sprite.new
flash.bitmap = RPG::Cache.title("Opening8.png")
flash.z = 10
flash.opacity = 0
mid = Sprite.new
mid.bitmap = RPG::Cache.title("Opening5.png")
mid.z = 5
mid.visible = false
screen = Sprite.new
screen.bitmap = RPG::Cache.title("Opening10.png")
screen.z = 2
screen.visible = false
start = Sprite.new
start.bitmap = RPG::Cache.title("Opening11.png")
start.z = 5
start.visible = false
Graphics.transition(5)
$game_system.bgm_play($data_system.title_bgm)
Audio.me_stop
Audio.bgs_stop
timer = 0
loop do
Graphics.update
Input.update
timer += 1
background.ox -= 12
#background_bis.ox += 6
if timer == 210
background.tone.gray = 0
end
if timer > 210 and background.tone.red > 0
background.tone.red -= 25
background.tone.green -= 25
end
if timer > 210 and timer % (150 + rand(50)) == 0
background.tone.red = background.tone.green = 250
end
if flash.opacity > 0
flash.opacity -= 15
end
if timer > 5 and not band_top.disposed?
band_top.x += 13
if band_top.x > 640
band_top.dispose
end
end
if timer > 73 and not band_bottom.disposed?
band_bottom.x -= 13
if band_bottom.x < -640
band_bottom.dispose
end
end
if timer > 150 and not band_mid.disposed?
band_mid.ox -= 20
if timer > 210
band_mid.dispose
mid.visible = true
end
end
if timer > 210 and not title1.disposed? and title1.opacity < 255
title1.opacity += 15
title1.color.alpha -= 15
end
if timer > 240 and not title1.disposed? and title1.opacity == 255
title1.color.alpha += 15
end
if timer == 270
flash.opacity = 255
title1.dispose
mid.dispose
middle.dispose
screen.visible = true
end
if timer > 270 and not title2.disposed? and title2.opacity < 255
title2.opacity += 15
title2.color.alpha -= 15
if title2.opacity >= 255
title2.dispose
end
end
if timer > 290 and timer%20 == 0
start.visible = !start.visible
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
break
end
if timer > 3750
Audio.bgm_fade(1000*5)
end
end
Graphics.freeze
background.dispose if not background.disposed?
#background_bis.dispose if not background_bis.disposed?
band_top.dispose if not band_top.disposed?
band_bottom.dispose if not band_bottom.disposed?
band_mid.dispose if not band_mid.disposed?
mid.dispose if not mid.disposed?
middle.dispose if not middle.disposed?
title1.dispose if not title1.disposed?
title2.dispose if not title2.disposed?
flash.dispose if not flash.disposed?
start.dispose if not start.disposed?
screen.dispose if not screen.disposed?
Graphics.transition
Graphics.freeze
Audio.bgm_stop
=end
# -----------------------------------------------------------------
# Fin de la scène d'intro
# -----------------------------------------------------------------
elsif MAPINTRO.type == Array and $_temp_map_intro == nil
$_temp_map_intro = true
$map_link = {}
Audio.bgm_stop
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# ---- Pas forcément nécessaire
$pokemon_party = POKEMON_S::Pokemon_Party.new
$data_storage = [[0]]
$pokemon_party.create_box
Player.set_trainer_code(rand(2**32))
$random_encounter = Array.new(7)
$random_encounter[0] = 0
$battle_var = POKEMON_S::Pokemon_Battle_Variable.new
$existing_pokemon = []
$string = []
POKEMON_S::set_SAVESLOT = @index
Player.trainer_trade_code
# ---- Pas forcément nécessaire
$game_party.setup_starting_members
$game_map.setup(MAPINTRO[0])
$game_player.moveto(MAPINTRO[1], MAPINTRO[2])
$game_player.refresh
$game_map.autoplay
$game_map.update
# ---- Nécessaire
$options[0] = POKEMON_S::SPEED_MSG # Vitesse message
$options[4] = POKEMON_S::NB_MSG # Numéro de la fenêtre de dialogue
$options[5] = POKEMON_S::MSG # Nom complet de la fenêtre de dialogue
$scene = Scene_Map.new
return
end
Audio.bgm_stop
$_temp_map_intro = nil
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
number = 0 # Nombre de cadres de sauvegarde à générer
for i in 0..1
if FileTest.exist?("Save#{i+1}.rxdata")
number += 1
end
end
@number = number
@new_game_window = Window_Base.new(33, (16 + 48*@number), 216, 45)
@new_game_window.contents = Bitmap.new(216, 48)
set_window(@new_game_window)
@new_game_window.contents.font.color = Color.new(160,160,168,255)
@new_game_window.contents.draw_text(1,-16,216,48,"NOUVELLE PARTIE")
@new_game_window.contents.draw_text(0,-15,216,48,"NOUVELLE PARTIE")
@new_game_window.contents.draw_text(1,-15,216,48,"NOUVELLE PARTIE")
@new_game_window.contents.font.color = Color.new(80,80,88,255)
@new_game_window.contents.draw_text(0,-16,216,48,"NOUVELLE PARTIE")
@save_game_window_list = []
for i in 1..@number
window = Window_Base.new(33, 10 + (83-20)*(i-1), 216, 45)
window.contents = Bitmap.new(548, 48)
@save_game_window_list.push(window)
end
@index = 0
@background = Plane.new(Viewport.new(136-123,33-20,256,192))
@background.bitmap = RPG::Cache.picture("fondsaved.png")
@background.z -= 10
@background2 = Sprite.new
@background2.bitmap = RPG::Cache.title("Opening1.png")
@background2.x = 13
@background2.y = 227
@background2.z = 1000
refresh_all
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@new_game_window.dispose
@background.dispose
@background2.dispose
for window in @save_game_window_list
window.dispose
end
end
def update
if Input.trigger?(Input::DOWN)
$game_system.se_play($data_system.decision_se)
@index += @index == @number ? 0 : 1
if @erase and @index > 2
@index = 2
end
refresh_all
end
if Input.trigger?(Input::UP)
$game_system.se_play($data_system.decision_se)
@index -= @index == 0 ? 0 : 1
refresh_all
end
if Input.trigger?(Input::C)
case @index
when @number # Nouveau jeu
if SAVEBOUNDSLOT and @number == 2
$game_system.se_play($data_system.decision_se)
@erase = true
@index = 0
@new_game_window.contents.clear
@new_game_window.contents.font.color = Color.new(160,160,168,255)
@new_game_window.contents.draw_text(1,-16,548,48,"RECOMMENCER QUELLE PARTIE?")
@new_game_window.contents.draw_text(0,-15,548,48,"RECOMMENCER QUELLE PARTIE?")
@new_game_window.contents.draw_text(1,-15,548,48,"RECOMMENCER QUELLE PARTIE?")
@new_game_window.contents.font.color = Color.new(80,80,88,255)
@new_game_window.contents.draw_text(0,-16,548,48,"RECOMMENCER QUELLE PARTIE?")
refresh_all
else
command_new_game
end
else # Chargement
if @erase
command_new_game
else
$game_temp = Game_Temp.new
on_decision("Save#{@index + 1}.rxdata")
end
end
end
if Input.trigger?(Input::B) and @erase
$game_system.se_play($data_system.cancel_se)
@erase = false
@index = 2
@new_game_window.contents.clear
@new_game_window.contents.font.color = Color.new(160,160,168,255)
@new_game_window.contents.draw_text(1,-16,548,48,"NOUVELLE PARTIE")
@new_game_window.contents.draw_text(0,-15,548,48,"NOUVELLE PARTIE")
@new_game_window.contents.draw_text(1,-15,548,48,"NOUVELLE PARTIE")
@new_game_window.contents.font.color = Color.new(80,80,88,255)
@new_game_window.contents.draw_text(0,-16,548,48,"NOUVELLE PARTIE")
refresh_all
end
if @auto_load != nil
$game_temp = Game_Temp.new
on_decision("SaveAuto.rxdata")
File.delete("SaveAuto.rxdata")
end
end
def refresh_all
for i in 0..@number-1
if i < @index
@save_game_window_list[i].opacity = 128
@save_game_window_list[i].y = 15 + 48*i
@save_game_window_list[i].height = 48
@save_game_window_list[i].contents = Bitmap.new(548, 48)
set_window(@save_game_window_list[i])
@save_game_window_list[i].contents.font.color = Color.new(160,160,168,255)
@save_game_window_list[i].contents.draw_text(1,-16, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.draw_text(0,-15, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.draw_text(1,-15, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.font.color = Color.new(80,80,88,255)
@save_game_window_list[i].contents.draw_text(0,-16, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
elsif i == @index
@save_game_window_list[i].opacity = 255
@save_game_window_list[i].y = 15 + 48*i
@save_game_window_list[i].height = 97
@save_game_window_list[i].contents = Bitmap.new(548, 131)
set_window(@save_game_window_list[i])
@save_game_window_list[i].contents.font.color = Color.new(160,160,168,255)
@save_game_window_list[i].contents.draw_text(1,-16, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.draw_text(0,-15, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.draw_text(1,-15, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.font.color = Color.new(80,80,88,255)
@save_game_window_list[i].contents.draw_text(0,-16, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@filename = "Save#{i + 1}.rxdata"
list = read_preview(@filename)
data = list[0]
time_sec = list[1]
hour = (time_sec / 3600).to_s
minute = "00"
minute += ((time_sec%3600)/60).to_s
minute = minute[minute.size-2, 2]
time = hour + ":" + minute
name = data[0].to_s
id = data[1].to_i
captured = data[2].to_s
badge = 0.to_s
#chargement des données
file = File.open("Save#{i + 1}.rxdata", "r")
read_save_data(file)
file.close
#Couleur de la police si votre heros est un garcon
@save_game_window_list[i].contents.font.color = Color.new(120, 184, 232, 255)
@save_game_window_list[i].contents.draw_text(9+1, 0, 252, 48, "JOUEUR")
@save_game_window_list[i].contents.draw_text(9+1, 0, 167, 48, name, 2)
@save_game_window_list[i].contents.draw_text(9+1, 12, 252, 48, "DUREE DE JEU")
@save_game_window_list[i].contents.draw_text(9+1, 12, 167, 48, time , 2)
@save_game_window_list[i].contents.draw_text(9+1, 24, 252, 48, "BADGES")
@save_game_window_list[i].contents.draw_text(9+1, 24, 167, 48, badge, 2)
@save_game_window_list[i].contents.draw_text(9+1, 36, 252, 48, "POKéDEX")
@save_game_window_list[i].contents.draw_text(9+1, 36, 167, 48, captured, 2)
@save_game_window_list[i].contents.draw_text(9, 0+1, 252, 48, "JOUEUR")
@save_game_window_list[i].contents.draw_text(9, 0+1, 167, 48, name, 2)
@save_game_window_list[i].contents.draw_text(9, 12+1, 252, 48, "DUREE DE JEU")
@save_game_window_list[i].contents.draw_text(9, 12+1, 167, 48, time , 2)
@save_game_window_list[i].contents.draw_text(9, 24+1, 252, 48, "BADGES")
@save_game_window_list[i].contents.draw_text(9, 24+1, 167, 48, badge, 2)
@save_game_window_list[i].contents.draw_text(9, 36+1, 252, 48, "POKéDEX")
@save_game_window_list[i].contents.draw_text(9, 36+1, 167, 48, captured, 2)
@save_game_window_list[i].contents.draw_text(9+1, 0+1, 252, 48, "JOUEUR")
@save_game_window_list[i].contents.draw_text(9+1, 0+1, 167, 48, name, 2)
@save_game_window_list[i].contents.draw_text(9+1, 12+1, 252, 48, "DUREE DE JEU")
@save_game_window_list[i].contents.draw_text(9+1, 12+1, 167, 48, time , 2)
@save_game_window_list[i].contents.draw_text(9+1, 24+1, 252, 48, "BADGES")
@save_game_window_list[i].contents.draw_text(9+1, 24+1, 167, 48, badge, 2)
@save_game_window_list[i].contents.draw_text(9+1, 36+1, 252, 48, "POKéDEX")
@save_game_window_list[i].contents.draw_text(9+1, 36+1, 167, 48, captured, 2)
@save_game_window_list[i].contents.font.color = Color.new(0, 112, 248, 255)
@save_game_window_list[i].contents.draw_text(9, 0, 252, 48, "JOUEUR")
@save_game_window_list[i].contents.draw_text(9, 0, 167, 48, name, 2)
@save_game_window_list[i].contents.draw_text(9, 12, 252, 48, "DUREE DE JEU")
@save_game_window_list[i].contents.draw_text(9, 12, 167, 48, time , 2)
@save_game_window_list[i].contents.draw_text(9, 24, 252, 48, "BADGES")
@save_game_window_list[i].contents.draw_text(9, 24, 167, 48, badge, 2)
@save_game_window_list[i].contents.draw_text(9, 36, 252, 48, "POKéDEX")
@save_game_window_list[i].contents.draw_text(9, 36, 167, 48, captured, 2)
# XX est a remplacer par le numero de l'intérupteur qui détermine si vous
# avez choisi un Garcon ou une fille
if $game_variables[11] == 2
#Couleur de la police si votre heros est une fille
@save_game_window_list[i].contents.font.color = Color.new(248, 168, 184, 255)
@save_game_window_list[i].contents.draw_text(9+1, 0, 252, 48, "JOUEUR")
@save_game_window_list[i].contents.draw_text(9+1, 0, 167, 48, name, 2)
@save_game_window_list[i].contents.draw_text(9+1, 12, 252, 48, "DUREE DE JEU")
@save_game_window_list[i].contents.draw_text(9+1, 12, 167, 48, time , 2)
@save_game_window_list[i].contents.draw_text(9+1, 24, 252, 48, "BADGES")
@save_game_window_list[i].contents.draw_text(9+1, 24, 167, 48, badge, 2)
@save_game_window_list[i].contents.draw_text(9+1, 36, 252, 48, "POKéDEX")
@save_game_window_list[i].contents.draw_text(9+1, 36, 167, 48, captured, 2)
@save_game_window_list[i].contents.draw_text(9, 0+1, 252, 48, "JOUEUR")
@save_game_window_list[i].contents.draw_text(9, 0+1, 167, 48, name, 2)
@save_game_window_list[i].contents.draw_text(9, 12+1, 252, 48, "DUREE DE JEU")
@save_game_window_list[i].contents.draw_text(9, 12+1, 167, 48, time , 2)
@save_game_window_list[i].contents.draw_text(9, 24+1, 252, 48, "BADGES")
@save_game_window_list[i].contents.draw_text(9, 24+1, 167, 48, badge, 2)
@save_game_window_list[i].contents.draw_text(9, 36+1, 252, 48, "POKéDEX")
@save_game_window_list[i].contents.draw_text(9, 36+1, 167, 48, captured, 2)
@save_game_window_list[i].contents.draw_text(9+1, 0+1, 252, 48, "JOUEUR")
@save_game_window_list[i].contents.draw_text(9+1, 0+1, 167, 48, name, 2)
@save_game_window_list[i].contents.draw_text(9+1, 12+1, 252, 48, "DUREE DE JEU")
@save_game_window_list[i].contents.draw_text(9+1, 12+1, 167, 48, time , 2)
@save_game_window_list[i].contents.draw_text(9+1, 24+1, 252, 48, "BADGES")
@save_game_window_list[i].contents.draw_text(9+1, 24+1, 167, 48, badge, 2)
@save_game_window_list[i].contents.draw_text(9+1, 36+1, 252, 48, "POKéDEX")
@save_game_window_list[i].contents.draw_text(9+1, 36+1, 167, 48, captured, 2)
@save_game_window_list[i].contents.font.color = Color.new(232, 32, 16, 255)
@save_game_window_list[i].contents.draw_text(9, 0, 252, 48, "JOUEUR")
@save_game_window_list[i].contents.draw_text(9, 0, 167, 48, name, 2)
@save_game_window_list[i].contents.draw_text(9, 12, 252, 48, "DUREE DE JEU")
@save_game_window_list[i].contents.draw_text(9, 12, 167, 48, time , 2)
@save_game_window_list[i].contents.draw_text(9, 24, 252, 48, "BADGES")
@save_game_window_list[i].contents.draw_text(9, 24, 167, 48, badge, 2)
@save_game_window_list[i].contents.draw_text(9, 36, 252, 48, "POKéDEX")
@save_game_window_list[i].contents.draw_text(9, 36, 167, 48, captured, 2)
end
elsif i > @index
@save_game_window_list[i].opacity = 128
@save_game_window_list[i].y = 15 + 48*i + 48
@save_game_window_list[i].height = 48
@save_game_window_list[i].contents = Bitmap.new(548, 48)
set_window(@save_game_window_list[i])
@save_game_window_list[i].contents.font.color = Color.new(160,160,168,255)
@save_game_window_list[i].contents.draw_text(1,-16, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.draw_text(0,-15, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.draw_text(1,-15, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
@save_game_window_list[i].contents.font.color = Color.new(80,80,88,255)
@save_game_window_list[i].contents.draw_text(0,-16, 530, 48, "CONTINUER PARTIE "+(i+1).to_s)
end
end
if @index == @number
@new_game_window.opacity = 255
@new_game_window.y = 15 + 48*@number
else
@new_game_window.opacity = 128
@new_game_window.y = 15 + 48*(@number+1)
end
end
def set_window(window)
window.contents.font.name = $fontface
window.contents.font.size = $fontsizebig
window.contents.font.color = window.normal_color
end
# --------------------------------------------------------
# Chargement
# --------------------------------------------------------
def read_preview(filename)
file = File.open(filename, "r")
time_stamp = file.mtime
characters = Marshal.load(file)
frame_count = Marshal.load(file)
game_system = Marshal.load(file)
game_switches = Marshal.load(file)
game_variables = Marshal.load(file)
total_sec = frame_count / Graphics.frame_rate
# Non utilisé
game_self_switches = Marshal.load(file)
game_screen = Marshal.load(file)
game_actors = Marshal.load(file)
game_party = Marshal.load(file)
game_troop = Marshal.load(file)
game_map = Marshal.load(file)
game_player = Marshal.load(file)
# ------------
read_data = Marshal.load(file)
file.close
return [read_data, total_sec]
end
def read_save_data(file)
characters = Marshal.load(file)
Graphics.frame_count = Marshal.load(file)
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
$read_data = Marshal.load(file)
if SAVE_CONVERT # Conversion des sauvegardes pre-v0.7 à v0.7+
Player.set_trainer_code(Marshal.load(file)) # Variable trainer_code
trainer_id = Marshal.load(file) # Variable
$game_party.actors[0].name = Marshal.load(file) # Game_Actor
$game_party.actors[0].set_graphic($game_party.actors[0].character_name,
$game_party.actors[0].character_hue,
Marshal.load(file),
$game_party.actors[0].battler_hue
)# Game_Actor
end
$pokemon_party = Marshal.load(file)
$random_encounter = Marshal.load(file)
$data_pokedex = Marshal.load(file)
$data_storage = Marshal.load(file)
$battle_var = Marshal.load(file)
$existing_pokemon = Marshal.load(file)
$string = Marshal.load(file)
$options = Marshal.load(file)
$map_link = ($read_data != nil and $read_data[3] != nil) ? $read_data[3] : {}
if $game_system.magic_number != $data_system.magic_number
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
$game_party.refresh
POKEMON_S::set_SAVESLOT = @index
Player.trainer_trade_code
end
def on_decision(filename)
unless FileTest.exist?(filename)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.load_se)
file = File.open(filename, "rb")
read_save_data(file)
file.close
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
$game_map.update
$scene = Scene_Map.new
$scene.update_encounter
Player.pokedex_update
end
alias alias_command_new_game command_new_game
def command_new_game
$map_link = {}
alias_command_new_game
#-----------------------------------------------------
# Variables créées automatiquement au début du jeu
# Elles sont absolument nécessaires
#-----------------------------------------------------
$pokemon_party = POKEMON_S::Pokemon_Party.new
$data_storage = [[0]]
$pokemon_party.create_box
Player.set_trainer_code(rand(2**32))
$random_encounter = Array.new(7)
$random_encounter[0] = 0
$battle_var = POKEMON_S::Pokemon_Battle_Variable.new
$existing_pokemon = []
$string = []
$options = []
POKEMON_S::set_SAVESLOT = @index
Player.trainer_trade_code
$data_pokedex = Array.new($data_pokemon.length-1)
$data_pokedex[0] = false # Possède ou non
for i in 1..$data_pokemon.length-1
$data_pokedex[i] = [false, false] # Vu, Capturé
end
$game_variables[5000] = {}
$game_variables[5000]["banque"] = [BANQUE::Banque.new]
$game_switches[15] = true # Système Jour/Nuit
$game_switches[10] = false # Signale un combat contre un champion
$game_variables[11] = nil # Sexe du héros non défini
#-----------------------------------------------------
# Valeurs par défaut
#-----------------------------------------------------
$options[0] = POKEMON_S::SPEED_MSG # Vitesse message
$options[1] = POKEMON_S::COLOR_MENU # Couleur d'image du Menu Echap
$options[2] = true # Animations d'attaques
$options[3] = true # Changement de Pokémon en combat
$options[4] = POKEMON_S::NB_MSG # Numéro de la fenêtre de dialogue
$options[5] = POKEMON_S::MSG # Nom complet de la fenêtre de dialogue
end
end