RPG Creator : créez votre MMORPG ou RPG sans aucune connaissance en programmation


Disponible le 4 Juin !




- Jouez à votre jeu sur tablettes tactiles, Smartphones et navigateurs Web
- Personnalisez vos menus
- Dessinez facilement et rapidement vos cartes
- Créez des actions pour le combat A-RPG


www.rpgcreator.net


Heures au format UTC + 1 heure [ Heure d’été ]


Règles du forum


Consultez la liste des Scripts : cliquez ici



Publier un nouveau sujet Répondre au sujet  [ 2 messages ] 
Auteur Message
 Sujet du message: Menu Option Plus V 1.5 [By Adurna]
MessagePublié: 25 Sep 2010, 13:12 
Villageois (Nv 1)
Avatar de l’utilisateur

Inscrit le: 25 Sep 2010, 12:02
Messages: 11
Sexe: Masculin
Points d'aide: 28/60

Créations :

Voir ses créations

Menu Option Plus V 1.5


Auteur : Adurna
Version : 1.5
Date : 17/12/09
Description : Un menu différent de celui d'origine avec plus d'options!
Indications pour l'utilisation : Collez ce script au dessus de Main en le nommant : Scene_Menu.

Code: Tout sélectionner
#=================================================================#
# By Adurna                                                        12/12/09         
# maj:16/12/09
#                                          menu option plus version 1.5                                                        #
#=================================================================#

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
module Adurna


Obj = "Objet"
Comp = "Compétence"
Equip = "Equiper"
Stat = "Statut"
Sov = "Sauvegarder"
Char = "Charger"
Fin = "Quiter"

Or = "Or"
Location ="Location :"

Affiche_Icon=1
Icon_Or=147
Icon_Loc=153
Icon_Obj=144
Icon_Comp=128
Icon_Equip=32
Icon_Stat=118
Icon_Sov=176
Icon_Char=177
Icon_Fin=117

Menu_sw=1
Obj_sw=1
Comp_sw=1
Equip_sw=1
Stat_sw=1
Sov_sw=1
Char_sw=1
Fin_sw=1

end

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
  create_menu_background
    create_command_window
    @location_window = Window_location.new(0, 240)
    @status_window=0
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @location_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
  update_menu_background
    @command_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = [Adurna::Icon_Obj, Adurna::Obj]
    s2 = [Adurna::Icon_Comp, Adurna::Comp]
    s3 = [Adurna::Icon_Equip, Adurna::Equip]
    s4 = [Adurna::Icon_Stat, Adurna::Stat]
    s5 = [Adurna::Icon_Sov, Adurna::Sov]
    s6 = [Adurna::Icon_Char, Adurna::Char]
    s7=  [Adurna::Icon_Fin, Adurna::Fin]
  @command_window = Window_IconCommand.new(172, [s1, s2, s3, s4, s5, s6,s7])
    @command_window.index = @menu_index
   
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
    end
    if $game_system.save_disabled            # If save is forbidden
      @command_window.draw_item(4,false)    # Disable save
    end
    if Dir.glob('Save*.rvdata').size <=0
      @command_window.draw_item(5,false)
    end
if Adurna::Menu_sw != 1
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
      @command_window.draw_item(4,false)
      @command_window.draw_item(5,false)
      @command_window.draw_item(6,false)
end
   
if Adurna::Obj_sw != 1
      @command_window.draw_item(0, false)
end

if Adurna::Comp_sw != 1
      @command_window.draw_item(1, false)
end

if Adurna::Equip_sw != 1
      @command_window.draw_item(2, false)
end

if Adurna::Stat_sw != 1
      @command_window.draw_item(3, false)
end

if Adurna::Sov_sw != 1
      @command_window.draw_item(4, false)
end
   
if Adurna::Char_sw != 1
      @command_window.draw_item(5, false)
end

if Adurna::Fin_sw != 1
      @command_window.draw_item(6, false)
end


  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      elsif Dir.glob('Save*.rvdata').size <=0 and @command_window.index == 5
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        @status_window=Window_MenuStatus.new(160, 0)
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
        when 5
          $scene = Scene_File.new(false, false, false)
      when 6      # End Game
        $scene = Scene_End.new
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
def update_actor_selection
      @status_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
    @status_window.visible = false
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end








class Window_location < Window_Base
  def initialize(x, y)
    super(x, y, 300, (WLH*2) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    $maps = load_data("Data/MapInfos.rvdata")
    @map_id = $game_map.map_id
    @map_name = $maps[@map_id].name
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 128, 32, Adurna::Location)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -4+WLH, 128, 32, @map_name, 1)
    draw_icon(Adurna::Icon_Loc,0, WLH, true)
    self.contents.font.color = system_color
    self.contents.draw_text(125, -4, 128, 32, Adurna::Or,1)
    self.contents.font.color = normal_color
    self.contents.draw_text(125, -10+WLH, 140, 42, $game_party.gold, 1)
    draw_icon(Adurna::Icon_Or,235, WLH, true)
  end
end




class Window_IconCommand < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 7, spacing = 20)
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = commands
    @item_max = commands.size
    @column_max = column_max
    refresh
    self.index = 0
  end
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index,enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  def draw_item_name(index, x, y,enabled = true)
    draw_icon(index, x, y, enabled)
  end
end


Screen du rendu
:

Image


A vous de tester ;)
Bientôt la prochaine mise à jour!

Version ultérieure (0.5) :
Code: Tout sélectionner
#=================================================================#
#                      By Adurna                                                        12/02/09                                    #
#                                          menu option plus version 0.5                                                        #
#=================================================================#

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
  create_menu_background
    create_command_window
    @location_window = Window_location.new(0, 240)
    @status_window=0
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @location_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
  update_menu_background
    @command_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = "charger"
    s7= Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7])
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)    # Disable item
      @command_window.draw_item(1, false)    # Disable skill
      @command_window.draw_item(2, false)    # Disable equipment
      @command_window.draw_item(3, false)    # Disable status
    end
    if $game_system.save_disabled            # If save is forbidden
      @command_window.draw_item(4, false)    # Disable save
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        @status_window=Window_MenuStatus.new(160, 0)
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
        when 5
          $scene = Scene_File.new(false, false, false)
      when 6      # End Game
        $scene = Scene_End.new
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
def update_actor_selection
      @status_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
    @status_window.visible = false
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end








class Window_location < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 300, (WLH*2) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    $maps = load_data("Data/MapInfos.rvdata")
    @map_id = $game_map.map_id
    @currmap = $maps[@map_id].name
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 128, 32, "Location :")
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -4+WLH, 128, 32, @currmap, 1)
    self.contents.font.color = system_color
    self.contents.draw_text(125, -4, 128, 32, "Or :",1)
    self.contents.font.color = normal_color
    self.contents.draw_text(125, -10+WLH, 140, 42, $game_party.gold, 1)
  # self.contents.draw_text($game_party.gold, 4, 0, 120)
  #self.contents.draw_currency_value($game_party.gold, 4, 0, 120)
  end
end


Screen du rendu :
Image



Edit by Mist' : Remise en forme du premier post, enjoy!

_________________


28 PA donné(s) par Sh4k4 le 12 Octobre 2010
Raison : Pour les nombreux partages de script

Haut
 Profil  
 
 Sujet du message: Re: Menu Option Plus V 1.5 [By Adurna]
MessagePublié: 06 Oct 2010, 15:42 
Villageois (Nv 3)
Avatar de l’utilisateur

Inscrit le: 01 Aoû 2010, 22:18
Messages: 48
Sexe: Masculin
Points d'aide: 4/60

Créations :

Voir ses créations

Il n'y a pas d'image :/
Tu n'as pas bien héberger le screen.
Sinon le script ne fait que rajouter des choses en plus sur l'ancien menu ?

_________________
Mon projet magnifique
Nom: Senna Gaiden.
Avancement: Attendez.
Présentation: Pas encore
Forum: Aucun


Haut
 Profil  
 
Afficher les messages depuis:  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 2 messages ] 

Heures au format UTC + 1 heure [ Heure d’été ]


Qui est en ligne ?

Utilisateurs parcourant actuellement ce forum : Aucun utilisateur inscrit et 3 invités


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas insérer de pièces jointes dans ce forum

Rechercher pour:
Sauter vers:  
cron
RPG Creative Forum version 5 ; Tous droits réservés
phpBB Group (Traduit par Xaphos)
Optimisé pour une résolution 1024*728