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

Project1

 找回密码
 注册会员
搜索
查看: 3205|回复: 8

[已经过期] 能力值改成百分比显示或者小数

[复制链接]

Lv4.逐梦者

梦石
0
星屑
7653
在线时间
1339 小时
注册时间
2012-6-6
帖子
345
发表于 2014-1-16 01:44:41 | 显示全部楼层 |阅读模式

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

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

x
先上图吧 QQ图片20140116013840.jpg


命中1  回避5  会心49   可不不可以用百分比显示呀?1%    5%     49%   


或者小数显示 0.01     0.05     4.9


整数着实不好看呀。。。。。




点评

在描绘能力值的地方加个%号不就可以了!  发表于 2014-1-16 07:39

Lv1.梦旅人

梦石
0
星屑
238
在线时间
341 小时
注册时间
2010-9-5
帖子
70
发表于 2014-1-16 09:35:46 | 显示全部楼层
试试这个脚本,或者从这里提供思路改一下你的脚本
  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.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  53.     # - Command Window Settings -
  54.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  55.     # This section adjusts the commands that appear in the command window used
  56.     # for the status screen. Rearrange the commands, add new ones, remove them
  57.     # as you see fit.
  58.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  59.     COMMANDS =[ # The order at which the menu items are shown.
  60.     # [    :command,    "Display"],
  61.       [    :general,    "基本信息"],
  62.       [ :parameters, "主要属性"],
  63.       [ :properties, "其它属性"],
  64.     # [    :custom1,     "Skills"],
  65.     # [    :custom2,  "Equipment"],
  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 = 16        # Font size used for properties.
  124.    
  125.     # These are the properties that appear in column 1.
  126.     PROPERTIES_COLUMN1 =[
  127.       [:hit, "物理命中"],
  128.       [:eva, "物理闪避"],
  129.       [:cri, "致命一击"],
  130.       [:cev, "致命闪避"],
  131.       [:mev, "魔法闪避"],
  132.       [:mrf, "魔法反射"],
  133.       [:cnt, "物理反击"],
  134.       [:tgr, "目标攻击"],
  135.     ] # Do not remove this.
  136.    
  137.     # These are the properties that appear in column 2.
  138.     PROPERTIES_COLUMN2 =[
  139.       [:hrg, "HP再生"],
  140.       [:mrg, "MP再生"],
  141.       [:trg, "TP再生"],
  142.       [:rec, "恢复"],
  143.       [:grd, "防御力"],
  144.       [:pha, "物品使用"],
  145.       [:exr, "经验获得"],
  146.       [:tcr, "TP模式"],
  147.     ] # Do not remove this.
  148.    
  149.     # These are the properties that appear in column 3.
  150.     PROPERTIES_COLUMN3 =[
  151. #      [:hcr, "HP消费伤害"],    # Requires YEA - Skill Cost Manager
  152. #      [:mcr, "MP消费伤害"],
  153. #      [:tcr, "TP消费伤害"],    # Requires YEA - Skill Cost Manager
  154. #      [:cdr, "硬直伤害"],   # Requires YEA - Skill Restrictions
  155. #      [:wur, "激励伤害"],     # Requires YEA - Skill Restrictions
  156.       [:pdr, "物理伤害"],
  157.       [:mdr, "魔法伤害"],
  158.       [:fdr, "基本伤害"],
  159.     ] # Do not remove this.
  160.    
  161.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  162.     # - Biography Window Settings -
  163.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  164.     # These settings adjust the way the biography appears including the title
  165.     # used at the top, the font size, and whatnot.
  166.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  167.     BIOGRAPHY_NICKNAME_TEXT = "%s the %s"   # How the nickname will appear.
  168.     BIOGRAPHY_NICKNAME_SIZE = 32            # Size of the font used.
  169.    
  170.      
  171.    
  172.   end # STATUS
  173. end # YEA

  174. #==============================================================================
  175. # ▼ Editting anything past this point may potentially result in causing
  176. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  177. # halitosis so edit at your own risk.
  178. #==============================================================================

  179. #==============================================================================
  180. # ■ Numeric
  181. #==============================================================================

  182. class Numeric
  183.   
  184.   #--------------------------------------------------------------------------
  185.   # new method: group_digits
  186.   #--------------------------------------------------------------------------
  187.   unless $imported["YEA-CoreEngine"]
  188.   def group; return self.to_s; end
  189.   end # $imported["YEA-CoreEngine"]
  190.    
  191. end # Numeric

  192. #==============================================================================
  193. # ■ Game_Temp
  194. #==============================================================================

  195. class Game_Temp
  196.   
  197.   #--------------------------------------------------------------------------
  198.   # public instance variables
  199.   #--------------------------------------------------------------------------
  200.   attr_accessor :scene_status_index
  201.   attr_accessor :scene_status_oy
  202.   
  203. end # Game_Temp

  204. #==============================================================================
  205. # ■ Game_Actor
  206. #==============================================================================

  207. class Game_Actor < Game_Battler
  208.   
  209.   #--------------------------------------------------------------------------
  210.   # new method: description=
  211.   #--------------------------------------------------------------------------
  212.   def description=(text)
  213.     @description = text
  214.   end
  215.   
  216.   #--------------------------------------------------------------------------
  217.   # overwrite method: description
  218.   #--------------------------------------------------------------------------
  219.   def description
  220.     return @description unless @description.nil?
  221.     return actor.description
  222.   end
  223.   
  224. end # Game_Actor

  225. #==============================================================================
  226. # ■ Window_StatusCommand
  227. #==============================================================================

  228. class Window_StatusCommand < Window_Command
  229.   
  230.   #--------------------------------------------------------------------------
  231.   # public instance variables
  232.   #--------------------------------------------------------------------------
  233.   attr_accessor :item_window
  234.   
  235.   #--------------------------------------------------------------------------
  236.   # initialize
  237.   #--------------------------------------------------------------------------
  238.   def initialize(dx, dy)
  239.     super(dx, dy)
  240.     [url=home.php?mod=space&uid=95897]@actor[/url] = nil
  241.   end
  242.   
  243.   #--------------------------------------------------------------------------
  244.   # window_width
  245.   #--------------------------------------------------------------------------
  246.   def window_width; return 160; end
  247.   
  248.   #--------------------------------------------------------------------------
  249.   # actor=
  250.   #--------------------------------------------------------------------------
  251.   def actor=(actor)
  252.     return if @actor == actor
  253.     @actor = actor
  254.     refresh
  255.   end
  256.   
  257.   #--------------------------------------------------------------------------
  258.   # visible_line_number
  259.   #--------------------------------------------------------------------------
  260.   def visible_line_number; return 4; end
  261.   
  262.   #--------------------------------------------------------------------------
  263.   # ok_enabled?
  264.   #--------------------------------------------------------------------------
  265.   def ok_enabled?
  266.     return handle?(current_symbol)
  267.   end
  268.   
  269.   #--------------------------------------------------------------------------
  270.   # make_command_list
  271.   #--------------------------------------------------------------------------
  272.   def make_command_list
  273.     return unless @actor
  274.     for command in YEA::STATUS::COMMANDS
  275.       case command[0]
  276.       #--- Default ---
  277.       when :general, :parameters, :properties, :biography
  278.         add_command(command[1], command[0])
  279.       #--- Yanfly Engine Ace ---
  280.       when :rename
  281.         next unless $imported["YEA-RenameActor"]
  282.         add_command(command[1], command[0], @actor.rename_allow?)
  283.       when :retitle
  284.         next unless $imported["YEA-RenameActor"]
  285.         add_command(command[1], command[0], @actor.retitle_allow?)
  286.       #--- Custom Commands ---
  287.       else
  288.         process_custom_command(command)
  289.       end
  290.     end
  291.     if !$game_temp.scene_status_index.nil?
  292.       select($game_temp.scene_status_index)
  293.       self.oy = $game_temp.scene_status_oy
  294.     end
  295.     $game_temp.scene_status_index = nil
  296.     $game_temp.scene_status_oy = nil
  297.   end
  298.   
  299.   #--------------------------------------------------------------------------
  300.   # process_ok
  301.   #--------------------------------------------------------------------------
  302.   def process_ok
  303.     $game_temp.scene_status_index = index
  304.     $game_temp.scene_status_oy = self.oy
  305.     super
  306.   end
  307.   
  308.   #--------------------------------------------------------------------------
  309.   # process_custom_command
  310.   #--------------------------------------------------------------------------
  311.   def process_custom_command(command)
  312.     return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
  313.     show = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][1]
  314.     continue = show <= 0 ? true : $game_switches[show]
  315.     return unless continue
  316.     text = command[1]
  317.     switch = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][0]
  318.     enabled = switch <= 0 ? true : $game_switches[switch]
  319.     add_command(text, command[0], enabled)
  320.   end
  321.   
  322.   #--------------------------------------------------------------------------
  323.   # update
  324.   #--------------------------------------------------------------------------
  325.   def update
  326.     super
  327.     update_item_window
  328.   end
  329.   
  330.   #--------------------------------------------------------------------------
  331.   # update_item_window
  332.   #--------------------------------------------------------------------------
  333.   def update_item_window
  334.     return if @item_window.nil?
  335.     return if @current_index == current_symbol
  336.     @current_index = current_symbol
  337.     @item_window.refresh
  338.   end
  339.   
  340.   #--------------------------------------------------------------------------
  341.   # item_window=
  342.   #--------------------------------------------------------------------------
  343.   def item_window=(window)
  344.     @item_window = window
  345.     update
  346.   end
  347.   
  348.   #--------------------------------------------------------------------------
  349.   # update_help
  350.   #--------------------------------------------------------------------------
  351.   def update_help
  352.     return if @actor.nil?
  353.     @help_window.set_text(@actor.actor.description)
  354.   end
  355.   
  356. end # Window_StatusCommand

  357. #==============================================================================
  358. # ■ Window_StatusActor
  359. #==============================================================================

  360. class Window_StatusActor < Window_Base
  361.   
  362.   #--------------------------------------------------------------------------
  363.   # initialize
  364.   #--------------------------------------------------------------------------
  365.   def initialize(dx, dy)
  366.     super(dx, dy, window_width, fitting_height(4))
  367.     @actor = nil
  368.   end
  369.   
  370.   #--------------------------------------------------------------------------
  371.   # window_width
  372.   #--------------------------------------------------------------------------
  373.   def window_width; return Graphics.width - 160; end
  374.   
  375.   #--------------------------------------------------------------------------
  376.   # actor=
  377.   #--------------------------------------------------------------------------
  378.   def actor=(actor)
  379.     return if @actor == actor
  380.     @actor = actor
  381.     refresh
  382.   end
  383.   
  384.   #--------------------------------------------------------------------------
  385.   # refresh
  386.   #--------------------------------------------------------------------------
  387.   def refresh
  388.     contents.clear
  389.     return unless @actor
  390.     draw_actor_face(@actor, 0, 0)
  391.     draw_actor_simple_status(@actor, 108, line_height / 2)
  392.   end
  393.   
  394. end # Window_StatusActor

  395. #==============================================================================
  396. # ■ Window_StatusItem
  397. #==============================================================================

  398. class Window_StatusItem < Window_Base
  399.   
  400.   #--------------------------------------------------------------------------
  401.   # initialize
  402.   #--------------------------------------------------------------------------
  403.   def initialize(dx, dy, command_window)
  404.     super(dx, dy, Graphics.width, Graphics.height - dy)
  405.     @command_window = command_window
  406.     @actor = nil
  407.     refresh
  408.   end
  409.   
  410.   #--------------------------------------------------------------------------
  411.   # actor=
  412.   #--------------------------------------------------------------------------
  413.   def actor=(actor)
  414.     return if @actor == actor
  415.     @actor = actor
  416.     refresh
  417.   end
  418.   
  419.   #--------------------------------------------------------------------------
  420.   # refresh
  421.   #--------------------------------------------------------------------------
  422.   def refresh
  423.     contents.clear
  424.     reset_font_settings
  425.     return unless @actor
  426.     draw_window_contents
  427.   end
  428.   
  429.   #--------------------------------------------------------------------------
  430.   # draw_window_contents
  431.   #--------------------------------------------------------------------------
  432.   def draw_window_contents
  433.     case @command_window.current_symbol
  434.     when :general
  435.       draw_actor_general
  436.     when :parameters
  437.       draw_parameter_graph
  438.     when :properties
  439.       draw_properties_list
  440.     when :biography, :rename, :retitle
  441.       draw_actor_biography
  442.     else
  443.       draw_custom
  444.     end
  445.   end
  446.   
  447.   #--------------------------------------------------------------------------
  448.   # draw_actor_general
  449.   #--------------------------------------------------------------------------
  450.   def draw_actor_general
  451.     change_color(system_color)
  452.     text = YEA::STATUS::PARAMETERS_VOCAB
  453.     draw_text(0, 0, contents.width/2, line_height, text, 1)
  454.     text = YEA::STATUS::EXPERIENCE_VOCAB
  455.     draw_text(contents.width/2, 0, contents.width/2, line_height, text, 1)
  456.     draw_general_parameters
  457.     draw_general_experience
  458.   end
  459.   
  460.   #--------------------------------------------------------------------------
  461.   # draw_general_parameters
  462.   #--------------------------------------------------------------------------
  463.   def draw_general_parameters
  464.     dx = 24
  465.     dy = line_height / 2
  466.     draw_actor_level(dx, line_height*1+dy, contents.width/2 - 24)
  467.     draw_actor_param(0, dx, line_height*2+dy, contents.width/2 - 24)
  468.     draw_actor_param(1, dx, line_height*3+dy, contents.width/2 - 24)
  469.     draw_actor_param(2, dx, line_height*4+dy, contents.width/4 - 12)
  470.     draw_actor_param(4, dx, line_height*5+dy, contents.width/4 - 12)
  471.     draw_actor_param(6, dx, line_height*6+dy, contents.width/4 - 12)
  472.     dx += contents.width/4 - 12
  473.     draw_actor_param(3, dx, line_height*4+dy, contents.width/4 - 12)
  474.     draw_actor_param(5, dx, line_height*5+dy, contents.width/4 - 12)
  475.     draw_actor_param(7, dx, line_height*6+dy, contents.width/4 - 12)
  476.   end
  477.   
  478.   #--------------------------------------------------------------------------
  479.   # draw_actor_level
  480.   #--------------------------------------------------------------------------
  481.   def draw_actor_level(dx, dy, dw)
  482.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  483.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  484.     contents.fill_rect(rect, colour)
  485.     change_color(system_color)
  486.     draw_text(dx+4, dy, dw-8, line_height, Vocab::level)
  487.     change_color(normal_color)
  488.     draw_text(dx+4, dy, dw-8, line_height, @actor.level.group, 2)
  489.   end
  490.   
  491.   #--------------------------------------------------------------------------
  492.   # draw_actor_param
  493.   #--------------------------------------------------------------------------
  494.   def draw_actor_param(param_id, dx, dy, dw)
  495.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  496.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  497.     contents.fill_rect(rect, colour)
  498.     change_color(system_color)
  499.     draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
  500.     change_color(normal_color)
  501.     draw_text(dx+4, dy, dw-8, line_height, @actor.param(param_id).group, 2)
  502.   end
  503.   
  504.   #--------------------------------------------------------------------------
  505.   # draw_general_experience
  506.   #--------------------------------------------------------------------------
  507.   def draw_general_experience
  508.     if @actor.max_level?
  509.       s1 = @actor.exp.group
  510.       s2 = "-------"
  511.       s3 = "-------"
  512.     else
  513.       s1 = @actor.exp.group
  514.       s2 = (@actor.next_level_exp - @actor.exp).group
  515.       s3 = @actor.next_level_exp.group
  516.     end
  517.     s_next = sprintf(Vocab::ExpNext, Vocab::level)
  518.     total_next_text = sprintf(YEA::STATUS::NEXT_TOTAL_VOCAB, Vocab::level)
  519.     change_color(system_color)
  520.     dx = contents.width/2 + 12
  521.     dy = line_height * 3 / 2
  522.     dw = contents.width/2 - 36
  523.     draw_text(dx, dy + line_height * 0, dw, line_height, Vocab::ExpTotal)
  524.     draw_text(dx, dy + line_height * 2, dw, line_height, s_next)
  525.     draw_text(dx, dy + line_height * 4, dw, line_height, total_next_text)
  526.     change_color(normal_color)
  527.     draw_text(dx, dy + line_height * 1, dw, line_height, s1, 2)
  528.     draw_text(dx, dy + line_height * 3, dw, line_height, s2, 2)
  529.     draw_text(dx, dy + line_height * 5, dw, line_height, s3, 2)
  530.   end
  531.   
  532.   #--------------------------------------------------------------------------
  533.   # draw_parameter_graph
  534.   #--------------------------------------------------------------------------
  535.   def draw_parameter_graph
  536.     draw_parameter_title
  537.     dy = line_height * 3/2
  538.     maximum = 1
  539.     minimum = @actor.param_max(2)
  540.     for i in 2..7
  541.       maximum = [@actor.param(i), maximum].max
  542.       minimum = [@actor.param(i), minimum].min
  543.     end
  544.     maximum += minimum * 0.33 unless maximum == minimum
  545.     for i in 2..7
  546.       rate = calculate_rate(maximum, minimum, i)
  547.       dy = line_height * i - line_height/2
  548.       draw_param_gauge(i, dy, rate)
  549.       change_color(system_color)
  550.       draw_text(28, dy, contents.width - 56, line_height, Vocab::param(i))
  551.       dw = (contents.width - 48) * rate - 8
  552.       change_color(normal_color)
  553.       draw_text(28, dy, dw, line_height, @actor.param(i).group, 2)
  554.     end
  555.   end
  556.   
  557.   #--------------------------------------------------------------------------
  558.   # calculate_rate
  559.   #--------------------------------------------------------------------------
  560.   def calculate_rate(maximum, minimum, param_id)
  561.     return 1.0 if maximum == minimum
  562.     rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
  563.     rate *= 0.67
  564.     rate += 0.33
  565.     return rate
  566.   end
  567.   
  568.   #--------------------------------------------------------------------------
  569.   # draw_param_gauge
  570.   #--------------------------------------------------------------------------
  571.   def draw_param_gauge(param_id, dy, rate)
  572.     dw = contents.width - 48
  573.     colour1 = param_gauge1(param_id)
  574.     colour2 = param_gauge2(param_id)
  575.     draw_gauge(24, dy, dw, rate, colour1, colour2)
  576.   end
  577.   
  578.   #--------------------------------------------------------------------------
  579.   # param_gauge1
  580.   #--------------------------------------------------------------------------
  581.   def param_gauge1(param_id)
  582.     return YEA::STATUS::PARAM_COLOUR[param_id][1]
  583.   end
  584.   
  585.   #--------------------------------------------------------------------------
  586.   # param_gauge2
  587.   #--------------------------------------------------------------------------
  588.   def param_gauge2(param_id)
  589.     return YEA::STATUS::PARAM_COLOUR[param_id][2]
  590.   end
  591.   
  592.   #--------------------------------------------------------------------------
  593.   # draw_parameter_title
  594.   #--------------------------------------------------------------------------
  595.   def draw_parameter_title
  596.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  597.     rect = Rect.new(0, 0, contents.width, contents.height)
  598.     contents.fill_rect(rect, colour)
  599.     change_color(system_color)
  600.     text = YEA::STATUS::PARAMETERS_VOCAB
  601.     draw_text(0, line_height/3, contents.width, line_height, text, 1)
  602.   end
  603.   
  604.   #--------------------------------------------------------------------------
  605.   # draw_properties_list
  606.   #--------------------------------------------------------------------------
  607.   def draw_properties_list
  608.     contents.font.size = YEA::STATUS::PROPERTIES_FONT_SIZE
  609.     draw_properties_column1
  610.     draw_properties_column2
  611.     draw_properties_column3
  612.     reset_font_settings
  613.   end
  614.   
  615.   #--------------------------------------------------------------------------
  616.   # draw_properties_column1
  617.   #--------------------------------------------------------------------------
  618.   def draw_properties_column1
  619.     dx = 24
  620.     dw = (contents.width - 24) / 3 - 24
  621.     dy = 0
  622.     for property in YEA::STATUS::PROPERTIES_COLUMN1
  623.       dy = draw_property(property, dx, dy, dw)
  624.     end
  625.   end
  626.   
  627.   #--------------------------------------------------------------------------
  628.   # draw_properties_column2
  629.   #--------------------------------------------------------------------------
  630.   def draw_properties_column2
  631.     dx = 24 + (contents.width - 24) / 3
  632.     dw = (contents.width - 24) / 3 - 24
  633.     dy = 0
  634.     for property in YEA::STATUS::PROPERTIES_COLUMN2
  635.       dy = draw_property(property, dx, dy, dw)
  636.     end
  637.   end
  638.   
  639.   #--------------------------------------------------------------------------
  640.   # draw_properties_column3
  641.   #--------------------------------------------------------------------------
  642.   def draw_properties_column3
  643.     dx = 24 + (contents.width - 24) / 3 * 2
  644.     dw = (contents.width - 24) / 3 - 24
  645.     dy = 0
  646.     for property in YEA::STATUS::PROPERTIES_COLUMN3
  647.       dy = draw_property(property, dx, dy, dw)
  648.     end
  649.   end
  650.   
  651.   #--------------------------------------------------------------------------
  652.   # draw_property
  653.   #--------------------------------------------------------------------------
  654.   def draw_property(property, dx, dy, dw)
  655.     case property[0]
  656.     #---
  657.     when :hit
  658.       fmt = "%1.2f%%"
  659.       value = sprintf(fmt, @actor.hit * 100)
  660.     when :eva
  661.       fmt = "%1.2f%%"
  662.       value = sprintf(fmt, @actor.eva * 100)
  663.     when :cri
  664.       fmt = "%1.2f%%"
  665.       value = sprintf(fmt, @actor.cri * 100)
  666.     when :cev
  667.       fmt = "%1.2f%%"
  668.       value = sprintf(fmt, @actor.cev * 100)
  669.     when :mev
  670.       fmt = "%1.2f%%"
  671.       value = sprintf(fmt, @actor.mev * 100)
  672.     when :mrf
  673.       fmt = "%1.2f%%"
  674.       value = sprintf(fmt, @actor.mrf * 100)
  675.     when :cnt
  676.       fmt = "%1.2f%%"
  677.       value = sprintf(fmt, @actor.cnt * 100)
  678.     when :hrg
  679.       fmt = "%1.2f%%"
  680.       value = sprintf(fmt, @actor.hrg * 100)
  681.     when :mrg
  682.       fmt = "%1.2f%%"
  683.       value = sprintf(fmt, @actor.mrg * 100)
  684.     when :trg
  685.       fmt = "%1.2f%%"
  686.       value = sprintf(fmt, @actor.trg * 100)
  687.     when :tgr
  688.       fmt = "%1.2f%%"
  689.       value = sprintf(fmt, @actor.tgr * 100)
  690.     when :grd
  691.       fmt = "%1.2f%%"
  692.       value = sprintf(fmt, @actor.grd * 100)
  693.     when :rec
  694.       fmt = "%1.2f%%"
  695.       value = sprintf(fmt, @actor.rec * 100)
  696.     when :pha
  697.       fmt = "%1.2f%%"
  698.       value = sprintf(fmt, @actor.pha * 100)
  699.     when :mcr
  700.       fmt = "%1.2f%%"
  701.       value = sprintf(fmt, @actor.mcr * 100)
  702.     when :tcr
  703.       fmt = "%1.2f%%"
  704.       value = sprintf(fmt, @actor.tcr * 100)
  705.     when :pdr
  706.       fmt = "%1.2f%%"
  707.       value = sprintf(fmt, @actor.pdr * 100)
  708.     when :mdr
  709.       fmt = "%1.2f%%"
  710.       value = sprintf(fmt, @actor.mdr * 100)
  711.     when :fdr
  712.       fmt = "%1.2f%%"
  713.       value = sprintf(fmt, @actor.fdr * 100)
  714.     when :exr
  715.       fmt = "%1.2f%%"
  716.       value = sprintf(fmt, @actor.exr * 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. # ■ Scene_Status
  887. #==============================================================================

  888. class Scene_Status < Scene_MenuBase
  889.   
  890.   #--------------------------------------------------------------------------
  891.   # start
  892.   #--------------------------------------------------------------------------
  893.   def start
  894.     super
  895.      
  896.     create_help_window
  897.     create_command_window
  898.     create_status_window
  899.     create_item_window
  900.     relocate_windows
  901.   end
  902.   
  903.   #--------------------------------------------------------------------------
  904.   # create_command_window
  905.   #--------------------------------------------------------------------------
  906.   def create_command_window
  907.     wy = @help_window.height
  908.     @command_window = Window_StatusCommand.new(0, wy)
  909.     @command_window.viewport = @viewport
  910.     @command_window.actor = @actor
  911.     @command_window.help_window = @help_window
  912.     @command_window.set_handler(:cancel,   method(:return_scene))
  913.     @command_window.set_handler(:pagedown, method(:next_actor))
  914.     @command_window.set_handler(:pageup,   method(:prev_actor))
  915.     process_custom_status_commands
  916.   end
  917.   
  918.   #--------------------------------------------------------------------------
  919.   # process_custom_status_commands
  920.   #--------------------------------------------------------------------------
  921.   def process_custom_status_commands
  922.     for command in YEA::STATUS::COMMANDS
  923.       next unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
  924.       called_method = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][2]
  925.       @command_window.set_handler(command[0], method(called_method))
  926.     end
  927.   end
  928.   
  929.   #--------------------------------------------------------------------------
  930.   # create_status_window
  931.   #--------------------------------------------------------------------------
  932.   def create_status_window
  933.     wy = @help_window.height
  934.     @status_window = Window_StatusActor.new(@command_window.width, wy)
  935.     @status_window.viewport = @viewport
  936.     @status_window.actor = @actor
  937.   end
  938.   
  939.   #--------------------------------------------------------------------------
  940.   # create_item_window
  941.   #--------------------------------------------------------------------------
  942.   def create_item_window
  943.     dy = @command_window.y + @command_window.height
  944.     @item_window = Window_StatusItem.new(0, dy, @command_window)
  945.     @item_window.viewport = @viewport
  946.     @item_window.actor = @actor
  947.     @command_window.item_window = @item_window
  948.   end
  949.   
  950.   #--------------------------------------------------------------------------
  951.   # relocate_windows
  952.   #--------------------------------------------------------------------------
  953.   def relocate_windows
  954.     return unless $imported["YEA-AceMenuEngine"]
  955.     case Menu.help_window_location
  956.     when 0 # Top
  957.       @help_window.y = 0
  958.       @command_window.y = @help_window.height
  959.       @item_window.y = @command_window.y + @command_window.height
  960.     when 1 # Middle
  961.       @command_window.y = 0
  962.       @help_window.y = @command_window.height
  963.       @item_window.y = @help_window.y + @help_window.height
  964.     else # Bottom
  965.       @command_window.y = 0
  966.       @item_window.y = @command_window.height
  967.       @help_window.y = @item_window.y + @item_window.height
  968.     end
  969.     @status_window.y = @command_window.y
  970.   end
  971.   
  972.   #--------------------------------------------------------------------------
  973.   # on_actor_change
  974.   #--------------------------------------------------------------------------
  975.   def on_actor_change
  976.     @command_window.actor = @actor
  977.     @status_window.actor = @actor
  978.     @item_window.actor = @actor
  979.     @command_window.activate
  980.   end
  981.   
  982.   #--------------------------------------------------------------------------
  983.   # new method: command_name1
  984.   #--------------------------------------------------------------------------
  985.   def command_name1
  986.     SceneManager.call(Scene_Skill)
  987.   end
  988.   
  989.   #--------------------------------------------------------------------------
  990.   # new method: command_name2
  991.   #--------------------------------------------------------------------------
  992.   def command_name2
  993.     SceneManager.call(Scene_Equip)
  994.   end
  995.   
  996.   #--------------------------------------------------------------------------
  997.   # new method: command_name3
  998.   #--------------------------------------------------------------------------
  999.   def command_name3
  1000.     unless $imported["YEA-ClassSystem"]
  1001.       @command_window.activate
  1002.       return
  1003.     end
  1004.     SceneManager.call(Scene_Class)
  1005.   end
  1006.   
  1007. end # Scene_Status

  1008. #==============================================================================
  1009. #
  1010. # ▼ End of File
  1011. #
  1012. #==============================================================================
复制代码

评分

参与人数 1星屑 +60 收起 理由
流浪杰哥 + 60 塞糖

查看全部评分

点击即可领养:
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
7653
在线时间
1339 小时
注册时间
2012-6-6
帖子
345
 楼主| 发表于 2014-1-16 14:07:30 | 显示全部楼层
令狐林 发表于 2014-1-16 09:35
试试这个脚本,或者从这里提供思路改一下你的脚本

我不会改这个外站脚本,感谢回答!
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
7653
在线时间
1339 小时
注册时间
2012-6-6
帖子
345
 楼主| 发表于 2014-1-16 14:08:45 | 显示全部楼层
白痴地问一句在哪里改呀?我是脚本盲。。。。。。说个大概的位置

点评

请问您要改的是什么?  发表于 2014-1-16 14:37
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
7653
在线时间
1339 小时
注册时间
2012-6-6
帖子
345
 楼主| 发表于 2014-1-16 15:55:58 | 显示全部楼层
流浪杰哥 发表于 2014-1-16 14:08
白痴地问一句在哪里改呀?我是脚本盲。。。。。。说个大概的位置

那啥命中率 回避率  必杀率   改成用小数显示,不用整数显示   ,我想配合那个装备说明增强脚本。。。。。

点评

请先附上你使用的装备说明增强脚本……  发表于 2014-1-16 18:58
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
218 小时
注册时间
2013-12-17
帖子
386
发表于 2014-1-16 17:58:07 | 显示全部楼层
你这个不是默认的脚本吧
RM脚本定制/修改/整合 群:143356012(入群注明来意)
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
7653
在线时间
1339 小时
注册时间
2012-6-6
帖子
345
 楼主| 发表于 2014-1-17 22:37:07 | 显示全部楼层
流浪杰哥 发表于 2014-1-16 15:55
那啥命中率 回避率  必杀率   改成用小数显示,不用整数显示   ,我想配合那个装备说明增强脚本。。。。 ...
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ 装备说明增强
  4. #------------------------------------------------------------------------------
  5. #  修改了说明窗口,增强了装备的说明 作者:wyongcan  发布于66RPG   转载请注明
  6. #==============================================================================
  7. module Help
  8.   CODE ={
  9.     11 => "属性抗性",
  10.     12 => "弱化抗性",
  11.     13 => "状态抗性",
  12.     14 => "状态免疫",
  13.     21 => "普通能力",
  14.     22 => "添加能力",
  15.     23 => "特殊能力",
  16.     31 => "攻击附带属性",
  17.     32 => "攻击附带状态",
  18.     33 => "攻击速度",
  19.     34 => "添加攻击次数",
  20.     41 => "添加技能类型",
  21.     42 => "禁用技能类型",
  22.     43 => "添加技能",
  23.     44 => "禁用技能",
  24.     51 => "可装备武器类型",
  25.     52 => "可装备护甲类型",
  26.     53 => "固定装备",
  27.     54 => "禁用装备",
  28.     55 => "装备风格",
  29.     61 => "行动次数",
  30.     62 => "特殊标志",
  31.     63 => "消失效果",
  32.     64 => "队伍能力"}
  33.   #特殊标志
  34.   FLAG ={
  35.                 0 => "自动战斗",
  36.                 1 => "擅长防御",
  37.                 2 => "保护弱者",
  38.                 3 => "特技专注"}
  39.   #普通能力
  40.         PARAM ={
  41.                 0 => "生命上限",
  42.                 1 => "魔法上限",
  43.                 2 => "物理攻击",
  44.                 3 => "物理防御",
  45.                 4 => "魔法攻击",
  46.                 5 => "魔法防御",
  47.                 6 => "敏 捷 值",
  48.                 7 => "幸 运 值"}
  49.   #添加能力
  50.         XPARAM ={
  51.                 0 => "物理命中:",
  52.                 1 => "物理闪避几率:",
  53.                 2 => "必杀几率:",
  54.                 3 => "必杀闪避几率:",
  55.                 4 => "魔法闪避几率:",
  56.                 5 => "魔法反射几率:",
  57.                 6 => "物理反击几率:",
  58.                 7 => "体力值再生速度:",
  59.                 8 => "魔力值再生速度:",
  60.                 9 => "特技值再生速度:"}
  61.   #特殊能力
  62.         SPARAM ={
  63.                 0 => "受到攻击的几率",
  64.                 1 => "防御效果比率",
  65.                 2 => "恢复效果比率",
  66.                 3 => "药理知识",
  67.                 4 => "MP消耗率",
  68.                 5 => "TP消耗率",
  69.                 6 => "物理伤害加成",
  70.                 7 => "魔法伤害加成",
  71.                 8 => "地形伤害加成",
  72.                 9 => "经验加成"}
  73.    #效果范围
  74. #         SCOPE ={
  75. #                 0 => "特殊",
  76. #                 1 => "单个敌人",
  77. #                 2 => "全体敌人" ,
  78. #                 3 => "一个随机敌人",
  79. #                 4 => "两个随机敌人",
  80. #                 5 => "三个随机敌人",
  81. #                 6 => "四个随机敌人",
  82. #                 7 => "单个队友",
  83. #                 8 => "全体队友",
  84. #                 9 => "单个队友(无法战斗)",
  85. #                 10 => "全体队友(无法战斗)",
  86. #                 11 => "使用者"}
  87.         @队伍能力 ={
  88.                 0 => "遇敌几率减半",
  89.                 1 => "野外不遇敌",
  90.                 2 => "敌人偷袭无效",
  91.                 3 => "先制攻击几率上升",
  92.                 4 => "获得金钱双倍",
  93.                 5 => "物品掉落几率双倍"}
  94.   def self.ready
  95.     @状态 = {}
  96.     @武器类型 = {}
  97.     @防具类型 = {}
  98.     @属性 = {}
  99.     $data_states.each{|x| @状态[x.id] = x.name if x != nil}
  100.     elements = $data_system.elements
  101.     weapon_types = $data_system.weapon_types
  102.     armor_types = $data_system.armor_types
  103.     elements.each_with_index{|x,y| @属性[y] = x if x != ""}
  104.     weapon_types.each_with_index{|x,y| @武器类型[y] = x if x != ""}
  105.     armor_types.each_with_index{|x,y| @防具类型[y] = x if x != ""}
  106.   end
  107.   def self.getequiphelp(equip)
  108.     ready if @状态 == nil
  109.     help = ""
  110.     param = []
  111.     equip.params.each_with_index{|x,y| param.push([PARAM[y],x])}
  112.     param = param.select{|x| x[1] != 0}
  113.     param.each{|x| help += x[0] + ":" + x[1].to_s + "\n"}
  114.     features = equip.features
  115.     features.select{|x| x.code == 55}.each{|x| help += CODE[x.code] + ":双持武器" + "\n"}
  116.     features.select{|x| x.code == 11}.each{|x| help += CODE[x.code] + ":" + @属性[x.data_id] + "X" + x.value.to_s + "\n"}
  117.     features.select{|x| x.code == 12}.each{|x| help += CODE[x.code] + ":" + PARAM[x.data_id] + "X" + x.value.to_s + "\n"}
  118.     features.select{|x| x.code == 13}.each{|x| help += CODE[x.code] + ":" + @状态[x.data_id] + "X" + x.value.to_s + "\n"}
  119.     features.select{|x| x.code == 14}.each{|x| help += CODE[x.code] + ":" + @状态[x.data_id] + "\n"}
  120.     features.select{|x| x.code == 31}.each{|x| help += CODE[x.code] + ":" + @属性[x.data_id] + "\n"}
  121.     features.select{|x| x.code == 32}.each{|x| help += CODE[x.code] + ":" + @状态[x.data_id] + "+" + x.value.to_s + "\n"}
  122.     features.select{|x| x.code == 33}.each{|x| help += CODE[x.code] + ":" + x.value.to_s + "\n"}
  123.     features.select{|x| x.code == 34}.each{|x| help += CODE[x.code] + ":" + x.value.to_s + "\n"}
  124.     features.select{|x| x.code == 41}.each{|x| help += CODE[x.code] + ":" + (x.data_id == 1 ? "特技" : "魔法")  + "\n"}
  125.     features.select{|x| x.code == 42}.each{|x| help += CODE[x.code] + ":" + (x.data_id == 1 ? "特技" : "魔法")  + "\n"}
  126.     features.select{|x| x.code == 43}.each{|x| help += CODE[x.code] + ":" + $data_skills[x.data_id].name  + "\n"}
  127.     features.select{|x| x.code == 44}.each{|x| help += CODE[x.code] + ":" + $data_skills[x.data_id].name  + "\n"}
  128.     features.select{|x| x.code == 51}.each{|x| help += CODE[x.code] + ":" + @武器类型[x.data_id]  + "\n"}
  129.     features.select{|x| x.code == 52}.each{|x| help += CODE[x.code] + ":" + @防具类型[x.data_id]  + "\n"}
  130.     features.select{|x| x.code == 61}.each{|x| help += CODE[x.code] + ":" + x.value.to_s  + "\n"}
  131.     features.select{|x| x.code == 62}.each{|x| help += CODE[x.code] + ":" + FLAG[x.data_id]  + "\n"}
  132.     features.select{|x| x.code == 64}.each{|x| help += CODE[x.code] + ":" + @队伍能力[x.data_id]  + "\n"}
  133.     featuresparam = []
  134.     featuresparam.push features.select{|x| x.code == 21}
  135.     featuresparam.push features.select{|x| x.code == 22}
  136.     featuresparam.push features.select{|x| x.code == 23}
  137.     featuresparam[0].each{|x| help += PARAM[x.data_id] + "X" + x.value.to_s + "\n"}
  138.     featuresparam[1].each{|x| help += XPARAM[x.data_id] + x.value.to_s + "\n"}
  139.     featuresparam[2].each{|x| help += SPARAM[x.data_id] + "X" + x.value.to_s + "\n"}
  140.     help
  141.   end
  142.   def self.getline(text,maxtext)
  143.     xtext = []
  144.     line = 0 #修改长度的地方
  145.     text.each_line{|x| xtext.push x.sub(/\n/){}}
  146.     xtext.each{|x| x.size %  maxtext != 0 ? line += x.size / maxtext + 1 : line += x.size / maxtext}
  147.     line
  148.   end
  149. end
  150. #==============================================================================
  151. # ■ Window_Help
  152. #------------------------------------------------------------------------------
  153. #  显示特技和物品等的说明、以及角色状态的窗口
  154. #==============================================================================

  155. class Window_Help < Window_Base
  156.   #--------------------------------------------------------------------------
  157.   # ● 初始化对象
  158.   #--------------------------------------------------------------------------
  159.   def initialize(line_number = 0)
  160.     super(0, 0, 270, 0)
  161.     self.z = 150
  162.     contents.font.size = 18
  163.     hide
  164.   end
  165.   #--------------------------------------------------------------------------
  166.   # ● 设置内容
  167.   #--------------------------------------------------------------------------
  168.   def set_text(text)
  169.     if text != @text
  170.       @text = text
  171.       refresh
  172.     end
  173.   end
  174.   #--------------------------------------------------------------------------
  175.   # ● 清除
  176.   #--------------------------------------------------------------------------
  177.   def clear
  178.     set_text("")
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # ● 更新帮助位置
  182.   #--------------------------------------------------------------------------
  183.   def uppos(index,rect,window)
  184.     self.height = fitting_height2(Help.getline(@xtext,13))
  185.     create_contents
  186.     contents.font.size =  18 #字体大小
  187.     change_color(Color.new(100, -55, 205))
  188.     rect.x -= window.ox
  189.     rect.y -= window.oy
  190.     ax = rect.x + rect.width + 14
  191.     ax = rect.x - self.width + 0 if ax + self.width > window.width + 10
  192.     ax += window.x
  193.     ax = 0 if ax < 0
  194.     ay = rect.y + rect.height
  195.     ay = rect.y - self.height if ay + self.height > window.height
  196.     ay += window.y
  197.     ay = 0 if ay < 0
  198.     self.x = ax
  199.     self.y = ay
  200.     set_text(@xtext)
  201.     show
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # ● 设置物品
  205.   #     item : 技能、物品等
  206.   #--------------------------------------------------------------------------
  207.   def set_item(item)
  208.     if item == nil
  209.       set_text("")
  210.       return
  211.     end
  212.     @xtext = ""
  213.     @xtext = "名称:" + item.name + "\n"
  214.     @xtext += "品质:" + item.description + "\n"
  215.     @xtext += "价格:" + item.price.to_s + "\n" if item.is_a?(RPG::EquipItem) || item.is_a?(RPG::Item)
  216.     @xtext += Help.getequiphelp(item) if item.is_a?(RPG::EquipItem)
  217.     @xtext = @xtext[0,@text.size - 2] if @xtext[@xtext.size - 2,2] == "\n"
  218.   end
  219.   #--------------------------------------------------------------------------
  220.   # ● 刷新
  221.   #--------------------------------------------------------------------------
  222.   def refresh
  223.     contents.clear
  224.     hide if @text == ""
  225.     draw_text_ex(2, 2, @text,width,5,false)
  226.   end
  227. end

  228. class Window_Base < Window
  229.   #--------------------------------------------------------------------------
  230.   # ● 计算窗口显示指定行数时的应用高度2*************************
  231.   #--------------------------------------------------------------------------
  232.   def fitting_height2(line_number)
  233.     line_number * contents.font.size + standard_padding * 2
  234.   end
  235. #~ draw_text_ex的增强,使其可以自动换行  原作者:叶子 修改:wyongcan
  236.   #--------------------------------------------------------------------------
  237.   # ● 绘制带有控制符的文本内容
  238.   #   如果传递了width参数的话,会自动换行
  239.   #--------------------------------------------------------------------------
  240.   def draw_text_ex(x, y, text, width = nil,textwidth = nil,normalfont = true)
  241.     reset_font_settings if normalfont == true
  242.     text = convert_escape_characters(text)
  243.     pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
  244.     if width != nil
  245.       pos[:height] = contents.font.size
  246.       pos[:width] = width
  247.       pos[:textwidth] = textwidth
  248.     end
  249.     process_character(text.slice!(0, 1), text, pos) until text.empty?
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # ● 文字的处理
  253.   #     c    : 文字
  254.   #     text : 绘制处理中的字符串缓存(字符串可能会被修改)
  255.   #     pos  : 绘制位置 {:x, :y, :new_x, :height}
  256.   #--------------------------------------------------------------------------
  257.   def process_character(c, text, pos)
  258.     case c
  259.     when "\r"   # 回车
  260.       return
  261.     when "\n"   # 换行
  262.       process_new_line(text, pos)
  263.     when "\f"   # 翻页
  264.       process_new_page(text, pos)
  265.     when "\e"   # 控制符
  266.       process_escape_character(obtain_escape_code(text), text, pos)
  267.     else        # 普通文字
  268.       pos[:textwidth] == nil ? text_width = text_size(c).width : text_width = pos[:textwidth]
  269.       if pos[:width] != nil && pos[:x] - pos[:new_x] + text_width > pos[:width]
  270.         process_new_line(text, pos)
  271.       end
  272.       process_normal_character(c, pos)
  273.     end
  274.   end
  275. end

  276. class Window_ItemList < Window_Selectable
  277.   #--------------------------------------------------------------------------
  278.   # ● 更新帮助内容
  279.   #--------------------------------------------------------------------------
  280.   def update_help
  281.     @help_window.set_item(item)
  282.     @help_window.uppos(index,item_rect(index),self) if index != -1 && item != nil
  283.   end
  284. end

  285. class Window_SkillList < Window_Selectable
  286.   #--------------------------------------------------------------------------
  287.   # ● 更新帮助内容
  288.   #--------------------------------------------------------------------------
  289.   def update_help
  290.     @help_window.set_item(item)
  291.     @help_window.uppos(index,item_rect(index),self) if index != -1 && item != nil
  292.   end
  293. end

  294. class Window_ShopBuy < Window_Selectable
  295.   #--------------------------------------------------------------------------
  296.   # ● 更新帮助内容
  297.   #--------------------------------------------------------------------------
  298.   def update_help
  299.     @help_window.set_item(item) if @help_window
  300.     @help_window.uppos(index,item_rect(index),self) if index != -1 && item != nil && @help_window
  301.     @status_window.item = item if @status_window
  302.   end
  303. end

  304. class Window_EquipSlot < Window_Selectable
  305.   #--------------------------------------------------------------------------
  306.   # ● 更新帮助内容
  307.   #--------------------------------------------------------------------------
  308.   def update_help
  309.     super
  310.     @help_window.set_item(item) if @help_window
  311.     @help_window.uppos(index,item_rect(index),self) if index != -1 && item != nil && @help_window
  312.     @status_window.set_temp_actor(nil) if @status_window
  313.   end
  314. end

  315. class Scene_Shop < Scene_MenuBase
  316.         alias on_sell_ok_old on_sell_ok
  317.         def on_sell_ok
  318.                 on_sell_ok_old
  319.                 @help_window.hide
  320.         end
  321.         alias on_buy_ok_old on_buy_ok
  322.         def on_buy_ok
  323.                 on_buy_ok_old
  324.                 @help_window.hide
  325.         end
  326.         alias on_number_ok_old on_number_ok
  327.         def on_number_ok
  328.                 on_number_ok_old
  329.     @help_window.refresh
  330.                 @help_window.show
  331.         end
  332.         alias on_number_cancel_old on_number_cancel
  333.         def on_number_cancel
  334.                 on_number_cancel_old
  335.     @help_window.refresh
  336.                 @help_window.show
  337.         end
  338. end

  339. class Scene_Title < Scene_Base
  340.   alias start_old start
  341.   def start
  342.     start_old
  343.     Help.ready
  344.   end
  345. end
  346. class Window_Base < Window
  347.         alias old_process_new_line process_new_line
  348.         def process_new_line(text, pos)
  349.     old_process_new_line(text, pos)
  350.                 pos[:height] = contents.font.size if pos[:width] != nil
  351.         end
  352. end
  353. class Scene_ItemBase < Scene_MenuBase
  354.         alias old_on_actor_cancel on_actor_cancel
  355.   def on_actor_cancel
  356.     old_on_actor_cancel
  357.         @help_window.refresh
  358.   end
  359.         alias old_on_actor_ok on_actor_ok
  360.   def on_actor_ok
  361.     old_on_actor_ok
  362.         @help_window.refresh
  363.   end
  364. end
  365. #——————————————————————————————
复制代码
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
7653
在线时间
1339 小时
注册时间
2012-6-6
帖子
345
 楼主| 发表于 2014-1-17 22:41:48 | 显示全部楼层
流浪杰哥 发表于 2014-1-16 15:55
那啥命中率 回避率  必杀率   改成用小数显示,不用整数显示   ,我想配合那个装备说明增强脚本。。。。 ...

用了装备说明增强脚本,这个脚本在显示必杀率,闪避率,都是用小数显示的,能不能弄成整数显示呀?
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
7653
在线时间
1339 小时
注册时间
2012-6-6
帖子
345
 楼主| 发表于 2019-2-21 23:10:37 | 显示全部楼层
流浪杰哥 发表于 2014-1-16 15:55
那啥命中率 回避率  必杀率   改成用小数显示,不用整数显示   ,我想配合那个装备说明增强脚本。。。。 ...

我现在回复你不算晚哪。。。。。。皮一下
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-3-29 10:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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