AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  ConnexionConnexion  



Le Deal du moment :
Pokémon EV06 : où acheter le Bundle Lot ...
Voir le deal

Partagez
 

 Un script de changement d'équipe

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
yamiriku
Poulet trizo Lv.3
Poulet trizo Lv.3
yamiriku


Inscrit le : 16/02/2010
Messages : 33

Un script de changement d'équipe Empty
MessageSujet: Un script de changement d'équipe   Un script de changement d'équipe Icon_minitimeDim 4 Juil 2010 - 11:51

Bonjour à tous, je sais qu'un script de formation existe déjà, mais dans mon RPG il y aura sans doute entre dix et quinze personnage donc il n'y a pas assez de place à l'écran pour les mettre tous avec le menu formation... Pour présenter un peu mon RPG, ce grand nombre de personnage est du au scénario.

En fait, l'histoire sera qu'il y a des gardiens répartir sur la planète. Beaucoup sont obtenu sans le vouloir tandis que les "méchant" du RPG eux les capturent pour détruire la planète.
Le scénario avec les gardiens est un peu inspiré de Final Fantasy VIII (Mon préféré pour tout dire, j'aimerais tant qu'on le remake XD) Le RPG s'appelle Heroes of Sky, une présentation sur le forum ainsi qu'une démo' ne devrait pas tardé, je dirais maximum la semaine prochaine.

Voici une petite base pour le menu et je vais faire un petit "schéma".

Un script de changement d'équipe Items_10

Voici le menu de base (et oui repris de Final Fantasy VIII x3)

Un script de changement d'équipe Menu_m10

Et voici le schéma.
1. Une flèche pour montré qu'il faudrait monté ce menu un peu plus vers le haut pour laissé de la place au n°6

2. Il s'agit simplement de mettre le nom du menu.

3. A la place de mettre G-Force, mettre personnages.

4. Le nom du personnage lorsqu'on passe dessus. (Pas obligatoire mais ce serait plus propre...)

5. Les faces des personnages en "retrait".

6. Là, serait le menu ou est l'équipe actuel.

Pour une navigation simple, il suffirait simplement d'appuyé sur le bouton enter sur un personnage en retrait et ensuite choisir le personnage ou une case vide à remplacé et ré-appuyé sur enter pour effectué le changement.

Si vous désirez plus d'information dites le moi !

Merci, Riku


Dernière édition par yamiriku le Dim 4 Juil 2010 - 12:19, édité 1 fois
Revenir en haut Aller en bas
Zangther
Maître des Duels
Maître des Duels
Zangther


Masculin Age : 31
Inscrit le : 29/07/2009
Messages : 7840

Un script de changement d'équipe Empty
MessageSujet: Re: Un script de changement d'équipe   Un script de changement d'équipe Icon_minitimeDim 4 Juil 2010 - 11:53

T'as le PHS qui resemble a ce que tu veux.
Revenir en haut Aller en bas
yamiriku
Poulet trizo Lv.3
Poulet trizo Lv.3
yamiriku


Inscrit le : 16/02/2010
Messages : 33

Un script de changement d'équipe Empty
MessageSujet: Re: Un script de changement d'équipe   Un script de changement d'équipe Icon_minitimeDim 4 Juil 2010 - 13:01

J'avoue qu'il est bien, mais ce n'est pas compatible avec mon menu à la Final fantasy IX... Désolé je ne trouve plus ou je l'ai eu... J'ai regardé si il était sur le forum mais il n'y est pas û.U Quand je met le PHS, mon menu disparait et est remplacé par en autre et la quatrième face se coupe... Connaissez vous un bon menu qui serait compatible avec ?
Revenir en haut Aller en bas
BARVACHE
Vache Folle
Vache Folle
BARVACHE


Masculin Age : 29
Inscrit le : 22/05/2010
Messages : 3005

Un script de changement d'équipe Empty
MessageSujet: Re: Un script de changement d'équipe   Un script de changement d'équipe Icon_minitimeSam 17 Juil 2010 - 10:25

J'ai ça si tu veux. Je l'ai un peu traduit. C'est un menu customisable qui est déjà sur le forum. Je l'ai déjà configuré mais tu peux le modifier:
Code:
#===============================================================================
#
# Yanfly Engine RD - Scene Menu ReDux + KGC Custom Menu Command
# Last Date Updated: 2009.06.22
# Level: Normal, Hard, Lunatic
#
# This is more or less a revision of the menu scene. Included in the script are
# a couple of features. Note that I will NOT take credit for KGC's custom menu
# command script as all I did was merely import it into this script and finished
# up the excluded functions that he's left behind. Everything else I did add
# to the script.
#
# COMMAND CONTROL - by KGC
# Add, remove, and re-order commands akin to KGC's CustomMenuCommands. Akin to
# this feature will include what KGC's original script was missing and that was
# easy functionality to include custom menu commands without hassling the core
# script itself. Also added is the ability to launch common events from the
# main menu itself for those who wish to event unique commands.
#
# REDUX MENUS
# The redux menus are completely optional and are mostly nothing other than
# visual changes to the menu scene. You can add icons to the command window,
# display more than just gold on the main menu screen, and added experience
# bars to the party window.
#
#===============================================================================
# Updates:
# ----------------------------------------------------------------------------
# o 2009.06.22 - Fixed time calculation.
# o 2009.06.10 - Added Time, Steps, and Map Name to MultiVariable Window.
# o 2009.06.06 - Finished script.
# o 2009.06.05 - Started script.
#===============================================================================
# Instructions
#===============================================================================
#
# Note that the placement of this script is extremely important.
#
# 1. Place all of the non-KGC and non-Yanfly scripts that have new scenes above
#    this script. That way, they will not alter the menu.
# 2. Place all KGC and Yanfly scripts below this script to develop compatibility
#    amongst all of the scripts.
#
# Note that the special rules other scripts may use to disable their respective
# commands will not follow those rules. You'll have to mimic them through usage
# of switches. Make sure you understand how and when those scripts disable their
# own commands before toggling your switches.
#
# Scroll down to MENU_COMMANDS to add/remove/reorder your own menu commands.
# Adjust any of the ReDux menu options if desired.
#
#===============================================================================
#
# Compatibility
# - Works With: KGC scripts, Yanfly scripts, etc.
# - Alias: Game_Temp, initialize
# - Overwrites: Scene_Menu: anything regarding command window
# - Overwrites: Scene_Equip, Scene_Skill, and Scene_Status's return_scene
#
#===============================================================================
# Credits:
# All credits will go to KGC as I did not write the majority of this code.
# KGC for Custom Menu Command base coding and pretty much everything.
#===============================================================================

$imported = {} if $imported == nil
$imported["SceneMenuReDux"] = true

module YE
  module REDUX
    module MENU
     
      #-----------------------------------------------------------------------
      # BASIC MENU FUNCTIONS
      #-----------------------------------------------------------------------
     
      # Touche qui appelle le menu
      MENU_BUTTON = Input::B
     
      # Place où est le curseur  au départ. Le premier est 0
      START_INDEX = 0
     
      # Placer le menu commandes à droite ou à gauche:droite mettre true; gauche mettre false.
      RIGHT_SIDE_COMMAND = true
     
      #-----------------------------------------------------------------------
      # Instructions on how to set up the MENU_COMMANDS order.
      #------------------------------------------------------------------------
      # Ce tableau vous laissera determiner l'ordre des commandes( ligne 128)
      #Chaque commande est assignée à un nombre ce sont les nombres qui suivent
      #Commandes par défaut::
      #
      # 0..Objets  1..Compétences  2..Equipement  3..Statuts  4..Sauver  5..System
      #
      # Commandes menu KGC:(il faut  avoir les scripts correspondants pour les utiliser.
      #Chaque nombre correspond à une commande.)
      #
      # 10: Party .............. KGC_LargeParty #Pour avoir une plus grande équipe (PHS)
      # 11: View AP ............ KGC_EquipLearnSkill
      # 12: Skill Slots ........ KGC_SkillCPSystem
      # 13: Difficulty ......... KGC_BattleDifficulty
      # 14: Level Up ........... KGC_DistributeParameter
      # 15: Bestiary ........... KGC_MonsterGuide
      # 16: Outline ............ KGC_Outline
      #
      # Menu i pour les scripts de YanFly et ReDux
      #
      # 51: Change Class ....... Yanfly's Subclass Selection System
      # 52: Learn Skill ........ Yanfly's Subclass Selection System
      # 53: Skill Slots ........ Yanfly's Equip Skill Slots
      # 54: Bestiary ........... Yanfly's Bestiary + Display Scanned Enemy
      #
      # Pour les commandes de101 à 200, on peut mettre des evenements communs dans le menu(. Voir le hash ligne 163)
      #
      # From command 201 and onward, custom scripted scenes can be launched.
      # Already imported are a few rather popular scripts found throughout the
      # RPG Maker VX community.
      #
      # 201: Quest Journal ..... Modern Algebra's Quest Journal
      # 202: Factions .......... SojaBird's Factions
      # 203: Rows .............. originalwij's Row Changer
      # 204: Record Window ..... Stilleas' Record Window
      # 205: Crafting .......... Cmpsr2000's Crafting Scene
      #
      # If you wish to add your own commands, you'll need to register them
      # under the lunatic mode portion of the script.
      #-----------------------------------------------------------------------
#      Choisir les nombres correspondants aux commandes et les mettre:
      MENU_COMMANDS =[ # Lire les instructions plus haut avant d'entammer ceci.
      0, # Items
        1, # Skills
        2, # Equipment
        3, # Status
      15, # Bestiary
        10,#LargeParty
      101, # Common-Event 9
      102, # Common-Event 10
        4, # Save
        5, # System
     
      ] # Do not remove this
     
      # Nombre maximum de commandes
      MAX_ROWS = 10
     
      #-----------------------------------------------------------------------
      # Comment utiliser: Lunatic Mode - Menu Command - Common Events
      #-----------------------------------------------------------------------
      # Mettre des evenements communs dans le menu
      # Quand un evenement commun est utilisé de la sorte vous êtes renvoyé à l'ecran de la map
      # et l'evenement commun se déclenche. Les IDs de commandes sont de 101 à 200
      # Here is what each of the categories mean:
      #
      # HideSw - Switch used to hide the command. Mettre nil si ce n'est pas utilisé
      # DisbSw - Switch used to disable the command. Mettre nil si ce n'est pas utilisé
      # Debug? - Apparaît seulement en test de jeu.(mettre false si non et true si oui.
      # CEvent - L'ID de l'envenement commun dans la base de données
      # Title  - Le nom de la commande qui apparaîtera dans le menu
      #
      # Inserer comme dans l'exemple:
      #-----------------------------------------------------------------------
      COMMON_EVENTS ={ # Commandes de101 à 199.
      #EXEMPLE:    -ID => [HideSw, DisbSw, Debug?, CEvent, Title Name]
        101 => [  nil,    nil,  true,      29, "Bestiaire"],
        102 => [  nil,    nil,  false,    30, "Se reposer"],
      } # Ne pas retirer  ce hash
     
      #-----------------------------------------------------------------------
      # How to Use: Lunatic Mode - Menu Command - Imported scripts
      #-----------------------------------------------------------------------
      # The following is what KGC originally was going to have in his script
      # but was actually missing it in his publicized script. This will regain
      # functionality and also lift the "limit" of only 100 extra commands.
      # The following will explain how to set up the individual options.
      #
      # HideSw - Cacher la commande. Mettre nil si pas utilisé.(je suis pas sur ^^)
      # DisbSw - Switch used to disable the command. Set to nil if not used.
      # Actor? - Does this select an actor. Set to true if it does.
      # Title  - The title text that appears for the event.
      # Scene  - The scene used to launch the respective scene.
      #
      # Note that this does not automatically detect what will and will not
      # disable the command ingame. You must understand and create a work
      # around with them (if they do disable the commands) with switches.
      # After binding your imported commands, go back to MENU_COMMANDS and
      # insert the proper command ID at the proper location.
      #-----------------------------------------------------------------------
      IMPORTED_COMMANDS ={ # These can only be from 201 onward.
      # -ID => [HideSw, DisbSw, Actor?, Title Name, Scene Name.new]
        201 => [    8,      9,  false,  "Quests", "Scene_Quest"],
        202 => [    10,    11,  false, "Factions", "Scene_Factions"],
        203 => [  nil,    nil,  false,    "Rows", "Scene_Row"],
        204 => [  nil,    nil,  false,  "Records", "Scene_Record"],
        205 => [  nil,    nil,  false, "Crafting", "Scene_Crafting"],
      } # Do not remove this.
     
      #-----------------------------------------------------------------------
      # REDUX MENU FUNCTIONS
      #-----------------------------------------------------------------------
     
      # Utiliser les icones de l'iconset:
      #true:utiliser
      #false: ne pas utiliser
      COMMAND_ICONS = true
     
     
      # Match the ingame command names with the icons. The reason this isn't
      # implemented together with the index numbers is because this can allow
      # for varying icons dependent on the command name (such as difficulty).
      ICON_SETS ={ # "Unlisted" doit être laissé pour les commandequi n'ont pas d'icones (par défaut).
        "Unlisted"      => 176,
      # -----Vocab----- => Icon
        "Bestiaire"      => 141,
        "Se reposer"          => 117,
        "Class Change"  => 131,
        "Equiper"        => 44,
        "Objets"          => 144,
        "Learn Skills"  => 133,
        "Quests"        => 193,
        "Sauvegarder"          => 149,
        "Quitter"      => 143,
        "Slots"        => 103,
        "Compétences"        => 159,
        "Statut"        => 137,
        "System"        => 134,
        "LargeParty"  =>149,
      } # Ne pas effacer

     
      # This part will trigger usage of the "new" party status window. Set it
      # to false if you do not wish to use it. The "new" status window simply
      # adds the experience bar to the menu and raises the coordinates of the
      # various status items by a little bit.
      USE_REDUX_STATUS = true
     
      # This part will adjust the font size for the text shown in the Redux
      # Status Menu. Affects all text.
      REDUX_FONT_SIZE = 20
     
      # Choisir si dans le menu on met: chara du(des) heros, face du(des) heros ou les deux
      DRAWN_ACTOR_SETUP = 2      # 0 - Face seulement, 1 - Chara seulement, 2 - Les deux
      SPRITE_OFFSET = 32        # Sets the y offset for actor sprites
      FACE_OPACITY  = 128        # Sets the face opacity for setting 2
     
      # The following adjusts the EXP bar. Fill out the info properly.
      EXP_TEXT      = "EXP"      # Text used for EXP
      PERCENT_EXP  = "%#.04g%%" # Text format used for EXP percentage
      EXP_GAUGE_1  = 28        # Colour 1 for the EXP Gauge
      EXP_GAUGE_2  = 29        # Colour 2 for the EXP Gauge
     
      # Montrer des variables
      USE_MULTI_VARIABLE_WINDOW = true
      #Montrer des variables dans une fenètre en bas à gauche
      # Les varaibles doivent être dans l'ordre. Mettre 0 pour l'argent. Modifier le hash ligne 257 pour
      #changer ces variables
      VARIABLES_SHOWN = [-5, -1, -2, 0, ]
      VARIABLES_ICONS = true#pour mettre des icones aux variables
      VARIABLES_HASH  ={ # Note that value zero must exist.
      # VarID => [Icon, Text]
          -5 => [ 153, "Map"],
          -2 => [  48, "Steps"],
          -1 => [ 188, "Time"],
            0 => [ 205, "Gold"],
      }# Do not remove this.
     
    end
  end
end

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

#===============================================================================
# Scene_Menu
#===============================================================================

class Scene_Menu < Scene_Base
 
  #--------------------------------------------------------------------------
  # create_command_list
  #--------------------------------------------------------------------------
  def create_command_list
    commands = []
    @ex_cmds = {}
    index_list = {}
    YE::REDUX::MENU::MENU_COMMANDS.each_with_index { |c, i|
      case c
      when 0 # Items
        index_list[:item] = commands.size
        commands.push(Vocab.item)
       
      when 1 # Skills
        index_list[:skill] = commands.size
        commands.push(Vocab.skill)
       
      when 2 # Equip
        index_list[:equip] = commands.size
        commands.push(Vocab.equip)
       
      when 3 # Status
        index_list[:status] = commands.size
        commands.push(Vocab.status)
       
      when 4 # Save
        index_list[:save] = commands.size
        commands.push(Vocab.save)
       
      when 5 # System
        index_list[:game_end] = commands.size
        commands.push(Vocab.game_end)
       
      when 10 # KGC's Large Party
        next unless $imported["LargeParty"]
        index_list[:partyform] = commands.size
        @__command_partyform_index = commands.size
        commands.push(Vocab.partyform)
       
      when 11 # KGC's AP Viewer
        next unless $imported["EquipLearnSkill"]
        index_list[:ap_viewer] = commands.size
        @__command_ap_viewer_index = commands.size
        commands.push(Vocab.ap_viewer)
       
      when 12 # KGC's CP Skill System
        next unless $imported["SkillCPSystem"]
        index_list[:set_battle_skill] = commands.size
        @__command_set_battle_skill_index = commands.size
        commands.push(Vocab.set_battle_skill)
       
      when 13 # KGC's Battle Difficulty
        next unless $imported["BattleDifficulty"]
        index_list[:set_difficulty] = commands.size
        @__command_set_difficulty_index = commands.size
        commands.push(KGC::BattleDifficulty.get[:name])
       
      when 14 # KGC's Distribute Parameter
        next unless $imported["DistributeParameter"]
        index_list[:distribute_parameter] = commands.size
        @__command_distribute_parameter_index = commands.size
        commands.push(Vocab.distribute_parameter)
       
      when 15 # KGC's Enemy Guide
        next unless $imported["EnemyGuide"]
        index_list[:enemy_guide] = commands.size
        @__command_enemy_guide_index = commands.size
        commands.push(Vocab.enemy_guide)
       
      when 16 # KGC's Outline
        next unless $imported["Outline"]
        index_list[:outline] = commands.size
        @__command_outline_index = commands.size
        commands.push(Vocab.outline)
       
      when 51 # Yanfly Subclass Class Change
        next unless $imported["SubclassSelectionSystem"]
        next unless YE::SUBCLASS::MENU_CLASS_CHANGE_OPTION
        next unless $game_switches[YE::SUBCLASS::ENABLE_CLASS_CHANGE_SWITCH]
        index_list[:classchange] = commands.size
        @command_class_change = commands.size
        commands.push(YE::SUBCLASS::MENU_CLASS_CHANGE_TITLE)

      when 52 # Yanfly Subclass Learn Skill
        next unless $imported["SubclassSelectionSystem"]
        next unless YE::SUBCLASS::USE_JP_SYSTEM and
        YE::SUBCLASS::LEARN_SKILL_OPTION
        next unless $game_switches[YE::SUBCLASS::ENABLE_LEARN_SKILLS_SWITCH]
        index_list[:learnskill] = commands.size
        @command_learn_skill = commands.size
        commands.push(YE::SUBCLASS::LEARN_SKILL_TITLE)
       
      when 53 # Yanfly Equip Skill System
        next unless $imported["EquipSkillSlots"]
        next unless $game_switches[YE::EQUIPSKILL::ENABLE_SLOTS_SWITCH]
        index_list[:equipskill] = commands.size
        @command_equip_skill = commands.size
        commands.push(YE::EQUIPSKILL::MENU_TITLE)
       
      when 54  # Yanfly Bestiary
        next unless $imported["DisplayScannedEnemy"]
        next unless $game_switches[YE::MENU::MONSTER::BESTIARY_SWITCH]
        index_list[:bestiary] = commands.size
        @command_bestiary = commands.size
        commands.push(YE::MENU::MONSTER::BESTIARY_TITLE)
       
      when 101..200
        next unless YE::REDUX::MENU::COMMON_EVENTS.include?(c)
        common_event = YE::REDUX::MENU::COMMON_EVENTS[c]
        next if !$TEST and common_event[2]
        next if common_event[0] != nil and $game_switches[common_event[0]]
        index_list[c] = commands.size
        @ex_cmds[c] = commands.size
        commands.push(common_event[4])
       
      else
        next unless YE::REDUX::MENU::IMPORTED_COMMANDS.include?(c)
        command_array = YE::REDUX::MENU::IMPORTED_COMMANDS[c]
        next if command_array[0] != nil and $game_switches[command_array[0]]
        index_list[c] = commands.size
        @ex_cmds[c] = commands.size
        commands.push(command_array[3])
       
      end
    } # Do not remove this.
    $game_temp.menu_command_index = index_list
    return commands
  end
 
  #--------------------------------------------------------------------------
  # set_command_enabled
  #--------------------------------------------------------------------------
  def set_command_enabled
    disable_items = []
    @disabled_command_index = []
    # If zero party members are present
    if $game_party.members.size == 0
      disable_items.push(:item, :skill, :equip, :status, :partyform,
      :ap_viewer, :set_battle_skill, :distribute_parameter, :classchange,
      :learnskill, :equipskill)
    end
    # If saving has been disabled
    if $game_system.save_disabled
      disable_items.push(:save)
    end
    # If party changing is disabled
    if $imported["LargeParty"] and !$game_party.partyform_enable?
      disable_items.push(:partyform)
    end
    for key in YE::REDUX::MENU::COMMON_EVENTS
      next unless $game_temp.menu_command_index.has_key?(key[0])
      next if key[1][1] == nil
      disable_items.push(key[0]) if $game_switches[key[1][1]]
    end
    for key in YE::REDUX::MENU::IMPORTED_COMMANDS
      next unless $game_temp.menu_command_index.has_key?(key[0])
      next if key[1][1] == nil
      disable_items.push(key[0]) if $game_switches[key[1][1]]
    end
    # Disable each of the items.
    disable_items.each { |i|
      if $game_temp.menu_command_index.has_key?(i)
        index = $game_temp.menu_command_index[i]
        @command_window.draw_item(index, false)
        @disabled_command_index.push(index)
      end
    }
  end
 
  #--------------------------------------------------------------------------
  # overwrite update_command_selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      index = @command_window.index
      unless command_enabled?(index)
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case index
      # Item Command
      when $game_temp.menu_command_index[:item]
        $scene = Scene_Item.new
      # Skill, Equip, and Status Commands
      when $game_temp.menu_command_index[:skill],
      $game_temp.menu_command_index[:equip],
      $game_temp.menu_command_index[:status]
        start_actor_selection
      # Save Command
      when $game_temp.menu_command_index[:save]
        $scene = Scene_File.new(true, false, false)
      # System Command
      when $game_temp.menu_command_index[:game_end]
        $scene = Scene_End.new
      else # Custom Commands
        return_check = true
        for key in @ex_cmds
          if @ex_cmds[key[0]] == index
            return_check = false
            found_key = key[0]
            break
          end
        end
        return if return_check
        if found_key >= 101 and found_key <= 200 # Play a common event
          common_event = YE::REDUX::MENU::COMMON_EVENTS[found_key]
          $game_temp.common_event_id = common_event[3]
          $scene = Scene_Map.new
        else # Play an imported scene
          menu_command = YE::REDUX::MENU::IMPORTED_COMMANDS[found_key]
          if menu_command[2]
            start_actor_selection
          else
            $scene = eval(menu_command[4] + ".new")
          end
        end # End found_key
      end # End case check
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite update_actor_selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when $game_temp.menu_command_index[:skill] # Skill Command
        $scene = Scene_Skill.new(@status_window.index)
      when $game_temp.menu_command_index[:equip] # Equip Command
        $scene = Scene_Equip.new(@status_window.index)
      when $game_temp.menu_command_index[:status] # Status Command
        $scene = Scene_Status.new(@status_window.index)
      else # Custom Commands
        return_check = true
        for key in @ex_cmds
          if @ex_cmds[key[0]] == @command_window.index
            return_check = false
            found_key = key[0]
            break
          end
        end
        return if return_check
        menu_command = YE::REDUX::MENU::IMPORTED_COMMANDS[found_key]
        $scene = eval(menu_command[4] + ".new(@status_window.index)")
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # command_enabled?
  #--------------------------------------------------------------------------
  def command_enabled?(index)
    if $game_system.save_disabled and
    index == $game_temp.menu_command_index[:save]
      return false
    end
    if $game_party.members.size == 0 and
    @disabled_command_index.include?(index)
      return false
    end
    for key in @ex_cmds
      if @ex_cmds[key[0]] == index
        return false if @disabled_command_index.include?(index)
      end
    end
    return true
  end
 
  #--------------------------------------------------------------------------
  # overwrite initialize
  #--------------------------------------------------------------------------
  def initialize(menu_index = YE::REDUX::MENU::START_INDEX)
    @menu_index = menu_index
  end
 
  #--------------------------------------------------------------------------
  # alias start
  #--------------------------------------------------------------------------
  alias start_menurd start unless $@
  def start
    start_menurd
    if YE::REDUX::MENU::USE_REDUX_STATUS
      @status_window.dispose
      @status_window = Window_ReDuxMenuStatus.new(160, 0)
    end
    if YE::REDUX::MENU::USE_MULTI_VARIABLE_WINDOW
      @gold_window.dispose
      @gold_window = Window_MultiVariableWindow.new
    end
    if YE::REDUX::MENU::RIGHT_SIDE_COMMAND
      @status_window.x = 0
      @command_window.x = Graphics.width - 160
      @gold_window.x = Graphics.width - 160
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite create_command_window
  #--------------------------------------------------------------------------
  def create_command_window
    commands = create_command_list
    if YE::REDUX::MENU::COMMAND_ICONS
      @command_window = Window_MenuCommand.new(160, commands)
    else
      @command_window = Window_Command.new(160, commands)
    end
    @command_window.height = [@command_window.height,
      YE::REDUX::MENU::MAX_ROWS * 24 + 32].min
    @command_window.index = [@menu_index, commands.size - 1].min
    set_command_enabled
  end
 
end # Scene_Menu

#===============================================================================
# Scene_Map
#===============================================================================

class Scene_Map < Scene_Base

  #--------------------------------------------------------------------------
  # overwrite update_call_menu
  #--------------------------------------------------------------------------
  def update_call_menu
    if Input.trigger?(YE::REDUX::MENU::MENU_BUTTON)
      return if $game_map.interpreter.running?
      return if $game_system.menu_disabled
      $game_temp.menu_beep = true
      $game_temp.next_scene = "menu"
    end
  end
 
end # Scene_Map

#==============================================================================
# Imported from KGC's Custom Menu Command
# to improve compatibility amongst KGC scripts
#==============================================================================
$imported["CustomMenuCommand"] = true
class Game_Temp
  attr_accessor :menu_command_index
  attr_accessor :next_scene_actor_index
 
  alias initialize_KGC_CustomMenuCommand initialize unless $@
  def initialize
    initialize_KGC_CustomMenuCommand

    @menu_command_index = {}
    @next_scene_actor_index = 0
  end
end

module KGC
module Commands
  module_function
  def call_item
    return if $game_temp.in_battle
    $game_temp.next_scene = :menu_item
    $game_temp.next_scene_actor_index = 0
    $game_temp.menu_command_index = {}
  end
  def call_skill(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :menu_skill
    $game_temp.next_scene_actor_index = actor_index
    $game_temp.menu_command_index = {}
  end
  def call_equip(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :menu_equip
    $game_temp.next_scene_actor_index = actor_index
    $game_temp.menu_command_index = {}
  end
  def call_status(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :menu_status
    $game_temp.next_scene_actor_index = actor_index
    $game_temp.menu_command_index = {}
  end
end
end

class Game_Interpreter
  include KGC::Commands
end

class Scene_Map < Scene_Base
  alias update_scene_change_KGC_CustomMenuCommand update_scene_change unless $@
  def update_scene_change
    return if $game_player.moving?
    case $game_temp.next_scene
    when :menu_item
      call_menu_item
    when :menu_skill
      call_menu_skill
    when :menu_equip
      call_menu_equip
    when :menu_status
      call_menu_status
    else
      update_scene_change_KGC_CustomMenuCommand
    end
  end
  def call_menu_item
    $game_temp.next_scene = nil
    $scene = Scene_Item.new
  end
  def call_menu_skill
    $game_temp.next_scene = nil
    $scene = Scene_Skill.new($game_temp.next_scene_actor_index)
    $game_temp.next_scene_actor_index = 0
  end
  def call_menu_equip
    $game_temp.next_scene = nil
    $scene = Scene_Equip.new($game_temp.next_scene_actor_index)
    $game_temp.next_scene_actor_index = 0
  end
  def call_menu_status
    $game_temp.next_scene = nil
    $scene = Scene_Status.new($game_temp.next_scene_actor_index)
    $game_temp.next_scene_actor_index = 0
  end
end

class Scene_Item < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:item)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:item])
    else
      $scene = Scene_Map.new
    end
  end
end

unless $imported["SceneSkillReDux"]
class Scene_Skill < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:skill)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:skill])
    else
      $scene = Scene_Map.new
    end
  end
end
end

unless $imported["SceneEquipReDux"]
class Scene_Equip < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:equip)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:equip])
    else
      $scene = Scene_Map.new
    end
  end
end
end

unless $imported["SceneStatusReDux"]
class Scene_Status < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:status)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:status])
    else
      $scene = Scene_Map.new
    end
  end
end
end

class Scene_File < Scene_Base
  alias return_scene_KGC_CustomMenuCommand return_scene unless $@
  def return_scene
    if @from_title || @from_event
      return_scene_KGC_CustomMenuCommand
    elsif $game_temp.menu_command_index.has_key?(:save)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:save])
    else
      $scene = Scene_Map.new
    end
  end
end

class Scene_End < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:game_end)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:game_end])
    else
      $scene = Scene_Map.new
    end
  end
end

#===============================================================================
# Game_Map
#===============================================================================

class Game_Map
 
  #--------------------------------------------------------------------------
  # map name
  #--------------------------------------------------------------------------
  unless method_defined?(:map_name)
  def map_name
    data = load_data("Data/MapInfos.rvdata")
    text = data[@map_id].name.gsub(/\[.*\]/) { "" }
    return text
  end
  end
 
end # Game_Map

#===============================================================================
# Game_Actor
#===============================================================================

class Game_Actor < Game_Battler
 
  #--------------------------------------------------------------------------
  # Now Exp - The experience gained for the current level.
  #--------------------------------------------------------------------------
  def now_exp
    return @exp - @exp_list[@level]
  end
 
  #--------------------------------------------------------------------------
  # Next Exp - The experience needed for the next level.
  #--------------------------------------------------------------------------
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
 
end # Game_Actor

#===============================================================================
# Window_MenuCommand
#===============================================================================

class Window_MenuCommand < Window_Command
 
  #--------------------------------------------------------------------------
  # draw_item
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    dx = rect.x
    dy = rect.y
    dw = rect.width
    dh = rect.height
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    if YE::REDUX::MENU::ICON_SETS.include?(@commands[index])
      icon = YE::REDUX::MENU::ICON_SETS[@commands[index]]
    else
      icon = YE::REDUX::MENU::ICON_SETS["Unlisted"]
    end
    draw_icon(icon, dx, dy, enabled)
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(dx+24, dy, dw-24, dh, @commands[index])
  end
 
end # Window_MenuCommand

#===============================================================================
# Window_ReDuxMenuStatus
#===============================================================================

class Window_ReDuxMenuStatus < Window_MenuStatus
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    @item_max = $game_party.members.size
    create_contents
    fill_stand_by_background if $imported["LargeParty"]
    for actor in $game_party.members
      draw_rd_menu_actor(actor)
      x = 104
      y = actor.index * 96
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 120, y)
      draw_actor_level(actor, x, y + WLH * 1)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x + 120, y + WLH * 1, 120)
      draw_actor_mp(actor, x + 120, y + WLH * 2, 120)
      draw_rd_menu_exp(actor, x + 120, y + WLH * 3, 120)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_rd_menu_actor
  #--------------------------------------------------------------------------
  def draw_rd_menu_actor(actor)
    case YE::REDUX::MENU::DRAWN_ACTOR_SETUP
    when 0
      draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
    when 1
      offset = YE::REDUX::MENU::SPRITE_OFFSET
      draw_actor_graphic(actor, 49, (actor.index + 1) * 96 - offset)
    when 2
      offset = YE::REDUX::MENU::SPRITE_OFFSET
      opacity = YE::REDUX::MENU::FACE_OPACITY
      face_name = actor.face_name
      face_index = actor.face_index
      bitmap = Cache.face(face_name)
      rect = Rect.new(0, 0, 0, 0)
      rect.x = face_index % 4 * 96 + 4 / 2
      rect.y = face_index / 4 * 96 + 4 / 2
      rect.width = 92
      rect.height = 92
      self.contents.blt(2, actor.index * 96 + 2, bitmap, rect, opacity)
      bitmap.dispose
      draw_actor_graphic(actor, 49, (actor.index + 1) * 96 - offset)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_rd_menu_exp
  #--------------------------------------------------------------------------
  def draw_rd_menu_exp(actor, x, y, size = 120)
    if actor.next_exp != 0
      gw = size * actor.now_exp
      gw /= actor.next_exp
    else
      gw = size
    end
    gc1 = text_color(YE::REDUX::MENU::EXP_GAUGE_1)
    gc2 = text_color(YE::REDUX::MENU::EXP_GAUGE_2)
    self.contents.fill_rect(x, y + WLH - 8, size, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
   
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 40, WLH, YE::REDUX::MENU::EXP_TEXT)
    self.contents.font.color = normal_color
    if actor.next_exp != 0
      expercent = actor.now_exp * 100.000
      expercent /= actor.next_exp
    else
      expercent = 100.000
    end
    expercent = 100.000 if expercent > 100.000
    text = sprintf(YE::REDUX::MENU::PERCENT_EXP, expercent)
    self.contents.draw_text(x, y, size, WLH, text, 2)
  end
 
end # Window_ReDuxMenuStatus

#===============================================================================
# Window_MultiVariableWindow
#===============================================================================

class Window_MultiVariableWindow < Window_Selectable
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize
    dh = 32 + 24 * YE::REDUX::MENU::VARIABLES_SHOWN.size
    dy = Graphics.height - dh
    super(0, dy, 160, dh)
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    @data = []
    for i in YE::REDUX::MENU::VARIABLES_SHOWN
      next unless YE::REDUX::MENU::VARIABLES_HASH.include?(i)
      @time_index = @data.size if i == -1
      @data.push(i)
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    sw = self.width - 32
    dy = WLH * index
    self.contents.clear_rect(rect)
    i = @data[index]
    case i
    when -5 # Draw Map Name
      self.contents.draw_text(0, dy, sw, WLH, $game_map.map_name, 1)
     
    when -2 # Draw Steps
      if YE::REDUX::MENU::VARIABLES_ICONS
        text = $game_party.steps
        self.contents.draw_text(0, dy, sw-24, WLH, text, 2)
        draw_icon(YE::REDUX::MENU::VARIABLES_HASH[-2][0], sw-24, dy)
      else
        text = YE::REDUX::MENU::VARIABLES_HASH[-2][1]
        value = $game_party.steps
        cx = contents.text_size(text).width
        self.contents.font.color = normal_color
        self.contents.draw_text(0, dy, sw-cx-2, WLH, value, 2)
        self.contents.font.color = system_color
        self.contents.draw_text(0, dy, sw, WLH, text, 2)
      end
     
    when -1 # Draw Time
      if YE::REDUX::MENU::VARIABLES_ICONS
        text = game_time
        self.contents.draw_text(0, dy, sw-24, WLH, text, 2)
        draw_icon(YE::REDUX::MENU::VARIABLES_HASH[-1][0], sw-24, dy)
      else
        self.contents.font.color = normal_color
        text = game_time
        self.contents.draw_text(0, dy, sw, WLH, text, 1)
      end
     
    when 0 # Draw Gold
      if YE::REDUX::MENU::VARIABLES_ICONS
        text = $game_party.gold
        self.contents.draw_text(0, dy, sw-24, WLH, text, 2)
        draw_icon(YE::REDUX::MENU::VARIABLES_HASH[0][0], sw-24, dy)
      else
        draw_currency_value($game_party.gold, 4, dy, 120)
      end
     
    else # Draw Variables
      if YE::REDUX::MENU::VARIABLES_ICONS
        text = $game_variables[i]
        self.contents.draw_text(0, dy, sw-24, WLH, text, 2)
        draw_icon(YE::REDUX::MENU::VARIABLES_HASH[i][0], sw-24, dy)
      else
        text = YE::REDUX::MENU::VARIABLES_HASH[i][1]
        value = $game_variables[i]
        cx = contents.text_size(text).width
        self.contents.font.color = normal_color
        self.contents.draw_text(0, dy, sw-cx-2, WLH, value, 2)
        self.contents.font.color = system_color
        self.contents.draw_text(0, dy, sw, WLH, text, 2)
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # game_time
  #--------------------------------------------------------------------------
  def game_time
    @gametime = Graphics.frame_count / Graphics.frame_rate
    hours = @gametime / 3600
    minutes = @gametime / 60 % 60
    seconds = @gametime % 60
    result = sprintf("%d:%02d:%02d", hours, minutes, seconds)
    return result
  end
 
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  if YE::REDUX::MENU::VARIABLES_SHOWN.include?(-1)
  def update
    if @gametime != (Graphics.frame_count / Graphics.frame_rate)
      draw_item(@time_index)
    end
  end
  end
 
end # Window_MultiVariableWindow

#===============================================================================
#
# END OF FILE
#
#===============================================================================
Bon making^^
Revenir en haut Aller en bas
Contenu sponsorisé




Un script de changement d'équipe Empty
MessageSujet: Re: Un script de changement d'équipe   Un script de changement d'équipe Icon_minitime

Revenir en haut Aller en bas
 

Un script de changement d'équipe

Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

 Sujets similaires

-
» script changement de menu
» problème du a un changement de script (résolus)
» Script, changement de perso! [RÉSOLUE]
» [Vx] Recherche un Script de changement de personnage
» Demande de script "menu changement de partenaire" pour avoir plus de 4 perso dans l'histoire

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX :: Entraide :: Scripts :: Requêtes :: Archives-
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Forum gratuit