查看: 2188|回复: 1

[已经过期] 谁能帮忙把天赋脚本和详细状态脚本整合一下

[复制链接]
梦石
0
星屑
50
在线时间
182 小时
注册时间
2015-11-14
回帖
44
发表于 2016-6-17 19:26:31 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
请原谅我表达能力不好直接用图表示
下面是脚本
天赋
  1. module ActorQuality
  2.   #总评分级次
  3.   QUALITY_AMOUNT = 13
  4.   #各级次显示字母
  5.   QUALITY_LETTER = ["D", "D+", "C", "C+", "B", "B+", "A", "A+", "S", "S+", "SS", "SS+", "SSS"]
  6.   #每级评分
  7.   QUALITY_MARK = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
  8.   #分母
  9.   QUALITY_DENOMINATOR = 367
  10.   #各级次所对应分子,配合分母就是概率
  11.   QUALITY_MOLECULAR = [1, 3, 7, 15, 31, 63, 127, 63, 31, 15, 7, 3, 1]
  12.   #各级次对应成长率
  13.   QUALITY_CHANGE = [0.25, 0.29, 0.33, 0.4, 0.5, 0.67, 1, 1.001, 1.007, 1.01, 1.04, 1.06, 1.09]
  14.   #是否显示
  15.   QUALITY_SHOW = true
  16. end

  17. class Game_Actor < Game_Battler
  18.   
  19.   attr_accessor :tan_quality_param#各属性级次数组
  20.   attr_accessor :tan_all_quality_param#总评分
  21.   attr_accessor :tan_game_actor_temp#临时变量
  22.   
  23.   #--------------------------------------------------------------------------
  24.   # ● 属性级次初始化
  25.   #--------------------------------------------------------------------------
  26.   def init_tan_quality_param
  27.     @tan_quality_param = [0] * 8#各属性级次数组初始化
  28.     @tan_all_quality_param = 0#总评分初始化
  29.     @tan_game_actor_temp = [0] * ActorQuality::QUALITY_AMOUNT#临时变量初始化
  30.     @tan_game_actor_temp.count.times {|i|
  31.       if i == 0
  32.         @tan_game_actor_temp[i] = ActorQuality::QUALITY_MOLECULAR[i]
  33.       else
  34.         @tan_game_actor_temp[i] = @tan_game_actor_temp[i-1] + ActorQuality::QUALITY_MOLECULAR[i]
  35.       end
  36.     }
  37.     8.times {|i|
  38.       v = rand(ActorQuality::QUALITY_DENOMINATOR)
  39.       @tan_game_actor_temp.each_with_index {|i2, i3|
  40.         if v < i2
  41.           @tan_quality_param[i] = i3
  42.           break
  43.         end
  44.       }
  45.       @tan_all_quality_param += ActorQuality::QUALITY_MARK[@tan_quality_param[i]]
  46.     }
  47.     init_tan_all_quality_param
  48.     self.hp = self.mhp
  49.     self.mp = self.mmp
  50.   end
  51.   #--------------------------------------------------------------------------
  52.   # ● 计算总评分,并将总评分转化成评价
  53.   #--------------------------------------------------------------------------
  54.   def init_tan_all_quality_param
  55.     @tan_all_quality_param = (@tan_all_quality_param / 8.0).round
  56.     ActorQuality::QUALITY_MARK.count.times {|i|
  57.       if @tan_all_quality_param <= ActorQuality::QUALITY_MARK[i]
  58.         @tan_all_quality_param = i
  59.         break
  60.       end
  61.     }
  62.   end
  63.   #--------------------------------------------------------------------------
  64.   # ● 设置(人物初始化重写)
  65.   #--------------------------------------------------------------------------
  66.   alias tan_quality_setup setup
  67.   def setup(actor_id)
  68.     tan_quality_setup(actor_id)
  69.     init_tan_quality_param
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● 获取普通能力的基础值(重写)
  73.   #--------------------------------------------------------------------------
  74.   alias tan_quality_param_base param_base
  75.   def param_base(param_id)
  76.     v = tan_quality_param_base(param_id)
  77.     i = @tan_quality_param[param_id] if @tan_quality_param
  78.     v = v * ActorQuality::QUALITY_CHANGE[i].to_f if i
  79.     return v.to_i
  80.   end
  81.   #--------------------------------------------------------------------------
  82.   # ● 获取普通能力的最大值(为了防止属性爆表后还是999不能突破1000,特意修改该方法)
  83.   #--------------------------------------------------------------------------
  84.   def param_max(param_id)
  85.     return 1000000000
  86.   end
  87. end

  88. #==============================================================================
  89. # ■ Window_Status
  90. #------------------------------------------------------------------------------
  91. #  状态画面中,显示角色基本信息的窗口。(新增评分信息)
  92. #==============================================================================
  93. class Window_Status < Window_Selectable
  94.   #--------------------------------------------------------------------------
  95.   # ● 绘制基本信息(增加HP、MP评分以及总评分)
  96.   #--------------------------------------------------------------------------
  97.   alias draw_basic_info_quality draw_basic_info
  98.   def draw_basic_info(x, y)
  99.     draw_basic_info_quality(x, y)
  100.     s = "Rank:" + ActorQuality::QUALITY_LETTER[@actor.tan_all_quality_param]
  101.     draw_text(x + 60, y + line_height * 0, 108, line_height, s, 2)
  102.     s = ActorQuality::QUALITY_LETTER[@actor.tan_quality_param[0]]
  103.     draw_text(x + 120, y + line_height * 2, 36, line_height, s, 2)
  104.     s = ActorQuality::QUALITY_LETTER[@actor.tan_quality_param[1]]
  105.     draw_text(x + 120, y + line_height * 3, 36, line_height, s, 2)
  106.   end
  107.   #--------------------------------------------------------------------------
  108.   # ● 绘制能力值(增加其他属性评分)
  109.   #--------------------------------------------------------------------------
  110.   alias draw_parameters_actor_quality draw_parameters
  111.   def draw_parameters(x, y)
  112.     draw_parameters_actor_quality(x, y)
  113.     6.times {|i|
  114.       s = ActorQuality::QUALITY_LETTER[@actor.tan_quality_param[i + 2]]
  115.       change_color(normal_color)
  116.       draw_text(x + 200, y + line_height * i, 36, line_height, s, 2)
  117.     }
  118.   end
  119. end
复制代码

详细状态
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Ace Status Menu v1.01
  4. # -- Last Updated: 2011.12.26
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-StatusMenu"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2011.12.26 - Compatibility Update: Rename Actor
  15. # 2011.12.23 - Started Script and Finished.
  16. #
  17. #==============================================================================
  18. # ▼ Introduction
  19. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  20. # This script changes the status screen completely to something the player can
  21. # interact with more and be able to view actor data with more clarity. The
  22. # player is able to view the general information for an actor (parameters and
  23. # experience), a parameters bar graph, the various hidden extra parameters
  24. # (named properties in the script), and a customizable biography for the actor.
  25. # Also with this script, biographies can be changed at any time using a script
  26. # call to add more of a personal touch to characters.
  27. #
  28. #==============================================================================
  29. # ▼ Instructions
  30. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31. # To install this script, open up your script editor and copy/paste this script
  32. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  33. #
  34. # -----------------------------------------------------------------------------
  35. # Script Calls - These commands are used with script calls.
  36. # -----------------------------------------------------------------------------
  37. # $game_actors[x].description = string
  38. # Changes the biography description for actor x to that of the string. Use \n
  39. # to designate linebreaks in the string. If you wish to use text codes, write
  40. # them in the strings as \\n[2] or \\c[3] to make them work properly.
  41. #
  42. #==============================================================================
  43. # ▼ Compatibility
  44. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  45. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  46. # it will run with RPG Maker VX without adjusting.
  47. #
  48. #==============================================================================

  49. module YEA
  50.   module STATUS

  51.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  52.     # - Command Window Settings -
  53.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  54.     # This section adjusts the commands that appear in the command window used
  55.     # for the status screen. Rearrange the commands, add new ones, remove them
  56.     # as you see fit.
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     COMMANDS =[ # The order at which the menu items are shown.
  59.     # [    :command,    "Display"],
  60.       [    :general,    "基本信息"],
  61.       [ :parameters, "数据"],
  62.       [ :properties, "属性"],
  63.     # [    :custom1,     "Skills"],
  64.     # [    :custom2,  "Equipment"],
  65.     # [    :custom3,      "Class"],
  66.       [  :biography,  "传记"],
  67.       [     :rename,     "Rename"],  # Requires YEA - Rename Actor
  68.       [    :retitle,    "Retitle"],  # Requires YEA - Rename Actor
  69.     ] # Do not remove this.

  70.     #--------------------------------------------------------------------------
  71.     # - Status Custom Commands -
  72.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  73.     # For those who use scripts to that may produce unique effects for the
  74.     # status menu, use this hash to manage the custom commands for the Status
  75.     # Command Window. You can disable certain commands or prevent them from
  76.     # appearing by using switches. If you don't wish to bind them to a switch,
  77.     # set the proper switch to 0 for it to have no impact.
  78.     #--------------------------------------------------------------------------
  79.     CUSTOM_STATUS_COMMANDS ={
  80.     # :command => [EnableSwitch, ShowSwitch, Handler Method, Window Draw],
  81.       :custom1 => [           0,          0, :command_name1, :draw_custom1],
  82.       :custom2 => [           0,          0, :command_name2, :draw_custom2],
  83.       :custom3 => [           0,          0, :command_name3, :draw_custom3],
  84.     } # Do not remove this.

  85.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86.     # - General Window Settings -
  87.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  88.     # These settings adjust the way the general window visually appears.
  89.     # Not many changes need to be done here other than vocab changes.
  90.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91.     PARAMETERS_VOCAB = "数据"         # Title used for Parameters.
  92.     EXPERIENCE_VOCAB = "经验值"         # Title used for Experience.
  93.     NEXT_TOTAL_VOCAB = "下次 %s 经验值总数"  # Label used for total experience.

  94.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  95.     # - Parameters Window Settings -
  96.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  97.     # These settings adjust the way the parameters window visually appears.
  98.     # Each of the stats have a non-window colour. Adjust them as you see fit.
  99.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  100.     PARAM_COLOUR ={
  101.     # ParamID => [:stat,       Colour1,                   Colour2          ],
  102.             2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
  103.             3 => [ :def, Color.new(250, 150,  30), Color.new(250, 180, 100)],
  104.             4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
  105.             5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
  106.             6 => [ :agi, Color.new( 60, 180,  80), Color.new(120, 200, 120)],
  107.             7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
  108.     } # Do not remove this.

  109.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  110.     # - Properties Window Settings -
  111.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  112.     # These settings adjust the way the properties window visually appears.
  113.     # The properties have abbreviations, but leaving them as such makes things
  114.     # confusing (as it's sometimes hard to figure out what the abbreviations
  115.     # mean). Change the way the appear, whether or not they appear, and what
  116.     # order they will appear in.
  117.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  118.     PROPERTIES_FONT_SIZE = 16        # Font size used for properties.

  119.     # These are the properties that appear in column 1.
  120.     PROPERTIES_COLUMN1 =[
  121.       [:hit, "命中"],
  122.       [:eva, "躲避"],
  123.       [:cri, "暴击"],
  124.       [:cev, "暴击闪避"],
  125.       [:mev, "魔法躲避"],
  126.       [:mrf, "魔法反射"],
  127.       [:cnt, "反击"],
  128.       [:tgr, "目标攻击"],
  129.     ] # Do not remove this.

  130.     # These are the properties that appear in column 2.
  131.     PROPERTIES_COLUMN2 =[
  132.       [:hrg, "hp恢复"],
  133.       [:mrg, "mp再生"],
  134.       [:trg, "TP再生"],
  135.       [:rec, "恢复"],
  136.       [:grd, "防御力"],
  137.       [:pha, "物品使用"],
  138.       [:exr, "经验值获得"],
  139.       [:tcr, "TP模式"],
  140.     ] # Do not remove this.

  141.     # These are the properties that appear in column 3.
  142.     PROPERTIES_COLUMN3 =[
  143.       [:hcr, "士兵消费伤害"],    # Requires YEA - Skill Cost Manager
  144.       [:mcr, "魔法消费伤害"],
  145.       [:tcr, "士气消费伤害"],    # Requires YEA - Skill Cost Manager
  146.       [:cdr, "硬直伤害"],   # Requires YEA - Skill Restrictions
  147.       [:wur, "激励伤害"],     # Requires YEA - Skill Restrictions
  148.       [:pdr, "物理伤害"],
  149.       [:mdr, "魔法伤害"],
  150.       [:fdr, "基本伤害"],
  151.     ] # Do not remove this.

  152.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  153.     # - Biography Window Settings -
  154.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  155.     # These settings adjust the way the biography appears including the title
  156.     # used at the top, the font size, and whatnot.
  157.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  158.     BIOGRAPHY_NICKNAME_TEXT = "%s %s"   # How the nickname will appear.
  159.     BIOGRAPHY_NICKNAME_SIZE = 32            # Size of the font used.



  160.   end # STATUS
  161. end # YEA

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

  167. #==============================================================================
  168. # ■ Numeric
  169. #==============================================================================

  170. class Numeric

  171.   #--------------------------------------------------------------------------
  172.   # new method: group_digits
  173.   #--------------------------------------------------------------------------
  174.   unless $imported["YEA-CoreEngine"]
  175.   def group; return self.to_s; end
  176.   end # $imported["YEA-CoreEngine"]

  177. end # Numeric

  178. #==============================================================================
  179. # ■ Game_Temp
  180. #==============================================================================

  181. class Game_Temp

  182.   #--------------------------------------------------------------------------
  183.   # public instance variables
  184.   #--------------------------------------------------------------------------
  185.   attr_accessor :scene_status_index
  186.   attr_accessor :scene_status_oy

  187. end # Game_Temp

  188. #==============================================================================
  189. # ■ Game_Actor
  190. #==============================================================================

  191. class Game_Actor < Game_Battler

  192.   #--------------------------------------------------------------------------
  193.   # new method: description=
  194.   #--------------------------------------------------------------------------
  195.   def description=(text)
  196.     @description = text
  197.   end

  198.   #--------------------------------------------------------------------------
  199.   # overwrite method: description
  200.   #--------------------------------------------------------------------------
  201.   def description
  202.     return @description unless @description.nil?
  203.     return actor.description
  204.   end

  205. end # Game_Actor

  206. #==============================================================================
  207. # ■ Window_StatusCommand
  208. #==============================================================================

  209. class Window_StatusCommand < Window_Command

  210.   #--------------------------------------------------------------------------
  211.   # public instance variables
  212.   #--------------------------------------------------------------------------
  213.   attr_accessor :item_window

  214.   #--------------------------------------------------------------------------
  215.   # initialize
  216.   #--------------------------------------------------------------------------
  217.   def initialize(dx, dy)
  218.     super(dx, dy)
  219.     @actor = nil
  220.   end

  221.   #--------------------------------------------------------------------------
  222.   # window_width
  223.   #--------------------------------------------------------------------------
  224.   def window_width; return 160; end

  225.   #--------------------------------------------------------------------------
  226.   # actor=
  227.   #--------------------------------------------------------------------------
  228.   def actor=(actor)
  229.     return if @actor == actor
  230.     @actor = actor
  231.     refresh
  232.   end

  233.   #--------------------------------------------------------------------------
  234.   # visible_line_number
  235.   #--------------------------------------------------------------------------
  236.   def visible_line_number; return 4; end

  237.   #--------------------------------------------------------------------------
  238.   # ok_enabled?
  239.   #--------------------------------------------------------------------------
  240.   def ok_enabled?
  241.     return handle?(current_symbol)
  242.   end

  243.   #--------------------------------------------------------------------------
  244.   # make_command_list
  245.   #--------------------------------------------------------------------------
  246.   def make_command_list
  247.     return unless @actor
  248.     for command in YEA::STATUS::COMMANDS
  249.       case command[0]
  250.       #--- Default ---
  251.       when :general, :parameters, :properties, :biography
  252.         add_command(command[1], command[0])
  253.       #--- Yanfly Engine Ace ---
  254.       when :rename
  255.         next unless $imported["YEA-RenameActor"]
  256.         add_command(command[1], command[0], @actor.rename_allow?)
  257.       when :retitle
  258.         next unless $imported["YEA-RenameActor"]
  259.         add_command(command[1], command[0], @actor.retitle_allow?)
  260.       #--- Custom Commands ---
  261.       else
  262.         process_custom_command(command)
  263.       end
  264.     end
  265.     if !$game_temp.scene_status_index.nil?
  266.       select($game_temp.scene_status_index)
  267.       self.oy = $game_temp.scene_status_oy
  268.     end
  269.     $game_temp.scene_status_index = nil
  270.     $game_temp.scene_status_oy = nil
  271.   end

  272.   #--------------------------------------------------------------------------
  273.   # process_ok
  274.   #--------------------------------------------------------------------------
  275.   def process_ok
  276.     $game_temp.scene_status_index = index
  277.     $game_temp.scene_status_oy = self.oy
  278.     super
  279.   end

  280.   #--------------------------------------------------------------------------
  281.   # process_custom_command
  282.   #--------------------------------------------------------------------------
  283.   def process_custom_command(command)
  284.     return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
  285.     show = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][1]
  286.     continue = show <= 0 ? true : $game_switches[show]
  287.     return unless continue
  288.     text = command[1]
  289.     switch = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][0]
  290.     enabled = switch <= 0 ? true : $game_switches[switch]
  291.     add_command(text, command[0], enabled)
  292.   end

  293.   #--------------------------------------------------------------------------
  294.   # update
  295.   #--------------------------------------------------------------------------
  296.   def update
  297.     super
  298.     update_item_window
  299.   end

  300.   #--------------------------------------------------------------------------
  301.   # update_item_window
  302.   #--------------------------------------------------------------------------
  303.   def update_item_window
  304.     return if @item_window.nil?
  305.     return if @current_index == current_symbol
  306.     @current_index = current_symbol
  307.     @item_window.refresh
  308.   end

  309.   #--------------------------------------------------------------------------
  310.   # item_window=
  311.   #--------------------------------------------------------------------------
  312.   def item_window=(window)
  313.     @item_window = window
  314.     update
  315.   end

  316.   #--------------------------------------------------------------------------
  317.   # update_help
  318.   #--------------------------------------------------------------------------
  319.   def update_help
  320.     return if @actor.nil?
  321.     @help_window.set_text(@actor.actor.description)
  322.   end

  323. end # Window_StatusCommand

  324. #==============================================================================
  325. # ■ Window_StatusActor
  326. #==============================================================================

  327. class Window_StatusActor < Window_Base

  328.   #--------------------------------------------------------------------------
  329.   # initialize
  330.   #--------------------------------------------------------------------------
  331.   def initialize(dx, dy)
  332.     super(dx, dy, window_width, fitting_height(4))
  333.     @actor = nil
  334.   end

  335.   #--------------------------------------------------------------------------
  336.   # window_width
  337.   #--------------------------------------------------------------------------
  338.   def window_width; return Graphics.width - 160; end

  339.   #--------------------------------------------------------------------------
  340.   # actor=
  341.   #--------------------------------------------------------------------------
  342.   def actor=(actor)
  343.     return if @actor == actor
  344.     @actor = actor
  345.     refresh
  346.   end

  347.   #--------------------------------------------------------------------------
  348.   # refresh
  349.   #--------------------------------------------------------------------------
  350.   def refresh
  351.     contents.clear
  352.     return unless @actor
  353.     draw_actor_face(@actor, 0, 0)
  354.     draw_actor_simple_status(@actor, 108, line_height / 2)
  355.   end

  356. end # Window_StatusActor

  357. #==============================================================================
  358. # ■ Window_StatusItem
  359. #==============================================================================

  360. class Window_StatusItem < Window_Base

  361.   #--------------------------------------------------------------------------
  362.   # initialize
  363.   #--------------------------------------------------------------------------
  364.   def initialize(dx, dy, command_window)
  365.     super(dx, dy, Graphics.width, Graphics.height - dy)
  366.     @command_window = command_window
  367.     @actor = nil
  368.     refresh
  369.   end

  370.   #--------------------------------------------------------------------------
  371.   # actor=
  372.   #--------------------------------------------------------------------------
  373.   def actor=(actor)
  374.     return if @actor == actor
  375.     @actor = actor
  376.     refresh
  377.   end

  378.   #--------------------------------------------------------------------------
  379.   # refresh
  380.   #--------------------------------------------------------------------------
  381.   def refresh
  382.     contents.clear
  383.     reset_font_settings
  384.     return unless @actor
  385.     draw_window_contents
  386.   end

  387.   #--------------------------------------------------------------------------
  388.   # draw_window_contents
  389.   #--------------------------------------------------------------------------
  390.   def draw_window_contents
  391.     case @command_window.current_symbol
  392.     when :general
  393.       draw_actor_general
  394.     when :parameters
  395.       draw_parameter_graph
  396.     when :properties
  397.       draw_properties_list
  398.     when :biography, :rename, :retitle
  399.       draw_actor_biography
  400.     else
  401.       draw_custom
  402.     end
  403.   end

  404.   #--------------------------------------------------------------------------
  405.   # draw_actor_general
  406.   #--------------------------------------------------------------------------
  407.   def draw_actor_general
  408.     change_color(system_color)
  409.     text = YEA::STATUS::PARAMETERS_VOCAB
  410.     draw_text(0, 0, contents.width/2, line_height, text, 1)
  411.     text = YEA::STATUS::EXPERIENCE_VOCAB
  412.     draw_text(contents.width/2, 0, contents.width/2, line_height, text, 1)
  413.     draw_general_parameters
  414.     draw_general_experience
  415.   end

  416.   #--------------------------------------------------------------------------
  417.   # draw_general_parameters
  418.   #--------------------------------------------------------------------------
  419.   def draw_general_parameters
  420.     dx = 24
  421.     dy = line_height / 2
  422.     draw_actor_level(dx, line_height*1+dy, contents.width/2 - 24)
  423.     draw_actor_param(0, dx, line_height*2+dy, contents.width/2 - 24)
  424.     draw_actor_param(1, dx, line_height*3+dy, contents.width/2 - 24)
  425.     draw_actor_param(2, dx, line_height*4+dy, contents.width/4 - 12)
  426.     draw_actor_param(4, dx, line_height*5+dy, contents.width/4 - 12)
  427.     draw_actor_param(6, dx, line_height*6+dy, contents.width/4 - 12)
  428.     dx += contents.width/4 - 12
  429.     draw_actor_param(3, dx, line_height*4+dy, contents.width/4 - 12)
  430.     draw_actor_param(5, dx, line_height*5+dy, contents.width/4 - 12)
  431.     draw_actor_param(7, dx, line_height*6+dy, contents.width/4 - 12)
  432.   end

  433.   #--------------------------------------------------------------------------
  434.   # draw_actor_level
  435.   #--------------------------------------------------------------------------
  436.   def draw_actor_level(dx, dy, dw)
  437.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  438.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  439.     contents.fill_rect(rect, colour)
  440.     change_color(system_color)
  441.     draw_text(dx+4, dy, dw-8, line_height, Vocab::level)
  442.     change_color(normal_color)
  443.     draw_text(dx+4, dy, dw-8, line_height, @actor.level.group, 2)
  444.   end

  445.   #--------------------------------------------------------------------------
  446.   # draw_actor_param
  447.   #--------------------------------------------------------------------------
  448.   def draw_actor_param(param_id, dx, dy, dw)
  449.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  450.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  451.     contents.fill_rect(rect, colour)
  452.     change_color(system_color)
  453.     draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
  454.     change_color(normal_color)
  455.     draw_text(dx+4, dy, dw-8, line_height, @actor.param(param_id).group, 2)
  456.   end

  457.   #--------------------------------------------------------------------------
  458.   # draw_general_experience
  459.   #--------------------------------------------------------------------------
  460.   def draw_general_experience
  461.     if @actor.max_level?
  462.       s1 = @actor.exp.group
  463.       s2 = "-------"
  464.       s3 = "-------"
  465.     else
  466.       s1 = @actor.exp.group
  467.       s2 = (@actor.next_level_exp - @actor.exp).group
  468.       s3 = @actor.next_level_exp.group
  469.     end
  470.     s_next = sprintf(Vocab::ExpNext, Vocab::level)
  471.     total_next_text = sprintf(YEA::STATUS::NEXT_TOTAL_VOCAB, Vocab::level)
  472.     change_color(system_color)
  473.     dx = contents.width/2 + 12
  474.     dy = line_height * 3 / 2
  475.     dw = contents.width/2 - 36
  476.     draw_text(dx, dy + line_height * 0, dw, line_height, Vocab::ExpTotal)
  477.     draw_text(dx, dy + line_height * 2, dw, line_height, s_next)
  478.     draw_text(dx, dy + line_height * 4, dw, line_height, total_next_text)
  479.     change_color(normal_color)
  480.     draw_text(dx, dy + line_height * 1, dw, line_height, s1, 2)
  481.     draw_text(dx, dy + line_height * 3, dw, line_height, s2, 2)
  482.     draw_text(dx, dy + line_height * 5, dw, line_height, s3, 2)
  483.   end

  484.   #--------------------------------------------------------------------------
  485.   # draw_parameter_graph
  486.   #--------------------------------------------------------------------------
  487.   def draw_parameter_graph
  488.     draw_parameter_title
  489.     dy = line_height * 3/2
  490.     maximum = 1
  491.     minimum = @actor.param_max(2)
  492.     for i in 2..7
  493.       maximum = [@actor.param(i), maximum].max
  494.       minimum = [@actor.param(i), minimum].min
  495.     end
  496.     maximum += minimum * 0.33 unless maximum == minimum
  497.     for i in 2..7
  498.       rate = calculate_rate(maximum, minimum, i)
  499.       dy = line_height * i - line_height/2
  500.       draw_param_gauge(i, dy, rate)
  501.       change_color(system_color)
  502.       draw_text(28, dy, contents.width - 56, line_height, Vocab::param(i))
  503.       dw = (contents.width - 48) * rate - 8
  504.       change_color(normal_color)
  505.       draw_text(28, dy, dw, line_height, @actor.param(i).group, 2)
  506.     end
  507.   end

  508.   #--------------------------------------------------------------------------
  509.   # calculate_rate
  510.   #--------------------------------------------------------------------------
  511.   def calculate_rate(maximum, minimum, param_id)
  512.     return 1.0 if maximum == minimum
  513.     rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
  514.     rate *= 0.67
  515.     rate += 0.33
  516.     return rate
  517.   end

  518.   #--------------------------------------------------------------------------
  519.   # draw_param_gauge
  520.   #--------------------------------------------------------------------------
  521.   def draw_param_gauge(param_id, dy, rate)
  522.     dw = contents.width - 48
  523.     colour1 = param_gauge1(param_id)
  524.     colour2 = param_gauge2(param_id)
  525.     draw_gauge(24, dy, dw, rate, colour1, colour2)
  526.   end

  527.   #--------------------------------------------------------------------------
  528.   # param_gauge1
  529.   #--------------------------------------------------------------------------
  530.   def param_gauge1(param_id)
  531.     return YEA::STATUS::PARAM_COLOUR[param_id][1]
  532.   end

  533.   #--------------------------------------------------------------------------
  534.   # param_gauge2
  535.   #--------------------------------------------------------------------------
  536.   def param_gauge2(param_id)
  537.     return YEA::STATUS::PARAM_COLOUR[param_id][2]
  538.   end

  539.   #--------------------------------------------------------------------------
  540.   # draw_parameter_title
  541.   #--------------------------------------------------------------------------
  542.   def draw_parameter_title
  543.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  544.     rect = Rect.new(0, 0, contents.width, contents.height)
  545.     contents.fill_rect(rect, colour)
  546.     change_color(system_color)
  547.     text = YEA::STATUS::PARAMETERS_VOCAB
  548.     draw_text(0, line_height/3, contents.width, line_height, text, 1)
  549.   end

  550.   #--------------------------------------------------------------------------
  551.   # draw_properties_list
  552.   #--------------------------------------------------------------------------
  553.   def draw_properties_list
  554.     contents.font.size = YEA::STATUS::PROPERTIES_FONT_SIZE
  555.     draw_properties_column1
  556.     draw_properties_column2
  557.     draw_properties_column3
  558.     reset_font_settings
  559.   end

  560.   #--------------------------------------------------------------------------
  561.   # draw_properties_column1
  562.   #--------------------------------------------------------------------------
  563.   def draw_properties_column1
  564.     dx = 24
  565.     dw = (contents.width - 24) / 3 - 24
  566.     dy = 0
  567.     for property in YEA::STATUS::PROPERTIES_COLUMN1
  568.       dy = draw_property(property, dx, dy, dw)
  569.     end
  570.   end

  571.   #--------------------------------------------------------------------------
  572.   # draw_properties_column2
  573.   #--------------------------------------------------------------------------
  574.   def draw_properties_column2
  575.     dx = 24 + (contents.width - 24) / 3
  576.     dw = (contents.width - 24) / 3 - 24
  577.     dy = 0
  578.     for property in YEA::STATUS::PROPERTIES_COLUMN2
  579.       dy = draw_property(property, dx, dy, dw)
  580.     end
  581.   end

  582.   #--------------------------------------------------------------------------
  583.   # draw_properties_column3
  584.   #--------------------------------------------------------------------------
  585.   def draw_properties_column3
  586.     dx = 24 + (contents.width - 24) / 3 * 2
  587.     dw = (contents.width - 24) / 3 - 24
  588.     dy = 0
  589.     for property in YEA::STATUS::PROPERTIES_COLUMN3
  590.       dy = draw_property(property, dx, dy, dw)
  591.     end
  592.   end

  593.   #--------------------------------------------------------------------------
  594.   # draw_property
  595.   #--------------------------------------------------------------------------
  596.   def draw_property(property, dx, dy, dw)
  597.     case property[0]
  598.     #---
  599.     when :hit
  600.       fmt = "%1.2f%%"
  601.       value = sprintf(fmt, @actor.hit * 100)
  602.     when :eva
  603.       fmt = "%1.2f%%"
  604.       value = sprintf(fmt, @actor.eva * 100)
  605.     when :cri
  606.       fmt = "%1.2f%%"
  607.       value = sprintf(fmt, @actor.cri * 100)
  608.     when :cev
  609.       fmt = "%1.2f%%"
  610.       value = sprintf(fmt, @actor.cev * 100)
  611.     when :mev
  612.       fmt = "%1.2f%%"
  613.       value = sprintf(fmt, @actor.mev * 100)
  614.     when :mrf
  615.       fmt = "%1.2f%%"
  616.       value = sprintf(fmt, @actor.mrf * 100)
  617.     when :cnt
  618.       fmt = "%1.2f%%"
  619.       value = sprintf(fmt, @actor.cnt * 100)
  620.     when :hrg
  621.       fmt = "%1.2f%%"
  622.       value = sprintf(fmt, @actor.hrg * 100)
  623.     when :mrg
  624.       fmt = "%1.2f%%"
  625.       value = sprintf(fmt, @actor.mrg * 100)
  626.     when :trg
  627.       fmt = "%1.2f%%"
  628.       value = sprintf(fmt, @actor.trg * 100)
  629.     when :tgr
  630.       fmt = "%1.2f%%"
  631.       value = sprintf(fmt, @actor.tgr * 100)
  632.     when :grd
  633.       fmt = "%1.2f%%"
  634.       value = sprintf(fmt, @actor.grd * 100)
  635.     when :rec
  636.       fmt = "%1.2f%%"
  637.       value = sprintf(fmt, @actor.rec * 100)
  638.     when :pha
  639.       fmt = "%1.2f%%"
  640.       value = sprintf(fmt, @actor.pha * 100)
  641.     when :mcr
  642.       fmt = "%1.2f%%"
  643.       value = sprintf(fmt, @actor.mcr * 100)
  644.     when :tcr
  645.       fmt = "%1.2f%%"
  646.       value = sprintf(fmt, @actor.tcr * 100)
  647.     when :pdr
  648.       fmt = "%1.2f%%"
  649.       value = sprintf(fmt, @actor.pdr * 100)
  650.     when :mdr
  651.       fmt = "%1.2f%%"
  652.       value = sprintf(fmt, @actor.mdr * 100)
  653.     when :fdr
  654.       fmt = "%1.2f%%"
  655.       value = sprintf(fmt, @actor.fdr * 100)
  656.     when :exr
  657.       fmt = "%1.2f%%"
  658.       value = sprintf(fmt, @actor.exr * 100)
  659.     when :hcr
  660.       return dy unless $imported["YEA-SkillCostManager"]
  661.       fmt = "%1.2f%%"
  662.       value = sprintf(fmt, @actor.hcr * 100)
  663.     when :tcr
  664.       return dy unless $imported["YEA-SkillCostManager"]
  665.       fmt = "%1.2f%%"
  666.       value = sprintf(fmt, @actor.tcr * 100)
  667.     when :gcr
  668.       return dy unless $imported["YEA-SkillCostManager"]
  669.       fmt = "%1.2f%%"
  670.       value = sprintf(fmt, @actor.gcr * 100)
  671.     when :cdr
  672.       return dy unless $imported["YEA-SkillRestrictions"]
  673.       fmt = "%1.2f%%"
  674.       value = sprintf(fmt, @actor.cdr * 100)
  675.     when :wur
  676.       return dy unless $imported["YEA-SkillRestrictions"]
  677.       fmt = "%1.2f%%"
  678.       value = sprintf(fmt, @actor.wur * 100)
  679.     #---
  680.     else; return dy
  681.     end
  682.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  683.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  684.     contents.fill_rect(rect, colour)
  685.     change_color(system_color)
  686.     draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
  687.     change_color(normal_color)
  688.     draw_text(dx+4, dy, dw-8, line_height, value, 2)
  689.     return dy + line_height
  690.   end

  691.   #--------------------------------------------------------------------------
  692.   # draw_actor_biography
  693.   #--------------------------------------------------------------------------
  694.   def draw_actor_biography
  695.     fmt = YEA::STATUS::BIOGRAPHY_NICKNAME_TEXT
  696.     text = sprintf(fmt,@actor.nickname, @actor.name )
  697.     contents.font.size = YEA::STATUS::BIOGRAPHY_NICKNAME_SIZE
  698.     draw_text(0, 0, contents.width, line_height*2, text, 1)
  699.     reset_font_settings
  700.     draw_text_ex(24, line_height*2, @actor.description)
  701.   end

  702.   #--------------------------------------------------------------------------
  703.   # draw_custom
  704.   #--------------------------------------------------------------------------
  705.   def draw_custom
  706.     current_symbol = @command_window.current_symbol
  707.     return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(current_symbol)
  708.     method(YEA::STATUS::CUSTOM_STATUS_COMMANDS[current_symbol][3]).call
  709.   end

  710.   #--------------------------------------------------------------------------
  711.   # draw_custom1
  712.   #--------------------------------------------------------------------------
  713.   def draw_custom1
  714.     dx = 0; dy = 0
  715.     for skill in @actor.skills
  716.       next if skill.nil?
  717.       next unless @actor.added_skill_types.include?(skill.stype_id)
  718.       draw_item_name(skill, dx, dy)
  719.       dx = dx == contents.width / 2 + 16 ? 0 : contents.width / 2 + 16
  720.       dy += line_height if dx == 0
  721.       return if dy + line_height > contents.height
  722.     end
  723.   end

  724.   #--------------------------------------------------------------------------
  725.   # draw_custom2
  726.   #--------------------------------------------------------------------------
  727.   def draw_custom2
  728.     dx = 4; dy = 0; slot_id = 0
  729.     for equip in @actor.equips
  730.       change_color(system_color)
  731.       text = Vocab.etype(@actor.equip_slots[slot_id])
  732.       draw_text(dx, dy, contents.width - dx, line_height, text)
  733.       reset_font_settings
  734.       draw_item_name(equip, dx+92, dy) unless equip.nil?
  735.       slot_id += 1
  736.       dy += line_height
  737.       break if dy + line_height > contents.height
  738.     end
  739.     dw = Graphics.width * 2 / 5 - 24
  740.     dx = contents.width - dw; dy = 0
  741.     param_id = 0
  742.     8.times do
  743.       colour = Color.new(0, 0, 0, translucent_alpha/2)
  744.       rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  745.       contents.fill_rect(rect, colour)
  746.       size = $imported["YEA-AceEquipEngine"] ? YEA::EQUIP::STATUS_FONT_SIZE : 20
  747.       contents.font.size = size
  748.       change_color(system_color)
  749.       draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
  750.       change_color(normal_color)
  751.       dwa = (Graphics.width * 2 / 5 - 2) / 2
  752.       draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
  753.       reset_font_settings
  754.       change_color(system_color)
  755.       draw_text(dx + dwa, dy, 22, line_height, "→", 1)
  756.       param_id += 1
  757.       dy += line_height
  758.       break if dy + line_height > contents.height
  759.     end
  760.   end

  761.   #--------------------------------------------------------------------------
  762.   # draw_custom3
  763.   #--------------------------------------------------------------------------
  764.   def draw_custom3
  765.     return unless $imported["YEA-ClassSystem"]
  766.     data = []
  767.     for class_id in YEA::CLASS_SYSTEM::CLASS_ORDER
  768.       next if $data_classes[class_id].nil?
  769.       item = $data_classes[class_id]
  770.       next unless @actor.unlocked_classes.include?(item.id) or
  771.         YEA::CLASS_SYSTEM::DEFAULT_UNLOCKS.include?(item.id)
  772.       data.push(item)
  773.     end
  774.     dx = 0; dy = 0; class_index = 0
  775.     for class_id in data
  776.       item = data[class_index]
  777.       reset_font_settings
  778.       if item == @actor.class
  779.         change_color(text_color(YEA::CLASS_SYSTEM::CURRENT_CLASS_COLOUR))
  780.       elsif item == @actor.subclass
  781.         change_color(text_color(YEA::CLASS_SYSTEM::SUBCLASS_COLOUR))
  782.       else
  783.         change_color(normal_color)
  784.       end
  785.       icon = item.icon_index
  786.       draw_icon(icon, dx, dy)
  787.       text = item.name
  788.       draw_text(24, dy, contents.width-24, line_height, text)
  789.       next if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
  790.       level = @actor.class_level(item.id)
  791.       contents.font.size = YEA::CLASS_SYSTEM::LEVEL_FONT_SIZE
  792.       text = sprintf(YEA::CLASS_SYSTEM::CLASS_LEVEL, level.group)
  793.       dwa = contents.width - (Graphics.width * 2 / 5 - 24) - 28
  794.       draw_text(dx, dy, dwa, line_height, text, 2)
  795.       class_index += 1
  796.       dy += line_height
  797.       break if dy + line_height > contents.height
  798.     end
  799.     dw = Graphics.width * 2 / 5 - 24
  800.     dx = contents.width - dw; dy = 0
  801.     param_id = 0
  802.     8.times do
  803.       colour = Color.new(0, 0, 0, translucent_alpha/2)
  804.       rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  805.       contents.fill_rect(rect, colour)
  806.       contents.font.size = YEA::CLASS_SYSTEM::PARAM_FONT_SIZE
  807.       change_color(system_color)
  808.       draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
  809.       change_color(normal_color)
  810.       dwa = (Graphics.width * 2 / 5 - 2) / 2
  811.       draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
  812.       reset_font_settings
  813.       change_color(system_color)
  814.       draw_text(dx + dwa, dy, 22, line_height, "→", 1)
  815.       param_id += 1
  816.       dy += line_height
  817.       break if dy + line_height > contents.height
  818.     end
  819.   end

  820. end # Window_StatusItem

  821. #==============================================================================
  822. # ■ Scene_Status
  823. #==============================================================================

  824. class Scene_Status < Scene_MenuBase

  825.   #--------------------------------------------------------------------------
  826.   # start
  827.   #--------------------------------------------------------------------------
  828.   def start
  829.     super

  830.     create_help_window
  831.     create_command_window
  832.     create_status_window
  833.     create_item_window
  834.     relocate_windows
  835.   end

  836.   #--------------------------------------------------------------------------
  837.   # create_command_window
  838.   #--------------------------------------------------------------------------
  839.   def create_command_window
  840.     wy = @help_window.height
  841.     @command_window = Window_StatusCommand.new(0, wy)
  842.     @command_window.viewport = @viewport
  843.     @command_window.actor = @actor
  844.     @command_window.help_window = @help_window
  845.     @command_window.set_handler(:cancel,   method(:return_scene))
  846.     @command_window.set_handler(:pagedown, method(:next_actor))
  847.     @command_window.set_handler(:pageup,   method(:prev_actor))
  848.     process_custom_status_commands
  849.   end

  850.   #--------------------------------------------------------------------------
  851.   # process_custom_status_commands
  852.   #--------------------------------------------------------------------------
  853.   def process_custom_status_commands
  854.     for command in YEA::STATUS::COMMANDS
  855.       next unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
  856.       called_method = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][2]
  857.       @command_window.set_handler(command[0], method(called_method))
  858.     end
  859.   end

  860.   #--------------------------------------------------------------------------
  861.   # create_status_window
  862.   #--------------------------------------------------------------------------
  863.   def create_status_window
  864.     wy = @help_window.height
  865.     @status_window = Window_StatusActor.new(@command_window.width, wy)
  866.     @status_window.viewport = @viewport
  867.     @status_window.actor = @actor
  868.   end

  869.   #--------------------------------------------------------------------------
  870.   # create_item_window
  871.   #--------------------------------------------------------------------------
  872.   def create_item_window
  873.     dy = @command_window.y + @command_window.height
  874.     @item_window = Window_StatusItem.new(0, dy, @command_window)
  875.     @item_window.viewport = @viewport
  876.     @item_window.actor = @actor
  877.     @command_window.item_window = @item_window
  878.   end

  879.   #--------------------------------------------------------------------------
  880.   # relocate_windows
  881.   #--------------------------------------------------------------------------
  882.   def relocate_windows
  883.     return unless $imported["YEA-AceMenuEngine"]
  884.     case Menu.help_window_location
  885.     when 0 # Top
  886.       @help_window.y = 0
  887.       @command_window.y = @help_window.height
  888.       @item_window.y = @command_window.y + @command_window.height
  889.     when 1 # Middle
  890.       @command_window.y = 0
  891.       @help_window.y = @command_window.height
  892.       @item_window.y = @help_window.y + @help_window.height
  893.     else # Bottom
  894.       @command_window.y = 0
  895.       @item_window.y = @command_window.height
  896.       @help_window.y = @item_window.y + @item_window.height
  897.     end
  898.     @status_window.y = @command_window.y
  899.   end

  900.   #--------------------------------------------------------------------------
  901.   # on_actor_change
  902.   #--------------------------------------------------------------------------
  903.   def on_actor_change
  904.     @command_window.actor = @actor
  905.     @status_window.actor = @actor
  906.     @item_window.actor = @actor
  907.     @command_window.activate
  908.   end

  909.   #--------------------------------------------------------------------------
  910.   # new method: command_name1
  911.   #--------------------------------------------------------------------------
  912.   def command_name1
  913.     SceneManager.call(Scene_Skill)
  914.   end

  915.   #--------------------------------------------------------------------------
  916.   # new method: command_name2
  917.   #--------------------------------------------------------------------------
  918.   def command_name2
  919.     SceneManager.call(Scene_Equip)
  920.   end

  921.   #--------------------------------------------------------------------------
  922.   # new method: command_name3
  923.   #--------------------------------------------------------------------------
  924.   def command_name3
  925.     unless $imported["YEA-ClassSystem"]
  926.       @command_window.activate
  927.       return
  928.     end
  929.     SceneManager.call(Scene_Class)
  930.   end

  931. end # Scene_Status

  932. #==============================================================================
  933. #
  934. # ▼ End of File
  935. #
  936. #==============================================================================
复制代码

原来效果

原来效果

理想效果

理想效果
...
梦石
0
星屑
50
在线时间
182 小时
注册时间
2015-11-14
回帖
44
 楼主| 发表于 2016-6-18 18:13:19 | 显示全部楼层

[重发]谁能帮忙把天赋脚本和详细状态兼容一下

之前不知怎么得就变成已经解决了,
已经解决的帖子应该没人看把?
所以重发一下,不知道有没有违规。
天赋
  1. module ActorQuality
  2.   #总评分级次
  3.   QUALITY_AMOUNT = 13
  4.   #各级次显示字母
  5.   QUALITY_LETTER = ["D", "D+", "C", "C+", "B", "B+", "A", "A+", "S", "S+", "SS", "SS+", "SSS"]
  6.   #每级评分
  7.   QUALITY_MARK = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
  8.   #分母
  9.   QUALITY_DENOMINATOR = 367
  10.   #各级次所对应分子,配合分母就是概率
  11.   QUALITY_MOLECULAR = [1, 3, 7, 15, 31, 63, 127, 63, 31, 15, 7, 3, 1]
  12.   #各级次对应成长率
  13.   QUALITY_CHANGE = [0.25, 0.29, 0.33, 0.4, 0.5, 0.67, 1, 1.001, 1.007, 1.01, 1.04, 1.06, 1.09]
  14.   #是否显示
  15.   QUALITY_SHOW = true
  16. end

  17. class Game_Actor < Game_Battler
  18.   
  19.   attr_accessor :tan_quality_param#各属性级次数组
  20.   attr_accessor :tan_all_quality_param#总评分
  21.   attr_accessor :tan_game_actor_temp#临时变量
  22.   
  23.   #--------------------------------------------------------------------------
  24.   # ● 属性级次初始化
  25.   #--------------------------------------------------------------------------
  26.   def init_tan_quality_param
  27.     @tan_quality_param = [0] * 8#各属性级次数组初始化
  28.     @tan_all_quality_param = 0#总评分初始化
  29.     @tan_game_actor_temp = [0] * ActorQuality::QUALITY_AMOUNT#临时变量初始化
  30.     @tan_game_actor_temp.count.times {|i|
  31.       if i == 0
  32.         @tan_game_actor_temp[i] = ActorQuality::QUALITY_MOLECULAR[i]
  33.       else
  34.         @tan_game_actor_temp[i] = @tan_game_actor_temp[i-1] + ActorQuality::QUALITY_MOLECULAR[i]
  35.       end
  36.     }
  37.     8.times {|i|
  38.       v = rand(ActorQuality::QUALITY_DENOMINATOR)
  39.       @tan_game_actor_temp.each_with_index {|i2, i3|
  40.         if v < i2
  41.           @tan_quality_param[i] = i3
  42.           break
  43.         end
  44.       }
  45.       @tan_all_quality_param += ActorQuality::QUALITY_MARK[@tan_quality_param[i]]
  46.     }
  47.     init_tan_all_quality_param
  48.     self.hp = self.mhp
  49.     self.mp = self.mmp
  50.   end
  51.   #--------------------------------------------------------------------------
  52.   # ● 计算总评分,并将总评分转化成评价
  53.   #--------------------------------------------------------------------------
  54.   def init_tan_all_quality_param
  55.     @tan_all_quality_param = (@tan_all_quality_param / 8.0).round
  56.     ActorQuality::QUALITY_MARK.count.times {|i|
  57.       if @tan_all_quality_param <= ActorQuality::QUALITY_MARK[i]
  58.         @tan_all_quality_param = i
  59.         break
  60.       end
  61.     }
  62.   end
  63.   #--------------------------------------------------------------------------
  64.   # ● 设置(人物初始化重写)
  65.   #--------------------------------------------------------------------------
  66.   alias tan_quality_setup setup
  67.   def setup(actor_id)
  68.     tan_quality_setup(actor_id)
  69.     init_tan_quality_param
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● 获取普通能力的基础值(重写)
  73.   #--------------------------------------------------------------------------
  74.   alias tan_quality_param_base param_base
  75.   def param_base(param_id)
  76.     v = tan_quality_param_base(param_id)
  77.     i = @tan_quality_param[param_id] if @tan_quality_param
  78.     v = v * ActorQuality::QUALITY_CHANGE[i].to_f if i
  79.     return v.to_i
  80.   end
  81.   #--------------------------------------------------------------------------
  82.   # ● 获取普通能力的最大值(为了防止属性爆表后还是999不能突破1000,特意修改该方法)
  83.   #--------------------------------------------------------------------------
  84.   def param_max(param_id)
  85.     return 1000000000
  86.   end
  87. end

  88. #==============================================================================
  89. # ■ Window_Status
  90. #------------------------------------------------------------------------------
  91. #  状态画面中,显示角色基本信息的窗口。(新增评分信息)
  92. #==============================================================================
  93. class Window_Status < Window_Selectable
  94.   #--------------------------------------------------------------------------
  95.   # ● 绘制基本信息(增加HP、MP评分以及总评分)
  96.   #--------------------------------------------------------------------------
  97.   alias draw_basic_info_quality draw_basic_info
  98.   def draw_basic_info(x, y)
  99.     draw_basic_info_quality(x, y)
  100.     s = "Rank:" + ActorQuality::QUALITY_LETTER[@actor.tan_all_quality_param]
  101.     draw_text(x + 60, y + line_height * 0, 108, line_height, s, 2)
  102.     s = ActorQuality::QUALITY_LETTER[@actor.tan_quality_param[0]]
  103.     draw_text(x + 120, y + line_height * 2, 36, line_height, s, 2)
  104.     s = ActorQuality::QUALITY_LETTER[@actor.tan_quality_param[1]]
  105.     draw_text(x + 120, y + line_height * 3, 36, line_height, s, 2)
  106.   end
  107.   #--------------------------------------------------------------------------
  108.   # ● 绘制能力值(增加其他属性评分)
  109.   #--------------------------------------------------------------------------
  110.   alias draw_parameters_actor_quality draw_parameters
  111.   def draw_parameters(x, y)
  112.     draw_parameters_actor_quality(x, y)
  113.     6.times {|i|
  114.       s = ActorQuality::QUALITY_LETTER[@actor.tan_quality_param[i + 2]]
  115.       change_color(normal_color)
  116.       draw_text(x + 200, y + line_height * i, 36, line_height, s, 2)
  117.     }
  118.   end
  119. end
复制代码

详细状态
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Ace Status Menu v1.01
  4. # -- Last Updated: 2011.12.26
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-StatusMenu"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2011.12.26 - Compatibility Update: Rename Actor
  15. # 2011.12.23 - Started Script and Finished.
  16. #
  17. #==============================================================================
  18. # ▼ Introduction
  19. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  20. # This script changes the status screen completely to something the player can
  21. # interact with more and be able to view actor data with more clarity. The
  22. # player is able to view the general information for an actor (parameters and
  23. # experience), a parameters bar graph, the various hidden extra parameters
  24. # (named properties in the script), and a customizable biography for the actor.
  25. # Also with this script, biographies can be changed at any time using a script
  26. # call to add more of a personal touch to characters.
  27. #
  28. #==============================================================================
  29. # ▼ Instructions
  30. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31. # To install this script, open up your script editor and copy/paste this script
  32. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  33. #
  34. # -----------------------------------------------------------------------------
  35. # Script Calls - These commands are used with script calls.
  36. # -----------------------------------------------------------------------------
  37. # $game_actors[x].description = string
  38. # Changes the biography description for actor x to that of the string. Use \n
  39. # to designate linebreaks in the string. If you wish to use text codes, write
  40. # them in the strings as \\n[2] or \\c[3] to make them work properly.
  41. #
  42. #==============================================================================
  43. # ▼ Compatibility
  44. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  45. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  46. # it will run with RPG Maker VX without adjusting.
  47. #
  48. #==============================================================================

  49. module YEA
  50.   module STATUS

  51.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  52.     # - Command Window Settings -
  53.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  54.     # This section adjusts the commands that appear in the command window used
  55.     # for the status screen. Rearrange the commands, add new ones, remove them
  56.     # as you see fit.
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     COMMANDS =[ # The order at which the menu items are shown.
  59.     # [    :command,    "Display"],
  60.       [    :general,    "基本信息"],
  61.       [ :parameters, "数据"],
  62.       [ :properties, "属性"],
  63.     # [    :custom1,     "Skills"],
  64.     # [    :custom2,  "Equipment"],
  65.     # [    :custom3,      "Class"],
  66.       [  :biography,  "传记"],
  67.       [     :rename,     "Rename"],  # Requires YEA - Rename Actor
  68.       [    :retitle,    "Retitle"],  # Requires YEA - Rename Actor
  69.     ] # Do not remove this.

  70.     #--------------------------------------------------------------------------
  71.     # - Status Custom Commands -
  72.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  73.     # For those who use scripts to that may produce unique effects for the
  74.     # status menu, use this hash to manage the custom commands for the Status
  75.     # Command Window. You can disable certain commands or prevent them from
  76.     # appearing by using switches. If you don't wish to bind them to a switch,
  77.     # set the proper switch to 0 for it to have no impact.
  78.     #--------------------------------------------------------------------------
  79.     CUSTOM_STATUS_COMMANDS ={
  80.     # :command => [EnableSwitch, ShowSwitch, Handler Method, Window Draw],
  81.       :custom1 => [           0,          0, :command_name1, :draw_custom1],
  82.       :custom2 => [           0,          0, :command_name2, :draw_custom2],
  83.       :custom3 => [           0,          0, :command_name3, :draw_custom3],
  84.     } # Do not remove this.

  85.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86.     # - General Window Settings -
  87.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  88.     # These settings adjust the way the general window visually appears.
  89.     # Not many changes need to be done here other than vocab changes.
  90.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91.     PARAMETERS_VOCAB = "数据"         # Title used for Parameters.
  92.     EXPERIENCE_VOCAB = "经验值"         # Title used for Experience.
  93.     NEXT_TOTAL_VOCAB = "下次 %s 经验值总数"  # Label used for total experience.

  94.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  95.     # - Parameters Window Settings -
  96.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  97.     # These settings adjust the way the parameters window visually appears.
  98.     # Each of the stats have a non-window colour. Adjust them as you see fit.
  99.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  100.     PARAM_COLOUR ={
  101.     # ParamID => [:stat,       Colour1,                   Colour2          ],
  102.             2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
  103.             3 => [ :def, Color.new(250, 150,  30), Color.new(250, 180, 100)],
  104.             4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
  105.             5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
  106.             6 => [ :agi, Color.new( 60, 180,  80), Color.new(120, 200, 120)],
  107.             7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
  108.     } # Do not remove this.

  109.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  110.     # - Properties Window Settings -
  111.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  112.     # These settings adjust the way the properties window visually appears.
  113.     # The properties have abbreviations, but leaving them as such makes things
  114.     # confusing (as it's sometimes hard to figure out what the abbreviations
  115.     # mean). Change the way the appear, whether or not they appear, and what
  116.     # order they will appear in.
  117.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  118.     PROPERTIES_FONT_SIZE = 16        # Font size used for properties.

  119.     # These are the properties that appear in column 1.
  120.     PROPERTIES_COLUMN1 =[
  121.       [:hit, "命中"],
  122.       [:eva, "躲避"],
  123.       [:cri, "暴击"],
  124.       [:cev, "暴击闪避"],
  125.       [:mev, "魔法躲避"],
  126.       [:mrf, "魔法反射"],
  127.       [:cnt, "反击"],
  128.       [:tgr, "目标攻击"],
  129.     ] # Do not remove this.

  130.     # These are the properties that appear in column 2.
  131.     PROPERTIES_COLUMN2 =[
  132.       [:hrg, "hp恢复"],
  133.       [:mrg, "mp再生"],
  134.       [:trg, "TP再生"],
  135.       [:rec, "恢复"],
  136.       [:grd, "防御力"],
  137.       [:pha, "物品使用"],
  138.       [:exr, "经验值获得"],
  139.       [:tcr, "TP模式"],
  140.     ] # Do not remove this.

  141.     # These are the properties that appear in column 3.
  142.     PROPERTIES_COLUMN3 =[
  143.       [:hcr, "士兵消费伤害"],    # Requires YEA - Skill Cost Manager
  144.       [:mcr, "魔法消费伤害"],
  145.       [:tcr, "士气消费伤害"],    # Requires YEA - Skill Cost Manager
  146.       [:cdr, "硬直伤害"],   # Requires YEA - Skill Restrictions
  147.       [:wur, "激励伤害"],     # Requires YEA - Skill Restrictions
  148.       [:pdr, "物理伤害"],
  149.       [:mdr, "魔法伤害"],
  150.       [:fdr, "基本伤害"],
  151.     ] # Do not remove this.

  152.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  153.     # - Biography Window Settings -
  154.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  155.     # These settings adjust the way the biography appears including the title
  156.     # used at the top, the font size, and whatnot.
  157.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  158.     BIOGRAPHY_NICKNAME_TEXT = "%s %s"   # How the nickname will appear.
  159.     BIOGRAPHY_NICKNAME_SIZE = 32            # Size of the font used.



  160.   end # STATUS
  161. end # YEA

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

  167. #==============================================================================
  168. # ■ Numeric
  169. #==============================================================================

  170. class Numeric

  171.   #--------------------------------------------------------------------------
  172.   # new method: group_digits
  173.   #--------------------------------------------------------------------------
  174.   unless $imported["YEA-CoreEngine"]
  175.   def group; return self.to_s; end
  176.   end # $imported["YEA-CoreEngine"]

  177. end # Numeric

  178. #==============================================================================
  179. # ■ Game_Temp
  180. #==============================================================================

  181. class Game_Temp

  182.   #--------------------------------------------------------------------------
  183.   # public instance variables
  184.   #--------------------------------------------------------------------------
  185.   attr_accessor :scene_status_index
  186.   attr_accessor :scene_status_oy

  187. end # Game_Temp

  188. #==============================================================================
  189. # ■ Game_Actor
  190. #==============================================================================

  191. class Game_Actor < Game_Battler

  192.   #--------------------------------------------------------------------------
  193.   # new method: description=
  194.   #--------------------------------------------------------------------------
  195.   def description=(text)
  196.     @description = text
  197.   end

  198.   #--------------------------------------------------------------------------
  199.   # overwrite method: description
  200.   #--------------------------------------------------------------------------
  201.   def description
  202.     return @description unless @description.nil?
  203.     return actor.description
  204.   end

  205. end # Game_Actor

  206. #==============================================================================
  207. # ■ Window_StatusCommand
  208. #==============================================================================

  209. class Window_StatusCommand < Window_Command

  210.   #--------------------------------------------------------------------------
  211.   # public instance variables
  212.   #--------------------------------------------------------------------------
  213.   attr_accessor :item_window

  214.   #--------------------------------------------------------------------------
  215.   # initialize
  216.   #--------------------------------------------------------------------------
  217.   def initialize(dx, dy)
  218.     super(dx, dy)
  219.     @actor = nil
  220.   end

  221.   #--------------------------------------------------------------------------
  222.   # window_width
  223.   #--------------------------------------------------------------------------
  224.   def window_width; return 160; end

  225.   #--------------------------------------------------------------------------
  226.   # actor=
  227.   #--------------------------------------------------------------------------
  228.   def actor=(actor)
  229.     return if @actor == actor
  230.     @actor = actor
  231.     refresh
  232.   end

  233.   #--------------------------------------------------------------------------
  234.   # visible_line_number
  235.   #--------------------------------------------------------------------------
  236.   def visible_line_number; return 4; end

  237.   #--------------------------------------------------------------------------
  238.   # ok_enabled?
  239.   #--------------------------------------------------------------------------
  240.   def ok_enabled?
  241.     return handle?(current_symbol)
  242.   end

  243.   #--------------------------------------------------------------------------
  244.   # make_command_list
  245.   #--------------------------------------------------------------------------
  246.   def make_command_list
  247.     return unless @actor
  248.     for command in YEA::STATUS::COMMANDS
  249.       case command[0]
  250.       #--- Default ---
  251.       when :general, :parameters, :properties, :biography
  252.         add_command(command[1], command[0])
  253.       #--- Yanfly Engine Ace ---
  254.       when :rename
  255.         next unless $imported["YEA-RenameActor"]
  256.         add_command(command[1], command[0], @actor.rename_allow?)
  257.       when :retitle
  258.         next unless $imported["YEA-RenameActor"]
  259.         add_command(command[1], command[0], @actor.retitle_allow?)
  260.       #--- Custom Commands ---
  261.       else
  262.         process_custom_command(command)
  263.       end
  264.     end
  265.     if !$game_temp.scene_status_index.nil?
  266.       select($game_temp.scene_status_index)
  267.       self.oy = $game_temp.scene_status_oy
  268.     end
  269.     $game_temp.scene_status_index = nil
  270.     $game_temp.scene_status_oy = nil
  271.   end

  272.   #--------------------------------------------------------------------------
  273.   # process_ok
  274.   #--------------------------------------------------------------------------
  275.   def process_ok
  276.     $game_temp.scene_status_index = index
  277.     $game_temp.scene_status_oy = self.oy
  278.     super
  279.   end

  280.   #--------------------------------------------------------------------------
  281.   # process_custom_command
  282.   #--------------------------------------------------------------------------
  283.   def process_custom_command(command)
  284.     return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
  285.     show = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][1]
  286.     continue = show <= 0 ? true : $game_switches[show]
  287.     return unless continue
  288.     text = command[1]
  289.     switch = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][0]
  290.     enabled = switch <= 0 ? true : $game_switches[switch]
  291.     add_command(text, command[0], enabled)
  292.   end

  293.   #--------------------------------------------------------------------------
  294.   # update
  295.   #--------------------------------------------------------------------------
  296.   def update
  297.     super
  298.     update_item_window
  299.   end

  300.   #--------------------------------------------------------------------------
  301.   # update_item_window
  302.   #--------------------------------------------------------------------------
  303.   def update_item_window
  304.     return if @item_window.nil?
  305.     return if @current_index == current_symbol
  306.     @current_index = current_symbol
  307.     @item_window.refresh
  308.   end

  309.   #--------------------------------------------------------------------------
  310.   # item_window=
  311.   #--------------------------------------------------------------------------
  312.   def item_window=(window)
  313.     @item_window = window
  314.     update
  315.   end

  316.   #--------------------------------------------------------------------------
  317.   # update_help
  318.   #--------------------------------------------------------------------------
  319.   def update_help
  320.     return if @actor.nil?
  321.     @help_window.set_text(@actor.actor.description)
  322.   end

  323. end # Window_StatusCommand

  324. #==============================================================================
  325. # ■ Window_StatusActor
  326. #==============================================================================

  327. class Window_StatusActor < Window_Base

  328.   #--------------------------------------------------------------------------
  329.   # initialize
  330.   #--------------------------------------------------------------------------
  331.   def initialize(dx, dy)
  332.     super(dx, dy, window_width, fitting_height(4))
  333.     @actor = nil
  334.   end

  335.   #--------------------------------------------------------------------------
  336.   # window_width
  337.   #--------------------------------------------------------------------------
  338.   def window_width; return Graphics.width - 160; end

  339.   #--------------------------------------------------------------------------
  340.   # actor=
  341.   #--------------------------------------------------------------------------
  342.   def actor=(actor)
  343.     return if @actor == actor
  344.     @actor = actor
  345.     refresh
  346.   end

  347.   #--------------------------------------------------------------------------
  348.   # refresh
  349.   #--------------------------------------------------------------------------
  350.   def refresh
  351.     contents.clear
  352.     return unless @actor
  353.     draw_actor_face(@actor, 0, 0)
  354.     draw_actor_simple_status(@actor, 108, line_height / 2)
  355.   end

  356. end # Window_StatusActor

  357. #==============================================================================
  358. # ■ Window_StatusItem
  359. #==============================================================================

  360. class Window_StatusItem < Window_Base

  361.   #--------------------------------------------------------------------------
  362.   # initialize
  363.   #--------------------------------------------------------------------------
  364.   def initialize(dx, dy, command_window)
  365.     super(dx, dy, Graphics.width, Graphics.height - dy)
  366.     @command_window = command_window
  367.     @actor = nil
  368.     refresh
  369.   end

  370.   #--------------------------------------------------------------------------
  371.   # actor=
  372.   #--------------------------------------------------------------------------
  373.   def actor=(actor)
  374.     return if @actor == actor
  375.     @actor = actor
  376.     refresh
  377.   end

  378.   #--------------------------------------------------------------------------
  379.   # refresh
  380.   #--------------------------------------------------------------------------
  381.   def refresh
  382.     contents.clear
  383.     reset_font_settings
  384.     return unless @actor
  385.     draw_window_contents
  386.   end

  387.   #--------------------------------------------------------------------------
  388.   # draw_window_contents
  389.   #--------------------------------------------------------------------------
  390.   def draw_window_contents
  391.     case @command_window.current_symbol
  392.     when :general
  393.       draw_actor_general
  394.     when :parameters
  395.       draw_parameter_graph
  396.     when :properties
  397.       draw_properties_list
  398.     when :biography, :rename, :retitle
  399.       draw_actor_biography
  400.     else
  401.       draw_custom
  402.     end
  403.   end

  404.   #--------------------------------------------------------------------------
  405.   # draw_actor_general
  406.   #--------------------------------------------------------------------------
  407.   def draw_actor_general
  408.     change_color(system_color)
  409.     text = YEA::STATUS::PARAMETERS_VOCAB
  410.     draw_text(0, 0, contents.width/2, line_height, text, 1)
  411.     text = YEA::STATUS::EXPERIENCE_VOCAB
  412.     draw_text(contents.width/2, 0, contents.width/2, line_height, text, 1)
  413.     draw_general_parameters
  414.     draw_general_experience
  415.   end

  416.   #--------------------------------------------------------------------------
  417.   # draw_general_parameters
  418.   #--------------------------------------------------------------------------
  419.   def draw_general_parameters
  420.     dx = 24
  421.     dy = line_height / 2
  422.     draw_actor_level(dx, line_height*1+dy, contents.width/2 - 24)
  423.     draw_actor_param(0, dx, line_height*2+dy, contents.width/2 - 24)
  424.     draw_actor_param(1, dx, line_height*3+dy, contents.width/2 - 24)
  425.     draw_actor_param(2, dx, line_height*4+dy, contents.width/4 - 12)
  426.     draw_actor_param(4, dx, line_height*5+dy, contents.width/4 - 12)
  427.     draw_actor_param(6, dx, line_height*6+dy, contents.width/4 - 12)
  428.     dx += contents.width/4 - 12
  429.     draw_actor_param(3, dx, line_height*4+dy, contents.width/4 - 12)
  430.     draw_actor_param(5, dx, line_height*5+dy, contents.width/4 - 12)
  431.     draw_actor_param(7, dx, line_height*6+dy, contents.width/4 - 12)
  432.   end

  433.   #--------------------------------------------------------------------------
  434.   # draw_actor_level
  435.   #--------------------------------------------------------------------------
  436.   def draw_actor_level(dx, dy, dw)
  437.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  438.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  439.     contents.fill_rect(rect, colour)
  440.     change_color(system_color)
  441.     draw_text(dx+4, dy, dw-8, line_height, Vocab::level)
  442.     change_color(normal_color)
  443.     draw_text(dx+4, dy, dw-8, line_height, @actor.level.group, 2)
  444.   end

  445.   #--------------------------------------------------------------------------
  446.   # draw_actor_param
  447.   #--------------------------------------------------------------------------
  448.   def draw_actor_param(param_id, dx, dy, dw)
  449.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  450.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  451.     contents.fill_rect(rect, colour)
  452.     change_color(system_color)
  453.     draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
  454.     change_color(normal_color)
  455.     draw_text(dx+4, dy, dw-8, line_height, @actor.param(param_id).group, 2)
  456.   end

  457.   #--------------------------------------------------------------------------
  458.   # draw_general_experience
  459.   #--------------------------------------------------------------------------
  460.   def draw_general_experience
  461.     if @actor.max_level?
  462.       s1 = @actor.exp.group
  463.       s2 = "-------"
  464.       s3 = "-------"
  465.     else
  466.       s1 = @actor.exp.group
  467.       s2 = (@actor.next_level_exp - @actor.exp).group
  468.       s3 = @actor.next_level_exp.group
  469.     end
  470.     s_next = sprintf(Vocab::ExpNext, Vocab::level)
  471.     total_next_text = sprintf(YEA::STATUS::NEXT_TOTAL_VOCAB, Vocab::level)
  472.     change_color(system_color)
  473.     dx = contents.width/2 + 12
  474.     dy = line_height * 3 / 2
  475.     dw = contents.width/2 - 36
  476.     draw_text(dx, dy + line_height * 0, dw, line_height, Vocab::ExpTotal)
  477.     draw_text(dx, dy + line_height * 2, dw, line_height, s_next)
  478.     draw_text(dx, dy + line_height * 4, dw, line_height, total_next_text)
  479.     change_color(normal_color)
  480.     draw_text(dx, dy + line_height * 1, dw, line_height, s1, 2)
  481.     draw_text(dx, dy + line_height * 3, dw, line_height, s2, 2)
  482.     draw_text(dx, dy + line_height * 5, dw, line_height, s3, 2)
  483.   end

  484.   #--------------------------------------------------------------------------
  485.   # draw_parameter_graph
  486.   #--------------------------------------------------------------------------
  487.   def draw_parameter_graph
  488.     draw_parameter_title
  489.     dy = line_height * 3/2
  490.     maximum = 1
  491.     minimum = @actor.param_max(2)
  492.     for i in 2..7
  493.       maximum = [@actor.param(i), maximum].max
  494.       minimum = [@actor.param(i), minimum].min
  495.     end
  496.     maximum += minimum * 0.33 unless maximum == minimum
  497.     for i in 2..7
  498.       rate = calculate_rate(maximum, minimum, i)
  499.       dy = line_height * i - line_height/2
  500.       draw_param_gauge(i, dy, rate)
  501.       change_color(system_color)
  502.       draw_text(28, dy, contents.width - 56, line_height, Vocab::param(i))
  503.       dw = (contents.width - 48) * rate - 8
  504.       change_color(normal_color)
  505.       draw_text(28, dy, dw, line_height, @actor.param(i).group, 2)
  506.     end
  507.   end

  508.   #--------------------------------------------------------------------------
  509.   # calculate_rate
  510.   #--------------------------------------------------------------------------
  511.   def calculate_rate(maximum, minimum, param_id)
  512.     return 1.0 if maximum == minimum
  513.     rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
  514.     rate *= 0.67
  515.     rate += 0.33
  516.     return rate
  517.   end

  518.   #--------------------------------------------------------------------------
  519.   # draw_param_gauge
  520.   #--------------------------------------------------------------------------
  521.   def draw_param_gauge(param_id, dy, rate)
  522.     dw = contents.width - 48
  523.     colour1 = param_gauge1(param_id)
  524.     colour2 = param_gauge2(param_id)
  525.     draw_gauge(24, dy, dw, rate, colour1, colour2)
  526.   end

  527.   #--------------------------------------------------------------------------
  528.   # param_gauge1
  529.   #--------------------------------------------------------------------------
  530.   def param_gauge1(param_id)
  531.     return YEA::STATUS::PARAM_COLOUR[param_id][1]
  532.   end

  533.   #--------------------------------------------------------------------------
  534.   # param_gauge2
  535.   #--------------------------------------------------------------------------
  536.   def param_gauge2(param_id)
  537.     return YEA::STATUS::PARAM_COLOUR[param_id][2]
  538.   end

  539.   #--------------------------------------------------------------------------
  540.   # draw_parameter_title
  541.   #--------------------------------------------------------------------------
  542.   def draw_parameter_title
  543.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  544.     rect = Rect.new(0, 0, contents.width, contents.height)
  545.     contents.fill_rect(rect, colour)
  546.     change_color(system_color)
  547.     text = YEA::STATUS::PARAMETERS_VOCAB
  548.     draw_text(0, line_height/3, contents.width, line_height, text, 1)
  549.   end

  550.   #--------------------------------------------------------------------------
  551.   # draw_properties_list
  552.   #--------------------------------------------------------------------------
  553.   def draw_properties_list
  554.     contents.font.size = YEA::STATUS::PROPERTIES_FONT_SIZE
  555.     draw_properties_column1
  556.     draw_properties_column2
  557.     draw_properties_column3
  558.     reset_font_settings
  559.   end

  560.   #--------------------------------------------------------------------------
  561.   # draw_properties_column1
  562.   #--------------------------------------------------------------------------
  563.   def draw_properties_column1
  564.     dx = 24
  565.     dw = (contents.width - 24) / 3 - 24
  566.     dy = 0
  567.     for property in YEA::STATUS::PROPERTIES_COLUMN1
  568.       dy = draw_property(property, dx, dy, dw)
  569.     end
  570.   end

  571.   #--------------------------------------------------------------------------
  572.   # draw_properties_column2
  573.   #--------------------------------------------------------------------------
  574.   def draw_properties_column2
  575.     dx = 24 + (contents.width - 24) / 3
  576.     dw = (contents.width - 24) / 3 - 24
  577.     dy = 0
  578.     for property in YEA::STATUS::PROPERTIES_COLUMN2
  579.       dy = draw_property(property, dx, dy, dw)
  580.     end
  581.   end

  582.   #--------------------------------------------------------------------------
  583.   # draw_properties_column3
  584.   #--------------------------------------------------------------------------
  585.   def draw_properties_column3
  586.     dx = 24 + (contents.width - 24) / 3 * 2
  587.     dw = (contents.width - 24) / 3 - 24
  588.     dy = 0
  589.     for property in YEA::STATUS::PROPERTIES_COLUMN3
  590.       dy = draw_property(property, dx, dy, dw)
  591.     end
  592.   end

  593.   #--------------------------------------------------------------------------
  594.   # draw_property
  595.   #--------------------------------------------------------------------------
  596.   def draw_property(property, dx, dy, dw)
  597.     case property[0]
  598.     #---
  599.     when :hit
  600.       fmt = "%1.2f%%"
  601.       value = sprintf(fmt, @actor.hit * 100)
  602.     when :eva
  603.       fmt = "%1.2f%%"
  604.       value = sprintf(fmt, @actor.eva * 100)
  605.     when :cri
  606.       fmt = "%1.2f%%"
  607.       value = sprintf(fmt, @actor.cri * 100)
  608.     when :cev
  609.       fmt = "%1.2f%%"
  610.       value = sprintf(fmt, @actor.cev * 100)
  611.     when :mev
  612.       fmt = "%1.2f%%"
  613.       value = sprintf(fmt, @actor.mev * 100)
  614.     when :mrf
  615.       fmt = "%1.2f%%"
  616.       value = sprintf(fmt, @actor.mrf * 100)
  617.     when :cnt
  618.       fmt = "%1.2f%%"
  619.       value = sprintf(fmt, @actor.cnt * 100)
  620.     when :hrg
  621.       fmt = "%1.2f%%"
  622.       value = sprintf(fmt, @actor.hrg * 100)
  623.     when :mrg
  624.       fmt = "%1.2f%%"
  625.       value = sprintf(fmt, @actor.mrg * 100)
  626.     when :trg
  627.       fmt = "%1.2f%%"
  628.       value = sprintf(fmt, @actor.trg * 100)
  629.     when :tgr
  630.       fmt = "%1.2f%%"
  631.       value = sprintf(fmt, @actor.tgr * 100)
  632.     when :grd
  633.       fmt = "%1.2f%%"
  634.       value = sprintf(fmt, @actor.grd * 100)
  635.     when :rec
  636.       fmt = "%1.2f%%"
  637.       value = sprintf(fmt, @actor.rec * 100)
  638.     when :pha
  639.       fmt = "%1.2f%%"
  640.       value = sprintf(fmt, @actor.pha * 100)
  641.     when :mcr
  642.       fmt = "%1.2f%%"
  643.       value = sprintf(fmt, @actor.mcr * 100)
  644.     when :tcr
  645.       fmt = "%1.2f%%"
  646.       value = sprintf(fmt, @actor.tcr * 100)
  647.     when :pdr
  648.       fmt = "%1.2f%%"
  649.       value = sprintf(fmt, @actor.pdr * 100)
  650.     when :mdr
  651.       fmt = "%1.2f%%"
  652.       value = sprintf(fmt, @actor.mdr * 100)
  653.     when :fdr
  654.       fmt = "%1.2f%%"
  655.       value = sprintf(fmt, @actor.fdr * 100)
  656.     when :exr
  657.       fmt = "%1.2f%%"
  658.       value = sprintf(fmt, @actor.exr * 100)
  659.     when :hcr
  660.       return dy unless $imported["YEA-SkillCostManager"]
  661.       fmt = "%1.2f%%"
  662.       value = sprintf(fmt, @actor.hcr * 100)
  663.     when :tcr
  664.       return dy unless $imported["YEA-SkillCostManager"]
  665.       fmt = "%1.2f%%"
  666.       value = sprintf(fmt, @actor.tcr * 100)
  667.     when :gcr
  668.       return dy unless $imported["YEA-SkillCostManager"]
  669.       fmt = "%1.2f%%"
  670.       value = sprintf(fmt, @actor.gcr * 100)
  671.     when :cdr
  672.       return dy unless $imported["YEA-SkillRestrictions"]
  673.       fmt = "%1.2f%%"
  674.       value = sprintf(fmt, @actor.cdr * 100)
  675.     when :wur
  676.       return dy unless $imported["YEA-SkillRestrictions"]
  677.       fmt = "%1.2f%%"
  678.       value = sprintf(fmt, @actor.wur * 100)
  679.     #---
  680.     else; return dy
  681.     end
  682.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  683.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  684.     contents.fill_rect(rect, colour)
  685.     change_color(system_color)
  686.     draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
  687.     change_color(normal_color)
  688.     draw_text(dx+4, dy, dw-8, line_height, value, 2)
  689.     return dy + line_height
  690.   end

  691.   #--------------------------------------------------------------------------
  692.   # draw_actor_biography
  693.   #--------------------------------------------------------------------------
  694.   def draw_actor_biography
  695.     fmt = YEA::STATUS::BIOGRAPHY_NICKNAME_TEXT
  696.     text = sprintf(fmt,@actor.nickname, @actor.name )
  697.     contents.font.size = YEA::STATUS::BIOGRAPHY_NICKNAME_SIZE
  698.     draw_text(0, 0, contents.width, line_height*2, text, 1)
  699.     reset_font_settings
  700.     draw_text_ex(24, line_height*2, @actor.description)
  701.   end

  702.   #--------------------------------------------------------------------------
  703.   # draw_custom
  704.   #--------------------------------------------------------------------------
  705.   def draw_custom
  706.     current_symbol = @command_window.current_symbol
  707.     return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(current_symbol)
  708.     method(YEA::STATUS::CUSTOM_STATUS_COMMANDS[current_symbol][3]).call
  709.   end

  710.   #--------------------------------------------------------------------------
  711.   # draw_custom1
  712.   #--------------------------------------------------------------------------
  713.   def draw_custom1
  714.     dx = 0; dy = 0
  715.     for skill in @actor.skills
  716.       next if skill.nil?
  717.       next unless @actor.added_skill_types.include?(skill.stype_id)
  718.       draw_item_name(skill, dx, dy)
  719.       dx = dx == contents.width / 2 + 16 ? 0 : contents.width / 2 + 16
  720.       dy += line_height if dx == 0
  721.       return if dy + line_height > contents.height
  722.     end
  723.   end

  724.   #--------------------------------------------------------------------------
  725.   # draw_custom2
  726.   #--------------------------------------------------------------------------
  727.   def draw_custom2
  728.     dx = 4; dy = 0; slot_id = 0
  729.     for equip in @actor.equips
  730.       change_color(system_color)
  731.       text = Vocab.etype(@actor.equip_slots[slot_id])
  732.       draw_text(dx, dy, contents.width - dx, line_height, text)
  733.       reset_font_settings
  734.       draw_item_name(equip, dx+92, dy) unless equip.nil?
  735.       slot_id += 1
  736.       dy += line_height
  737.       break if dy + line_height > contents.height
  738.     end
  739.     dw = Graphics.width * 2 / 5 - 24
  740.     dx = contents.width - dw; dy = 0
  741.     param_id = 0
  742.     8.times do
  743.       colour = Color.new(0, 0, 0, translucent_alpha/2)
  744.       rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  745.       contents.fill_rect(rect, colour)
  746.       size = $imported["YEA-AceEquipEngine"] ? YEA::EQUIP::STATUS_FONT_SIZE : 20
  747.       contents.font.size = size
  748.       change_color(system_color)
  749.       draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
  750.       change_color(normal_color)
  751.       dwa = (Graphics.width * 2 / 5 - 2) / 2
  752.       draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
  753.       reset_font_settings
  754.       change_color(system_color)
  755.       draw_text(dx + dwa, dy, 22, line_height, "→", 1)
  756.       param_id += 1
  757.       dy += line_height
  758.       break if dy + line_height > contents.height
  759.     end
  760.   end

  761.   #--------------------------------------------------------------------------
  762.   # draw_custom3
  763.   #--------------------------------------------------------------------------
  764.   def draw_custom3
  765.     return unless $imported["YEA-ClassSystem"]
  766.     data = []
  767.     for class_id in YEA::CLASS_SYSTEM::CLASS_ORDER
  768.       next if $data_classes[class_id].nil?
  769.       item = $data_classes[class_id]
  770.       next unless @actor.unlocked_classes.include?(item.id) or
  771.         YEA::CLASS_SYSTEM::DEFAULT_UNLOCKS.include?(item.id)
  772.       data.push(item)
  773.     end
  774.     dx = 0; dy = 0; class_index = 0
  775.     for class_id in data
  776.       item = data[class_index]
  777.       reset_font_settings
  778.       if item == @actor.class
  779.         change_color(text_color(YEA::CLASS_SYSTEM::CURRENT_CLASS_COLOUR))
  780.       elsif item == @actor.subclass
  781.         change_color(text_color(YEA::CLASS_SYSTEM::SUBCLASS_COLOUR))
  782.       else
  783.         change_color(normal_color)
  784.       end
  785.       icon = item.icon_index
  786.       draw_icon(icon, dx, dy)
  787.       text = item.name
  788.       draw_text(24, dy, contents.width-24, line_height, text)
  789.       next if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
  790.       level = @actor.class_level(item.id)
  791.       contents.font.size = YEA::CLASS_SYSTEM::LEVEL_FONT_SIZE
  792.       text = sprintf(YEA::CLASS_SYSTEM::CLASS_LEVEL, level.group)
  793.       dwa = contents.width - (Graphics.width * 2 / 5 - 24) - 28
  794.       draw_text(dx, dy, dwa, line_height, text, 2)
  795.       class_index += 1
  796.       dy += line_height
  797.       break if dy + line_height > contents.height
  798.     end
  799.     dw = Graphics.width * 2 / 5 - 24
  800.     dx = contents.width - dw; dy = 0
  801.     param_id = 0
  802.     8.times do
  803.       colour = Color.new(0, 0, 0, translucent_alpha/2)
  804.       rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  805.       contents.fill_rect(rect, colour)
  806.       contents.font.size = YEA::CLASS_SYSTEM::PARAM_FONT_SIZE
  807.       change_color(system_color)
  808.       draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
  809.       change_color(normal_color)
  810.       dwa = (Graphics.width * 2 / 5 - 2) / 2
  811.       draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
  812.       reset_font_settings
  813.       change_color(system_color)
  814.       draw_text(dx + dwa, dy, 22, line_height, "→", 1)
  815.       param_id += 1
  816.       dy += line_height
  817.       break if dy + line_height > contents.height
  818.     end
  819.   end

  820. end # Window_StatusItem

  821. #==============================================================================
  822. # ■ Scene_Status
  823. #==============================================================================

  824. class Scene_Status < Scene_MenuBase

  825.   #--------------------------------------------------------------------------
  826.   # start
  827.   #--------------------------------------------------------------------------
  828.   def start
  829.     super

  830.     create_help_window
  831.     create_command_window
  832.     create_status_window
  833.     create_item_window
  834.     relocate_windows
  835.   end

  836.   #--------------------------------------------------------------------------
  837.   # create_command_window
  838.   #--------------------------------------------------------------------------
  839.   def create_command_window
  840.     wy = @help_window.height
  841.     @command_window = Window_StatusCommand.new(0, wy)
  842.     @command_window.viewport = @viewport
  843.     @command_window.actor = @actor
  844.     @command_window.help_window = @help_window
  845.     @command_window.set_handler(:cancel,   method(:return_scene))
  846.     @command_window.set_handler(:pagedown, method(:next_actor))
  847.     @command_window.set_handler(:pageup,   method(:prev_actor))
  848.     process_custom_status_commands
  849.   end

  850.   #--------------------------------------------------------------------------
  851.   # process_custom_status_commands
  852.   #--------------------------------------------------------------------------
  853.   def process_custom_status_commands
  854.     for command in YEA::STATUS::COMMANDS
  855.       next unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
  856.       called_method = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][2]
  857.       @command_window.set_handler(command[0], method(called_method))
  858.     end
  859.   end

  860.   #--------------------------------------------------------------------------
  861.   # create_status_window
  862.   #--------------------------------------------------------------------------
  863.   def create_status_window
  864.     wy = @help_window.height
  865.     @status_window = Window_StatusActor.new(@command_window.width, wy)
  866.     @status_window.viewport = @viewport
  867.     @status_window.actor = @actor
  868.   end

  869.   #--------------------------------------------------------------------------
  870.   # create_item_window
  871.   #--------------------------------------------------------------------------
  872.   def create_item_window
  873.     dy = @command_window.y + @command_window.height
  874.     @item_window = Window_StatusItem.new(0, dy, @command_window)
  875.     @item_window.viewport = @viewport
  876.     @item_window.actor = @actor
  877.     @command_window.item_window = @item_window
  878.   end

  879.   #--------------------------------------------------------------------------
  880.   # relocate_windows
  881.   #--------------------------------------------------------------------------
  882.   def relocate_windows
  883.     return unless $imported["YEA-AceMenuEngine"]
  884.     case Menu.help_window_location
  885.     when 0 # Top
  886.       @help_window.y = 0
  887.       @command_window.y = @help_window.height
  888.       @item_window.y = @command_window.y + @command_window.height
  889.     when 1 # Middle
  890.       @command_window.y = 0
  891.       @help_window.y = @command_window.height
  892.       @item_window.y = @help_window.y + @help_window.height
  893.     else # Bottom
  894.       @command_window.y = 0
  895.       @item_window.y = @command_window.height
  896.       @help_window.y = @item_window.y + @item_window.height
  897.     end
  898.     @status_window.y = @command_window.y
  899.   end

  900.   #--------------------------------------------------------------------------
  901.   # on_actor_change
  902.   #--------------------------------------------------------------------------
  903.   def on_actor_change
  904.     @command_window.actor = @actor
  905.     @status_window.actor = @actor
  906.     @item_window.actor = @actor
  907.     @command_window.activate
  908.   end

  909.   #--------------------------------------------------------------------------
  910.   # new method: command_name1
  911.   #--------------------------------------------------------------------------
  912.   def command_name1
  913.     SceneManager.call(Scene_Skill)
  914.   end

  915.   #--------------------------------------------------------------------------
  916.   # new method: command_name2
  917.   #--------------------------------------------------------------------------
  918.   def command_name2
  919.     SceneManager.call(Scene_Equip)
  920.   end

  921.   #--------------------------------------------------------------------------
  922.   # new method: command_name3
  923.   #--------------------------------------------------------------------------
  924.   def command_name3
  925.     unless $imported["YEA-ClassSystem"]
  926.       @command_window.activate
  927.       return
  928.     end
  929.     SceneManager.call(Scene_Class)
  930.   end

  931. end # Scene_Status

  932. #==============================================================================
  933. #
  934. # ▼ End of File
  935. #
  936. #==============================================================================
复制代码

原来效果

原来效果

理想效果

理想效果
...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部