Partagez
Aller en bas
Orbital
Orbital
Membre

Nombre de messages : 141
Age : 28
Localisation : Euh, tu vois la France ? l'Isère ? grenoble ? SMH ? ma maison ? le bureau ? le PC ? bah c'est là
Distinction : aucune
Date d'inscription : 09/08/2008

[Résolu] Compatibilité de 2 window_status Empty [Résolu] Compatibilité de 2 window_status

le Lun 15 Mar 2010 - 21:23
Saloute à tous !
Alors voilà mon problème :
J'utilise un premier script qui me permet de rajouter une caractéristique pour les personnages et les monstres. Ce script vient de Yanfly (YEZ), et fait également s'afficher cette meme caractéristique dans le menu statut d'un personnage. Voici :
Spoiler:
Code:
#===============================================================================
#
# Yanfly Engine Zealous - Battler Stat: DEX
# Last Date Updated: 2010.01.27
# Level: Normal, Hard, Lunatic
#
# One of the things that's always bothered me about RPG Maker VX is that, by
# default, there's no way for an actor by itself to truly affect the HIT and
# damage variance without equipping a weapon or item. And even then, all of the
# experience gained will still not affect the likelihood of the actor hitting
# better while maximum and minimum damage got worse for skills. This script will
# introduce the DEX stat to bring that little piece of common sense back to the
# gaming scene for RPG Maker VX.
#
# This script will also allow you to adjust the base DEX of each individual
# actor and enemy dependent on their level through a formula that can be either
# universal or personal. This script also allows pieces of equipment to contain
# boosts towards DEX in both a set fashion and a percentile fashion. And to
# complete it all, status effects can also affect the DEX stat in set amounts
# or percentile adjustments.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 2010.01.27 - Enemy Levels compatibility.
# o 2010.01.20 - Equipment Overhaul compatibility.
# o 2010.01.10 - Improved Job System: Classes compatibility.
# o 2009.12.31 - Item Growth Fix.
# o 2009.12.22 - Compatibility with Custom Status Properties state stacking.
# o 2009.12.17 - Fixed actor initialization process.
# o 2009.12.16 - Started and finished script.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Item Tags - Insert the following tags into usable Item noteboxes.
# -----------------------------------------------------------------------------
# <dex growth +n> <dex growth -n>
# This will determine whether or not the item will raise or lower DEX when used
# on an actor. This is a permanent increase or decrease to the DEX stat.
#
# -----------------------------------------------------------------------------
# Equip Tags - Insert the following tags into Weapon and Armour noteboxes.
# -----------------------------------------------------------------------------
# <dex +n>  <dex -n>
# <dex +n%>  <dex -n%>
# This will give weapons and armours bonus increases to the DEX stat. + and -
# will signify an increase or decrease as a set amount. Adding % after n will
# signify an increase or decrease as a percentile amount.
#
# -----------------------------------------------------------------------------
# Enemy Tags - Insert the following tags into Enemy noteboxes.
# -----------------------------------------------------------------------------
# <base dex n>
# This will determine what the enemy's base DEX stat is. If nothing is entered,
# the particular enemy will use the DEFAULT_ENEMY_DEX to calculate its base DEX
# instead of this.
#
# -----------------------------------------------------------------------------
# State Tags - Insert the following tags into State noteboxes.
# -----------------------------------------------------------------------------
# <dex +n>  <dex -n>  <dex n%>
# This will cause the state to give an increase or decrease to the battler's
# DEX stat as long as the state remains. + and - will result in a directly set
# increase or decrease in the DEX stat while the % will result in a percentile
# alteration of the DEX stat. Stackable.
#
# -----------------------------------------------------------------------------
# Script Commands - These are used with the Event Editor's Script command.
# -----------------------------------------------------------------------------
# $game_actors[1].dex = 100
# This will set actor 1's DEX stat to 100.
#
#===============================================================================
# Compatibility
# -----------------------------------------------------------------------------
# - Works With: KGC's LimitBreak
# -----------------------------------------------------------------------------
# Note: This script may not work with former Yanfly Engine ReDux scripts.
#      Use Yanfly Engine Zealous scripts to work with this if available.
#===============================================================================

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

module YEZ
  module STAT
   
    # This is what the DEX stat will be called in your game.
    VOCAB_DEX = "DEX"
   
    # The following determines the relationship DEX has with the HIT and damage
    # variance for actors and enemies alike. The following formulas are added
    # to the base amounts for HIT and damage variance.
    DEX_TO_HIT = "self.dex * 0.20"
    DEX_TO_MAX = "variance/4 * user.dex"  # Formula for max damage bonus.
    DEX_TO_MIN = "variance/20 * user.dex"  # Formula for min damage bonus.
   
    # The following are the formulas you can use to adjust the rate of growth
    # regarding each actor's base DEX. Note that actor 0 will be used if an
    # actor's ID does not appear on this list.
    ACTOR_BASE_DEX = { # Do not remove actor 0.
    # ID => Formula
      0 => "actor.parameters[2, @level] / 2 + actor.parameters[5, @level] / 2",
      1 => "@level * 5 + 20",
      2 => "@level * 6 + 24",
      3 => "@level * 4 + 16",
      4 => "@level * 3 + 12",
    } # Do not remove this
   
    # The following will determine every enemy's default DEX if they do not use
    # the appropiate <base dex n> tag in their notebox.
    DEFAULT_ENEMY_DEX = "base_atk / 2 + base_agi / 2"
   
  end # STAT
end # YEZ

#===============================================================================
# Battler Stat: DEX - Lunatic Mode
# ----------------------------------------------------------------------------
# Those who are interested in editting the apply variance formula themselves
# can do it below. It will give the script user a lot more control regarding
# the way damage fluctuation is concerned if that's what the user desires.
#===============================================================================

class Game_Battler
 
  #--------------------------------------------------------------------------
  # overwrite method: apply_variance
  #--------------------------------------------------------------------------
  def apply_variance(damage, variance)
    user = $scene.is_a?(Scene_Battle) ? $scene.active_battler : self
    amp = [damage.abs * variance / 100, 0].max
    max_bonus = Integer([eval(YEZ::STAT::DEX_TO_MAX),1].max)
    min_bonus = Integer([eval(YEZ::STAT::DEX_TO_MIN),1].max)
    if damage > 0 and variance != 0
      damage += rand((amp+1)+max_bonus) + rand(amp+1) + min_bonus
      damage -= amp/10
    elsif damage < 0 and variance != 0
      damage -= rand((amp+1)+max_bonus) + rand(amp+1) + min_bonus
      damage += amp/10
    end
    return Integer(damage)
  end
 
end # Game_Battler

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

module YEZ
  module REGEXP
    module BASEITEM
     
      DEX_SET = /<(?:DEX|dex)[ ]*([\+\-]\d+)>/i
      DEX_PER = /<(?:DEX|dex)[ ]*([\+\-]\d+)([%%])>/i
      DEX_GROWTH = /<(?:DEX_GROWTH|dex growth)[ ]*([\+\-]\d+)>/i
     
    end # BASEITEM
    module ENEMY
     
      BASE_DEX = /<(?:BASE_DEX|base dex|dex)[ ]*(\d+)>/i
     
    end
    module STATE
     
      DEX_SET = /<(?:DEX|dex)[ ]*([\+\-]\d+)>/i
      DEX_PER = /<(?:DEX|dex)[ ]*(\d+)([%%])>/i
     
    end # STATE
  end # REGEXP
end # YEZ

module Vocab
  def self.dex
    return YEZ::STAT::VOCAB_DEX
  end
end # Vocab

#===============================================================================
# RPG::BaseItem
#===============================================================================

class RPG::BaseItem
 
  #--------------------------------------------------------------------------
  # common cache: yez_cache_baseitem_bsrdex
  #--------------------------------------------------------------------------
  def yez_cache_baseitem_bsdex
    @equip_dex_set = 0; @equip_dex_per = 0; @dex_growth = 0
   
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when YEZ::REGEXP::BASEITEM::DEX_SET
        @equip_dex_set = $1.to_i
      when YEZ::REGEXP::BASEITEM::DEX_PER
        @equip_dex_per = $1.to_i
      when YEZ::REGEXP::BASEITEM::DEX_GROWTH
        @dex_growth = $1.to_i
      end
    } # end self.note.split
  end # yez_cache_baseitem_bsdex
 
  #--------------------------------------------------------------------------
  # new method: equip_dex_set
  #--------------------------------------------------------------------------
  def dex
    yez_cache_baseitem_bsdex if @equip_dex_set == nil
    return @equip_dex_set
  end
 
  #--------------------------------------------------------------------------
  # new method: equip_dex_per
  #--------------------------------------------------------------------------
  def equip_dex_per
    yez_cache_baseitem_bsdex if @equip_dex_per == nil
    return @equip_dex_per
  end
 
  #--------------------------------------------------------------------------
  # new method: dex_growth
  #--------------------------------------------------------------------------
  def dex_growth
    yez_cache_baseitem_bsdex if @dex_growth == nil
    return @dex_growth
  end
 
end # RPG::BaseItem

#===============================================================================
# RPG::Enemy
#===============================================================================

class RPG::Enemy
 
  #--------------------------------------------------------------------------
  # common cache: yez_cache_enemy_bsdex
  #--------------------------------------------------------------------------
  def yez_cache_enemy_bsdex
    @base_dex = 0
   
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when YEZ::REGEXP::ENEMY::BASE_DEX
        @base_dex = $1.to_i
      end
    } # end self.note.split
  end # yez_cache_enemy_bsdex
 
  #--------------------------------------------------------------------------
  # new method: base_dex
  #--------------------------------------------------------------------------
  def base_dex
    yez_cache_enemy_bsdex if @base_dex == nil
    return @base_dex
  end
 
end # RPG::Enemy

#===============================================================================
# RPG::State
#===============================================================================

class RPG::State
 
  #--------------------------------------------------------------------------
  # common cache: yez_cache_state_bsdex
  #--------------------------------------------------------------------------
  def yez_cache_state_bsdex
    @dex_set = 0; @dex_per = 100
   
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when YEZ::REGEXP::STATE::DEX_SET
        @dex_set = $1.to_i
      when YEZ::REGEXP::STATE::DEX_PER
        @dex_per = $1.to_i
      end
    } # end self.note.split
  end # yez_cache_state_bsdex
 
  #--------------------------------------------------------------------------
  # new method: dex_set
  #--------------------------------------------------------------------------
  def dex_set
    yez_cache_state_bsdex if @dex_set == nil
    return @dex_set
  end # dex_set
 
  #--------------------------------------------------------------------------
  # new method: dex_per
  #--------------------------------------------------------------------------
  def dex_per
    yez_cache_state_bsdex if @dex_per == nil
    return @dex_per
  end # dex_set
 
end # RPG::State

#===============================================================================
# Game_Battler
#===============================================================================

class Game_Battler
 
  #--------------------------------------------------------------------------
  # alias method: clear_extra_values
  #--------------------------------------------------------------------------
  alias clear_extra_values_bsdex clear_extra_values unless $@
  def clear_extra_values
    clear_extra_values_bsdex
    @dex_plus = 0
  end

  #--------------------------------------------------------------------------
  # new method: dex
  #--------------------------------------------------------------------------
  def dex
    @dex_plus = 0 if @dex_plus == nil
    n = [base_dex + @dex_plus, 1].max
    for state in states
      if $imported["CustomStatusPropertiesZeal"]
        percent = 100
        for i in 1..stack(state); percent += state.dex_per - 100; end
      else
        percent = state.dex_per
      end
      n = n * percent / 100.0
    end
    for state in states;
      if $imported["CustomStatusPropertiesZeal"]
        for i in 1..stack(state); n += state.dex_set; end
      else
        n += state.dex_set
      end
    end
    if $imported["LimitBreak"] # KGC's LimitBreak
      n = [[Integer(n), 1].max, parameter_limit].min
    else
      n = [[Integer(n), 1].max, 999].min
    end
    return n
  end # dex
 
  #--------------------------------------------------------------------------
  # new method: dex=
  #--------------------------------------------------------------------------
  def dex=(new_dex)
    @dex_plus = 0 if @dex_plus == nil
    @dex_plus += new_dex - self.dex
    if $imported["LimitBreak"] # KGC's LimitBreak
      @dex_plus = [[@dex_plus, -parameter_limit].max, parameter_limit].min
    else
      @dex_plus = [[@dex_plus, -999].max, 999].min
    end
  end # dex=

  #--------------------------------------------------------------------------
  # alias method: item_test
  #--------------------------------------------------------------------------
  alias item_test_bsdex item_test unless $@
  def item_test(user, item)
    return true if item.dex_growth != 0
    return item_test_bsdex(user, item)
  end
 
  #--------------------------------------------------------------------------
  # alias method: item_growth_effect
  #--------------------------------------------------------------------------
  alias item_growth_effect_bsdex item_growth_effect unless $@
  def item_growth_effect(user, item)
    if item.dex_growth != 0
      @dex_plus = 0 if @dex_plus == nil
      @dex_plus += item.dex_growth
    end
    item_growth_effect_bsdex(user, item)
  end
 
end # Game_Battler

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

class Game_Actor < Game_Battler
 
  #--------------------------------------------------------------------------
  # new method: base_dex
  #--------------------------------------------------------------------------
  def base_dex
    if YEZ::STAT::ACTOR_BASE_DEX.include?(@actor_id)
      n = eval(YEZ::STAT::ACTOR_BASE_DEX[@actor_id])
    else
      n = eval(YEZ::STAT::ACTOR_BASE_DEX[0])
    end
    if $imported["JobSystemClasses"]
      anticrash_bonus_stats
      n += @base_dex_plus
      n = Integer(n * base_class_stat(:dex))
    end
    percent = 100
    for item in equips.compact
      if $imported["EquipmentOverhaul"]
        percent += aptitude(item.equip_dex_per, :dex)
      else
        percent += item.equip_dex_per
      end
    end
    n *= percent / 100.0
    for item in equips.compact
      if $imported["EquipmentOverhaul"]
        n += aptitude(item.dex, :dex)
      else
        n += item.dex
      end
    end
    return Integer(n)
  end # base_dex
 
  #--------------------------------------------------------------------------
  # alias method: hit
  #--------------------------------------------------------------------------
  alias hit_actor_bsdex hit unless $@
  def hit
    n = hit_actor_bsdex
    n += Integer(eval(YEZ::STAT::DEX_TO_HIT))
    return n
  end
 
end # Game_Actor

#===============================================================================
# Game_Enemy
#===============================================================================

class Game_Enemy < Game_Battler
 
  #--------------------------------------------------------------------------
  # new method: base_dex
  #--------------------------------------------------------------------------
  def base_dex
    @base_stats = {} if @base_stats == nil
    return @base_stats[:dex] if @base_stats[:dex] != nil
    if enemy.base_dex <= 0
      result = Integer(eval(YEZ::STAT::DEFAULT_ENEMY_DEX))
    else
      result = enemy.base_dex
    end
    if $imported["EnemyLevels"]
      base = result
      per = enemy.growth_per[:dex]
      set = enemy.growth_set[:dex]
      result = Integer(eval(YEZ::ENEMY_LEVEL::BASE_FORMULAS[:dex]))
    end
    @base_stats[:dex] = result
    return result
  end
 
  #--------------------------------------------------------------------------
  # alias method: hit
  #--------------------------------------------------------------------------
  alias hit_enemy_bsdex hit unless $@
  def hit
    n = hit_enemy_bsdex
    n += Integer(eval(YEZ::STAT::DEX_TO_HIT))
    return n
  end
 
end # Game_Enemy

#===============================================================================
# Scene_Battle
#===============================================================================

class Scene_Battle < Scene_Base
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :active_battler
 
end # Scene_Battle

#===============================================================================
# Window_Base
#===============================================================================

class Window_Base < Window
 
  #--------------------------------------------------------------------------
  # alias method: draw_actor_parameter
  #--------------------------------------------------------------------------
  alias draw_actor_parameter_bsdex draw_actor_parameter unless $@
  def draw_actor_parameter(actor, x, y, type)
    if type == 102
      self.contents.font.color = system_color
      self.contents.draw_text(x, y, 120, WLH, Vocab::dex)
      self.contents.font.color = normal_color
      self.contents.draw_text(x + 120, y, 36, WLH, actor.dex, 2)
    else
      draw_actor_parameter_bsdex(actor, x, y, type)
    end
  end
 
end # class Window_Base

#===============================================================================
# Window_Status
#===============================================================================

class Window_Status < Window_Base
 
  #--------------------------------------------------------------------------
  # alias method: draw_parameters
  #--------------------------------------------------------------------------
  alias draw_parameters_bsdex draw_parameters unless $@
  def draw_parameters(x, y)
    draw_parameters_bsdex(x, y)
    @param_rows = 3 if @param_rows == nil
    @param_rows += 1
    draw_actor_parameter(@actor, x, y + WLH * @param_rows, 102)
  end
 
end # Window_Status

#===============================================================================
#
# END OF FILE
#
#===============================================================================

Et ensuite je voudrais utiliser ce deuxième script de Yanfly (YERD cette fois), qui change totalement le window_status. Il rajoute des options supplémentaires et permet meme de rajouter un accès à toute les scene qu'on veut (equip, skill).
Voici :
Spoiler:
Code:
#===============================================================================
#
# Yanfly Engine RD - Scene Status ReDux
# Last Date Updated: 2009.05.26
# Level: Normal, Hard, Lunatic
#
# There's not a whole lot of reason for the player to visit the status menu.
# Not too much to see aside from things you can already view in other menus
# such as the equipment menu for stats. This script will provide additional
# functionality to the scene in addition to allowing the game maker to free
# up additional space in the main menu for the not actor-oriented stuff.
#
#===============================================================================
# Updates:
# ----------------------------------------------------------------------------
# o 2009.05.26 - Started script and finished.
#===============================================================================
# Instructions
#===============================================================================
#
# This script is plug and play for the most part, but there's bound to be a lot
# things you may want to modify so scroll down and reach each of the individual
# instructions carefully for all sections and modify the constants properly.
#
#===============================================================================
#
# Compatibility
# - Works With: KGC scripts and others!
# - Alias: Scene_Equip: return_scene
# - Alias: Scene_Skill: return_scene
# - Alias: Scene_Title: create_game_objects
# - Alias: Game_Temp: initialize
# - Overwrites: Scene_Status: all
#
#===============================================================================

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

module YE
  module REDUX
    module STATUS
     
      #------------------------------------------------------------------------
      # Instructions on how to set up the STATUS_COMMANDS order.
      #------------------------------------------------------------------------
      # This array will let you determine how you want your status window
      # commands to be ordered. They will appear in the number you order them.
      # Each command is assigned a number and these are the following numbers.
      #
      #    0..Statistics    1..Biography    2..Skills    3..Equips
      #
      # The next couple are Yanfly Engine ReDux commands and require you to
      # have the respective scripts before they will appear in the menu. Be
      # sure to add them to STATUS_COMMANDS if you wish to display them.
      #
      #    4..Change Class .......... Requires Subclass Selection System
      #    5..Learn Skills .......... Requires Subclass Selection System
      #    6..Skill Slots ........... Requires Equip Skill Slots
      #
      # There are some pre-made imported functions for this script. Of them are
      # the popular and powerful KGC scripts and others which I've also found
      # to be rather interesting.
      #
      #  101..Distribute Parameter .. Requires KGC Distribute Parameter
      #  102..Equip Learn Skill ..... Requires KGC Equip Learn Skill
      #  103..Skill CP System ....... Requires KGC Skill CP System
      #  201..Skill Growth .......... Requires Garlyle's Skill Growth System
      #  301..Attributes ............ Requires 332211's Attribute System
      #  302..Soul Pieces ........... Requires 332211's Soul Pieces System
      #  303..Weapon by Ranks ....... Requires 332211's Weapon by Ranks System
      #
      # If you wish to add your own commands, you'll need to register them
      # under the lunatic mode portion of the script.
      #------------------------------------------------------------------------
      STATUS_COMMANDS =[ # Make sure you've read the instructions above.
        0, # Statistics
        1, # Biography
        2, # Skills
        6, # Skill Slots
        3, # Equips
        4, # Change Class
        5, # Learn Skills
      ] # Do not remove this.
     
      # The constants below will determine the unique sound and strings made
      # specificly for the Scene Status ReDux script.
      SOUND    = RPG::SE.new("Book", 80, 100)
      STATUS  = "Status"
      BIO      = "Biography"
     
      # The following determines determines profile categories for various
      # profile information.
      BIRTHDAY = "Birthday: "
      AGE      = "Age: "
      ORIGIN  = "Origin: "
      GENDER  = "Gender: "
      HEIGHT  = "Height: "
      WEIGHT  = "Weight: "
      UNKNOWN  = "Unknown"
     
      # This hash will let you determine what full names to give your
      # individual actors. Use %s to indicate where the RPG name appears.
      ACTOR_PROFILES1 ={
      # Actor => [      Full Name,  Origin,  Gender, Height,  Weight]
            1 => [ "%s von Xiguel", "Pallia",  "Male", "177.8 cm",  "72.7 kg"],
            2 => [  "Michelle %s", "Retvin", "Female", "170.2 cm", "Unknown"],
            3 => [    "%s Manfred",  "Namek",  "Male", "182.9 cm",  "68.2 kg"],
            4 => [  "%s Fernaeus",  "Yerd", "Female", "162.6 cm", "Secret~"],
      } # Do not remove this.
     
      # The following hash will determine the birthday information about the
      # actor. The VarID is what stores the birthday. Change the variable to
      # change the actor's age in the actual menu. The start age is what the
      # variable initially sets the actor's age to. The birthday is just the
      # date that the actor is born. Nothing else special about it.
      ACTOR_PROFILES2 ={
      # Actor => [ VarID, StartAge, Birthday]
            1 => [    21,      18, "May 26"],
            2 => [    22,      17, "Jan 14"],
            3 => [    23,      18, "Oct 31"],
            4 => [    24,      19, "June 3"],
      } # Do not remove this.
     
      # This will determine the size of the font used for the biography window.
      BIO_FONT_SIZE = 20
     
      # This section will allow you to type out the actor biographies. To
      # cause a line break, use a | in the middle of the string. If the actors
      # do not have a biography here, it will show actor 0 instead. For that
      # reason, do NOT remove actor 0.
      ACTOR_BIOGRAPHIES ={
      # Actor => Biography
            0 => "UNKNOWN    UNKNOWN    UNKNOWN|UNKNOWN    UNKNOWN    UNKNOWN|UNKNOWN    UNKNOWN    UNKNOWN|UNKNOWN    UNKNOWN    UNKNOWN|UNKNOWN    UNKNOWN    UNKNOWN|UNKNOWN    UNKNOWN    UNKNOWN|UNKNOWN    UNKNOWN    UNKNOWN|UNKNOWN    UNKNOWN    UNKNOWN",
            1 => "Ralph has set off on a quest to save|Don Miguel from the clutches of the evil|witch Margaret. Accompanied by Ulrika,|Bennett, and Ylva, Ralph adventures|the world to find Don Miguel.||\"Let's hurry! Don Miguel cannot wait|much longer!\"",
            2 => "Ulrika trained with Ralph before Don|Miguel was kidnapped. She always sees|Ralph as a rival, but also a source of|inspiration. Ulrika firmly believes that|training will let her get rid of her many|weaknesses.||\"Strength comes from a trained heart.\"",
            3 => "Bennett choose the wrong profession|given his bursting personality. He and|his best friend Ralph give each other|motivation to strengthen themselves|and to become the ultimate tagteam|ever known to the world.||\"Their priest is a sissy! You heard me,|a sissy!\"",
            4 => "Ylva studies in her free time about|various magic and locations. This is|why it seems like she knows a lot,|but the truth is that she only knows|what she has read in books.||\"Why risk your life to experience|something when you can read about|it in a book?\"",
      } # Do not remove this.
     
      # The following sets the statistical information for your actors.
      # These are all of the information you'll see in the statistics window.
      ICON_LVL  = 62          # Icon for level
      TEXT_LVL  = "Level"      # Text for level
      ICON_EXP  = 63          # Icon for experience
      TEXT_EXP  = "EXP"        # Text for experience
      ICON_NEXT = 142          # Icon for next level
      TEXT_NEXT = "Next"      # Text for next level
     
      ICON_HP  = 99          # Icon for HP
      ICON_MP  = 100          # Icon for MP
     
      ICON_ATK  = 2            # Icon for ATK
      TEXT_ATK  = "ATK"        # Text for ATK
      ICON_DEF  = 52          # Icon for DEF
      TEXT_DEF  = "DEF"        # Text for DEF
      ICON_SPI  = 21          # Icon for SPI
      TEXT_SPI  = "SPI"        # Text for SPI
      ICON_AGI  = 48          # Icon for AGI
      TEXT_AGI  = "AGI"        # Text for AGI
     
      ICON_HIT  = 135          # Icon for HIT
      TEXT_HIT  = "HIT"        # Text for HIT
      SHOW_HIT  = true        # Display HIT?
      ICON_EVA  = 158          # Icon for EVA
      TEXT_EVA  = "EVA"        # Text for EVA
      SHOW_EVA  = true        # Display EVA?
      ICON_CRI  = 119          # Icon for CRI
      TEXT_CRI  = "CRI"        # Text for CRI
      SHOW_CRI  = true        # Display CRI?
      ICON_ODDS = 137          # Icon for ODDS
      TEXT_ODDS = "LUK"        # Text for ODDS
      SHOW_ODDS = true        # Display ODDS?
   
    end # STATUS
  end # REDUX
end # YE

#===============================================================================
# How to Use: Lunatic Mode
#===============================================================================
#
# If you do not understand hashes, I -STRONGLY- recommend that you stay away
# from this portion of the script as it affects the rest of the script if you
# make a slight mistake.
#
# - First, under IMPORTED_COMMANDS, fill out the hash properly. You will have
# to fill them out correctly given the categories.
#
#    Swch? - Does this command require a switch to be on in order to be shown?
#    SwID - If the previous was true, this is the Switch ID needed to be on.
#    Title - This is the text that appears on the status command window.
#    Scene - This is the name of the scene you wish to load.
#
# - Given that you've done everything correctly, return to the top and adjust
# the STATUS_COMMANDS array. Input number 101 or whatever number you've used
# to determine the scene you wish to launch from the status menu.
#
# Note that if you exit the imported scenes, they will return to the main menu
# rather than the status menu. It will remain that way until you edit those
# scripts's respective return_scene definitions.
#
#===============================================================================

module YE
module REDUX
module STATUS
     
  # The following hash will govern the way the status menu will treat
  # imported commands. If you do not follow the setup properly, do not
  # expect the script to function correctly.
  IMPORTED_COMMANDS ={
  # -ID => [Swch?, SwID, ----Title----, -----------Scene-----------]
    101 => [false,    0, "Level Up",    "Scene_DistributeParameter"],
    102 => [false,    0, "View AP",    "Scene_APViewer"],
    103 => [false,    0, "Skill CP",    "Scene_SetBattleSkill"],
    201 => [false,    0, "Grow Skill",  "Scene_SkillGrowth"],
    301 => [false,    0, "Attributes",  "Scene_Attributes"],
    302 => [false,    0, "Soul Pieces", "Scene_soulpieces"],
    303 => [false,    0, "Weapon Rank", "Scene_weapon_by_ranks"],
  } # Do not remove this.
     
end # STATUS
end # REDUX
end # YE

#===============================================================================
# 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 Status
#===============================================================================

class Scene_Status < Scene_Base
 
  #--------------------------------------------------------------------------
  # create command list
  # --- This portion creates the commands for the status window.
  #--------------------------------------------------------------------------
  def create_command_list
    commands = []
    index_list = {}
    YE::REDUX::STATUS::STATUS_COMMANDS.each_with_index { |c, i|
      case c
      when 0 # View Statistics
        index_list[:stats] = commands.size
        commands.push(YE::REDUX::STATUS::STATUS)
       
      when 1 # View Biography
        index_list[:bio] = commands.size
        commands.push(YE::REDUX::STATUS::BIO)
       
      when 2 # Skill Menu
        index_list[:skill] = commands.size
        commands.push(Vocab.skill)
       
      when 3 # Equipment
        index_list[:equip] = commands.size
        commands.push(Vocab.equip)
     
      when 4 # Change Class
        next unless $imported["SubclassSelectionSystem"]
        next unless $game_switches[YE::SUBCLASS::ENABLE_CLASS_CHANGE_SWITCH]
        index_list[:classchange] = commands.size
        commands.push(YE::SUBCLASS::MENU_CLASS_CHANGE_TITLE)
       
      when 5 # Learn Skill
        next unless $imported["SubclassSelectionSystem"]
        next unless $game_switches[YE::SUBCLASS::ENABLE_LEARN_SKILLS_SWITCH]
        index_list[:learnskill] = commands.size
        commands.push(YE::SUBCLASS::LEARN_SKILL_TITLE)
       
      when 6 # Skill Slots
        next unless $imported["EquipSkillSlots"]
        next unless $game_switches[YE::EQUIPSKILL::ENABLE_SLOTS_SWITCH]
        index_list[:equipskill] = commands.size
        commands.push(YE::EQUIPSKILL::MENU_TITLE)
       
      else
        command_array = YE::REDUX::STATUS::IMPORTED_COMMANDS
        next unless command_array.include?(c)
        command_array = command_array[c]
        next if command_array[0] and !$game_switches[command_array[1]]
        index_list[c] = commands.size
        commands.push(command_array[2])
       
      end
    } # Do not remove this.
    $game_temp.status_command_index = index_list
    return commands
  end # create_command_list
 
  #--------------------------------------------------------------------------
  # case_command_selection
  #--------------------------------------------------------------------------
  def case_command_selection(index)
    case index
    when $game_temp.status_command_index[:stats]
      YE::REDUX::STATUS::SOUND.play
      $game_temp.status_bio_flag = 0
      start_visible_windows
     
    when $game_temp.status_command_index[:bio]
      YE::REDUX::STATUS::SOUND.play
      $game_temp.status_bio_flag = 1
      start_visible_windows
   
    when $game_temp.status_command_index[:skill]
      Sound.play_decision
      $scene = Scene_Skill.new(@actor_index)
     
    when $game_temp.status_command_index[:equip]
      Sound.play_decision
      $scene = Scene_Equip.new(@actor_index)
     
    when $game_temp.status_command_index[:classchange]
      Sound.play_decision
      $scene = Scene_Class_Change.new(@actor_index)
     
    when $game_temp.status_command_index[:learnskill]
      Sound.play_decision
      $scene = Scene_Learn_Skill.new(@actor_index)
     
    when $game_temp.status_command_index[:equipskill]
      Sound.play_decision
      $scene = Scene_Equip_Skill.new(@actor_index)
     
    else
      return_check = true
      for key in $game_temp.status_command_index
        if $game_temp.status_command_index[key[0]] == index
          return_check = false
          found_key = key[0]
          break
        end
      end
      return if return_check
      Sound.play_decision
      command_array = YE::REDUX::STATUS::IMPORTED_COMMANDS[found_key]
      $scene = eval(command_array[3] + ".new(@actor_index)")
     
    end
  end # case_command_selection
 
  #--------------------------------------------------------------------------
  # overwrite initialize
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, menu_index = 0)
    @menu_index = menu_index
    $game_temp.status_menu_flag = true
    @actor_index = actor_index
    @actor = $game_party.members[@actor_index]
  end
 
  #--------------------------------------------------------------------------
  # overwrite start
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @status_window = Window_Status.new(@actor)
    @status_mini_window = Window_Status_Mini.new(@actor)
    @status_bio_window = Window_Status_Bio.new(@actor)
    start_visible_windows
    create_command_window
  end
 
  #--------------------------------------------------------------------------
  # overwrite terminate
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose if @command_window != nil
    @status_window.dispose if @status_window != nil
    @status_mini_window.dispose if @status_mini_window != nil
    @status_bio_window.dispose if @status_bio_window != nil
  end
 
  #--------------------------------------------------------------------------
  # overwrite return scene
  #--------------------------------------------------------------------------
  def return_scene
    if $imported["CustomMenuCommand"] and
    $game_temp.menu_command_index.has_key?(:status)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:status])
    elsif $imported["CustomMenuCommand"]
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(3)
    end
    $game_temp.status_menu_flag = false
  end
 
  #--------------------------------------------------------------------------
  # overwrite next actor
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Status.new(@actor_index, @command_window.index)
  end
 
  #--------------------------------------------------------------------------
  # overwrite prev actor
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Status.new(@actor_index, @command_window.index)
  end
 
  #--------------------------------------------------------------------------
  # overwrite update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::C)
      $game_temp.status_menu_index = @command_window.index
      case_command_selection(@command_window.index)
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
  end
 
  #--------------------------------------------------------------------------
  # create command window
  #--------------------------------------------------------------------------
  def create_command_window
    commands = create_command_list
    @command_window = Window_Command.new(160, commands)
    @command_window.y = 128
    @command_window.height = 288
    @command_window.opacity = 0
    @command_window.index = @menu_index
  end
 
  #--------------------------------------------------------------------------
  # start visible windows
  #--------------------------------------------------------------------------
  def start_visible_windows
    @status_mini_window.visible = false
    @status_bio_window.visible = false
    case $game_temp.status_bio_flag
    when 0
      @status_mini_window.visible = true
    when 1
      @status_bio_window.visible = true
    end
  end
 
end

#==============================================================================
# Game_Temp
#==============================================================================

class Game_Temp
 
  #--------------------------------------------------------------------------
  # Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :status_command_index
  attr_accessor :status_menu_flag
  attr_accessor :status_menu_index
  attr_accessor :status_bio_flag
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_statusrd initialize unless $@
  def initialize
    initialize_statusrd
    @status_command_index = {}
    @status_menu_flag = false
    @status_menu_index = 0
    @status_bio_flag = 0
  end
end

#===============================================================================
# Scene Title
#===============================================================================

class Scene_Title < Scene_Base
 
  #--------------------------------------------------------------------------
  # alias create game objects
  #--------------------------------------------------------------------------
  alias create_game_objects_statusrd create_game_objects unless $@
  def create_game_objects
    create_game_objects_statusrd
    for key in YE::REDUX::STATUS::ACTOR_PROFILES2
      narray = key[1]
      $game_variables[narray[0]] = narray[1]
    end
  end
 
end # Scene_Title

#===============================================================================
# return scene alias
#===============================================================================
unless $imported["SceneSkillReDux"]
class Scene_Skill < Scene_Base
 
  #--------------------------------------------------------------------------
  # alias return scene
  #--------------------------------------------------------------------------
  alias skill_return_scene_statusrd return_scene unless $@
  def return_scene
    if $game_temp.status_menu_flag
      $scene = Scene_Status.new(@actor_index, $game_temp.status_menu_index)
    else
      skill_return_scene_statusrd
    end
  end
 
end
end
unless $imported["SceneEquipReDux"]
class Scene_Equip < Scene_Base
 
  #--------------------------------------------------------------------------
  # alias return scene
  #--------------------------------------------------------------------------
  alias equip_return_scene_statusrd return_scene unless $@
  def return_scene
    if $game_temp.status_menu_flag
      $scene = Scene_Status.new(@actor_index, $game_temp.status_menu_index)
    else
      equip_return_scene_statusrd
    end
  end
 
end
end

#===============================================================================
# Window_Status
#===============================================================================

class Window_Status < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 544, 416)
    @actor = actor
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_face(@actor, 0, 0)
    profile1 = YE::REDUX::STATUS::ACTOR_PROFILES1
    profile2 = YE::REDUX::STATUS::ACTOR_PROFILES2
    if profile1.include?(@actor.id)
      text = sprintf(profile1[@actor.id][0], @actor.name)
    else
      text = @actor.name
    end
    self.contents.draw_text(112, 0, 180, WLH, text, 0)
    #----
    dx = 112
    if $imported["SubclassSelectionSystem"]
      if YE::SUBCLASS::CLASS_ICONS.include?(@actor.class.id)
        icon = YE::SUBCLASS::CLASS_ICONS[@actor.class.id]
      else
        icon = YE::SUBCLASS::CLASS_ICONS[0]
      end
      draw_icon(icon, dx, 24)
      dx += 24
      if @actor.subclass != nil
        if YE::SUBCLASS::CLASS_ICONS.include?(@actor.subclass.id)
          icon = YE::SUBCLASS::CLASS_ICONS[@actor.subclass.id]
        else
          icon = YE::SUBCLASS::CLASS_ICONS[0]
        end
        draw_icon(icon, dx, 24)
        dx += 24
      end
    end
    draw_actor_class(@actor, dx, 24)
    #----
    self.contents.font.color = system_color
    text1 = YE::REDUX::STATUS::BIRTHDAY
    text2 = YE::REDUX::STATUS::AGE
    self.contents.draw_text(112, 48, 90, WLH, text1, 2)
    self.contents.draw_text(112, 72, 90, WLH, text2, 2)
    if profile2.include?(@actor.id)
      text1 = profile2[@actor.id][2]
      text2 = $game_variables[profile2[@actor.id][0]]
    else
      text1 = YE::REDUX::STATUS::UNKNOWN
      text2 = YE::REDUX::STATUS::UNKNOWN
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(202, 48, 90, WLH, text1, 0)
    self.contents.draw_text(202, 72, 90, WLH, text2, 0)
    #----
    self.contents.font.color = system_color
    text1 = YE::REDUX::STATUS::ORIGIN
    text2 = YE::REDUX::STATUS::GENDER
    text3 = YE::REDUX::STATUS::HEIGHT
    text4 = YE::REDUX::STATUS::WEIGHT
    self.contents.draw_text(292,  0, 90, WLH, text1, 2)
    self.contents.draw_text(292, 24, 90, WLH, text2, 2)
    self.contents.draw_text(292, 48, 90, WLH, text3, 2)
    self.contents.draw_text(292, 72, 90, WLH, text4, 2)
    if profile1.include?(@actor.id)
      text1 = profile1[@actor.id][1]
      text2 = profile1[@actor.id][2]
      text3 = profile1[@actor.id][3]
      text4 = profile1[@actor.id][4]
    else
      text1 = YE::REDUX::STATUS::UNKNOWN
      text2 = YE::REDUX::STATUS::UNKNOWN
      text3 = YE::REDUX::STATUS::UNKNOWN
      text4 = YE::REDUX::STATUS::UNKNOWN
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(382,  0, 90, WLH, text1, 0)
    self.contents.draw_text(382, 24, 90, WLH, text2, 0)
    self.contents.draw_text(382, 48, 90, WLH, text3, 0)
    self.contents.draw_text(382, 72, 90, WLH, text4, 0)
    #----
  end
 
end # Window_Status

#==============================================================================
# Window_Status_Mini
#==============================================================================

class Window_Status_Mini < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(160, 128, 384, 288)
    @actor = actor
    self.opacity = 0
    self.visible = false
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    #---
    sw = self.width - 32
    dx = 0
    dy = 0
    draw_icon(YE::REDUX::STATUS::ICON_LVL, dx, dy)
    self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_LVL)
   
    dy += WLH
    draw_icon(YE::REDUX::STATUS::ICON_NEXT, dx, dy)
    self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_NEXT)
    dy += WLH
    draw_icon(YE::REDUX::STATUS::ICON_EXP, dx, dy)
    self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_EXP)
   
    dy = WLH * 3
    draw_icon(YE::REDUX::STATUS::ICON_HP, dx, dy)
    draw_actor_hp(@actor, dx+24, dy, 128)
    dy += WLH
    self.contents.font.color = system_color
    draw_icon(YE::REDUX::STATUS::ICON_ATK, dx, dy)
    self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_ATK)
    dy += WLH
    draw_icon(YE::REDUX::STATUS::ICON_DEF, dx, dy)
    self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_DEF)
    dy += WLH
    draw_icon(YE::REDUX::STATUS::ICON_SPI, dx, dy)
    self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_SPI)
    dy += WLH
    draw_icon(YE::REDUX::STATUS::ICON_AGI, dx, dy)
    self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_AGI)
    #---
    dx = sw/2
    dy = WLH * 3
    draw_icon(YE::REDUX::STATUS::ICON_MP, dx, dy)
    draw_actor_mp(@actor, dx+24, dy, 128)
    dy += WLH
    self.contents.font.color = system_color
    if YE::REDUX::STATUS::SHOW_HIT
      draw_icon(YE::REDUX::STATUS::ICON_HIT, dx, dy)
      self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_HIT)
    end
    dy += WLH
    if YE::REDUX::STATUS::SHOW_EVA
      draw_icon(YE::REDUX::STATUS::ICON_EVA, dx, dy)
      self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_EVA)
    end
    dy += WLH
    if YE::REDUX::STATUS::SHOW_CRI
      draw_icon(YE::REDUX::STATUS::ICON_CRI, dx, dy)
      self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_CRI)
    end
    dy += WLH
    if YE::REDUX::STATUS::SHOW_ODDS
      draw_icon(YE::REDUX::STATUS::ICON_ODDS, dx, dy)
      self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_ODDS)
    end
    #---
    self.contents.font.color = normal_color
    dw = sw - 84
    dx = 84
    dy = 0
    self.contents.draw_text(dx, dy, 68, WLH, @actor.level); dy += WLH
    self.contents.draw_text(dx, dy, dw, WLH, @actor.next_rest_exp_s); dy += WLH
    self.contents.draw_text(dx, dy, dw, WLH, @actor.exp_s); dy += WLH
   
    dy = WLH * 4
    self.contents.draw_text(dx, dy, 68, WLH, @actor.atk, 0); dy += WLH
    self.contents.draw_text(dx, dy, 68, WLH, @actor.def, 0); dy += WLH
    self.contents.draw_text(dx, dy, 68, WLH, @actor.spi, 0); dy += WLH
    self.contents.draw_text(dx, dy, 68, WLH, @actor.agi, 0); dy += WLH
    dy = WLH * 4
    dx = sw/2 + 84
    if YE::REDUX::STATUS::SHOW_HIT
      text = sprintf("%d%%", @actor.hit)
      self.contents.draw_text(dx, dy, 68, WLH, text, 0)
    end; dy += WLH
    if YE::REDUX::STATUS::SHOW_EVA
      text = sprintf("%d%%", @actor.eva)
      self.contents.draw_text(dx, dy, 68, WLH, text, 0)
    end; dy += WLH
    if YE::REDUX::STATUS::SHOW_CRI
      text = sprintf("%d%%", @actor.cri)
      self.contents.draw_text(dx, dy, 68, WLH, text, 0)
    end; dy += WLH
    if YE::REDUX::STATUS::SHOW_ODDS
      self.contents.draw_text(dx, dy, 68, WLH, @actor.odds, 0)
    end; dy += WLH
  end
 
end # Window_Status_Mini

#==============================================================================
# Window_Status_Bio
#==============================================================================

class Window_Status_Bio < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(160, 128, 384, 288)
    @actor = actor
    self.opacity = 0
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.font.size = YE::REDUX::STATUS::BIO_FONT_SIZE
    if YE::REDUX::STATUS::ACTOR_BIOGRAPHIES.include?(@actor.id)
      text = YE::REDUX::STATUS::ACTOR_BIOGRAPHIES[@actor.id]
    else
      text = YE::REDUX::STATUS::ACTOR_BIOGRAPHIES[0]
    end
    y = 0
    txsize = YE::REDUX::STATUS::BIO_FONT_SIZE + 4
    nwidth = 544
    buf = text.gsub(/\\N(\[\d+\])/i) { "\\__#{$1}" }
    lines = buf.split(/(?:[|]|\\n)/i)
    lines.each_with_index { |l, i|
      l.gsub!(/\\__(\[\d+\])/i) { "\\N#{$1}" }
      self.contents.draw_text(0, i * txsize + y, nwidth, WLH, l, 0)
    }
  end
 
end # Window_Status_Bio

#===============================================================================
#
# END OF FILE
#
#===============================================================================


J'explique maintenant ce que je voudrais :
Je veux que la caractéristique crée par le premier script (DEX) apparaisse dans le window_status qui est modifié par le 2ème script.
Pour faire simple, je veux savoir quelles lignes de script rajouter dans le 2ème script pour que le joueur voit cette caractéristique dans le menu statut d'un perso.

J'espère être assez clair et précis ><

Merci d'avance

PS : j'utilise aussi un script de yanfly (YERD) qui permet de scanner les ennemis. En plus ce scan crée une encyclopédie (bestiaire) où à peu près tout est répertorié sur les monstres (caractéristique, description, butin, exp...). Et je voudrais que la nouvelle caractéristique crée (DEX) apparaisse également lors du scan ET de la visite sur le bestiaire. (car cette caractéristique est valable aussi pour les ennemis).

Voilou ! merci !


Dernière édition par Orbital le Sam 20 Mar 2010 - 1:08, édité 1 fois
Berka
Berka
Administrateur

Nombre de messages : 1832
Age : 29
Localisation : Paris
Distinction : rubyste déglingué
9ème dan en scripting-no-jutsu

Nouveau Justine Beber ;P
Date d'inscription : 16/12/2007
http://rpgruby.olympe-network.com

[Résolu] Compatibilité de 2 window_status Empty Re: [Résolu] Compatibilité de 2 window_status

le Lun 15 Mar 2010 - 21:39
Dex n'est pas géré nativement ?

Dans tous les cas tu fais:
Code:
self.contents.draw_text(x, y, 36, WLH, $game_actors[ID].dex, 2)
Dans la méthode refresh du second script, classe Window_Status
Orbital
Orbital
Membre

Nombre de messages : 141
Age : 28
Localisation : Euh, tu vois la France ? l'Isère ? grenoble ? SMH ? ma maison ? le bureau ? le PC ? bah c'est là
Distinction : aucune
Date d'inscription : 09/08/2008

[Résolu] Compatibilité de 2 window_status Empty Re: [Résolu] Compatibilité de 2 window_status

le Lun 15 Mar 2010 - 21:52
hum, il me met une erreur :
[Résolu] Compatibilité de 2 window_status 16181597678400_sans_titre_2

En effet Dex est un ajout grâce au script. Je vais essayer de rajouter ICON_DEX = 48 TEXT_DEX = "DEX"
à la ligne 160 du deuxième script, puis
dy += WLH
draw_icon(YE::REDUX::STATUS::ICON_DEX, dx, dy)
self.contents.draw_text(dx+24, dy, 60, WLH, YE::REDUX::STATUS::TEXT_DEX)
à la 700ème, et enfin tenter un truc vers la ligne 740, en copiant ce modèle : self.contents.draw_text(dx, dy, 68, WLH, @actor.agi, 0); dy += WLH
Mais pour afficher la valeur de dex qui est dans l'autre scipt... en espérant que ça soit possible.

Bref, je m'en vais bidouiller le script (j'adore faire ça, essayer plein de truc, voir comment ça marche, en général ça finit en freestyle total où plus rien ne marche XD)
Berka
Berka
Administrateur

Nombre de messages : 1832
Age : 29
Localisation : Paris
Distinction : rubyste déglingué
9ème dan en scripting-no-jutsu

Nouveau Justine Beber ;P
Date d'inscription : 16/12/2007
http://rpgruby.olympe-network.com

[Résolu] Compatibilité de 2 window_status Empty Re: [Résolu] Compatibilité de 2 window_status

le Lun 15 Mar 2010 - 21:56
Logique. Il faut que tu remplaces ID par l'id de ton héro

dans ce cas, là, tu peux mettre:
Code:
self.contents.draw_text(dx, dy, 68, WLH, @actor.dex, 0); dy += WLH
Orbital
Orbital
Membre

Nombre de messages : 141
Age : 28
Localisation : Euh, tu vois la France ? l'Isère ? grenoble ? SMH ? ma maison ? le bureau ? le PC ? bah c'est là
Distinction : aucune
Date d'inscription : 09/08/2008

[Résolu] Compatibilité de 2 window_status Empty Re: [Résolu] Compatibilité de 2 window_status

le Lun 15 Mar 2010 - 21:58
Yep, je venais de le faire, ça marche effectivement, j'allais te le dire, tout content, mais tu m'as dit la réponse.

Merci à toi pour ton aide =p
Pour le bestiaire il faut que je rajoute une ligne du genre je pense, je vais bidouiller voir, si j'ai un problème, j'édit ou je upperais.

Woilou. Je ne mets pas sujet résolu car la demande pourrait se réitérer avec le bestiaire donc je laisse en suspend, histoire de pas créer 20 topics.
Balbereith
Balbereith
Staffeux retraité

Nombre de messages : 4129
Age : 26
Localisation : dans l'ombre...
Distinction : Péripatéticienne à temps perdu
Helly n°666 [Coco' ;D]
mon ptit balbounet p'tit jardinier en herbe(les râteaux ça le connait) [tonton Adurna]
Cultivateur professionnel de la commu' (il a de bons outils en de nombreux exemplaires [Résolu] Compatibilité de 2 window_status 522164 ) [Coco' Smile]
Date d'inscription : 13/05/2009

[Résolu] Compatibilité de 2 window_status Empty Re: [Résolu] Compatibilité de 2 window_status

le Ven 19 Mar 2010 - 20:44
Résolu ? Dans une semaine, je sanctionne, s'il y a pas de relance ou de réponse, résolvant le problème.
Orbital
Orbital
Membre

Nombre de messages : 141
Age : 28
Localisation : Euh, tu vois la France ? l'Isère ? grenoble ? SMH ? ma maison ? le bureau ? le PC ? bah c'est là
Distinction : aucune
Date d'inscription : 09/08/2008

[Résolu] Compatibilité de 2 window_status Empty Re: [Résolu] Compatibilité de 2 window_status

le Sam 20 Mar 2010 - 1:08
Sur ce coup, je te fais toute mes excuses, c'est vrai que le sujet en question est (partiellement résolu), mais ma demande principale l'est vraiment.
Tu peux locker.
Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum