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

Project1

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

[已经解决] 人物信息加强脚本问题求修改!

[复制链接]

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

跳转到指定楼层
1
发表于 2014-4-15 23:04:59 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 Sion 于 2014-4-17 17:55 编辑

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

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

2
 楼主| 发表于 2014-4-16 23:24:24 | 只看该作者
呼唤大神@Sion  
回复 支持 反对

使用道具 举报

Lv1.梦旅人

星君

梦石
0
星屑
83
在线时间
2980 小时
注册时间
2011-10-9
帖子
2317

贵宾短篇七萝莉正太组冠军

3
发表于 2014-4-17 01:39:32 | 只看该作者
本帖最后由 皮卡星 于 2014-4-16 18:43 编辑

随便写的,LZ把882行到898行换成下面这段试试
  1.     i = 1
  2.     16.times do  #显示16行
  3.       colour = Color.new(0, 0, 0, translucent_alpha/2)
  4.       rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  5.       contents.fill_rect(rect, colour)
  6.       contents.font.size = YEA::CLASS_SYSTEM::PARAM_FONT_SIZE
  7.       change_color(system_color)
  8.       draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
  9.       change_color(normal_color)
  10.       dwa = (Graphics.width * 2 / 5 - 2) / 2
  11.       draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
  12.       reset_font_settings
  13.       change_color(system_color)
  14.       draw_text(dx + dwa, dy, 22, line_height, "→", 1)
  15.       param_id += 1
  16.       dy += line_height
  17.       i += 1
  18.       dx += 160 if i >= 9
  19.       dy = 0 if i >= 9
  20.       #break if dy + line_height > contents.height
  21.     end
复制代码
就是把显示的装备调成了16个,到第9个的时候到第二列显示
我没看那个装备扩充脚本,我只是调了上限,LZ你可以自己修改: 3

回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

4
 楼主| 发表于 2014-4-17 21:54:31 | 只看该作者
皮卡星 发表于 2014-4-17 01:39
随便写的,LZ把882行到898行换成下面这段试试就是把显示的装备调成了16个,到第9个的时候到第二列显示
我没 ...

报错,发生NameEreoe。uninitialized constant YEA::CLASS_SYSTEM
回复 支持 反对

使用道具 举报

Lv1.梦旅人

星君

梦石
0
星屑
83
在线时间
2980 小时
注册时间
2011-10-9
帖子
2317

贵宾短篇七萝莉正太组冠军

5
发表于 2014-4-17 23:32:02 | 只看该作者
啊我发现我改错地方了,我上面改的改回去吧,看到8以为就是那个了,没仔细看内容就改Orz
LZ把808行到817行换成下面这段,应该不会有问题的这次
  1.     for equip in @actor.equips
  2.       change_color(system_color)
  3.       text = Vocab.etype(@actor.equip_slots[slot_id])
  4.       draw_text(dx, dy, contents.width - dx, line_height, text)
  5.       reset_font_settings
  6.       draw_item_name(equip, dx+92, dy) unless equip.nil?
  7.       slot_id += 1
  8.       dy += line_height
  9.       dx += 160 if slot_id >= 8
  10.       dy = 0 if slot_id >= 8
  11.       #break if dy + line_height > contents.height
  12.     end
复制代码

回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

6
 楼主| 发表于 2014-4-17 23:58:16 | 只看该作者
本帖最后由 VIPArcher 于 2014-4-18 00:00 编辑
皮卡星 发表于 2014-4-17 23:32
啊我发现我改错地方了,我上面改的改回去吧,看到8以为就是那个了,没仔细看内容就改Orz
LZ把808行到817行 ...


有问题,第九个可以正常显示,第十个以后就不正常了。而且坐标也不太好

QQ图片20140417235857.jpg (26.33 KB, 下载次数: 23)

。。。

。。。

点评

不明白您的意图,是要横着排版,一共两列?  发表于 2014-4-18 23:22
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
80
在线时间
362 小时
注册时间
2013-12-8
帖子
427
7
发表于 2014-4-18 00:12:52 | 只看该作者
来不及看脚本,提供一下思路,如果楼主有一点点基础的话可以试试自己改。
在循环描绘处用index%8==0来判断是否为8倍数,即换行,然后在条件下重置y,x+=144这样试试

点评

这是个不错的想法,我觉得可以奇数一列。偶数一列。判断是否为2的倍数。你觉得这样可行吗?  发表于 2014-4-18 22:07
柍念作yang三声。

龙→
回复 支持 反对

使用道具 举报

Lv1.梦旅人

星君

梦石
0
星屑
83
在线时间
2980 小时
注册时间
2011-10-9
帖子
2317

贵宾短篇七萝莉正太组冠军

8
发表于 2014-4-18 00:23:15 | 只看该作者
      dx += 160 if slot_id >= 8
      dy = 0 if slot_id >= 8
换成
    dx += 192 if slot_id == 8
      dy = 0 if slot_id == 8
试试
感觉很抱歉哦,这么多BUG,不过我手上没那个脚本所以也没法测试,谅解下吧(

点评

认可答案  发表于 2014-4-18 22:05

回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

9
 楼主| 发表于 2014-4-18 22:04:43 | 只看该作者
皮卡星 发表于 2014-4-18 00:23
dx += 160 if slot_id >= 8
      dy = 0 if slot_id >= 8
换成

感谢大神指导,我已解决
  1. dx = 240 if slot_id >= 8
  2.       dy = 0 if slot_id >= 8
  3.       dy = 0+line_height if slot_id >= 9
  4.       dy = 0+line_height*2 if slot_id >= 10
  5.       dy = 0+line_height*3 if slot_id >= 11
  6.       dy = 0+line_height*4 if slot_id >= 12
  7.       dy = 0+line_height*5 if slot_id >= 13
  8.       dy = 0+line_height*6 if slot_id >= 14
  9.       
复制代码
这样就可以了。不过这样一个一个判断感觉不太科学。有更简单的写法吗?没有就算了
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

10
 楼主| 发表于 2014-4-18 22:20:12 | 只看该作者
皮卡星 发表于 2014-4-18 00:23
dx += 160 if slot_id >= 8
      dy = 0 if slot_id >= 8
换成

已自行解决。
  1. dx = 240 if slot_id >= 8
  2.       if slot_id == 8
  3.         dy = 0
  4.       else
  5.         dy += line_height
  6.       end
复制代码
多谢指点
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-25 07:25

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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