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



Le Deal du moment : -21%
LEGO® Icons 10329 Les Plantes Miniatures, ...
Voir le deal
39.59 €

Partagez
 

 [Résolu] Incompatibilité entre les invocations et mon menu :

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Doddy
Citadin Lv.7
Citadin Lv.7
Doddy


Masculin Age : 37
Inscrit le : 12/02/2010
Messages : 204

[Résolu] Incompatibilité entre les invocations et mon menu : Empty
MessageSujet: [Résolu] Incompatibilité entre les invocations et mon menu :   [Résolu] Incompatibilité entre les invocations et mon menu : Icon_minitimeMar 16 Fév 2010 - 11:47

Bonjour, je pense que ceci ne demandera pas beaucoup d'effort à quelqu'un qui s'y connait un peut, moi j'ai beau cherché j'ai pas réussi.

Voici la partie du script d'invocation qui gère le menu :

Code:
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  Classe qui gère le menu
#==============================================================================
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Config_Invoc::Text_menu_invoc if $game_switches[Config_Invoc::Interrupteur_activation]
    s6 = Vocab::save
    s7 = Vocab::game_end
    decalage_invoc = $game_switches[Config_Invoc::Interrupteur_activation] ? 0 : 1
    @command_window = Window_Command.new(160,$game_switches[Config_Invoc::Interrupteur_activation] ?  [s1, s2, s3, s4, s5, s6,s7] : [s1, s2, s3, s4, s6,s7],
    column_max = 1, row_max = Config_Invoc::Affichage_max - decalage_invoc )
    @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
      @command_window.draw_item(4, false)  if $game_switches[Config_Invoc::Interrupteur_activation]  # Ne pas autoriser les invocations     
    end
    if $game_system.save_disabled            # If save is forbidden
      @command_window.draw_item( $game_switches[Config_Invoc::Interrupteur_activation] ? 5 : 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)
      save_index = $game_switches[Config_Invoc::Interrupteur_activation] ? 5 : 4
      if $game_party.members.size == 0 and @command_window.index < save_index
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == save_index
        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
        start_actor_selection
      when $game_switches[Config_Invoc::Interrupteur_activation]  ? 4 : 0
        $scene = Scene_Invoc.new
      when $game_switches[Config_Invoc::Interrupteur_activation] ? 5  : 4    # Save
        $scene = Scene_File.new(true, false, false)
      when $game_switches[Config_Invoc::Interrupteur_activation] ? 6 : 5      # End Game
        $scene = Scene_End.new
      end
    end
  end
end

#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  Gère le menu de sauvegarde
#==============================================================================
class Scene_File < Scene_Base
    #--------------------------------------------------------------------------
  # *Fait revenir l'index du menu à ca bon index
  #--------------------------------------------------------------------------
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new( $game_switches[Config_Invoc::Interrupteur_activation] ? 5 : 4)
    end
  end
end

#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
#  This class performs game end screen processing.
#==============================================================================
class Scene_End < Scene_Base
  #--------------------------------------------------------------------------
  # *Fait revenir l'index du menu à ca bon index
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Menu.new( $game_switches[Config_Invoc::Interrupteur_activation] ? 6 : 5)
  end
end

#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
#  Gère les fenêtres de commande
#==============================================================================
class Window_Command < Window_Selectable
  #--------------------------------------------------------------------------
  # * Correction d'un bug qui n'affichait pas les objets dépasant de la Window_Command
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    create_contents # A ajouter
    for i in 0...@item_max
      draw_item(i)
    end
  end
end


Et voici mon Menu :

Code:


class Scene_Menu < Scene_Base
  alias :last_choice :create_command_window
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    s7 = "Matéria"
    s8 = "Bestiaire"
    @command_window = Window_Command.new(160, [s1, s2, s3, s7, s4, s8, s5, s6])
    @command_window.index = @menu_index
  end
  #-----------------------------------------------------------------------------
  alias :update_last :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     
        $scene = Scene_Item.new
      when 1,2,3,4,5 
        start_actor_selection
      when 6   
        $scene = Scene_File.new(true, false, false)
      when 7     
        $scene = Scene_End.new
         
      end
    end
  end
  #-----------------------------------------------------------------------------
  alias :actor_last :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 1 
        $scene = Scene_Skill.new(@status_window.index)
      when 2 
        $scene = Scene_Equip.new(@status_window.index)
        when 3
          $scene = Scene_MateriaEquip.new(@status_window.index)
      when 4 
        $scene = Scene_Status.new(@status_window.index)
        when 5
          $scene = Scene_Catalogue.new (20)
      end
    end
  end
end

Donc mon Menu (même si c'est de la bidouille) il fonctionne, par contre je n'arrive pas à mélanger mon menu à celui du système d'invocation et j'aimerais garder mon bestiaire et mon système de matéria.

Alors si vous pouviez m'aider j'en serais ravis.

Merci.


Dernière édition par Doddy le Mer 17 Fév 2010 - 6:32, é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

[Résolu] Incompatibilité entre les invocations et mon menu : Empty
MessageSujet: Re: [Résolu] Incompatibilité entre les invocations et mon menu :   [Résolu] Incompatibilité entre les invocations et mon menu : Icon_minitimeMar 16 Fév 2010 - 12:38

Voila, j'ai tenté un petit bricolage, dis moi si ça te plait.

Code:
class Scene_Menu < Scene_Base
  alias :last_choice :create_command_window
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = "Matéria"
    s6 = "Bestiaire"
    s7 = "Invocations"
    s8 = Vocab::save
    s9 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9])
    @command_window.index = @menu_index
  end
  #-----------------------------------------------------------------------------
  alias :update_last :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   
        $scene = Scene_Item.new
      when 1,2,3,4,5
        start_actor_selection
      when 6   
        $scene = Scene_Invoc.new
      when 7 
        $scene = Scene_File.new(true, false, false)
      when 8   
        $scene = Scene_End.new
       
      end
    end
  end
  #-----------------------------------------------------------------------------
  alias :actor_last :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 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $scene = Scene_Equip.new(@status_window.index)
        when 3
          $scene = Scene_MateriaEquip.new(@status_window.index)
      when 4
        $scene = Scene_Status.new(@status_window.index)
        when 5
          $scene = Scene_Catalogue.new (20)
      end
    end
  end
end

#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  Gère le menu de sauvegarde
#==============================================================================
class Scene_File < Scene_Base
    #--------------------------------------------------------------------------
  # *Fait revenir l'index du menu à ca bon index
  #--------------------------------------------------------------------------
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(7)
    end
  end
end

#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
#  This class performs game end screen processing.
#==============================================================================
class Scene_End < Scene_Base
  #--------------------------------------------------------------------------
  # *Fait revenir l'index du menu à ca bon index
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Menu.new(8)
  end
end

#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
#  Gère les fenêtres de commande
#==============================================================================
class Window_Command < Window_Selectable
  #--------------------------------------------------------------------------
  # * Correction d'un bug qui n'affichait pas les objets dépasant de la Window_Command
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    create_contents # A ajouter
    for i in 0...@item_max
      draw_item(i)
    end
  end
end


Sinon tu le tiens d'où ton menu ?
Revenir en haut Aller en bas
Doddy
Citadin Lv.7
Citadin Lv.7
Doddy


Masculin Age : 37
Inscrit le : 12/02/2010
Messages : 204

[Résolu] Incompatibilité entre les invocations et mon menu : Empty
MessageSujet: Re: [Résolu] Incompatibilité entre les invocations et mon menu :   [Résolu] Incompatibilité entre les invocations et mon menu : Icon_minitimeMer 17 Fév 2010 - 6:31

C'est parfait, mon problème c'est que je cherchais à garder l'activation du menu d'invocation par interrupteur, alors qu'il suffisait tout simplement de l'ignorer (interrupteur) .
Du coup je me sens un peu stupide Embarassed

En tout cas merci la prochaine fois je ne ferais pas la même erreur.

Zangther a écrit:
Sinon tu le tiens d'où ton menu ?


Ayant totalement épluché le forum, je me suis aidé d'un tuto que j'ai trouvé dessus.

celui-ci : https://rpg-maker-vx.bbactif.com/tutoriels-de-script-f60/appeler-une-fenetre-depuis-le-menu-t751.htm

Encore merci.

Edit:
En fait je voulais garder l'activation par interrupteur alors j'ai retravaillé dessus et ca fonctionne parfaitement, encore merci c'est un peu grâce à toi je me suis appuyé sur ton script.

Le voici.

Code:

##==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  Classe qui gère le menu
#==============================================================================
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = "Matéria"
    s5 = Config_Invoc::Text_menu_invoc if $game_switches[Config_Invoc::Interrupteur_activation]
    s6 = Vocab::status
    s7 = "Bestiaire"
    s8 = Vocab::save
    s9 = Vocab::game_end
    decalage_invoc = $game_switches[Config_Invoc::Interrupteur_activation] ? 0 : 1
    @command_window = Window_Command.new(160,$game_switches[Config_Invoc::Interrupteur_activation] ?  [s1, s2, s3, s4, s5, s6, s7, s8, s9] : [s1, s2, s3, s4, s6, s7, s8, s9],
    column_max = 1, row_max = Config_Invoc::Affichage_max - decalage_invoc )
    @command_window.index = @menu_index
  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)
      save_index = $game_switches[Config_Invoc::Interrupteur_activation] ? 7 : 6
      if $game_party.members.size == 0 and @command_window.index < save_index
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == save_index
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1
        $scene = Scene_Skill.new
      when 2
        $scene = Scene_Equip.new
      when 3
        $scene = Scene_MateriaEquip.new
      when $game_switches[Config_Invoc::Interrupteur_activation]  ? 4 : 0
        $scene = Scene_Invoc.new
      when $game_switches[Config_Invoc::Interrupteur_activation]  ? 5 : 4
        $scene = Scene_Status.new
      when $game_switches[Config_Invoc::Interrupteur_activation]  ? 6 : 5
        $scene = Scene_Liste_Monstres.new
      when $game_switches[Config_Invoc::Interrupteur_activation] ? 7  : 6    # Save
        $scene = Scene_File.new(true, false, false)
      when $game_switches[Config_Invoc::Interrupteur_activation] ? 8 : 7      # End Game
        $scene = Scene_End.new
      end
    end
  end
end
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  Gère le menu de sauvegarde
#==============================================================================
class Scene_File < Scene_Base
    #--------------------------------------------------------------------------
  # *Fait revenir l'index du menu à ca bon index
  #--------------------------------------------------------------------------
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new( $game_switches[Config_Invoc::Interrupteur_activation] ? 7 : 6)
    end
  end
end

#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
#  This class performs game end screen processing.
#==============================================================================
class Scene_End < Scene_Base
  #--------------------------------------------------------------------------
  # *Fait revenir l'index du menu à ca bon index
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Menu.new( $game_switches[Config_Invoc::Interrupteur_activation] ? 8 : 7)
  end
end
Revenir en haut Aller en bas
Contenu sponsorisé




[Résolu] Incompatibilité entre les invocations et mon menu : Empty
MessageSujet: Re: [Résolu] Incompatibilité entre les invocations et mon menu :   [Résolu] Incompatibilité entre les invocations et mon menu : Icon_minitime

Revenir en haut Aller en bas
 

[Résolu] Incompatibilité entre les invocations et mon menu :

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

 Sujets similaires

-
» [Résolu] Incompatibilité entre le script de sauvegarde de Woratana et niveau des compétences de Gagay
» [Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script)
» [Résolu] Temps d'attente entre plusieurs actions
» [Résolu - Merci Sihn !] Incompatibilité entre deux scripts...
» [Résolu] Nombre de frames entre chaque image de character

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX :: Entraide :: Problèmes et Solutions :: Résolu-
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Forum gratuit