Project1

标题: 荣誉 与 装备说明增强 冲突 求解! [打印本页]

作者: 视觉诱惑    时间: 2013-1-23 22:28
标题: 荣誉 与 装备说明增强 冲突 求解!
本帖最后由 视觉诱惑 于 2013-1-23 22:31 编辑

遇到了一个奇怪的冲突 希望高手能给予修复和解决
如下图 这样 按说还应该有 荣誉的 说明才对.



  1. #==============================================================================
  2. # ★ RGSS3_荣誉系统 Ver1.00
  3. #==============================================================================
  4. #尼玛啊!!!我讨厌日文啊
  5. #使用方法:
  6. #         gain_medal(0)
  7. #==============================================================================
  8. # □ 设定项目
  9. #==============================================================================
  10. module TMMEDAL
  11.   COMMAND_MEDAL = "荣誉"     # 菜单中的名字
  12.   
  13.   # 一个荣誉也没有时隐藏菜单(true隐藏;false不隐藏)
  14.   HIDE_COMMAND = false
  15.   
  16.   # 荣誉获得时的效果音
  17.   SE_GAIN_MEDAL = RPG::SE.new("Powerup", 90, 140)
  18.   
  19.   # 荣誉名称及简介的设置
  20.   #例如:MEDAL_DATA[0] = ["名字", 187, "简介"]
  21.   MEDAL_DATA = {}
  22.   MEDAL_DATA[0] = ["新的开始", 18, "这记录着游戏开始的时间."]
  23.   MEDAL_DATA[1] = ["摆脱新手", 7, "你可以摆脱新手的困扰踏上勇者的道路了."]
  24.   MEDAL_DATA[2] = ["サキュバスファン", 187, "サキュバスと会話をした証"]
  25.   MEDAL_DATA[3] = ["サキュバスファン", 187, "サキュバスと会話をした証"]
  26.   MEDAL_DATA[4] = ["サキュバスファン", 187, "サキュバスと会話をした証"]
  27.   end

  28. #==============================================================================
  29. # ■ Game_Party
  30. #==============================================================================
  31. class Game_Party
  32.   #--------------------------------------------------------------------------
  33.   # ● 公共实例变量
  34.   #--------------------------------------------------------------------------
  35.   attr_reader   :medals                   # 獲得済みメダル
  36.   attr_reader   :new_medals               # 新規獲得メダル
  37.   attr_accessor :medal_info_count         # メダル情報表示カウント
  38.   attr_accessor :medal_info_opacity       # メダル情報表示不透明度
  39.   #--------------------------------------------------------------------------
  40.   # ● オブジェクト初期化
  41.   #--------------------------------------------------------------------------
  42.   alias tmmedal_game_party_initialize initialize
  43.   def initialize
  44.     tmmedal_game_party_initialize
  45.     @medals = []
  46.     @new_medals = []
  47.     @medal_info_count = 0
  48.     @medal_info_opacity = 0
  49.   end
  50.   #--------------------------------------------------------------------------
  51.   # ○ メダルの獲得
  52.   #--------------------------------------------------------------------------
  53.   def gain_medal(medal_id)
  54.     return if @medals.any? {|medal| medal[0] == medal_id }
  55.     t = Time.now.strftime(" (%Y/%m/%d %H:%M)")
  56.     @medals.push([medal_id, t])
  57.     @new_medals.push([medal_id, t])
  58.   end
  59.   #--------------------------------------------------------------------------
  60.   # ○ 獲得メダル情報の消去
  61.   #--------------------------------------------------------------------------
  62.   def delete_new_medal
  63.     @new_medals.shift
  64.   end
  65. end

  66. #==============================================================================
  67. # ■ Game_Interpreter
  68. #==============================================================================
  69. class Game_Interpreter
  70.   #--------------------------------------------------------------------------
  71.   # ○ メダルの獲得
  72.   #--------------------------------------------------------------------------
  73.   def gain_medal(medal_id)
  74.     $game_party.gain_medal(medal_id)
  75.   end
  76. end

  77. #==============================================================================
  78. # ■ Window_MenuCommand
  79. #==============================================================================
  80. class Window_MenuCommand
  81.   #--------------------------------------------------------------------------
  82.   # ● 独自コマンドの追加用
  83.   #--------------------------------------------------------------------------
  84.   alias tmmedal_window_menucommand_add_original_commands add_original_commands
  85.   def add_original_commands
  86.     tmmedal_window_menucommand_add_original_commands
  87.     unless TMMEDAL::HIDE_COMMAND && !medal_enabled
  88.       add_command(TMMEDAL::COMMAND_MEDAL, :medal, medal_enabled)
  89.     end
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # ○ メダルの有効状態を取得
  93.   #--------------------------------------------------------------------------
  94.   def medal_enabled
  95.     !$game_party.medals.empty?
  96.   end
  97. end

  98. #==============================================================================
  99. # □ Window_MedalInfo
  100. #==============================================================================
  101. class Window_MedalInfo < Window_Base
  102.   #--------------------------------------------------------------------------
  103.   # ● オブジェクト初期化
  104.   #--------------------------------------------------------------------------
  105.   def initialize
  106.     super(Graphics.width - window_width, 0, window_width, fitting_height(1))
  107.     self.opacity = 0
  108.     self.contents_opacity = $game_party.medal_info_opacity
  109.     refresh
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● ウィンドウ幅の取得
  113.   #--------------------------------------------------------------------------
  114.   def window_width
  115.     return 480
  116.   end
  117.   #--------------------------------------------------------------------------
  118.   # ● フレーム更新
  119.   #--------------------------------------------------------------------------
  120.   def update
  121.     super
  122.     if $game_party.medal_info_count > 0
  123.       self.contents_opacity += 16
  124.       $game_party.medal_info_count -= 1
  125.       $game_party.delete_new_medal if $game_party.medal_info_count == 0
  126.     else
  127.       self.contents_opacity -= 16
  128.       if self.contents_opacity == 0
  129.         open unless $game_party.new_medals.empty?
  130.       end
  131.     end
  132.     $game_party.medal_info_opacity = self.contents_opacity
  133.   end
  134.   #--------------------------------------------------------------------------
  135.   # ● ウィンドウを開く
  136.   #--------------------------------------------------------------------------
  137.   def open
  138.     refresh
  139.     TMMEDAL::SE_GAIN_MEDAL.play
  140.     $game_party.medal_info_count = 150
  141.     self.contents_opacity = 0
  142.     self
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   # ○ リフレッシュ
  146.   #--------------------------------------------------------------------------
  147.   def refresh
  148.     contents.clear
  149.     unless $game_party.new_medals.empty?
  150.       draw_background(contents.rect)
  151.       medal = TMMEDAL::MEDAL_DATA[$game_party.new_medals[0][0]]
  152.       rect = contents.rect.clone
  153.       draw_icon(medal[1], rect.x, rect.y)
  154.       rect.x += 24
  155.       rect.width -= 24
  156.       draw_text(rect, medal[0])
  157.     end
  158.   end
  159.   #--------------------------------------------------------------------------
  160.   # ○ 背景の描画
  161.   #--------------------------------------------------------------------------
  162.   def draw_background(rect)
  163.     temp_rect = rect.clone
  164.     temp_rect.width /= 2
  165.     contents.gradient_fill_rect(temp_rect, back_color2, back_color1)
  166.     temp_rect.x = temp_rect.width
  167.     contents.gradient_fill_rect(temp_rect, back_color1, back_color2)
  168.   end
  169.   #--------------------------------------------------------------------------
  170.   # ○ 背景色 1 の取得
  171.   #--------------------------------------------------------------------------
  172.   def back_color1
  173.     Color.new(0, 0, 0, 192)
  174.   end
  175.   #--------------------------------------------------------------------------
  176.   # ○ 背景色 2 の取得
  177.   #--------------------------------------------------------------------------
  178.   def back_color2
  179.     Color.new(0, 0, 0, 0)
  180.   end
  181. end

  182. #==============================================================================
  183. # □ Window_Medal
  184. #==============================================================================
  185. class Window_Medal < Window_Selectable
  186.   #--------------------------------------------------------------------------
  187.   # ● オブジェクト初期化
  188.   #--------------------------------------------------------------------------
  189.   def initialize(x, y, width, height)
  190.     super
  191.     refresh
  192.     select(0)
  193.     activate
  194.   end
  195.   #--------------------------------------------------------------------------
  196.   # ● 桁数の取得
  197.   #--------------------------------------------------------------------------
  198.   def col_max
  199.     return 1
  200.   end
  201.   #--------------------------------------------------------------------------
  202.   # ● 項目数の取得
  203.   #--------------------------------------------------------------------------
  204.   def item_max
  205.     @data ? @data.size : 1
  206.   end
  207.   #--------------------------------------------------------------------------
  208.   # ● アイテムの取得
  209.   #--------------------------------------------------------------------------
  210.   def item
  211.     @data && index >= 0 ? @data[index] : nil
  212.   end
  213.   #--------------------------------------------------------------------------
  214.   # ● アイテムリストの作成
  215.   #--------------------------------------------------------------------------
  216.   def make_item_list
  217.     @data = $game_party.medals
  218.   end
  219.   #--------------------------------------------------------------------------
  220.   # ● 項目の描画
  221.   #--------------------------------------------------------------------------
  222.   def draw_item(index)
  223.     item = @data[index]
  224.     medal = TMMEDAL::MEDAL_DATA[item[0]]
  225.     rect = item_rect(index)
  226.     draw_icon(medal[1], rect.x, rect.y)
  227.     rect.x += 24
  228.     rect.width -= 216
  229.     draw_text(rect, medal[0])
  230.     rect.x = contents.width - 192
  231.     rect.width = 192
  232.     draw_text(rect, item[1], 2)
  233.   end
  234.   #--------------------------------------------------------------------------
  235.   # ● ヘルプテキスト更新
  236.   #--------------------------------------------------------------------------
  237.   def update_help
  238.     if item
  239.       medal = TMMEDAL::MEDAL_DATA[item[0]]
  240.       text = medal[2]
  241.       @help_window.set_text(text)
  242.     end
  243.   end
  244.   #--------------------------------------------------------------------------
  245.   # ● リフレッシュ
  246.   #--------------------------------------------------------------------------
  247.   def refresh
  248.     make_item_list
  249.     create_contents
  250.     draw_all_items
  251.   end
  252. end

  253. #==============================================================================
  254. # ■ Scene_Map
  255. #==============================================================================
  256. class Scene_Map
  257.   #--------------------------------------------------------------------------
  258.   # ● 全ウィンドウの作成
  259.   #--------------------------------------------------------------------------
  260.   alias tmmedal_scene_map_create_all_windows create_all_windows
  261.   def create_all_windows
  262.     tmmedal_scene_map_create_all_windows
  263.     create_medal_window
  264.   end
  265.   #--------------------------------------------------------------------------
  266.   # ○ メダルウィンドウの作成
  267.   #--------------------------------------------------------------------------
  268.   def create_medal_window
  269.     @medal_window = Window_MedalInfo.new
  270.   end
  271. end

  272. #==============================================================================
  273. # ■ Scene_Menu
  274. #==============================================================================
  275. class Scene_Menu
  276.   #--------------------------------------------------------------------------
  277.   # ● コマンドウィンドウの作成
  278.   #--------------------------------------------------------------------------
  279.   alias tmmedal_scene_menu_create_command_window create_command_window
  280.   def create_command_window
  281.     tmmedal_scene_menu_create_command_window
  282.     @command_window.set_handler(:medal, method(:command_medal))
  283.   end
  284.   #--------------------------------------------------------------------------
  285.   # ○ コマンド[メダル]
  286.   #--------------------------------------------------------------------------
  287.   def command_medal
  288.     SceneManager.call(Scene_Medal)
  289.   end
  290. end

  291. #==============================================================================
  292. # □ Scene_Medal
  293. #==============================================================================
  294. class Scene_Medal < Scene_MenuBase
  295.   #--------------------------------------------------------------------------
  296.   # ● 開始処理
  297.   #--------------------------------------------------------------------------
  298.   def start
  299.     super
  300.     create_help_window
  301.     create_item_window
  302.   end
  303.   #--------------------------------------------------------------------------
  304.   # ○ アイテムウィンドウの作成
  305.   #--------------------------------------------------------------------------
  306.   def create_item_window
  307.     wy = @help_window.height
  308.     wh = Graphics.height - wy
  309.     @item_window = Window_Medal.new(0, wy, Graphics.width, wh)
  310.     @item_window.viewport = @viewport
  311.     @item_window.help_window = @help_window
  312.     @item_window.set_handler(:cancel, method(:return_scene))
  313.   end
  314. end


复制代码
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ 装备说明增强 By wyongcan
  4. #==============================================================================
  5. module Equipplus
  6.   CODE ={
  7.     11 => "属性抗性",
  8.     12 => "弱化抗性",
  9.     13 => "状态抗性",
  10.     14 => "状态免疫",
  11.     21 => "普通能力",
  12.     22 => "添加能力",
  13.     23 => "特殊能力",
  14.     31 => "攻击附带属性",
  15.     32 => "攻击附带状态",
  16.     33 => "修正攻击速度",
  17.     34 => "添加攻击次数",
  18.     41 => "添加技能类型",
  19.     42 => "禁用技能类型",
  20.     43 => "添加技能",
  21.     44 => "禁用技能",
  22.     51 => "可装备武器类型",
  23.     52 => "可装备护甲类型",
  24.     53 => "固定装备",
  25.     54 => "禁用装备",
  26.     55 => "装备风格",
  27.     61 => "添加行动次数",
  28.     62 => "特殊标志",
  29.     63 => "消失效果",
  30.     64 => "队伍能力"}
  31.   #特殊标志
  32.   FLAG ={
  33.                 0 => "自动战斗",
  34.                 1 => "擅长防御",
  35.                 2 => "保护弱者",
  36.                 3 => "特技专注"}
  37.   #普通能力
  38.         PARAM ={
  39.                 0 => "最大HP",
  40.                 1 => "最大MP",
  41.                 2 => "物理攻击",
  42.                 3 => "物理防御",
  43.                 4 => "魔法攻击",
  44.                 5 => "魔法防御",
  45.                 6 => "敏 捷 值",
  46.                 7 => "幸 运 值"}
  47.   #添加能力
  48.         XPARAM ={
  49.                 0 => "物理命中几率:",
  50.                 1 => "物理闪避几率:",
  51.                 2 => "必杀几率:",
  52.                 3 => "必杀闪避几率:",
  53.                 4 => "魔法闪避几率:",
  54.                 5 => "魔法反射几率:",
  55.                 6 => "物理反击几率:",
  56.                 7 => "体力值再生速度:",
  57.                 8 => "魔力值再生速度:",
  58.                 9 => "特技值再生速度:"}
  59.   #特殊能力
  60.         SPARAM ={
  61.                 0 => "受到攻击的几率",
  62.                 1 => "防御效果比率",
  63.                 2 => "恢复效果比率",
  64.                 3 => "药理知识",
  65.                 4 => "MP消费率",
  66.                 5 => "TP消耗率",
  67.                 6 => "物理伤害加成",
  68.                 7 => "魔法伤害加成",
  69.                 8 => "地形伤害加成",
  70.                 9 => "经验获得加成"}
  71.         @队伍能力 ={
  72.                 0 => "遇敌几率减半",
  73.                 1 => "随机遇敌无效",
  74.                 2 => "敌人偷袭无效",
  75.                 3 => "先制攻击几率上升",
  76.                 4 => "获得金钱数量双倍",
  77.                 5 => "物品掉落几率双倍"}
  78.   def self.equiphelpready
  79.     @状态 = {}
  80.     @武器类型 = {}
  81.     @防具类型 = {}
  82.     @属性 = {}
  83.     $data_states.each{|x| @状态[x.id] = x.name if x != nil}
  84.     elements = $data_system.elements
  85.     weapon_types = $data_system.weapon_types
  86.     armor_types = $data_system.armor_types
  87.     elements.each_with_index{|x,y| @属性[y] = x if x != ""}
  88.     weapon_types.each_with_index{|x,y| @武器类型[y] = x if x != ""}
  89.     armor_types.each_with_index{|x,y| @防具类型[y] = x if x != ""}
  90.   end
  91.   def self.getequiphelp(equip)
  92.     help = ""
  93.     param = []
  94.     equip.params.each_with_index{|x,y| param.push([PARAM[y],x])}
  95.     param = param.select{|x| x[1] != 0}
  96.     param.each{|x| help += x[0] + ":" + x[1].to_int.to_s + "\n"}
  97.     features = equip.features
  98.     features.select{|x| x.code == 55}.each{|x| help += CODE[x.code] + ":双持武器" + "\n"}
  99.     features.select{|x| x.code == 11}.each{|x| help += CODE[x.code] + ":" + @属性[x.data_id] + "*" + x.value.to_s + "\n"}
  100.     features.select{|x| x.code == 12}.each{|x| help += CODE[x.code] + ":" + PARAM[x.data_id] + "*" + x.value.to_s + "\n"}
  101.     features.select{|x| x.code == 13}.each{|x| help += CODE[x.code] + ":" + @状态[x.data_id] + "*" + x.value.to_s + "\n"}
  102.     features.select{|x| x.code == 14}.each{|x| help += CODE[x.code] + ":" + @状态[x.data_id] + "\n"}
  103.     features.select{|x| x.code == 31}.each{|x| help += CODE[x.code] + ":" + @属性[x.data_id] + "\n"}
  104.     features.select{|x| x.code == 32}.each{|x| help += CODE[x.code] + ":" + @状态[x.data_id] + "+" + x.value.to_s + "\n"}
  105.     features.select{|x| x.code == 33}.each{|x| help += CODE[x.code] + ":" + x.value.to_s + "\n"}
  106.     features.select{|x| x.code == 34}.each{|x| help += CODE[x.code] + ":" + x.value.to_s + "\n"}
  107.     features.select{|x| x.code == 41}.each{|x| help += CODE[x.code] + ":" + (x.data_id == 1 ? "特技" : "魔法")  + "\n"}
  108.     features.select{|x| x.code == 42}.each{|x| help += CODE[x.code] + ":" + (x.data_id == 1 ? "特技" : "魔法")  + "\n"}
  109.     features.select{|x| x.code == 43}.each{|x| help += CODE[x.code] + ":" + $data_skills[x.data_id].name  + "\n"}
  110.     features.select{|x| x.code == 44}.each{|x| help += CODE[x.code] + ":" + $data_skills[x.data_id].name  + "\n"}
  111.     features.select{|x| x.code == 51}.each{|x| help += CODE[x.code] + ":" + @武器类型[x.data_id]  + "\n"}
  112.     features.select{|x| x.code == 52}.each{|x| help += CODE[x.code] + ":" + @防具类型[x.data_id]  + "\n"}
  113.     features.select{|x| x.code == 61}.each{|x| help += CODE[x.code] + ":" + x.value.to_s  + "\n"}
  114.     features.select{|x| x.code == 62}.each{|x| help += CODE[x.code] + ":" + FLAG[x.data_id]  + "\n"}
  115.     features.select{|x| x.code == 64}.each{|x| help += CODE[x.code] + ":" + @队伍能力[x.data_id]  + "\n"}
  116.     featuresparam = []
  117.     featuresparam.push features.select{|x| x.code == 21}
  118.     featuresparam.push features.select{|x| x.code == 22}
  119.     featuresparam.push features.select{|x| x.code == 23}
  120.     featuresparam[0].each{|x| help += PARAM[x.data_id] + "*" + x.value.to_s + "\n"}
  121.     featuresparam[1].each{|x| help += XPARAM[x.data_id] + x.value.to_s + "\n"}
  122.     featuresparam[2].each{|x| help += SPARAM[x.data_id] + "*" + x.value.to_s + "\n"}
  123.     help
  124.   end
  125.   def self.getline(text,maxtext)
  126.     xtext = []
  127.     line = 0
  128.     text.each_line{|x| xtext.push x.sub(/\n/){}}
  129.     xtext.each{|x| x.size % maxtext != 0 ? line += x.size / maxtext + 1 : line += x.size / maxtext}
  130.     line
  131.   end
  132. end
  133. #==============================================================================
  134. # ■ Window_Help
  135. #------------------------------------------------------------------------------
  136. #  显示特技和物品等的说明、以及角色状态的窗口
  137. #==============================================================================

  138. class Window_Help2 < Window_Base
  139.   #--------------------------------------------------------------------------
  140.   # ● 初始化对象
  141.   #--------------------------------------------------------------------------
  142.   def initialize(line_number = 0)
  143.     super(0, 0, 210, 0)
  144.     self.z = 150
  145.     contents.font.size = 14
  146.     hide
  147.   end
  148.   #--------------------------------------------------------------------------
  149.   # ● 设置内容
  150.   #--------------------------------------------------------------------------
  151.   def set_text(text)
  152.       @text = text
  153.       refresh
  154.   end
  155.   #--------------------------------------------------------------------------
  156.   # ● 清除
  157.   #--------------------------------------------------------------------------
  158.   def clear
  159.     set_text("")
  160.   end
  161.   #--------------------------------------------------------------------------
  162.   # ● 更新帮助位置
  163.   #--------------------------------------------------------------------------
  164.   def uppos(index,rect,window)
  165.     self.height = fitting_height2(Equipplus.getline(@xtext,13))
  166.     create_contents
  167.     contents.font.size = 14
  168.     rect.x -= window.ox
  169.     rect.y -= window.oy
  170.     ax = rect.x + rect.width + 10
  171.     ax = rect.x - self.width + 10 if ax + self.width > window.width + 10
  172.     ax += window.x
  173.     ax = 0 if ax < 0
  174.     ay = rect.y + rect.height
  175.     ay = rect.y - self.height if ay + self.height > window.height
  176.     ay += window.y
  177.     ay = 0 if ay < 0
  178.     self.x = ax
  179.     self.y = ay
  180.     set_text(@xtext)
  181.     show
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # ● 设置物品
  185.   #     item : 技能、物品等
  186.   #--------------------------------------------------------------------------
  187.   def set_item(item)
  188.     if item == nil
  189.       set_text("")
  190.       return
  191.     end
  192.     @xtext = ""
  193.     @xtext = "名称:" + item.name + "\n"
  194.     @xtext += "介绍:" + item.description + "\n"
  195.     @xtext += "价格:" + item.price.to_s + "\n" if item.is_a?(RPG::EquipItem) || item.is_a?(RPG::Item)
  196.     @xtext += Equipplus.getequiphelp(item) if item.is_a?(RPG::EquipItem)
  197.     @xtext = @xtext[0,@text.size - 2] if @xtext[@xtext.size - 2,2] == "\n"
  198.   end
  199.   #--------------------------------------------------------------------------
  200.   # ● 刷新
  201.   #--------------------------------------------------------------------------
  202.   def refresh
  203.     contents.clear
  204.     hide if @text == ""
  205.     draw_text_ex(4, 0, @text,width,40,false)
  206.   end
  207. end
  208. class Window_Base < Window
  209.   #--------------------------------------------------------------------------
  210.   # ● 计算窗口显示指定行数时的应用高度2*************************
  211.   #--------------------------------------------------------------------------
  212.   def fitting_height2(line_number)
  213.     line_number * contents.font.size + standard_padding * 2
  214.   end
  215. #~ draw_text_ex的增强,使其可以自动换行  原作者:叶子 修改:wyongcan
  216.   #--------------------------------------------------------------------------
  217.   # ● 绘制带有控制符的文本内容
  218.   #   如果传递了width参数的话,会自动换行
  219.   #--------------------------------------------------------------------------
  220.   def draw_text_ex(x, y, text, width = nil,textwidth = nil,normalfont = true)
  221.     reset_font_settings if normalfont == true
  222.     text = convert_escape_characters(text)
  223.     pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
  224.     if width != nil
  225.       pos[:height] = contents.font.size
  226.       pos[:width] = width
  227.       pos[:textwidth] = textwidth
  228.     end
  229.     process_character(text.slice!(0, 1), text, pos) until text.empty?
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # ● 文字的处理
  233.   #     c    : 文字
  234.   #     text : 绘制处理中的字符串缓存(字符串可能会被修改)
  235.   #     pos  : 绘制位置 {:x, :y, :new_x, :height}
  236.   #--------------------------------------------------------------------------
  237.   def process_character(c, text, pos)
  238.     case c
  239.     when "\r"   # 回车
  240.       return
  241.     when "\n"   # 换行
  242.       process_new_line(text, pos)
  243.     when "\f"   # 翻页
  244.       process_new_page(text, pos)
  245.     when "\e"   # 控制符
  246.       process_escape_character(obtain_escape_code(text), text, pos)
  247.     else        # 普通文字
  248.       pos[:textwidth] == nil ? text_width = text_size(c).width : text_width = pos[:textwidth]
  249.       if pos[:width] != nil && pos[:x] - pos[:new_x] + text_width > pos[:width]
  250.         process_new_line(text, pos)
  251.       end
  252.       process_normal_character(c, pos)
  253.     end
  254.   end
  255. end

  256. class Window_ItemList < Window_Selectable
  257.   #--------------------------------------------------------------------------
  258.   # ● 更新帮助内容
  259.   #--------------------------------------------------------------------------
  260.   def update_help
  261.     @help_window.set_item(item)
  262.     @help_window.uppos(index,item_rect(index),self) if index != -1 && item != nil
  263.   end
  264. end

  265. class Window_SkillList < Window_Selectable
  266.   #--------------------------------------------------------------------------
  267.   # ● 更新帮助内容
  268.   #--------------------------------------------------------------------------
  269.   def update_help
  270.     @help_window.set_item(item)
  271.     @help_window.uppos(index,item_rect(index),self) if index != -1 && item != nil
  272.   end
  273. end

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

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

  295. class Scene_Shop < Scene_MenuBase
  296.         alias on_sell_ok_old on_sell_ok
  297.         def on_sell_ok
  298.                 on_sell_ok_old
  299.                 @help_window.hide
  300.         end
  301.         alias on_buy_ok_old on_buy_ok
  302.         def on_buy_ok
  303.                 on_buy_ok_old
  304.                 @help_window.hide
  305.         end
  306.         alias on_number_ok_old on_number_ok
  307.         def on_number_ok
  308.                 on_number_ok_old
  309.     @help_window.refresh
  310.                 @help_window.show
  311.         end
  312.         alias on_number_cancel_old on_number_cancel
  313.         def on_number_cancel
  314.                 on_number_cancel_old
  315.     @help_window.refresh
  316.                 @help_window.show
  317.         end
  318. end

  319. class Scene_Title < Scene_Base
  320.   alias start_old start
  321.   def start
  322.     start_old
  323.     Equipplus.equiphelpready
  324.   end
  325. end

  326. class Scene_ItemBase < Scene_MenuBase
  327.         alias old_on_actor_cancel on_actor_cancel
  328.   def on_actor_cancel
  329.     old_on_actor_cancel
  330.         @help_window.refresh
  331.   end
  332.         alias old_on_actor_ok on_actor_ok
  333.   def on_actor_ok
  334.     old_on_actor_ok
  335.         @help_window.refresh
  336.   end
  337. end

  338. class Window_Base < Window
  339.         alias old_process_new_line process_new_line
  340.         def process_new_line(text, pos)
  341.     old_process_new_line(text, pos)
  342.                 pos[:height] = contents.font.size if pos[:width] != nil
  343.         end
  344. end

  345. class Scene_MenuBase < Scene_Base
  346.   def create_help_window
  347.     @help_window = Window_Help2.new
  348.     @help_window.viewport = @viewport
  349.   end
  350. end
复制代码

作者: gaogs123456    时间: 2013-1-24 00:50
成就和装备帮助增强没有冲突,装备帮助增强必须和装备强化系统同时存在(同在里面的那个整合脚本,否则会出错,至于什么原因我就不知道了)。
作者: 视觉诱惑    时间: 2013-1-24 00:51
gaogs123456 发表于 2013-1-24 00:50
成就和装备帮助增强没有冲突,装备帮助增强必须和装备强化系统同时存在(同在里面的那个整合脚本,否则会出 ...

是显示问题  看图片 按说应该有个 荣誉描述呢 加上这个 脚本 描述 就莫名其妙的消失了~~~
作者: gaogs123456    时间: 2013-1-24 00:57
视觉诱惑 发表于 2013-1-24 00:51
是显示问题  看图片 按说应该有个 荣誉描述呢 加上这个 脚本 描述 就莫名其妙的消失了~~~ ...

发现了,装备帮助增强去掉了上方的帮助显示窗口(那个后面说明是显示在帮助窗口里的),感觉还是挺好的。直接把后面说明整合到名称里也可以吧。另外给你说个小发现,窗口设置为纯黑色,帮助增强显示的窗口看起来更清晰。
作者: 视觉诱惑    时间: 2013-1-24 01:37
gaogs123456 发表于 2013-1-24 00:57
发现了,装备帮助增强去掉了上方的帮助显示窗口(那个后面说明是显示在帮助窗口里的),感觉还是挺好的。 ...

我是新手看不懂 脚本呢  囧  能指点一下那里错了吗?  或者是冲突的地方
作者: 896409879    时间: 2013-1-24 09:19
是这样子的。那个说明加强灭了默认的帮助窗口,所以荣誉系统调用的帮助窗口挂掉了。。。。
需要的话,可以请人单独写一个改变调用窗口的脚本,比较简单的。。。
作者: 视觉诱惑    时间: 2013-1-24 20:21
896409879 发表于 2013-1-24 09:19
是这样子的。那个说明加强灭了默认的帮助窗口,所以荣誉系统调用的帮助窗口挂掉了。。。。
需要的话,可以 ...

能否教教我 怎样编写?




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1