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



Le deal à ne pas rater :
Funko POP! Jumbo One Piece Kaido Dragon Form : où l’acheter ?
Voir le deal

Partagez
 

 Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Sylfurion
Mage Lv.11
Mage Lv.11
Sylfurion


Masculin Age : 27
Inscrit le : 02/03/2009
Messages : 513

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 28 Juil 2009 - 10:31

Bonjour Bonjour

Je chercherais le moyen de rajouter un onglet pendant un combat, c'est à dire, au lieu d'avoir :

Attaque
Compétences
Défense
Objets

je voudrais :

Attaque
Compétences
Zaïn ( voir plus bas pour plus d'info )
Défense
Objets

Voila, donc si on pourrait faire ceci sa serait cool,

Mais ! Je n'ai pas fini !

Grace a un script de limitbreak de DerVVulfman, je voudrais que la compétences de LimitBreak soit dans l'onglet Zaïn ( mon nom de LimitBreak, si vous pouvez me conseiller mieux ... ^^ )

Donc en fait, il faudrait ajouter un onglet comme dit tout en haut, et dans cette onglet, ouvrir un menu de compétences mais que avec les compétences de LimitBreak apprises

J'espère que vous avez compris

Merci d'avance

Mon projet : Symbols - I

Sylfurion

PS : est-ce qu'il existe un script de LimitBreak meilleur que celui de DerVVulfman ?
Revenir en haut Aller en bas
Raizen
Va-nu-pieds Lv.4
Va-nu-pieds Lv.4
Raizen


Masculin Age : 31
Inscrit le : 03/08/2009
Messages : 61

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 14:47

Tu me passer le script de Limit Break, je vais voir ce que je peux faire, mais je ne te promets rien.
Revenir en haut Aller en bas
Sylfurion
Mage Lv.11
Mage Lv.11
Sylfurion


Masculin Age : 27
Inscrit le : 02/03/2009
Messages : 513

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 14:53

Code:
#==============================================================================
# ** Limit Break VX (DVV's)
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 2.1
#    05-20-2008
#    RGSS2
#------------------------------------------------------------------------------
#
# INTRODUCTION:
#
#  This system is a revised & enhanced version of my Limit Break (DVV) script.
#  and the feature it performs should be apparent  to users new and old alike.
#  Limit Break VX disables skills  until the hero's limit break bar is filled.
#  And once the 'limit break' skill is used, the skill becomes disabled again.

#  Like before, the system has been designed 'menuless' by intent, and this is
#  to prevent any possible conflicts with any custom menu system.  As such, it
#  is ready for plug-n-play use.
#
#  The system, by itself, does not change the 'ATTACK' option  in the Actor's
#  command window either.  Instead, this system  enables/disables the skills
#  in the skill menu  for you to select.
#
#  Unlike its RPGMaker XP counterpart,  'Limit Break VX (DVV)'  does include a
#  bar drawing system of its own. It still includes the 'flexible' positioning
#  system as before  as well as its own ringer system.  For your convenience,
#  the bar color schemes are editable in the system's configuration system. If
#  you wish to create your own custom bars, please look towards replacing or
#  overwriting the 'draw_actor_lb' method in Game_Actor.
#
#------------------------------------------------------------------------------
#
#  Appel de scripts :
#
#  Pour changer les valeurs en jeu voila comment procéder. Je vais explique chacune d'elles en détail.
#
#
#  Limitbreak:
#    Pour contrôler la valeur de la limitbreak.
#
#    Exemples :  $game_party.members[6].limitbreak += 20
#          (Ajoute 20 points d'overdrive au héros 6)
#   
#      print $game_party.members[3].limitbreak
#          (Affiche dans une fenêtre, la valeur de la limitbreak du héros 3.)
#           
#            $game_party.members[1].limitbreak -= 50     
#                (Retire 50 points d'overdrive au héros 1)
#   
#  Limitbreak Type :
#
#    Le type de la limitbreak, c''est à dire comment la gauge va se remplir.
#        Par defaut, le type est configuré avec LB_START
#    Ex:  $game_party.members[5].lb_type = 8
#          (Le 5 éme héros change son type de limitbreak en "Appeuré par l'ennemi")
#
#
#  Limitbreak faiblesse élémentaire
#
#      Ce mode est particulier, il donne des points d'overdrive suplémentaire quand le héros
#    est touché par un élément particulier
#    Ex:  $game_party.members[2].lb_weakness = 11
#          (Le 2éme héros va avoir pour faiblesse l'élément 11 (foudre).)
#
#
#  Limitbreak Feared Enemy:
#    A little nuance I made is the 'Feared Enemy' value for limitbreak.  I
#    felt it balances out the system. If the limitbreak gauge can be filled
#    by killing certain enemies,  you may as well be able to fill the gauge
#    by being struck by a certain enemy as well.  Like the last two,  this
#    value starts off  with a value in the configuration system, LB_FEARED,
#    but it can be changed with a simple script call:
#
#    EX:  $game_party.members[8].lb_weakness = 5
#          (Sets the 8th actor to gain more points if hit by the 5th enemy.)
#
#    +--------------------------------------------------------------------+
#    | It is important to note that after every one of these calls, it is |
#    | recommended to use the $game_party.refresh call to ensure that the |
#    | methods I have just described take effect.                        |
#    +--------------------------------------------------------------------+
#
#
#  Limitbreak Menu Bars:
#    Not everyone wants their limitbreak gauges visible in their menus.  As
#    such,  I made this switch  so you can hide  or reveal the bars at your
#    whim.  By default, it is set by the LB_BARS_ON value in the configura-
#    tion section:
#
#    EX:  $game_system.lb_menu = false
#          (This prevents the limit break bars from showing in the menu.)
#
#
#  Flexible Positioning System:  Menu & Battle Bar Positions
#    Not every menu or battlestatus window is made the same. As such, I de-
#    veloped the Flexible positioning system for both menu and battle bars.
#    It allows you to move the bars where you want them to show.  Linked to
#    the 'actor name' method  in Window_Base,  the position of the bars are
#    drawn based on the X & Y position of the Actor's name.  And since the
#    Actor's name is  'typically'  the first method called in any menu, the
#    bars will be drawn below/behind any other text on the screen.
#
#    The menu and battle bar positions  are controlled  by an array that is
#    configured with the LB_MENU_POS and LB_BATTLE_POS arrays in the confi-
#    guration section.  But they can be changed in-game as shown in the ex-
#    ample below. Please note that the arrays have 3 arguments (x-position,
#    y-position, and bar width):
#
#    EX:  $game_system.lb_menu_pos = [-5, 2, 20]
#          (The bar is shown 5px higher, 2px to the right & with a 20px width.)
#
#
#  Limitbreak Hidden Actors:
#    The last little nuance I made is the 'Hidden Actor' array.  It allows
#    you to identify any actor or actors you want that do not display their
#    limitbreak bars.  It's very simple, and starts off as configured with
#    the LB_HIDDEN_ACTORS array.  To change the  actors being hidden,  you
#    merely need to use a script call like the one below:
#
#    EX:  $game_system.lb_hidden_actors = [2, 7]
#          (This makes the 2nd and 7th actor's bars invisible)
#
#
#------------------------------------------------------------------------------
#
#  LIMITBREAK RATES:
#
#    The last little nuance I made is the 'Hidden Actor' array.  It allows
#    Rather than go into a long diatribe for each and every limitbreak fill
#    rate,  I will merely present a chart with a small summary of the rates
#    available and how they fill the actor's limitbreak gauges:

#  Rate  Name        Manner the Limitbreak Gauge is Filled
#    0)  Attack      ... when the hero 'hits' an enemy.
#    1)  Critical    ... when the hero performs a 'critical hit' on an enemy.
#    2)  Damage      ... when the hero is struck by an enemy.
#    3)  MP Attack  ... when the hero hurts an enemy's mp score.
#    4)  MP Damage  ... when an enemy damage's/drains the hero's mp score.
#    5)  Element    ... when the hero is hurt by an element-based attack.  *
#    6)  Status      ... when the hero is inflicted a status ailment.
#    7)  Restore    ... when the hero restores an ally's health.
#    8)  Feared      ... when the hero is hurt by a 'feared' enemy          **
#    9)  Enemy      ... when the hero lands the killing blow on an enemy.
#  10)  Boss        ... when the hero lands the killing blow on a boss.  ***
#  11)  Killed      ... when the hero is killed.                        ****
#  12)  Victory    ... when the party wins.
#  13)  Escape      ... when the party runs from combat.
#  14)  Defending  ... when the hero performs a defense/guard maneuver.
#  15)  Lone Member ... when the hero is the only surviving member.
#  16)  Action      ... when any action is performed.
#  17)  Crit Health ... when the hero has 25% or less health and in action.
#
#
#    *  The element must be specified by the LB_WEAKNESS value or subsequent
#      script call explained earlier.
#
#  **  The feared enemy must be specified by the LB_FEARED value or by the
#      subsequent script call explained earlier.
#
#  ***  Bosses are defined in the LB_BOSSES array in the configuration section.
#
# ****  While this allows you to gain limitbreak points on a character's death,
#      the 'Death Wipe' feature erases all points for actors upon death if the
#      LB_D_WIPE value is set to true.
#
#
#------------------------------------------------------------------------------
#
#  CREDITS AND THANKS:
#
#  Thanks still goes to Jaide for recommending the 'Death Wipe' feature.
#
#==============================================================================


  #=======================================================================#
  #  **  C  O  N  F  I  G  U  R  A  T  I  O  N      S  Y  S  T  E  M  **  #
  #=======================================================================#

  #=================#
  #  GAUGE CONTROL  #
  #=================#
 
  # Limit Break Note
  # ================
  # This is the text you enter into the 'Note' box for any skill that is to be
  # a limit break skill.
  #
  LB_NAME = "LimitBreak"

 
  # Limit Break Max Value
  # =====================
  # From 1 on up, this value is what you define as the highest value in your
  # limit break gauge.
  #
  LB_MAX      = 1000

 
  # Limit Break Fill Rates
  # ======================
  # This array defines the points gained in the limit break system.  It defines
  # the flat rate,  minimum and maximum point settings.  Please note  that the
  # maximum value settings should not exceed the value defined in LB_MAX.
  #
  LB_RATE    = [  10,  10,  200, # Hero Attacks the Enemy    (rate, min., max.)
                  25,  25, 1000, # Hero delivers a CRITICAL! (rate, min., max.)
                  30,  5, 1000, # Hero takes Damage        (rate, min., max.)
                    5,  5,  150, # Hero Hits with MP Damage  (rate, min., max.)
                  15,  15,  200, # Hero takes MP Damage      (rate, min., max.)
                  30,  10, 1000, # Hero takes Element Damage (rate, min., max.)
                  250,            # Hero Takes Status Effect  (flat rate)
                  150,            # Restore Ally's Health    (flat rate)
                  250,            # Struck by Feared Enemy    (flat rate) 
                  500,            # Enemy Killed              (flat rate)
                  750,            # Boss Killed              (flat rate)
                  900,            # Hero Killed              (flat rate)
                  200,            # Victory                  (flat rate)
                  200,            # Escape                    (flat rate)
                  100,            # Defending                (flat rate)
                  160,            # Lone Battler              (flat rate)
                  40,            # Any action performed      (flat rate)
                  160  ]        # Critical Health          (flat rate) 
 
  # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 
  #=================#
  #  BAR CONTROL  #
  #=================#
                 
  # Flexible positioning system
  # ===========================
  # Default position appears under the name or level
  #
  LB_BARS_ON    = true            # If false, bars are never shown.
  LB_MENU_ON    = true            # If true, the bar is shown in the menu.
  LB_MENU_POS    = [ 0, 44, 108]    # Position in the menu:  X, Y, & bar width.
  LB_BATTLE_POS  = [ 0,  0, 90]    # Position in the battle menu.  Same setup.

 
  # Limit Break Ring Effect
  #
  LB_RING = "Item2"
 
 
  # Color System for Built-in Bar
  # --Optional use of Windowskin color or RGB color system--
  #
  LB_BAR_Norm_Start = 14
  LB_BAR_Norm_End  = 6
  LB_BAR_Max_Start  = Color.new(128, 64,  0)
  LB_BAR_Max_End    = Color.new(255, 32, 32)

 
  # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Revenir en haut Aller en bas
Sylfurion
Mage Lv.11
Mage Lv.11
Sylfurion


Masculin Age : 27
Inscrit le : 02/03/2009
Messages : 513

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 14:54

Code:
  #=================#
  #  ACTOR CONTROL  #
  #=================#
   
  # Starting/Default Limit Break Setting
  # This determines how the bar is filled for your characters on the initial
  # start of your game.
  #
  LB_START    = 0  # 0 = Attack          |  1 = Critical      |  2 = Damaged
                    # 3 = Attack MP      |  4 = Damaged MP    |  5 = Damaged E.
                    # 6 = Damage Status  |  7 = Restore Ally  |  8 = Feared En.
                    # 9 = Killed an enemy | 10 = Killed a Boss | 11 = Hero Died
                    #12 = Victory        | 13 = Escape/Flee  | 14 = Defending
                    #15 = Lone Combatant  | 16 = Any Action    | 17 = Crit. HP


  # Hidden Actors
  # =============
  # This array holds the ID number of Actors who hide their own limitbreak
  # gauges in both the battle and menu screens.
  #
  LB_HIDDEN_ACTORS  = [] 

 
  # Hidden Bar
  # ==========
  # This makes the limitbreak gauge invisible for any actors who have no
  # limit break skills.
  #
  LB_NO_SKILL_HIDE  = true

  # Enemy Bosses (by ID)
  # ====================
  # Related to the LB_Rate, it determines if points garnered through 'killing'
  # an ememy gives regular 'enemy' points or 'boss' points to your LB gauge.
  #
  LB_BOSSES = []    # Emptied.  Not using it this time.
           
 
  # Feared Enemy (by ID)
  # ====================
  # Related to the LB_Rate, it determines if points are garnered when struck by
  # an especially feared enemy.
  #
  LB_FEARED  = 6    # Set to enemy 6 (Willowisp)
                   
 
  # Element Weakness (by ID)
  # ========================
  # Related to the LB_Rate, it determines if points are garnered when hit by
  # an attack with a specific elemental trait, like fire, water, etc.
  #
  LB_WEAKNESS = 11    # Set to element 11 (Thunder)
 
 
  # Limit Break Death Wipe               
  # ======================
  # This supercedes the LB_RATE condition for the 'Hero Died' setting.
  #
  LB_D_WIPE = true    # If true, death wipes out their LB points.
 
 

  #========================================================================
  #            C O N F I G U R A T I O N  S Y S T E M  E N D            #
  #========================================================================



#==============================================================================
# ** TAG CONSTANT
#------------------------------------------------------------------------------
#  Constant value(s) used to gain data from the 'note' section.
#==============================================================================

# Used for 'note-tagged' Limit Breaks
Note_LimitBreak = LB_NAME



#==============================================================================
# ** RPG
#------------------------------------------------------------------------------
#  A module containing RPGVX Data Structures.
#==============================================================================

module RPG
  #============================================================================
  # ** Skill
  #----------------------------------------------------------------------------
  #  Data class for skills.
  #============================================================================
 
  class Skill < RPG::UsableItem
    #--------------------------------------------------------------------------
    # * Set Limit Break Type
    #--------------------------------------------------------------------------
    def setup_limitbreak
      @__is_limitbreak = false
      self.note.split(/[\r\n]+/).each { |line|
          @__is_limitbreak = true if line =~ Note_LimitBreak  }
    end
    #--------------------------------------------------------------------------
    # * Obtain Limit Break Flag
    #--------------------------------------------------------------------------
    def limitbreak?
      setup_limitbreak if @__is_limitbreak == nil
      return @__is_limitbreak
    end
  end
end



#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :lb_menu                  # bars in menu flag
  attr_accessor :lb_menu_pos              # menu bar positioning
  attr_accessor :lb_battle_pos            # battle bar positioning
  attr_accessor :lb_hidden_actors        # bars hidden
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias lb_init initialize 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Perform the original call
    lb_init
    @lb_menu          = LB_MENU_ON
    @lb_menu_pos      = LB_MENU_POS
    @lb_battle_pos    = LB_BATTLE_POS
    @lb_hidden_actors = LB_HIDDEN_ACTORS
  end
end



#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass of the Game_Actor
# and Game_Enemy classes.
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias lb_add_state add_state
  alias lb_skill_can_use? skill_can_use?
  alias lb_execute_damage execute_damage
  alias lb_apply_state_changes apply_state_changes
  #--------------------------------------------------------------------------
  # * Add State
  #    state_id : state ID
  #--------------------------------------------------------------------------
  def add_state(state_id)
    # Perform the original call
    lb_add_state(state_id)
    # Perform Conditional Decrease
    self.limitbreak = 0 if dead? && LB_D_WIPE
  end
  #--------------------------------------------------------------------------
  # * Determine Usable Skills
  #    skill : skill
  #--------------------------------------------------------------------------
  def skill_can_use?(skill)
    return false unless lb_skill_can_use?(skill)                # Standard
    return false if @limitbreak != LB_MAX && skill.limitbreak?  # Limit Break
    return true
  end
  #--------------------------------------------------------------------------
  # * Damage Reflection
  #    user : User of skill or item
  #    @hp_damage, @mp_damage, or @absorbed must be calculated before this
  #    method is called.
  #--------------------------------------------------------------------------
  def execute_damage(user)
    # Perform the original call
    lb_execute_damage(user)
    # Perform Conditional Increase
    return unless user.is_a?(Game_Battler)
    return if self.class == user.class
    return if hp_damage == 0 && mp_damage == 0
    increase_attacker_limitbreak(user)    if user.lb_type ==  0 # Attack
    increase_critical_limitbreak(user)    if user.lb_type ==  1 # Critical
    increase_damaged_limitbreak          if self.lb_type ==  2 # Damaged
    increase_mp_attacker_limitbreak(user) if user.lb_type ==  3 # Attack MP
    increase_mp_damaged_limitbreak        if self.lb_type ==  4 # Damaged MP
    increase_e_damaged_limitbreak(user)  if self.lb_type ==  5 # Damaged Element
    increase_restore_limitbreak(user)    if user.lb_type ==  7 # Restore Health
    increase_feared_limitbreak(user)      if self.lb_type ==  8 # Restore Health
    increase_enemy_limitbreak(user)      if user.lb_type ==  9 # Enemy
    increase_boss_limitbreak(user)        if user.lb_type == 10 # Boss
    increase_hero_limitbreak(user)        if user.lb_type == 11 # Hero
    # Perform Conditional Decrease
    self.limitbreak = 0 if dead? && LB_D_WIPE
  end
  #--------------------------------------------------------------------------
  # * Apply State Changes
  #    obj : Skill, item, or attacker
  #-------------------------------------------------------------------------- 
  def apply_state_changes(obj)
    increase_s_damaged_limitbreak if self.lb_type == 6  && obj.plus_state_set.empty?
    # Perform the original call
    lb_apply_state_changes(obj)
  end
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Attack
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_attacker_limitbreak(attacker)
    lb_calc = (hp_damage * 5 * LB_RATE[0]) / 100
    lb_add  = [[lb_calc, LB_RATE[1]].max, LB_RATE[2]].min
    attacker.limitbreak += lb_add
  end
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Critical Hit
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_critical_limitbreak(attacker)
    lb_calc = (hp_damage * 5 * LB_RATE[3]) / 100
    lb_add  = [[lb_calc, LB_RATE[4]].max, LB_RATE[5]].min
    attacker.limitbreak += lb_add
  end 
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Damaged/Struck
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_damaged_limitbreak
    lb_calc = (hp_damage * 5 * LB_RATE[6]) / self.maxhp
    lb_add  = [[lb_calc, LB_RATE[7]].max, LB_RATE[8]].min
    self.limitbreak += lb_add
  end
Revenir en haut Aller en bas
Sylfurion
Mage Lv.11
Mage Lv.11
Sylfurion


Masculin Age : 27
Inscrit le : 02/03/2009
Messages : 513

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 14:55

Code:
 #--------------------------------------------------------------------------
  # * Limit Break Increase:  MP Attack
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_mp_attacker_limitbreak(attacker)
    lb_calc = (mp_damage * 5 * LB_RATE[9]) / 100
    lb_add  = [[lb_calc, LB_RATE[10]].max, LB_RATE[11]].min
    attacker.limitbreak += lb_add
  end
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  MP Drained
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_mp_damaged_limitbreak
    lb_calc = (mp_damage * 5 * LB_RATE[12]) / self.maxmp
    lb_add  = [[lb_calc, LB_RATE[13]].max, LB_RATE[14]].min
    self.limitbreak += lb_add
  end 
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Elementally Damaged
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_e_damaged_limitbreak(attacker)
    lb_e_check = false
    case attacker.action.kind
    when 0; lb_e_check = true if attacker.element_rate(self.lb_weakness) > 100
    when 1; lb_e_check = true if attacker.action.skill.element_set.include?(self.lb_weakness)
    when 2; lb_e_check = true if attacker.action.item.element_set.include?(self.lb_weakness)
    end
    return unless lb_e_check
    lb_calc = (hp_damage * 5 * LB_RATE[15]) / self.maxhp
    lb_add  = [[lb_calc, LB_RATE[16]].max, LB_RATE[17]].min
    self.limitbreak += lb_add
  end 
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Status Effect
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_s_damaged_limitbreak
    self.limitbreak += LB_RATE[18]
  end   
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Restore
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_restore_limitbreak(attacker)
    if attacker.is_a?(Game_Actor) && self.is_a?(Game_Actor) && self != attacker
      attacker.limitbreak += LB_RATE[19] if hp_damage < 0
    end
  end
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Feared Enemy
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_feared_limitbreak(attacker)
    return if attacker.is_a?(Game_Actor)
    if self.lb_feared == attacker.enemy_id
      self.limitbreak += LB_RATE[20]
    end
  end   
 
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Killed Enemy
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_enemy_limitbreak(attacker)
    if self.is_a?(Game_Enemy) && self.dead?
      attacker.limitbreak += LB_RATE[21]
    end
  end 
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Killed Boss
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_boss_limitbreak(attacker)
    if self.is_a?(Game_Enemy) && self.dead?
      if LB_BOSSES.include?(self.enemy_id)
        attacker.limitbreak += LB_RATE[22]
      end
    end
  end 
  #--------------------------------------------------------------------------
  # * Limit Break Increase:  Killed Hero
  #    attacker : attacker
  #--------------------------------------------------------------------------
  def increase_hero_limitbreak(attacker)
    if self.is_a?(Game_Actor) && self.dead?
      self.limitbreak += LB_RATE[23]
    end
  end   
end



#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #-------------------------------------------------------------------------- 
  attr_accessor :lb_type                  # Limitbreak action type
  attr_accessor :lb_weakness              # Limitbreak element weakness
  attr_accessor :lb_feared                # Limitbreak feared enemy
  attr_accessor :lb_ringer                # Limit Break Ring Checker
  attr_accessor :lb_battle_started        # Limit Break Start System
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias lb_setup setup
  #--------------------------------------------------------------------------
  # * Setup
  #    actor_id : actor ID
  #--------------------------------------------------------------------------
  def setup(actor_id)
    # Perform the original call
    lb_setup(actor_id)
    @limitbreak        = 0          # Initialize an empty limibreak gauge
    @lb_type            = LB_START    # Set the 'configured' limitbreak type
    @lb_weakness        = LB_WEAKNESS # Set the 'configured' weakness element
    @lb_feared          = LB_FEARED  # Set the 'configured' feared enemy
    @lb_ringer          = false      # Initialize a turned-off ringer flag
    @lb_battle_started  = false      # Initialize the battle start flag
  end
  #--------------------------------------------------------------------------
  # * Adjust the limitbreak value (permits addition & keeps within range)
  #--------------------------------------------------------------------------
  def limitbreak=(limitbreak)
    @limitbreak = limitbreak
    @limitbreak = LB_MAX if @limitbreak > LB_MAX
    @limitbreak = 0 if @limitbreak < 0
  end
  #--------------------------------------------------------------------------
  # * Acquire Limit Break value (nil values won't cause errors now)
  #--------------------------------------------------------------------------
  def limitbreak
    # Return 0 if nil (prevent errors)
    @limitbreak = 0 if @limitbreak == nil
    return @limitbreak
  end 
  #--------------------------------------------------------------------------
  # * Adjust the limitbreak weakness value
  #--------------------------------------------------------------------------
  def lb_weakness=(lb_weakness)
    @lb_weakness = lb_weakness
    @lb_weakness = 0 if @lb_weakness == nil
  end
  #--------------------------------------------------------------------------
  # * Acquire Limit Break weakness (nil values won't cause errors now)
  #--------------------------------------------------------------------------
  def lb_weakness
    # Return 0 if nil (prevent errors)
    @lb_weakness = 0 if @lb_weakness == nil
    return @lb_weakness
  end   
  #--------------------------------------------------------------------------
  # * Adjust the limitbreak feared enemy value
  #--------------------------------------------------------------------------
  def lb_feared=(lb_feared)
    @lb_feared = lb_feared
    @lb_feared = 0 if @lb_feared == nil
  end
  #--------------------------------------------------------------------------
  # * Acquire Limit Break weakness (nil values won't cause errors now)
  #--------------------------------------------------------------------------
  def lb_feared
    # Return 0 if nil (prevent errors)
    @lb_feared = 0 if @lb_feared == nil
    return @lb_feared
  end 
  #--------------------------------------------------------------------------
  # * Determine if Limit Break skill
  #--------------------------------------------------------------------------
  def limitbreak_skill?
    result = false
    last_in_battle = $game_temp.in_battle
    $game_temp.in_battle = false
    self.skills.each { |skill|
      if skill.limitbreak?
        result = true
        break
      end
    }
    $game_temp.in_battle = last_in_battle
    return result
  end
  #--------------------------------------------------------------------------
  # * Determine if gauge visible
  #--------------------------------------------------------------------------
  def lb_gauge_visible?
    return false  if !$game_system.lb_menu && !$game_temp.in_battle
    return false  if $game_system.lb_hidden_actors.include?(self.id)
    return false  if !limitbreak_skill? && LB_NO_SKILL_HIDE
    return true
  end
end



#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
#  This class handles enemy characters. It's used within the Game_Troop class
# ($game_troop).
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #-------------------------------------------------------------------------- 
  attr_accessor :limitbreak              # Limitbreak gauge
  attr_accessor :lb_type                  # Limitbreak action type 
  attr_accessor :lb_weakness              # Limitbreak element weakness
  attr_accessor :lb_feared                # Limitbreak feared enemy
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias lb_jnitialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    index    : index in troop
  #    enemy_id : enemy ID
  #--------------------------------------------------------------------------
  def initialize(index, enemy_id)
    # Perform the original call
    lb_jnitialize(index, enemy_id)
    @limitbreak = 0
    @lb_type = nil
    @lb_weakness = nil
    @lb_feared = nil
  end
end



#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This is a superclass of all windows in the game.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias lb_draw_actor_name draw_actor_name
Revenir en haut Aller en bas
Sylfurion
Mage Lv.11
Mage Lv.11
Sylfurion


Masculin Age : 27
Inscrit le : 02/03/2009
Messages : 513

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 14:55

Code:
 #--------------------------------------------------------------------------
  # * Draw Name
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_name(actor, x, y)
    # Set/reset the x, y and width of the Limit Break bar.   
    ox = $game_temp.in_battle ? $game_system.lb_battle_pos[0] : $game_system.lb_menu_pos[0]
    oy = $game_temp.in_battle ? $game_system.lb_battle_pos[1] : $game_system.lb_menu_pos[1]
    ow = $game_temp.in_battle ? $game_system.lb_battle_pos[2] : $game_system.lb_menu_pos[2]
    # Draw bar based on positioning (if bars are on)
    draw_actor_lb(actor, x + ox, y + oy, ow) if LB_BARS_ON
    # Perform the original call
    lb_draw_actor_name(actor, x, y)
  end
  #--------------------------------------------------------------------------
  # * Get LB Gauge Color 1
  #--------------------------------------------------------------------------
  def lb_gauge_normal_start_color
    color = LB_BAR_Norm_Start
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # * Get LB Gauge Color 2
  #--------------------------------------------------------------------------
  def lb_gauge_normal_end_color
    color = LB_BAR_Norm_End
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # * Get LB Max Gauge Color 1
  #--------------------------------------------------------------------------
  def lb_gauge_max_start_color
    color = LB_BAR_Max_Start
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # * Get LB Max Gauge Color 2
  #--------------------------------------------------------------------------
  def lb_gauge_max_end_color
    color = LB_BAR_Max_End
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # * Draw Limitbreak Bar
  #    actor  : actor
  #    x      : draw spot x-coordinate
  #    y      : draw spot y-coordinate
  #    width  : bar width
  #    height : bar height
  #--------------------------------------------------------------------------
  def draw_actor_lb(actor, x, y, width = 120)
    return unless actor.lb_gauge_visible?
    gw = width * actor.limitbreak / LB_MAX
    gc1 = (gw == width ? lb_gauge_max_start_color : lb_gauge_normal_start_color)
    gc2 = (gw == width ? lb_gauge_max_end_color : lb_gauge_normal_end_color)
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end 
end



#==============================================================================
# ** Scene_Skill
#------------------------------------------------------------------------------
#  This class performs the skill screen processing.
#==============================================================================

class Scene_Skill < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias lb_use_skill_nontarget use_skill_nontarget
  #--------------------------------------------------------------------------
  # * Use Skill (apply effects to non-ally targets)
  #--------------------------------------------------------------------------
  def use_skill_nontarget
    # Use up/empty the bar
    @actor.limitbreak = 0 if @skill.limitbreak?
    # Perform the original call
    lb_use_skill_nontarget
  end
end

 

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias lb_battle_end battle_end
  alias lb_process_action process_action
  alias lb_execute_action execute_action
  alias lb_execute_action_skill execute_action_skill
  #--------------------------------------------------------------------------
  # * End Battle
  #    result : Results (0: win, 1: escape, 2:lose)
  #--------------------------------------------------------------------------
  def battle_end(result)
    case result
    when 0  # Victory
      $game_party.existing_members.each { |actor|
      actor.limitbreak += LB_RATE[24] if actor.lb_type == 12 }
    when 1  # Escape
      $game_party.existing_members.each { |actor|
      actor.limitbreak += LB_RATE[25] if actor.lb_type == 13 }
    end
    # Perform the original call
    lb_battle_end(result)
  end
  #--------------------------------------------------------------------------
  # * Battle Action Processing
  #--------------------------------------------------------------------------
  def process_action 
  lb_process_action
  # Go through the Actors
    $game_party.members.each { |actor|
      # Only perform if the actor exists
      next unless actor.exist?
      # When the Limit Break gauge is set to zero,
      # Reset the Limit Break Ringer to false
      if actor.limitbreak == 0
        actor.lb_ringer = false
      end
      # When the Limit Break Ringer hasn't rung
      if actor.lb_ringer == false
        # But, if the Limit Break Bar is filled
        if actor.limitbreak == LB_MAX
          # Only show for visible gauges
          if actor.lb_gauge_visible?
            # If the battle only just started
            if actor.lb_battle_started == true
              # turn off the battle started flag
              actor.lb_battle_started = false
            else
              # Play the Limit Break Sound Effect
              full_lb_se
            end
          end
          # And Set the Limit Break Ringer to true
          actor.lb_ringer = true
        end
      end
      }
  end 
  #--------------------------------------------------------------------------
  # * Execute Battle Actions
  #--------------------------------------------------------------------------
  def execute_action
    if @active_battler.is_a?(Game_Actor)
      lb_add = 0
      # Defending
      lb_add += LB_RATE[26] if @active_battler.lb_type == 14 && @active_battler.action.basic == 1
      # Alone
      lb_add += LB_RATE[27] if @active_battler.lb_type == 15 && $game_party.existing_members.size == 1
      # Action
      lb_add += LB_RATE[28] if @active_battler.lb_type == 16
      # Fatal
      lb_add += LB_RATE[29] if @active_battler.lb_type == 17 && @active_battler.hp < @active_battler.maxhp / 4
      @active_battler.limitbreak += lb_add
    end
    # Perform the original call
    lb_execute_action
  end
  #--------------------------------------------------------------------------
  # * Execute Battle Action: Skill
  #--------------------------------------------------------------------------
  def execute_action_skill
    # Perform the original call
    lb_execute_action_skill
    skill = @active_battler.action.skill
    @active_battler.limitbreak = 0 if skill.limitbreak?
  end
  #--------------------------------------------------------------------------
  # * Full Limit Break Gauge SE
  #--------------------------------------------------------------------------
  def full_lb_se
    if LB_RING != nil
      if LB_RING != ""
        Audio.se_play("Audio/SE/" + LB_RING, 80, 100)
      end
    end
  end   
end
Revenir en haut Aller en bas
Sylfurion
Mage Lv.11
Mage Lv.11
Sylfurion


Masculin Age : 27
Inscrit le : 02/03/2009
Messages : 513

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 14:58

Voila le script en entier, j'était obliger de le mettre en 4 posts car il était trop long

( désolé pour le cinqtuple posts )

Ciao

Sylfurion
Revenir en haut Aller en bas
Raizen
Va-nu-pieds Lv.4
Va-nu-pieds Lv.4
Raizen


Masculin Age : 31
Inscrit le : 03/08/2009
Messages : 61

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 14:58

Dis moi, pour utiliser ce script... est ce que tu l'appelles par event ? si oui, dis moi les commandes que tu insères.
Revenir en haut Aller en bas
Sylfurion
Mage Lv.11
Mage Lv.11
Sylfurion


Masculin Age : 27
Inscrit le : 02/03/2009
Messages : 513

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 15:03

Non je ne l'appelle pas par event, en fait il suffit de mettre le commentaire " LimitBreak " dans le bloc commentaire de la compétence que tu veux qu'elle soit une competence LimitBreak, ensuite pendant un combat sa affiche une barre qui se remplit au fur et à mesure que tu frappes ou que tu fasses des actions.

Quand la barre est remplie tu peux utiliser la compétence qui est en LimitBreak, et quand tu l'utilises a barre se remet à O.

Ciao

Sylfurion


Dernière édition par Sylfurion le Mer 19 Aoû 2009 - 14:47, édité 1 fois
Revenir en haut Aller en bas
Raizen
Va-nu-pieds Lv.4
Va-nu-pieds Lv.4
Raizen


Masculin Age : 31
Inscrit le : 03/08/2009
Messages : 61

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 15:14

OK, je vais voir ce que je peux faire.
Revenir en haut Aller en bas
Sylfurion
Mage Lv.11
Mage Lv.11
Sylfurion


Masculin Age : 27
Inscrit le : 02/03/2009
Messages : 513

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitimeMar 18 Aoû 2009 - 16:30

O.K. Merci j'attent impatiamment Razz

Ciao

Sylfurion
Revenir en haut Aller en bas
Contenu sponsorisé




Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Empty
MessageSujet: Re: Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets   Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets Icon_minitime

Revenir en haut Aller en bas
 

Ajouter un Onglet dans un combat en plus de Attaque, Compétences, Défense et Objets

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

 Sujets similaires

-
» Ajouter un onglet dans le menu pour les reputations
» Onglet dans le menu de combat
» Rajouter un onglet dans Menu
» Enlevez la l'attaque en combat
» Ajouter l'option "Quetes" dans ce menu.

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