Sujet n°9127
Posté par jerebip le 5 Fév - 12:56 (2011)
Titre : Ecran titre à la BW
Bonjour à tous,

Ce tuto servira surtout aux débutants car je sais que les autres peuvent le faire comme ils le souhaitent.

Le but de ce tuto est de réaliser l'écran titre de Pokémon White:
http://www.youtube.com/watch?v=zSH_vQP0z2U

Mais uniquement la partie de 00:00 à 00:06, la suite arrivera surement avec une seconde version du Tuto. Tout d'abbord veuillez télécharger ce fichier:
Sendspace: http://www.sendspace.com/file/bhqriy
MegaUpload: http://www.megaupload.com/?d=PBQMBA4M
Vous l'avez compris qu'il faudra le placer dans l'archive de votre jeu Graphics/Titles en remplaçant les anciennes images.

Une fois les images déplacées dans le bon dossier remplacer Scene_Title par ce script:
Spoiler
Code:
#==============================================================================
# ■ 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("Opening2_1.png")
      background2.x = 13
      background2.y = 227
      background2.z = 0
     
      start = Sprite.new
      start.bitmap = RPG::Cache.title("Opening3.png")
      start.x = 50
      start.y = 167
      start.z = 30
      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 += 1
       
        if timer > 20 and timer%35 == 0
          start.visible = !start.visible
        end
       
        if frame == 0
        background2.bitmap = RPG::Cache.title("Opening2_1.png")
        end
        if frame == 5
          background2.bitmap = RPG::Cache.title("Opening2_2.png")         
        end       
        if frame == 10
          background2.bitmap = RPG::Cache.title("Opening2_3.png")
        end
        if frame == 15
          background2.bitmap = RPG::Cache.title("Opening2_4.png")
        end         
          if frame == 20
          background2.bitmap = RPG::Cache.title("Opening2_5.png")
        end   
          if frame == 25
          background2.bitmap = RPG::Cache.title("Opening2_6.png")
        end   
          if frame == 30
          background2.bitmap = RPG::Cache.title("Opening2_7.png")
        end   
          if frame == 35
          background2.bitmap = RPG::Cache.title("Opening2_8.png")
        end   
          if frame == 40
          background2.bitmap = RPG::Cache.title("Opening2_9.png")
        end   
          if frame == 45
          background2.bitmap = RPG::Cache.title("Opening2_10.png")
        end   
          if frame == 50
          background2.bitmap = RPG::Cache.title("Opening2_11.png")
        end   
          if frame == 55
          background2.bitmap = RPG::Cache.title("Opening2_12.png")
        end   
          if frame == 60
          background2.bitmap = RPG::Cache.title("Opening2_13.png")
        end   
          if frame == 65
          background2.bitmap = RPG::Cache.title("Opening2_14.png")
        end   
          if frame == 70
          background2.bitmap = RPG::Cache.title("Opening2_15.png")
        end   
          if frame == 75
          background2.bitmap = RPG::Cache.title("Opening2_16.png")
        end   
              if frame == 80
        background2.bitmap = RPG::Cache.title("Opening2_15.png")
        end
        if frame == 85
          background2.bitmap = RPG::Cache.title("Opening2_14.png")         
        end       
        if frame == 90
          background2.bitmap = RPG::Cache.title("Opening2_13.png")
        end
        if frame == 95
          background2.bitmap = RPG::Cache.title("Opening2_12.png")
        end         
          if frame == 100
          background2.bitmap = RPG::Cache.title("Opening2_11.png")
        end   
          if frame == 105
          background2.bitmap = RPG::Cache.title("Opening2_10.png")
        end   
          if frame == 110
          background2.bitmap = RPG::Cache.title("Opening2_9.png")
        end   
          if frame == 115
          background2.bitmap = RPG::Cache.title("Opening2_8.png")
        end   
          if frame == 120
          background2.bitmap = RPG::Cache.title("Opening2_7.png")
        end   
          if frame == 125
          background2.bitmap = RPG::Cache.title("Opening2_6.png")
        end   
          if frame == 130
          background2.bitmap = RPG::Cache.title("Opening2_5.png")
        end   
          if frame == 135
          background2.bitmap = RPG::Cache.title("Opening2_4.png")
        end   
          if frame == 140
          background2.bitmap = RPG::Cache.title("Opening2_3.png")
        end   
          if frame == 145
          background2.bitmap = RPG::Cache.title("Opening2_2.png")
        end   
          if frame == 150
          background2.bitmap = RPG::Cache.title("Opening2_1.png")
       frame = -5
        end   
 
       
      if timer > 20
        if Input.trigger?(Input::C) or TACTILE.det_clique(14,270,228,420)     
          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
      $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(140,140,140,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(239,239,239,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 = Sprite.new
    @background.bitmap = RPG::Cache.picture("fondsaved.png")
    @background.x = 13
    @background.y = 13
    @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(140,140,140,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(239,239,239,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(140,140,140,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(239,239,239,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(140,140,140,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(239,239,239,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(140,140,140,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(239,239,239,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(57, 107, 173, 255)
        @save_game_window_list[i].contents.draw_text(49+1, 0, 252, 48, name)
        @save_game_window_list[i].contents.draw_text(49, 0+1, 252, 48, name)
        @save_game_window_list[i].contents.draw_text(49+1, 0+1, 252, 48, name)
       
        @save_game_window_list[i].contents.font.color = Color.new(140,140,140,255)
        @save_game_window_list[i].contents.draw_text(9+1, 36, 252, 48, "Durée de Jeu    " + time)
        @save_game_window_list[i].contents.draw_text(49+1, 12, 167, 48, $mappan.to_s)
        @save_game_window_list[i].contents.draw_text(9+1, 24, 252, 48, "Badges    " + badge)
        @save_game_window_list[i].contents.draw_text(9+1, 24, 167, 48, "Pokédex    " + captured, 2)
       
        @save_game_window_list[i].contents.draw_text(9, 36+1, 252, 48, "Durée de Jeu    " + time)
        @save_game_window_list[i].contents.draw_text(49, 12+1, 167, 48, $mappan.to_s)
        @save_game_window_list[i].contents.draw_text(9, 24+1, 252, 48, "Badges    " + badge)
        @save_game_window_list[i].contents.draw_text(9, 24+1, 167, 48, "Pokédex    " + captured, 2)
       
        @save_game_window_list[i].contents.draw_text(9+1, 36+1, 252, 48, "Durée de Jeu    " + time)
        @save_game_window_list[i].contents.draw_text(49+1, 12+1, 167, 48, $mappan.to_s)
        @save_game_window_list[i].contents.draw_text(9+1, 24+1, 252, 48, "Badges    " + badge)
        @save_game_window_list[i].contents.draw_text(9+1, 24+1, 167, 48, "Pokédex    " + captured, 2)
       
     
        @save_game_window_list[i].contents.font.color = Color.new(57, 165, 255, 255)
        @save_game_window_list[i].contents.draw_text(49, 0, 252, 48, name)
        @save_game_window_list[i].contents.font.color = Color.new(239,239,239,255)
        @save_game_window_list[i].contents.draw_text(9, 36, 252, 48, "Durée de Jeu    " + time)
        @save_game_window_list[i].contents.draw_text(49, 12, 167, 48, $mappan.to_s)
        @save_game_window_list[i].contents.draw_text(9, 24, 252, 48, "Badges    " + badge)
        @save_game_window_list[i].contents.draw_text(9, 24, 167, 48, "Pokédex    " + 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(165, 66, 66, 255)
        @save_game_window_list[i].contents.draw_text(49+1, 0, 252, 48, name)
        @save_game_window_list[i].contents.draw_text(49, 0+1, 252, 48, name)
        @save_game_window_list[i].contents.draw_text(49+1, 0+1, 252, 48, name)
        @save_game_window_list[i].contents.font.color = Color.new(247, 74, 90, 255)
        @save_game_window_list[i].contents.draw_text(49, 0, 252, 48, name)
       
        end
        if $game_variables[11] == 2
          bitmap = RPG::Cache.title("fille.png")
        else
          bitmap = RPG::Cache.title("gars.png")
        end
        @save_game_window_list[i].contents.blt(12, 16, bitmap, Rect.new(0, 0, 32, 32),255)
      elsif i > @index
        @save_game_window_list[i].opacity = 196
        @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(140,140,140,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(239,239,239,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 = 196
      @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)   
    $mappan             = 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)
    $SPEED_MSG          = Marshal.load(file)
    $color_menu         = Marshal.load(file)
    $NB_MSG             = Marshal.load(file)
    $MSG                = Marshal.load(file)
    $voir_anim          = Marshal.load(file)
    $choix_battle       = 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 = []     
    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_switches[15] = true # Système Jour/Nuit
    #-----------------------------------------------------
    # Valeurs par défaut
    #-----------------------------------------------------   
    $SPEED_MSG = POKEMON_S::SPEED_MSG   # Vitesse message
    $color_menu = POKEMON_S::COLOR_MENU # Couleur d'image du Menu Echap
    $NB_MSG = POKEMON_S::NB_MSG         # Numéro de la fenêtre de dialogue
    $MSG = POKEMON_S::MSG               # Nom complet de la fenêtre de dialogue
    $voir_anim = true                   # Animations d'attaques
    $choix_battle = true                # Changement de Pokémon en combat
  end
end


Ensuite lancez votre jeu, admirez et ENJOY!


Je le rapelle, ce tuto est destiné pour PSP DS!

Posté par Noty! le 5 Fév - 13:51 (2011)
Problème: il y à des 8) ou autres smiles dans les scripts ...
Désactive les smiles Clin d'œil foireux !

Posté par Skyrocker's le 5 Fév - 15:56 (2011)
Le résultat est magniiiiiiiifique .

Posté par Drascorounet le 5 Fév - 16:41 (2011)
Je vais paraître con, mais j'ai une question : on supprime vraiment TOUTES les anciennes images?

Posté par jerebip le 5 Fév - 16:53 (2011)
Uniquement celles qui possèdent le même nom que celles du zip evidemment.

Mais même ces images là je te conseille d'en faire une copie dans un dossier à part. On ne sait jamais.

Posté par Drascorounet le 5 Fév - 17:08 (2011)
Tu peux mettre ton script sous la balise [code] ?

Posté par jerebip le 5 Fév - 17:09 (2011)
Voilà, c'est fait ^^

Posté par Drascorounet le 5 Fév - 17:32 (2011)
Ca me met ça quand je lance le jeu (j'ai c/c ton code)
Spoiler




Posté par jerebip le 5 Fév - 17:41 (2011)
Pourtant cette partie là proviens du Scene_Title originel :hum:

Posté par Pαlвσlѕку le 5 Fév - 19:25 (2011)
Il existe deux scripts Scene_Title.
C'est le deuxième qui doit être remplacé.

Posté par Drascorounet le 5 Fév - 20:31 (2011)
Merci, mon jeu va avancer avec ça !

Posté par Zoroark9999 le 6 Fév - 17:43 (2011)
Jerebip, peux-tu mettre un lien Sendspace?

Une question: Y aura-t-il une version avec Reshiram(Pokémon version Noire)?

Merci d'avance!

Posté par jerebip le 6 Fév - 17:49 (2011)
Actuellement je suis en train d'héberger le fichier sur sendspace.

En ce qui concerne Reshiram, ce là pourrait être possible mais il faudrait ue j'arrive à trouver les ressources nécessaires

Edit: http://www.sendspace.com/file/bhqriy

Posté par Antoine' le 12 Fév - 12:35 (2011)
Salut,

Moi j'ai mis le script et les image est quand je lance sa met un ecran noir et sa met Ne répond pas.

Merci de m'aider

Posté par quenti77 le 12 Fév - 22:12 (2011)
Salut, ce tuto est intéressant même si j'avais déjà réussi à le faire.
Regarder plutot : http://www.youtube.com/watch?v=R4zb3-4T7NM

Posté par Antoine' le 12 Fév - 22:15 (2011)
Le rendu est magnifique !

La chose qui gache tout c'est le Lune de glace :D

Posté par quenti77 le 12 Fév - 22:39 (2011)
Je sais je suis nul en graphisme et donc c'est un truc vite fait. Au fait pour faire ce rendu il ma fallut plus de 2600 images ripé d'une vidéo de pokemon Black !

Posté par sassouna le 11 Mai - 19:11 (2011)
ça me fait ça moi





---------- Erreur de script : Pokemon_Save* ----------
----- Type
NoMethodError


----- Message
- ARGS - []
undefined method `each' for nil:NilClass


----- Position dans Pokemon_Save*
Ligne 95


----- Backtrace
Script : Pokemon_Save* | Ligne : 95 | Méthode : in `main'
Script : Main | Ligne : 58

Posté par quenti77 le 15 Mai - 12:33 (2011)
Pourrais-tu nous donnez la partie du code qui ne fonctionne pas.

Posté par Araceus le 15 Mai - 12:38 (2011)
Vérifie les méthode de ton script, soit tu l'a mal orthographiée soit elle n'est pas à la bonne place.

Posté par sassouna le 15 Mai - 13:38 (2011)
def main       
    if $BTEST
      battle_test
      return


c'est celui en gars


Posté par sassouna le 15 Mai - 13:41 (2011)
araceus pourtant j'ai copié le code voila image du bug

Posté par Araceus le 15 Mai - 13:41 (2011)
sassouna a écrit:



def main       
    if $BTEST
      battle_test
      return


c'est celui en gars








Je pense plus que c'est le if $BTEST supprime le "$" devant BTEST

Posté par sassouna le 15 Mai - 14:23 (2011)
La meme chose meme bug (ligne 15 !

Posté par Araceus le 15 Mai - 14:23 (2011)
Bah à la place de def Main met def Initialize

Posté par Nuri Yuri le 15 Mai - 14:34 (2011)
Non, met un end avant def cry_pokemon, on vois bien que Main n'est pas fermé.

Posté par Araceus le 15 Mai - 14:35 (2011)
Ah ouaip j'avais pas vu le end manquant --'

Posté par Nuri Yuri le 15 Mai - 14:38 (2011)
En fait il y a pas de problèmes dans le script Scene_Title, ne fais aucune modifs.
Il est juste mal écris ce qui porte à confusions, le vrai bug se trouve dans Pokemon_Save*.

(J'ai pas lu le log plus haut :B)

Posté par Araceus le 15 Mai - 14:39 (2011)
Oui mais il faut aussi un second end un qui porte sur le def et l'autre sur le if non?

Posté par Nuri Yuri le 15 Mai - 14:53 (2011)
Il montre pas tout le script alors on peut pas dire :S

Posté par sassouna le 15 Mai - 18:20 (2011)
Voila la ligne du bug de pokemon-sav

Posté par Nuri Yuri le 15 Mai - 18:54 (2011)
Remplace la ligne par : @background.update if @background

Posté par sassouna le 15 Mai - 20:12 (2011)
Un pas en avant yuri mais autre bug xD


---------- Erreur de script : Scene_Map ----------
----- Type
NoMethodError


----- Message
- ARGS - [0, 6]
undefined method `[]=' for #<POKEMON_S::Pokemon_Party:0x9dd2120>


----- Position dans Scene_Map
Ligne 205


----- Backtrace
Script : Scene_Map | Ligne : 205 | Méthode : in `update_encounter'
Script : Scene_Title | Ligne : 735 | Méthode : in `on_decision'
Script : Scene_Title | Ligne : 469 | Méthode : in `update'
Script : Scene_Title | Ligne : 415 | Méthode : in `wachunga_autofontinstall_st_main'
Script : Scene_Title | Ligne : 412 | Méthode : in `loop'
Script : Scene_Title | Ligne : 419 | Méthode : in `wachunga_autofontinstall_st_main'
Script : Autofont_Install* | Ligne : 115 | Méthode : in `main'
Script : Main | Ligne : 58



Posté par Araceus le 15 Mai - 20:23 (2011)
Montre ta ligne 205 de ton script Scene_Map stp

Posté par sassouna le 16 Mai - 12:59 (2011)
Voila
$random_encounter[0] = (2880 / (16.0 * $game_map.encounter_step)).to_i

Posté par Flodino le 7 Aoû - 10:53 (2011)
J'ai un petit problème aussi ( Différent de celui D' sassouna )
le message d'erreur qu'on me met quand je lance le jeu est :


Et a la ligne 229 c'est :


Merci d'avance !

Posté par Conan Edogawa le 12 Aoû - 11:16 (2011)
Pour ceux qui veulent faire le cri de reshiram/zekrom faut chercher sa dans le script:
Code:
cry_pokemon(249)
.
Ensuite on le replace par ça:
Code:
cry_pokemon(643)
(Reshiram)
Code:
cry_pokemon(644)
(Zekrom)

Posté par Pαlвσlѕку le 12 Aoû - 11:57 (2011)
Flodino, pour ton problème, il faut que =begin soit coller à gauche.
S'il y a des espaces avant, ça bug obligatoirement.

Posté par Flodino le 12 Aoû - 12:38 (2011)
Merci beaucoup !
Mais maintenant ça fait le même message d'erreur mais celui ci pour la ligne 826 soit la dernière, j'ai essayé de faire la même démarche que le problème d'avant ( enlever les espaces avant ) mais ça ne marche toujours pas
En image :

Posté par Sphinx le 12 Aoû - 14:19 (2011)
Tu as un
Code:
=begin
dans le script qui bugge ?
Si oui, as tu aussi un
Code:
=end
?
Si toujours oui, y a t il des espaces avant =begin et/ou avant =end ?

Posté par Flodino le 12 Aoû - 15:00 (2011)
Ah ! =begin et =end doivent être tous les deux collés à gauche, il va falloir que je me mette à apprendre les bases du script dis donc !

Merci beaucoup tous !

Posté par The_Doctor le 5 Jan - 22:12 (2013)
Je suis désolé du gros necropost , mais je voulait qavoir si c'est possible de changer le lien ?