设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 884|回复: 1
打印 上一主题 下一主题

[已经过期] Yanfly的状态面板数据固定。

[复制链接]

Lv3.寻梦者

梦石
0
星屑
4557
在线时间
807 小时
注册时间
2017-7-14
帖子
170

开拓者

跳转到指定楼层
1
发表于 2017-9-23 23:16:06 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 wan5337088 于 2017-9-24 08:28 编辑

请问各位大神,怎么才能将图片里面的数值设定成固定数字,可以自己设置。不会随等级,装备变动,永远是固定不变的。
RUBY 代码复制
  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.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-StatusMenu"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2011.12.26 - Compatibility Update: Rename Actor
  17. # 2011.12.23 - Started Script and Finished.
  18. #
  19. #==============================================================================
  20. # ▼ Introduction
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # This script changes the status screen completely to something the player can
  23. # interact with more and be able to view actor data with more clarity. The
  24. # player is able to view the general information for an actor (parameters and
  25. # experience), a parameters bar graph, the various hidden extra parameters
  26. # (named properties in the script), and a customizable biography for the actor.
  27. # Also with this script, biographies can be changed at any time using a script
  28. # call to add more of a personal touch to characters.
  29. #
  30. #==============================================================================
  31. # ▼ Instructions
  32. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  33. # To install this script, open up your script editor and copy/paste this script
  34. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  35. #
  36. # -----------------------------------------------------------------------------
  37. # Script Calls - These commands are used with script calls.
  38. # -----------------------------------------------------------------------------
  39. # $game_actors[x].description = string
  40. # Changes the biography description for actor x to that of the string. Use
  41.  
  42. # to designate linebreaks in the string. If you wish to use text codes, write
  43. # them in the strings as \n[2] or \c[3] to make them work properly.
  44. #
  45. #==============================================================================
  46. # ▼ Compatibility
  47. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  48. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  49. # it will run with RPG Maker VX without adjusting.
  50. #
  51. #==============================================================================
  52.  
  53. module YEA
  54.   module STATUS
  55.  
  56.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  57.     # - Command Window Settings -
  58.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  59.     # This section adjusts the commands that appear in the command window used
  60.     # for the status screen. Rearrange the commands, add new ones, remove them
  61.     # as you see fit.
  62.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  63.     COMMANDS =[ # The order at which the menu items are shown.
  64.       [    :command,  "Display"],
  65.      [ :parameters,  "数据"],
  66.      [    :custom3,  "Class"],
  67.       [  :biography,  "介绍"],
  68.       [     :rename,  "Rename"],  # Requires YEA - Rename Actor
  69.       [    :retitle,  "Retitle"],  # Requires YEA - Rename Actor
  70.     ] # Do not remove this.
  71.  
  72.     #--------------------------------------------------------------------------
  73.     # - Status Custom Commands -
  74.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  75.     # For those who use scripts to that may produce unique effects for the
  76.     # status menu, use this hash to manage the custom commands for the Status
  77.     # Command Window. You can disable certain commands or prevent them from
  78.     # appearing by using switches. If you don't wish to bind them to a switch,
  79.     # set the proper switch to 0 for it to have no impact.
  80.     #--------------------------------------------------------------------------
  81.     CUSTOM_STATUS_COMMANDS ={
  82.     # :command => [EnableSwitch, ShowSwitch, Handler Method, Window Draw],
  83.       :custom1 => [           0,          0, :command_name1, :draw_custom1],
  84.       :custom2 => [           0,          0, :command_name2, :draw_custom2],
  85.       :custom3 => [           0,          0, :command_name3, :draw_custom3],
  86.     } # Do not remove this.
  87.  
  88.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  89.     # - General Window Settings -
  90.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91.     # These settings adjust the way the general window visually appears.
  92.     # Not many changes need to be done here other than vocab changes.
  93.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  94.     PARAMETERS_VOCAB = "数据"         # Title used for Parameters.
  95.     EXPERIENCE_VOCAB = "经验值"         # Title used for Experience.
  96.     NEXT_TOTAL_VOCAB = "下次 %s 经验数据"  # Label used for total experience.
  97.  
  98.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  99.     # - Parameters Window Settings -
  100.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  101.     # These settings adjust the way the parameters window visually appears.
  102.     # Each of the stats have a non-window colour. Adjust them as you see fit.
  103.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  104.     PARAM_COLOUR ={
  105.     # ParamID => [:stat,       Colour1,                   Colour2          ],
  106.             2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
  107.             3 => [ :def, Color.new(250, 150,  30), Color.new(250, 180, 100)],
  108.             4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
  109.             5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
  110.             6 => [ :agi, Color.new( 60, 180,  80), Color.new(120, 200, 120)],
  111.             7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
  112.     } # Do not remove this.
  113.  
  114.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  115.     # - Properties Window Settings -
  116.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  117.     # These settings adjust the way the properties window visually appears.
  118.     # The properties have abbreviations, but leaving them as such makes things
  119.     # confusing (as it's sometimes hard to figure out what the abbreviations
  120.     # mean). Change the way the appear, whether or not they appear, and what
  121.     # order they will appear in.
  122.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  123.     PROPERTIES_FONT_SIZE = 18        # Font size used for properties.
  124.  
  125.     # These are the properties that appear in column 1.
  126.     PROPERTIES_COLUMN1 =[
  127.       [:cnt, "物理反击"],
  128.       [:tgr, "被攻击率"],
  129.     ] # Do not remove this.
  130.  
  131.     # These are the properties that appear in column 2.
  132.     PROPERTIE
  133.     ] # Do not remove this.
  134.  
  135.     # These are the properties that appear in column 3.
  136.     PROPERTIES_COLUMN3 =[
  137. #      [:hcr, "HP補充率"],    # Requires YEA - Skill Cost Manag
  138.       [:gdr, "额外掉钱率"],
  139.     ] # Do not remove this.
  140.  
  141.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  142.     # - Biography Window Settings -
  143.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  144.     # These settings adjust the way the biography appears including the title
  145.     # used at the top, the font size, and whatnot.
  146.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  147.     BIOGRAPHY_NICKNAME_TEXT = "%s 
  148. 称号:%s"   # How the nickname will appear.
  149.     BIOGRAPHY_NICKNAME_SIZE = 32            # Size of the font used.
  150.  
  151.  
  152.  
  153.   end # STATUS
  154. end # YEA
  155.  
  156. #==============================================================================
  157. # ▼ Editting anything past this point may potentially result in causing
  158. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  159. # halitosis so edit at your own risk.
  160. #==============================================================================
  161.  
  162. #==============================================================================
  163. # ■ Numeric
  164. #==============================================================================
  165.  
  166. class Numeric
  167.  
  168.   #--------------------------------------------------------------------------
  169.   # new method: group_digits
  170.   #--------------------------------------------------------------------------
  171.   unless $imported["YEA-CoreEngine"]
  172.   def group; return self.to_s; end
  173.   end # $imported["YEA-CoreEngine"]
  174.  
  175. end # Numeric
  176.  
  177. #==============================================================================
  178. # ■ Game_Temp
  179. #==============================================================================
  180.  
  181. class Game_Temp
  182.  
  183.   #--------------------------------------------------------------------------
  184.   # public instance variables
  185.   #--------------------------------------------------------------------------
  186.   attr_accessor :scene_status_index
  187.   attr_accessor :scene_status_oy
  188.  
  189. end # Game_Temp
  190.  
  191. #==============================================================================
  192. # ■ Game_Actor
  193. #==============================================================================
  194.  
  195. class Game_Actor < Game_Battler
  196.  
  197.   #--------------------------------------------------------------------------
  198.   # new method: description=
  199.   #--------------------------------------------------------------------------
  200.   def description=(text)
  201.     @description = text
  202.   end
  203.  
  204.   #--------------------------------------------------------------------------
  205.   # overwrite method: description
  206.   #--------------------------------------------------------------------------
  207.   def description
  208.     return @description unless @description.nil?
  209.     return actor.description
  210.   end
  211.  
  212. end # Game_Actor
  213.  
  214. #==============================================================================
  215. # ■ Window_StatusCommand
  216. #==============================================================================
  217.  
  218. class Window_StatusCommand < Window_Command
  219.  
  220.   #--------------------------------------------------------------------------
  221.   # public instance variables
  222.   #--------------------------------------------------------------------------
  223.   attr_accessor :item_window
  224.  
  225.   #--------------------------------------------------------------------------
  226.   # initialize
  227.   #--------------------------------------------------------------------------
  228.   def initialize(dx, dy)
  229.     super(dx, dy)
  230.     @actor = nil
  231.   end
  232.  
  233.   #--------------------------------------------------------------------------
  234.   # window_width
  235.   #--------------------------------------------------------------------------
  236.   def window_width; return 160; end
  237.  
  238.   #--------------------------------------------------------------------------
  239.   # actor=
  240.   #--------------------------------------------------------------------------
  241.   def actor=(actor)
  242.     return if @actor == actor
  243.     @actor = actor
  244.     refresh
  245.   end
  246.  
  247.   #--------------------------------------------------------------------------
  248.   # visible_line_number
  249.   #--------------------------------------------------------------------------
  250.   def visible_line_number; return 4; end
  251.  
  252.   #--------------------------------------------------------------------------
  253.   # ok_enabled?
  254.   #--------------------------------------------------------------------------
  255.   def ok_enabled?
  256.     return handle?(current_symbol)
  257.   end
  258.  
  259.   #--------------------------------------------------------------------------
  260.   # make_command_list
  261.   #--------------------------------------------------------------------------
  262.   def make_command_list
  263.     return unless @actor
  264.     for command in YEA::STATUS::COMMANDS
  265.       case command[0]
  266.       #--- Default ---
  267.       when :general, :parameters, :properties, :biography
  268.         add_command(command[1], command[0])
  269.       #--- Yanfly Engine Ace ---
  270.       when :rename
  271.         next unless $imported["YEA-RenameActor"]
  272.         add_command(command[1], command[0], @actor.rename_allow?)
  273.       when :retitle
  274.         next unless $imported["YEA-RenameActor"]
  275.         add_command(command[1], command[0], @actor.retitle_allow?)
  276.       #--- Custom Commands ---
  277.       else
  278.         process_custom_command(command)
  279.       end
  280.     end
  281.     if !$game_temp.scene_status_index.nil?
  282.       select($game_temp.scene_status_index)
  283.       self.oy = $game_temp.scene_status_oy
  284.     end
  285.     $game_temp.scene_status_index = nil
  286.     $game_temp.scene_status_oy = nil
  287.   end
  288.  
  289.   #--------------------------------------------------------------------------
  290.   # process_ok
  291.   #--------------------------------------------------------------------------
  292.   def process_ok
  293.     $game_temp.scene_status_index = index
  294.     $game_temp.scene_status_oy = self.oy
  295.     super
  296.   end
  297.  
  298.   #--------------------------------------------------------------------------
  299.   # process_custom_command
  300.   #--------------------------------------------------------------------------
  301.   def process_custom_command(command)
  302.     return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
  303.     show = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][1]
  304.     continue = show <= 0 ? true : $game_switches[show]
  305.     return unless continue
  306.     text = command[1]
  307.     switch = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][0]
  308.     enabled = switch <= 0 ? true : $game_switches[switch]
  309.     add_command(text, command[0], enabled)
  310.   end
  311.  
  312.   #--------------------------------------------------------------------------
  313.   # update
  314.   #--------------------------------------------------------------------------
  315.   def update
  316.     super
  317.     update_item_window
  318.   end
  319.  
  320.   #--------------------------------------------------------------------------
  321.   # update_item_window
  322.   #--------------------------------------------------------------------------
  323.   def update_item_window
  324.     return if @item_window.nil?
  325.     return if @current_index == current_symbol
  326.     @current_index = current_symbol
  327.     @item_window.refresh
  328.   end
  329.  
  330.   #--------------------------------------------------------------------------
  331.   # item_window=
  332.   #--------------------------------------------------------------------------
  333.   def item_window=(window)
  334.     @item_window = window
  335.     update
  336.   end
  337.  
  338.   #--------------------------------------------------------------------------
  339.   # update_help
  340.   #--------------------------------------------------------------------------
  341.   def update_help
  342.     return if @actor.nil?
  343.     @help_window.set_text(@actor.actor.description)
  344.   end
  345.  
  346. end # Window_StatusCommand
  347.  
  348. #==============================================================================
  349. # ■ Window_StatusActor
  350. #==============================================================================
  351.  
  352. class Window_StatusActor < Window_Base
  353.  
  354.   #--------------------------------------------------------------------------
  355.   # initialize
  356.   #--------------------------------------------------------------------------
  357.   def initialize(dx, dy)
  358.     super(dx, dy, window_width, fitting_height(4))
  359.     @actor = nil
  360.   end
  361.  
  362.   #--------------------------------------------------------------------------
  363.   # window_width
  364.   #--------------------------------------------------------------------------
  365.   def window_width; return Graphics.width - 160; end
  366.  
  367.   #--------------------------------------------------------------------------
  368.   # actor=
  369.   #--------------------------------------------------------------------------
  370.   def actor=(actor)
  371.     return if @actor == actor
  372.     @actor = actor
  373.     refresh
  374.   end
  375.  
  376.   #--------------------------------------------------------------------------
  377.   # refresh
  378.   #--------------------------------------------------------------------------
  379.   def refresh
  380.     contents.clear
  381.     return unless @actor
  382.     draw_actor_face(@actor, 0, 0)
  383.     draw_actor_simple_status(@actor, 108, line_height / 2)
  384.   end
  385.  
  386. end # Window_StatusActor
  387.  
  388. #==============================================================================
  389. # ■ Window_StatusItem
  390. #==============================================================================
  391.  
  392. class Window_StatusItem < Window_Base
  393.  
  394.   #--------------------------------------------------------------------------
  395.   # initialize
  396.   #--------------------------------------------------------------------------
  397.   def initialize(dx, dy, command_window)
  398.     super(dx, dy, Graphics.width, Graphics.height - dy)
  399.     @command_window = command_window
  400.     @actor = nil
  401.     refresh
  402.   end
  403.  
  404.   #--------------------------------------------------------------------------
  405.   # actor=
  406.   #--------------------------------------------------------------------------
  407.   def actor=(actor)
  408.     return if @actor == actor
  409.     @actor = actor
  410.     refresh
  411.   end
  412.  
  413.   #--------------------------------------------------------------------------
  414.   # refresh
  415.   #--------------------------------------------------------------------------
  416.   def refresh
  417.     contents.clear
  418.     reset_font_settings
  419.     return unless @actor
  420.     draw_window_contents
  421.   end
  422.  
  423.   #--------------------------------------------------------------------------
  424.   # draw_window_contents
  425.   #--------------------------------------------------------------------------
  426.   def draw_window_contents
  427.     case @command_window.current_symbol
  428.     when :general
  429.       draw_actor_general
  430.     when :parameters
  431.       draw_parameter_graph
  432.     when :properties
  433.       draw_properties_list
  434.     when :biography, :rename, :retitle
  435.       draw_actor_biography
  436.     else
  437.       draw_custom
  438.     end
  439.   end
  440.  
  441.   #--------------------------------------------------------------------------
  442.   # draw_actor_general
  443.   #--------------------------------------------------------------------------
  444.   def draw_actor_general
  445.     change_color(system_color)
  446.     text = YEA::STATUS::PARAMETERS_VOCAB
  447.     draw_text(0, 0, contents.width/2, line_height, text, 1)
  448.     text = YEA::STATUS::EXPERIENCE_VOCAB
  449.     draw_text(contents.width/2, 0, contents.width/2, line_height, text, 1)
  450.     draw_general_parameters
  451.     draw_general_experience
  452.   end
  453.  
  454.   #--------------------------------------------------------------------------
  455.   # draw_general_parameters
  456.   #--------------------------------------------------------------------------
  457.   def draw_general_parameters
  458.     dx = 24
  459.     dy = line_height / 2
  460.     draw_actor_level(dx, line_height*1+dy, contents.width/2 - 24)
  461.     draw_actor_param(0, dx, line_height*2+dy, contents.width/2 - 24)
  462.     draw_actor_param(1, dx, line_height*3+dy, contents.width/2 - 24)
  463.     draw_actor_param(2, dx, line_height*4+dy, contents.width/4 - 12)
  464.     draw_actor_param(4, dx, line_height*5+dy, contents.width/4 - 12)
  465.     draw_actor_param(6, dx, line_height*6+dy, contents.width/4 - 12)
  466.     dx += contents.width/4 - 12
  467.     draw_actor_param(3, dx, line_height*4+dy, contents.width/4 - 12)
  468.     draw_actor_param(5, dx, line_height*5+dy, contents.width/4 - 12)
  469.     draw_actor_param(7, dx, line_height*6+dy, contents.width/4 - 12)
  470.   end
  471.  
  472.   #--------------------------------------------------------------------------
  473.   # draw_actor_level
  474.   #--------------------------------------------------------------------------
  475.   def draw_actor_level(dx, dy, dw)
  476.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  477.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  478.     contents.fill_rect(rect, colour)
  479.     change_color(system_color)
  480.     draw_text(dx+4, dy, dw-8, line_height, Vocab::level)
  481.     change_color(normal_color)
  482.     draw_text(dx+4, dy, dw-8, line_height, @actor.level.group, 2)
  483.   end
  484.  
  485.   #--------------------------------------------------------------------------
  486.   # draw_actor_param
  487.   #--------------------------------------------------------------------------
  488.   def draw_actor_param(param_id, dx, dy, dw)
  489.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  490.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  491.     contents.fill_rect(rect, colour)
  492.     change_color(system_color)
  493.     draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
  494.     change_color(normal_color)
  495.     draw_text(dx+4, dy, dw-8, line_height, @actor.param(param_id).group, 2)
  496.   end
  497.  
  498.   #--------------------------------------------------------------------------
  499.   # draw_general_experience
  500.   #--------------------------------------------------------------------------
  501.   def draw_general_experience
  502.     if @actor.max_level?
  503.       s1 = @actor.exp.group
  504.       s2 = "-------"
  505.       s3 = "-------"
  506.     else
  507.       s1 = @actor.exp.group
  508.       s2 = (@actor.next_level_exp - @actor.exp).group
  509.       s3 = @actor.next_level_exp.group
  510.     end
  511.     s_next = sprintf(Vocab::ExpNext, Vocab::level)
  512.     total_next_text = sprintf(YEA::STATUS::NEXT_TOTAL_VOCAB, Vocab::level)
  513.     change_color(system_color)
  514.     dx = contents.width/2 + 12
  515.     dy = line_height * 3 / 2
  516.     dw = contents.width/2 - 36
  517.     draw_text(dx, dy + line_height * 0, dw, line_height, Vocab::ExpTotal)
  518.     draw_text(dx, dy + line_height * 2, dw, line_height, s_next)
  519.     draw_text(dx, dy + line_height * 4, dw, line_height, total_next_text)
  520.     change_color(normal_color)
  521.     draw_text(dx, dy + line_height * 1, dw, line_height, s1, 2)
  522.     draw_text(dx, dy + line_height * 3, dw, line_height, s2, 2)
  523.     draw_text(dx, dy + line_height * 5, dw, line_height, s3, 2)
  524.   end
  525.  
  526.   #--------------------------------------------------------------------------
  527.   # draw_parameter_graph
  528.   #--------------------------------------------------------------------------
  529.   def draw_parameter_graph
  530.     draw_parameter_title
  531.     dy = line_height * 3/2
  532.     maximum = 1
  533.     minimum = @actor.param_max(2)
  534.     for i in 2..7
  535.       maximum = [@actor.param(i), maximum].max
  536.       minimum = [@actor.param(i), minimum].min
  537.     end
  538.     maximum += minimum * 0.33 unless maximum == minimum
  539.     for i in 2..7
  540.       rate = calculate_rate(maximum, minimum, i)
  541.       dy = line_height * i - line_height/2
  542.       draw_param_gauge(i, dy, rate)
  543.       change_color(system_color)
  544.       draw_text(28, dy, contents.width - 56, line_height, Vocab::param(i))
  545.       dw = (contents.width - 48) * rate - 8
  546.       change_color(normal_color)
  547.       draw_text(28, dy, dw, line_height, @actor.param(i).group, 2)
  548.     end
  549.   end
  550.  
  551.   #--------------------------------------------------------------------------
  552.   # calculate_rate
  553.   #--------------------------------------------------------------------------
  554.   def calculate_rate(maximum, minimum, param_id)
  555.     return 1.0 if maximum == minimum
  556.     rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
  557.     rate *= 0.67
  558.     rate += 0.33
  559.     return rate
  560.   end
  561.  
  562.   #--------------------------------------------------------------------------
  563.   # draw_param_gauge
  564.   #--------------------------------------------------------------------------
  565.   def draw_param_gauge(param_id, dy, rate)
  566.     dw = contents.width - 48
  567.     colour1 = param_gauge1(param_id)
  568.     colour2 = param_gauge2(param_id)
  569.     draw_gauge(24, dy, dw, rate, colour1, colour2)
  570.   end
  571.  
  572.   #--------------------------------------------------------------------------
  573.   # param_gauge1
  574.   #--------------------------------------------------------------------------
  575.   def param_gauge1(param_id)
  576.     return YEA::STATUS::PARAM_COLOUR[param_id][1]
  577.   end
  578.  
  579.   #--------------------------------------------------------------------------
  580.   # param_gauge2
  581.   #--------------------------------------------------------------------------
  582.   def param_gauge2(param_id)
  583.     return YEA::STATUS::PARAM_COLOUR[param_id][2]
  584.   end
  585.  
  586.   #--------------------------------------------------------------------------
  587.   # draw_parameter_title
  588.   #--------------------------------------------------------------------------
  589.   def draw_parameter_title
  590.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  591.     rect = Rect.new(0, 0, contents.width, contents.height)
  592.     contents.fill_rect(rect, colour)
  593.     change_color(system_color)
  594.     text = YEA::STATUS::PARAMETERS_VOCAB
  595.     draw_text(0, line_height/3, contents.width, line_height, text, 1)
  596.   end
  597.  
  598.   #--------------------------------------------------------------------------
  599.   # draw_properties_list
  600.   #--------------------------------------------------------------------------
  601.   def draw_properties_list
  602.     contents.font.size = YEA::STATUS::PROPERTIES_FONT_SIZE
  603.     draw_properties_column1
  604.     draw_properties_column2
  605.     draw_properties_column3
  606.     reset_font_settings
  607.   end
  608.  
  609.   #--------------------------------------------------------------------------
  610.   # draw_properties_column1
  611.   #--------------------------------------------------------------------------
  612.   def draw_properties_column1
  613.     dx = 24
  614.     dw = (contents.width - 24) / 3 - 24
  615.     dy = 0
  616.     for property in YEA::STATUS::PROPERTIES_COLUMN1
  617.       dy = draw_property(property, dx, dy, dw)
  618.     end
  619.   end
  620.  
  621.   #--------------------------------------------------------------------------
  622.   # draw_properties_column2
  623.   #--------------------------------------------------------------------------
  624.   def draw_properties_column2
  625.     dx = 24 + (contents.width - 24) / 3
  626.     dw = (contents.width - 24) / 3 - 24
  627.     dy = 0
  628.     for property in YEA::STATUS::PROPERTIES_COLUMN2
  629.       dy = draw_property(property, dx, dy, dw)
  630.     end
  631.   end
  632.  
  633.   #--------------------------------------------------------------------------
  634.   # draw_properties_column3
  635.   #--------------------------------------------------------------------------
  636.   def draw_properties_column3
  637.     dx = 24 + (contents.width - 24) / 3 * 2
  638.     dw = (contents.width - 24) / 3 - 24
  639.     dy = 0
  640.     for property in YEA::STATUS::PROPERTIES_COLUMN3
  641.       dy = draw_property(property, dx, dy, dw)
  642.     end
  643.   end
  644.  
  645.   #--------------------------------------------------------------------------
  646.   # draw_property
  647.   #--------------------------------------------------------------------------
  648.   def draw_property(property, dx, dy, dw)
  649.     case property[0]
  650.     #---
  651.     when :hit
  652.       fmt = "%1.2f%%"
  653.       value = sprintf(fmt, @actor.hit * 100)
  654.     when :eva
  655.       fmt = "%1.2f%%"
  656.       value = sprintf(fmt, @actor.eva * 100)
  657.     when :cri
  658.       fmt = "%1.2f%%"
  659.       value = sprintf(fmt, @actor.cri * 100)
  660.     when :cev
  661.       fmt = "%1.2f%%"
  662.       value = sprintf(fmt, @actor.cev * 100)
  663.     when :mev
  664.       fmt = "%1.2f%%"
  665.       value = sprintf(fmt, @actor.mev * 100)
  666.     when :mrf
  667.       fmt = "%1.2f%%"
  668.       value = sprintf(fmt, @actor.mrf * 100)
  669.     when :cnt
  670.       fmt = "%1.2f%%"
  671.       value = sprintf(fmt, @actor.cnt * 100)
  672.     when :hrg
  673.       fmt = "%1.2f%%"
  674.       value = sprintf(fmt, @actor.hrg * 100)
  675.     when :mrg
  676.       fmt = "%1.2f%%"
  677.       value = sprintf(fmt, @actor.mrg * 100)
  678.     when :trg
  679.       fmt = "%1.2f%%"
  680.       value = sprintf(fmt, @actor.trg * 100)
  681.     when :tgr
  682.       fmt = "%1.2f%%"
  683.       value = sprintf(fmt, @actor.tgr * 100)
  684.     when :grd
  685.       fmt = "%1.2f%%"
  686.       value = sprintf(fmt, @actor.grd * 100)
  687.     when :rec
  688.       fmt = "%1.2f%%"
  689.       value = sprintf(fmt, @actor.rec * 100)
  690.     when :pha
  691.       fmt = "%1.2f%%"
  692.       value = sprintf(fmt, @actor.pha * 100)
  693.     when :mcr
  694.       fmt = "%1.2f%%"
  695.       value = sprintf(fmt, @actor.mcr * 100)
  696.     when :tcr
  697.       fmt = "%1.2f%%"
  698.       value = sprintf(fmt, @actor.tcr * 100)
  699.     when :pdr
  700.       fmt = "%1.2f%%"
  701.       value = sprintf(fmt, @actor.pdr * 100)
  702.     when :mdr
  703.       fmt = "%1.2f%%"
  704.       value = sprintf(fmt, @actor.mdr * 100)
  705.     when :fdr
  706.       fmt = "%1.2f%%"
  707.       value = sprintf(fmt, @actor.fdr * 100)
  708.     when :exr #經驗獲得量
  709.       fmt = "%1.2f%%"
  710.       value = sprintf(fmt, @actor.exr * 100)
  711.     when :idr #额外掉宝率
  712.       fmt = "%1.2f%%"
  713.       value = sprintf(fmt, @actor.idr * 100)
  714.     when :gdr #额外掉钱率
  715.       fmt = "%1.2f%%"
  716.       value = sprintf(fmt, @actor.gdr * 100)
  717.     when :hcr
  718.       return dy unless $imported["YEA-SkillCostManager"]
  719.       fmt = "%1.2f%%"
  720.       value = sprintf(fmt, @actor.hcr * 100)
  721.     when :tcr
  722.       return dy unless $imported["YEA-SkillCostManager"]
  723.       fmt = "%1.2f%%"
  724.       value = sprintf(fmt, @actor.tcr * 100)
  725.     when :gcr
  726.       return dy unless $imported["YEA-SkillCostManager"]
  727.       fmt = "%1.2f%%"
  728.       value = sprintf(fmt, @actor.gcr * 100)
  729.     when :cdr
  730.       return dy unless $imported["YEA-SkillRestrictions"]
  731.       fmt = "%1.2f%%"
  732.       value = sprintf(fmt, @actor.cdr * 100)
  733.     when :wur
  734.       return dy unless $imported["YEA-SkillRestrictions"]
  735.       fmt = "%1.2f%%"
  736.       value = sprintf(fmt, @actor.wur * 100)
  737.     #---
  738.     else; return dy
  739.     end
  740.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  741.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  742.     contents.fill_rect(rect, colour)
  743.     change_color(system_color)
  744.     draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
  745.     change_color(normal_color)
  746.     draw_text(dx+4, dy, dw-8, line_height, value, 2)
  747.     return dy + line_height
  748.   end
  749.  
  750.   #--------------------------------------------------------------------------
  751.   # draw_actor_biography
  752.   #--------------------------------------------------------------------------
  753.   def draw_actor_biography
  754.     fmt = YEA::STATUS::BIOGRAPHY_NICKNAME_TEXT
  755.     text = sprintf(fmt, @actor.name, @actor.nickname)
  756.     contents.font.size = YEA::STATUS::BIOGRAPHY_NICKNAME_SIZE
  757.     draw_text(0, 0, contents.width, line_height*2, text, 1)
  758.     reset_font_settings
  759.     draw_text_ex(24, line_height*2, @actor.description)
  760.   end
  761.  
  762.   #--------------------------------------------------------------------------
  763.   # draw_custom
  764.   #--------------------------------------------------------------------------
  765.   def draw_custom
  766.     current_symbol = @command_window.current_symbol
  767.     return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(current_symbol)
  768.     method(YEA::STATUS::CUSTOM_STATUS_COMMANDS[current_symbol][3]).call
  769.   end
  770.  
  771.   #--------------------------------------------------------------------------
  772.   # draw_custom1
  773.   #--------------------------------------------------------------------------
  774.   def draw_custom1
  775.     dx = 0; dy = 0
  776.     for skill in @actor.skills
  777.       next if skill.nil?
  778.       next unless @actor.added_skill_types.include?(skill.stype_id)
  779.       draw_item_name(skill, dx, dy)
  780.       dx = dx == contents.width / 2 + 16 ? 0 : contents.width / 2 + 16
  781.       dy += line_height if dx == 0
  782.       return if dy + line_height > contents.height
  783.     end
  784.   end
  785.  
  786.   #--------------------------------------------------------------------------
  787.   # draw_custom2
  788.   #--------------------------------------------------------------------------
  789.   def draw_custom2
  790.     dx = 4; dy = 0; slot_id = 0
  791.     for equip in @actor.equips
  792.       change_color(system_color)
  793.       text = Vocab.etype(@actor.equip_slots[slot_id])
  794.       draw_text(dx, dy, contents.width - dx, line_height, text)
  795.       reset_font_settings
  796.       draw_item_name(equip, dx+92, dy) unless equip.nil?
  797.       slot_id += 1
  798.       dy += line_height
  799.       break if dy + line_height > contents.height
  800.     end
  801.     dw = Graphics.width * 2 / 5 - 24
  802.     dx = contents.width - dw; dy = 0
  803.     param_id = 0
  804.     8.times do
  805.       colour = Color.new(0, 0, 0, translucent_alpha/2)
  806.       rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  807.       contents.fill_rect(rect, colour)
  808.       size = $imported["YEA-AceEquipEngine"] ? YEA::EQUIP::STATUS_FONT_SIZE : 20
  809.       contents.font.size = size
  810.       change_color(system_color)
  811.       draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
  812.       change_color(normal_color)
  813.       dwa = (Graphics.width * 2 / 5 - 2) / 2
  814.       draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
  815.       reset_font_settings
  816.       change_color(system_color)
  817.       draw_text(dx + dwa, dy, 22, line_height, "→", 1)
  818.       param_id += 1
  819.       dy += line_height
  820.       break if dy + line_height > contents.height
  821.     end
  822.   end
  823.  
  824.   #--------------------------------------------------------------------------
  825.   # draw_custom3
  826.   #--------------------------------------------------------------------------
  827.   def draw_custom3
  828.     return unless $imported["YEA-ClassSystem"]
  829.     data = []
  830.     for class_id in YEA::CLASS_SYSTEM::CLASS_ORDER
  831.       next if $data_classes[class_id].nil?
  832.       item = $data_classes[class_id]
  833.       next unless @actor.unlocked_classes.include?(item.id) or
  834.         YEA::CLASS_SYSTEM::DEFAULT_UNLOCKS.include?(item.id)
  835.       data.push(item)
  836.     end
  837.     dx = 0; dy = 0; class_index = 0
  838.     for class_id in data
  839.       item = data[class_index]
  840.       reset_font_settings
  841.       if item == @actor.class
  842.         change_color(text_color(YEA::CLASS_SYSTEM::CURRENT_CLASS_COLOUR))
  843.       elsif item == @actor.subclass
  844.         change_color(text_color(YEA::CLASS_SYSTEM::SUBCLASS_COLOUR))
  845.       else
  846.         change_color(normal_color)
  847.       end
  848.       icon = item.icon_index
  849.       draw_icon(icon, dx, dy)
  850.       text = item.name
  851.       draw_text(24, dy, contents.width-24, line_height, text)
  852.       next if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
  853.       level = @actor.class_level(item.id)
  854.       contents.font.size = YEA::CLASS_SYSTEM::LEVEL_FONT_SIZE
  855.       text = sprintf(YEA::CLASS_SYSTEM::CLASS_LEVEL, level.group)
  856.       dwa = contents.width - (Graphics.width * 2 / 5 - 24) - 28
  857.       draw_text(dx, dy, dwa, line_height, text, 2)
  858.       class_index += 1
  859.       dy += line_height
  860.       break if dy + line_height > contents.height
  861.     end
  862.     dw = Graphics.width * 2 / 5 - 24
  863.     dx = contents.width - dw; dy = 0
  864.     param_id = 0
  865.     8.times do
  866.       colour = Color.new(0, 0, 0, translucent_alpha/2)
  867.       rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  868.       contents.fill_rect(rect, colour)
  869.       contents.font.size = YEA::CLASS_SYSTEM::PARAM_FONT_SIZE
  870.       change_color(system_color)
  871.       draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
  872.       change_color(normal_color)
  873.       dwa = (Graphics.width * 2 / 5 - 2) / 2
  874.       draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
  875.       reset_font_settings
  876.       change_color(system_color)
  877.       draw_text(dx + dwa, dy, 22, line_height, "→", 1)
  878.       param_id += 1
  879.       dy += line_height
  880.       break if dy + line_height > contents.height
  881.     end
  882.   end
  883.  
  884. end # Window_StatusItem
  885.  
  886. #==============================================================================
  887. # ■ Scene_Status
  888. #==============================================================================
  889.  
  890. class Scene_Status < Scene_MenuBase
  891.  
  892.   #--------------------------------------------------------------------------
  893.   # start
  894.   #--------------------------------------------------------------------------
  895.   def start
  896.     super
  897.  
  898.     create_help_window
  899.     create_command_window
  900.     create_status_window
  901.     create_item_window
  902.     relocate_windows
  903.   end
  904.  
  905.   #--------------------------------------------------------------------------
  906.   # create_command_window
  907.   #--------------------------------------------------------------------------
  908.   def create_command_window
  909.     wy = @help_window.height
  910.     @command_window = Window_StatusCommand.new(0, wy)
  911.     @command_window.viewport = @viewport
  912.     @command_window.actor = @actor
  913.     @command_window.help_window = @help_window
  914.     @command_window.set_handler(:cancel,   method(:return_scene))
  915.     @command_window.set_handler(:pagedown, method(:next_actor))
  916.     @command_window.set_handler(:pageup,   method(:prev_actor))
  917.     process_custom_status_commands
  918.   end
  919.  
  920.   #--------------------------------------------------------------------------
  921.   # process_custom_status_commands
  922.   #--------------------------------------------------------------------------
  923.   def process_custom_status_commands
  924.     for command in YEA::STATUS::COMMANDS
  925.       next unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
  926.       called_method = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][2]
  927.       @command_window.set_handler(command[0], method(called_method))
  928.     end
  929.   end
  930.  
  931.   #--------------------------------------------------------------------------
  932.   # create_status_window
  933.   #--------------------------------------------------------------------------
  934.   def create_status_window
  935.     wy = @help_window.height
  936.     @status_window = Window_StatusActor.new(@command_window.width, wy)
  937.     @status_window.viewport = @viewport
  938.     @status_window.actor = @actor
  939.   end
  940.  
  941.   #--------------------------------------------------------------------------
  942.   # create_item_window
  943.   #--------------------------------------------------------------------------
  944.   def create_item_window
  945.     dy = @command_window.y + @command_window.height
  946.     @item_window = Window_StatusItem.new(0, dy, @command_window)
  947.     @item_window.viewport = @viewport
  948.     @item_window.actor = @actor
  949.     @command_window.item_window = @item_window
  950.   end
  951.  
  952.   #--------------------------------------------------------------------------
  953.   # relocate_windows
  954.   #--------------------------------------------------------------------------
  955.   def relocate_windows
  956.     return unless $imported["YEA-AceMenuEngine"]
  957.     case Menu.help_window_location
  958.     when 0 # Top
  959.       @help_window.y = 0
  960.       @command_window.y = @help_window.height
  961.       @item_window.y = @command_window.y + @command_window.height
  962.     when 1 # Middle
  963.       @command_window.y = 0
  964.       @help_window.y = @command_window.height
  965.       @item_window.y = @help_window.y + @help_window.height
  966.     else # Bottom
  967.       @command_window.y = 0
  968.       @item_window.y = @command_window.height
  969.       @help_window.y = @item_window.y + @item_window.height
  970.     end
  971.     @status_window.y = @command_window.y
  972.   end
  973.  
  974.   #--------------------------------------------------------------------------
  975.   # on_actor_change
  976.   #--------------------------------------------------------------------------
  977.   def on_actor_change
  978.     @command_window.actor = @actor
  979.     @status_window.actor = @actor
  980.     @item_window.actor = @actor
  981.     @command_window.activate
  982.   end
  983.  
  984.   #--------------------------------------------------------------------------
  985.   # new method: command_name1
  986.   #--------------------------------------------------------------------------
  987.   def command_name1
  988.     SceneManager.call(Scene_Skill)
  989.   end
  990.  
  991.   #--------------------------------------------------------------------------
  992.   # new method: command_name2
  993.   #--------------------------------------------------------------------------
  994.   def command_name2
  995.     SceneManager.call(Scene_Equip)
  996.   end
  997.  
  998.   #--------------------------------------------------------------------------
  999.   # new method: command_name3
  1000.   #--------------------------------------------------------------------------
  1001.   def command_name3
  1002.     unless $imported["YEA-ClassSystem"]
  1003.       @command_window.activate
  1004.       return
  1005.     end
  1006.     SceneManager.call(Scene_Class)
  1007.   end
  1008.  
  1009. end # Scene_Status
  1010.  
  1011. #==============================================================================
  1012. #
  1013. # ▼ End of File
  1014. #
  1015. #==============================================================================

QQ图片20170923231118.png (94.06 KB, 下载次数: 12)

QQ图片20170923231118.png

Lv3.寻梦者

梦石
0
星屑
2724
在线时间
227 小时
注册时间
2016-3-27
帖子
576
2
发表于 2017-9-24 12:07:24 | 只看该作者
进数据库把角色还是职业那一栏的数据曲线全部改成水平的不就OK了
现在还能改名吗qwq
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-17 18:58

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表