Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.


 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
Le Deal du moment :
Carte Fnac+ Jackpot avec 30€ offerts sur le ...
Voir le deal
19.99 €

 

 Menu pour un arpg

Aller en bas 
2 participants
AuteurMessage
Link123
Modérateur
Modérateur
Link123


Nombre de messages : 63
Date d'inscription : 22/07/2006

Menu pour un arpg Empty
MessageSujet: Menu pour un arpg   Menu pour un arpg EmptyDim 20 Aoû - 16:11

Voila a quoi ressemble le menu :

Menu pour un arpg Monmenu2il

Un menu style arpg.

Tout dabord changer le Script scene menu par celui ci :

Code:
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
#  メニュー画面の処理を行うクラスです。
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #    menu_index : コマンドのカーソル初期位置
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main
    # スプライトセットを作成
    @spriteset = Spriteset_Map.new
    # コマンドウィンドウを作成
    s1 = "    Objets"
    s2 = " Competence"
    s3 = " Equipement"
    s4 = "      État"
    s5 = "Sauvegarder"
    s6 = "    Quitter"
    s7 = "  Charger"
    @command_window = Window_Command.new(160, [s1, s5, s7, s6])
    @command_window.index = @menu_index
    @command_window.x = 240
    @command_window.y = 41
    # パーティ人数が 0 人の場合
    if $game_party.actors.size == 0
      # アイテム、スキル、装備、ステータスを無効化
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # セーブ禁止の場合
    if $game_system.save_disabled
      # セーブを無効にする
      @command_window.disable_item(4)
    end
    # プレイ時間ウィンドウを作成
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 410
    @playtime_window.y = 200
    # 歩数ウィンドウを作成
    @steps_window = Window_Steps.new
    @steps_window.x = 240
    @steps_window.y = 330
    # ゴールドウィンドウを作成
    @gold_window = Window_Gold.new
    @gold_window.x = 70
    @gold_window.y = 200
    # ステータスウィンドウを作成
    @status_window = Window_MenuStatus.new
    @status_window.x = 230
    @status_window.y = 200
    # トランジション実行
    Graphics.transition
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @command_window.update
    @playtime_window.update
    @steps_window.update
    @gold_window.update
    @status_window.update
    @spriteset.update
    # コマンドウィンドウがアクティブの場合: update_command を呼ぶ
    if @command_window.active
      update_command
      return
    end
    # ステータスウィンドウがアクティブの場合: update_status を呼ぶ
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_command
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # マップ画面に切り替え
      $scene = Scene_Map.new
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # パーティ人数が 0 人で、セーブ、ゲーム終了以外のコマンドの場合
      if $game_party.actors.size == 0 and @command_window.index < 4
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # コマンドウィンドウのカーソル位置で分岐
      case @command_window.index
      when 0  # アイテム
        # 決定  SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アイテム画面に切り替え
        $scene = Scene_Item.new
      when 1  # セーブ
        # セーブ禁止の場合
        if $game_system.save_disabled
          # ブザー SE を演奏
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # セーブ画面に切り替え
        $scene = Scene_Save.new
      when 2
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # セーブ画面に切り替え
        $scene = Scene_Load.new
      when 3  # ゲーム終了
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ゲーム終了画面に切り替え
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_status
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # コマンドウィンドウをアクティブにする
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # コマンドウィンドウのカーソル位置で分岐
      case @command_window.index
      when 1  # スキル
        # このアクターの行動制限が 2 以上の場合
        if $game_party.actors[@status_window.index].restriction >= 2
          # ブザー SE を演奏
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # スキル画面に切り替え
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # 装備
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # 装備画面に切り替え
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # ステータス
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステータス画面に切り替え
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
Revenir en haut Aller en bas
Link123
Modérateur
Modérateur
Link123


Nombre de messages : 63
Date d'inscription : 22/07/2006

Menu pour un arpg Empty
MessageSujet: Re: Menu pour un arpg   Menu pour un arpg EmptyDim 20 Aoû - 16:11

Puis le scrîpt Window_Gold par ceci :

Code:
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
#  ゴールドを表示するウィンドウです。
#==============================================================================

class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 130, 32, $data_system.words.gold)
  end
end

Et le scrîpt Window_PlayTime par ce script :

Code:
#==============================================================================
# ■ Window_PlayTime
#------------------------------------------------------------------------------
#  メニュー画面でプレイ時間を表示するウィンドウです。
#==============================================================================

class Window_PlayTime < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 130, 32, "Temps de jeu :")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

Window_Steps par ce script :


Code:
#==============================================================================
# ■ Window_Steps
#------------------------------------------------------------------------------
#  メニュー画面で歩数を表示するウィンドウです。
#==============================================================================

class Window_Steps < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    self.opacity = 255
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 130, 32, "Nombre de pas")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
    self.opacity = 255
  end
end

Le scrîpt Window_MenuStatus :


Code:
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
#  メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 180, 130)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 40, y + 70)
      draw_actor_name(actor, x, y + 20)
     
      self.contents.draw_text(x-55, 42, 120, 32, $game_variables[1].to_s, 2)
      self.contents.draw_text(x-75, 42, 120, 32, "PV : ", 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● カーソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end

Ensuite il vous faudra créer une variable des HP du héros et entrer son ID dans les crochets de cette ligne-ci du script ci-dessus :

Code:
self.contents.draw_text(x-55, 42, 120, 32, $game_variables[1].to_s, 2)

Ici entre crochets il y a "1" ce qui signifie que c'est la première variable, changer ce nombre par l'ID de votre variable.

Wink
Revenir en haut Aller en bas
Vorg-sama
Admin
Admin
Vorg-sama


Nombre de messages : 104
Date d'inscription : 21/07/2006

Menu pour un arpg Empty
MessageSujet: Re: Menu pour un arpg   Menu pour un arpg EmptyDim 20 Aoû - 16:20

Je ne dit rien pour le double post car tu ne pouvais pas métre tout
en méme temps , sinon le script est bien Smile .
Revenir en haut Aller en bas
http://jeux-rpg-maker.bb-fr.com
Contenu sponsorisé





Menu pour un arpg Empty
MessageSujet: Re: Menu pour un arpg   Menu pour un arpg Empty

Revenir en haut Aller en bas
 
Menu pour un arpg
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Menu ff avec materia php et bestiaire

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
 :: Les Jeux amateurs :: Script-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser