查看: 3607|回复: 2

[已经解决] 求教,对话加强脚本的显字前延迟怎么去除

[复制链接]
梦石
24
星屑
8942
在线时间
248 小时
注册时间
2020-12-4
回帖
259

极短24获奖极短23获奖极短22获奖

发表于 2021-10-10 12:26:40 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 纯属小虫 于 2021-10-10 12:27 编辑

采用了RB给的逐字显示的对话加强脚本,非常好用
但是发现一个问题:
从对话框出现到第一个字的显示之间 有一个短暂的延迟,比较影响观感体验
但是没有找到这个延迟是哪一步骤导致的
还请大佬们指教
[fold]
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #------------------------------------------------------------------------------
  4. # 原版:趙雲
  5. # 重制:RyanBern  2015.08.24
  6. #------------------------------------------------------------------------------
  7. # 更新记录:
  8. #     2015.09.06    少许BUG修复,附加战斗场景对话效果
  9. #     2015.11.05    修复临时更改字号功能
  10. #     2015.11.13    增加更改姓名颜色的功能,修复显示 BUG
  11. #     2016.01.19    增加大型半身像对话框设置,快捷方式设置,高级快捷方式设置
  12. #     2016.05.10    增加对话框开关,打开指定开关时暂时屏蔽本对话加强窗口
  13. #                   增加\f[头像]的功能,可以显示正方形的说话者头像
  14. #     2016.08.26    简化代码,增加自动对话功能,高速跳过对话功能
  15. #     2016.11.05    增加自动调节文字位置的功能,当对话框太靠近屏幕上方或者下方
  16. #                   时,脚本会更换成另外一个显示的方向。
  17. #     2017.01.11    增加连行功能和兼容 VA 的头像组功能
  18. #==============================================================================

  19. #——说明

  20. # 使用时,要在Graphics文件夹下新建一个名为Faces的文件夹,用于存储头像
  21. # 对话框的窗口素材可不必和系统窗口相同,请将对话框窗口素材放到
  22. # Graphics/Windowskins文件夹下,并附上两个气泡箭头素材,用于指向说话者,
  23. # 命名规则为“对话框窗口素材名-top”和“对话框窗口素材名-under”
  24. # 然后在本脚本的设置区域修改。

  25. # 默认为一个字一个字的方式,如果需要一次全部显示,
  26. # 请打开特定开关(默认为 21 号)

  27. # 打开开关(默认为 22 号)后,对话时按下[空格键]可以瞬间显示全部对话。

  28. # 打卡开关(默认为 23 号)后,屏蔽加强对话框,将使用 XP 默认对话框。

  29. # 打开开关(默认为 24 号)后,对话框可以在对话显示完毕后自动消失,适合制作
  30. # 场景 CG,需要进行选择或数字输入的情况不会自动消失。此外在文本框中使用\t[数字]
  31. # 也可达到相似效果,不过作用范围仅限本次对话框。

  32. # 打开开关(默认为 25 号)后,按下 CTRL 键可以快速跳过对话,需要进行选择或者数字
  33. # 输入的情况不会跳过。

  34. # 打开开关(默认为 26 号)后,对话框的位置会自动调节,使其不会遮挡说话者
  35. # 默认对话字没有声音,如果需要声音,
  36. # 请在游戏中使用脚本:$game_system.soundname_on_speak = "这里输入文件名"
  37. # 我唯一一个见过“胡乱配音”的游戏是天使帝国2代,该游戏说话的时候每个字符随机发一个外星语音

  38. # 其他在对话中可以使用的功能:

  39. # \n[1]:显示1号角色的姓名

  40. # \name[李逍遥]:显示一个“李逍遥”方框,表示说话人姓名
  41. # \nc[0-7]:更改姓名框颜色

  42. # 非战斗时,\p功能可以自动调整对话框位置
  43. # \p[1] :对话框出现在1号事件的上方
  44. # \p[0] :主人公上方出现对话框
  45. # \p[-1]:对话框出现在屏幕下方,这种特殊类型的对话框在有大型半身像时使用
  46. #——————————————————使用\p功能后可以自动调整对话框大小
  47. # 使用\p功能后,使用事件指令[更改文章选项]可更改对话框的位置
  48. #   [上] :对话框出现在说话者上方
  49. #   [下] :对话框出现在说话者下方
  50. #   [中] :对话框出现在屏幕正中
  51. # 战斗时,\p功能有所变化
  52. # \p[1]:对话框出现在ID为1的角色战斗图附近(这个角色必须是队伍中的成员)
  53. # \p[1001]:对话框出现在Index为1的敌人战斗图附近--也就是说敌人的位置从
  54. #           1001开始算起,1002则是代表Index为2的敌人。
  55. # 战斗时使用\p指令+[更改文章选项]依然是有效的,但是如果不使用\p指令,那么
  56. # 对话框则会一直出现在屏幕正上方。

  57. # \\:显示""这个符号

  58. # \v[1] :显示变量1

  59. # \v[a1] :显示防具1

  60. # \v[w1] :显示武器1

  61. # \v[i1] :显示物品1

  62. # \v[s1] :显示特技1

  63. # \ic[001-Weapon01] : 显示图标"001-Weapon01.png"

  64. # \c[0-7]:更改颜色

  65. # \g:显示金钱窗口

  66. # \a[SE文件名]:对话的时候播放SE

  67. # \s[1-19]:更改弹字的速度

  68. # \.   :停顿一刹那(1、2帧)
  69. # \|   :停顿片刻(20帧)

  70. # \>   :文字不用打字方式
  71. # \<   :文字使用打字方式

  72. # \!   :等待玩家按回车再继续
  73. # \~   :文字直接消失

  74. # \I   :下一行从这个位置开始

  75. # \o[123]:文字透明度改为123,模拟将死之人(汗)

  76. # \h[12]:改用12号字

  77. # \b[50]:空50象素

  78. # \t[20]:对话显示完毕后等待 20 帧自动消失

  79. # \L[001]:在左边显示半身像"Graphics/Faces/001.png",并左右镜像反转
  80. # \R[001]:在右边显示半身像"Graphics/Faces/001.png"
  81. # \f[001]:在左边显示正方形头像"Graphics/Faces/001.png"
  82. # 注:不推荐同时使用显示半身像的功能和显示头像的功能。显示的头像图片大小
  83. #     不得超过 120x120,如果图片超过这个大小,图片将会被放缩
  84. # \gf[001, 0]:在左边显示正方形头像组"Graphics/Faces/001.png"的第一个
  85. # 注:头像组排序方式默认如下(先数第一行,再数第二行,可调节每行的头像个数)
  86. #  -----------------
  87. #  | 0 | 1 | 2 | 3 |
  88. #  -----------------
  89. #  | 4 | 5 | 6 | 7 |
  90. #  -----------------

  91. # \+:必须放在每一行的末尾,表示连行,它将合并下一个【显示文章】指令(需要
  92. #     在下面的设置区域调节 Max_Lines 以保证文字能正常显示出来)

  93. #==============================================================================
  94. # 设置区域(其他参数的调节请看这里)
  95. #==============================================================================
  96. module RB
  97. end
  98. module RB::Mes_Config
  99.   # 打开 XX 号开关后,关闭打字效果
  100.   No_Typing = 101
  101.   # 打开 XX 号开关后,按下[空格键]可以瞬间显示全部文字
  102.   Write_Skip = 102
  103.   # 打开 XX 号开关后,屏蔽加强对话框(使用默认对话框)
  104.   Mes_Disabled = 103
  105.   # 主角名字字符缩写
  106.   Regex_Player_Name = /pn(\d+)/
  107.   # 主角姓名框底色(RGBA)
  108.   Name_Bar_Color = Color.new(0, 0, 0, 180)
  109.   # 字体大小
  110.   Size = 18
  111.   # 对话框窗口皮肤(不写为和系统皮肤相同)
  112.   Mes_Windowskin = ""
  113.   # 最大行数(初值为 4,尽量不要修改,如果考虑合并选择项和连行,可以设置为 6 以上)
  114.   # 此最大行数仅在 \p 指令下有效,如果不使用 \p 指令那么对话框还是 4 行的高度
  115.   Max_Lines = 8
  116.   # 画面宽度和高度(width / height)
  117.   # 此设置一般不需要更改,当使用分辨率扩张脚本时,将如下的值改成你游戏的分辨率即可。
  118.   Graphics_Width = 640
  119.   Graphics_Height = 480
  120.   # 打开 XX 号开关后,对话自动结束(不用按下 C 键)
  121.   Auto_Terminate = 104
  122.   # 打开 XX 号开关后,按下 CTRL 可以高速跳过对话
  123.   Text_Skip_Fast = 105
  124.   # 打开 XX 号开关后,自动调节对话框使其不会挡住说话者
  125.   Auto_Adjust_Mes_Pos = 106
  126.   # 对话自动结束延迟(单位:帧)
  127.   Auto_Terminate_Frame = 10
  128.   # 头像组:横向单元数
  129.   Face_Group_W = 4
  130.   # 头像组:纵向单元数
  131.   Face_Group_H = 2  
  132.   # 默认姓名文字颜色(和系统默认编号一致)
  133.   Name_Color_Default = 0
  134.   # 快捷指令,定义后,可以直接在文本框中输入快捷指令
  135.   # 定义方式为 快捷指令 => 完整指令 ,使用方式为 \sc[快捷指令]
  136.   # 注意,指令中通常包含反斜线'\',因此需要使用单引号的字符串,
  137.   # 或者用"\"进行转义。下面是一个例子:
  138.   # 这样定义后,输入\sc[pn1]就等效为 \name[pn1]\r[L1]\p[-1]
  139.   Shortcuts = {
  140.     #'pn1' => '\name[pn1]\r[L1]\p[-1]'
  141.   }
  142.   # 高级快捷指令定义,类似于宏展开,需要借助正则表达式(高级用户使用)
  143.   Shortcuts_Regexp = {
  144.     /\\pn1/ => '\name[pn1]\r[L1]\p[-1]',
  145.     /\\[Rr]ed\[(.*?)\]/m => '\c[2]\1\c[0]',
  146.     /\\[Cc]ol\[(\d+)\]\{(.*?)\}/m => '\c[\1]\2\c[0]',
  147.   }
  148. end
  149. #==============================================================================
  150. # RPG::Cache
  151. #------------------------------------------------------------------------------
  152. # RPG::Cache 追加定义
  153. #==============================================================================
  154. module RPG::Cache
  155.   def self.face(filename)
  156.     self.load_bitmap("Graphics/Faces/", filename)
  157.   end
  158. end

  159. #==============================================================================
  160. # ■ Game_System
  161. #------------------------------------------------------------------------------
  162. #  处理系统附属数据的类。也可执行诸如 BGM 管理之类的功能。本类的实例请参考
  163. # $game_system 。
  164. #==============================================================================

  165. class Game_System
  166.   attr_accessor :soundname_on_speak
  167.   alias carol3_ini initialize
  168.   def initialize
  169.     carol3_ini
  170.     @soundname_on_speak = nil
  171.   end
  172. end

  173. #==============================================================================
  174. # ■ Window_Message
  175. #------------------------------------------------------------------------------
  176. #   修改的对话框类。
  177. #==============================================================================
  178. class Window_Message_RB < Window_Selectable
  179.   include RB::Mes_Config
  180.   #--------------------------------------------------------------------------
  181.   # ● 初始化状态
  182.   #--------------------------------------------------------------------------
  183.   def initialize
  184.     super(80, 304, 480, 160)
  185.     self.contents = Bitmap.new(1, 1)
  186.     self.visible = false
  187.     self.z = 9998
  188.     @fade_in = false
  189.     @fade_out = false
  190.     @contents_showing = false
  191.     @write_skip = false
  192.     @text_skip = false
  193.     @cursor_width = 0
  194.     @face_h = 0
  195.     self.active = false
  196.     self.index = -1
  197.     if $game_system.soundname_on_speak == nil then
  198.       $game_system.soundname_on_speak = ""
  199.     end
  200.     self.windowskin = RPG::Cache.windowskin(Mes_Windowskin) if Mes_Windowskin != ""
  201.     @opacity_text_buf = Bitmap.new(32, 32)
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # ● 释放
  205.   #--------------------------------------------------------------------------
  206.   def dispose
  207.     terminate_message
  208.     $game_temp.message_window_showing = false
  209.     if @input_number_window != nil
  210.       @input_number_window.dispose
  211.     end
  212.     super
  213.   end
  214.   #--------------------------------------------------------------------------
  215.   # ● 处理信息结束
  216.   #--------------------------------------------------------------------------
  217.   def terminate_message
  218.     self.active = false
  219.     self.pause = false
  220.     self.index = -1
  221.     self.contents.clear
  222.     # 清除显示中标志
  223.     @contents_showing = false
  224.     # 呼叫信息调用
  225.     if $game_temp.message_proc != nil
  226.       $game_temp.message_proc.call
  227.     end
  228.     # 清除文章、选择项、输入数值的相关变量
  229.     $game_temp.message_text = nil
  230.     $game_temp.message_proc = nil
  231.     $game_temp.choice_start = 99
  232.     $game_temp.choice_max = 0
  233.     $game_temp.choice_cancel_type = 0
  234.     $game_temp.choice_proc = nil
  235.     $game_temp.num_input_start = 99
  236.     $game_temp.num_input_variable_id = 0
  237.     $game_temp.num_input_digits_max = 0
  238.     # 清除头像(由于是 RPG::Cache 所以无需释放)
  239.     @face_bitmap = nil
  240.     @face_group_bitmap = nil
  241.     @face_ok = false
  242.     # 清除跳过标志
  243.     @write_skip = false
  244.     @text_skip = false
  245.     # 释放金钱窗口
  246.     if @gold_window != nil
  247.       @gold_window.dispose
  248.       @gold_window = nil
  249.     end
  250.     # 释放姓名窗口
  251.     if @name_window_text != nil
  252.       @name_window_text.dispose
  253.       @name_window_text = nil
  254.     end
  255.     # 释放右侧立绘
  256.     if @right_picture != nil
  257.       @right_picture.dispose
  258.       @right_picture = nil
  259.     end   
  260.     # 释放左侧立绘
  261.     if @left_picture != nil
  262.       @left_picture.dispose
  263.       @left_picture = nil
  264.     end
  265.     # 释放姓名蓝条
  266.     if @bar != nil
  267.       @bar.bitmap.dispose
  268.       @bar.dispose
  269.       @bar = nil
  270.     end
  271.     # 释放气泡图标
  272.     if @k_tale != nil
  273.       @k_tale.dispose
  274.       @k_tale = nil
  275.     end
  276.   end
  277.   #--------------------------------------------------------------------------
  278.   # ● 刷新
  279.   #--------------------------------------------------------------------------
  280.   def refresh
  281.     # 初期化
  282.     @x = @y = @max_x = @max_y = @indent = @lines = 0
  283.     @face_indent = 0
  284.     @opacity = 255
  285.     @cursor_width = 0
  286.     @write_speed = 0
  287.     @write_wait = 0
  288.     @mid_stop = false
  289.     @popchar = -2
  290.     @auto_terminate = -1
  291.     if $game_temp.choice_start == 0
  292.       @x = 8
  293.     end
  294.     if $game_temp.message_text != nil
  295.       @now_text = $game_temp.message_text
  296.       # Shortcuts 预处理
  297.       @now_text.gsub!(/\\sc\[(.*?)\]/) { Shortcuts[$1] || "" }
  298.       # Shortcuts_Regexp 预处理
  299.       Shortcuts_Regexp.each_pair do |regex, str|
  300.         @now_text.gsub!(regex, str)
  301.       end
  302.       # 头像设置
  303.       if (/\\[Ff]\[(.+?)\]/.match(@now_text)) != nil
  304.         @face_bitmap = RPG::Cache.face($1)
  305.         @x = @face_indent = [128, @face_bitmap.width + 4].min
  306.         @now_text.gsub!(/\\[Ff]\[(.+?)\]/) { "" }
  307.       end
  308.       # 头像组设置
  309.       if (/\\[Gg]f\[(.+?)\s*,\s*(\d+)\]/).match(@now_text) != nil
  310.         @face_group_bitmap = RPG::Cache.face($1)
  311.         idx = $2.to_i
  312.         ix, iy = idx % Face_Group_W, idx / Face_Group_W
  313.         w, h = @face_group_bitmap.width / Face_Group_W, @face_group_bitmap.height / Face_Group_H
  314.         @face_bitmap = Bitmap.new(w, h)
  315.         @face_bitmap.blt(0, 0, @face_group_bitmap, Rect.new(ix * w, iy * h, w, h))
  316.         @x = @face_indent = [128, @face_bitmap.width + 4].min
  317.         @now_text.gsub!(/\\[Gg]f\[(.+?)\s*,\s*(\d+)\]/) { "" }
  318.       end
  319.       #——左半身像设置
  320.       if (/\\[Ll]\[(.+?)\]/.match(@now_text)) != nil then
  321.         @face = $1
  322.         if @left_picture != nil
  323.           @left_picture.dispose
  324.         end
  325.         @left_picture = Sprite.new
  326.         @left_picture.bitmap = RPG::Cache.face(@face)
  327.         @left_picture.mirror = true
  328.         @x = @face_indent = @left_picture.bitmap.width
  329.         @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  330.       end
  331.       #——右半身像设置
  332.       if (/\\[Rr]\[(.+?)\]/.match(@now_text)) != nil then
  333.         @face = $1
  334.         if @right_picture != nil
  335.           @right_picture.dispose
  336.         end
  337.         @right_picture = Sprite.new
  338.         @right_picture.bitmap = RPG::Cache.face(@face)
  339.         @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  340.       end
  341.       # 显示人物姓名
  342.       name_window_set = false
  343.       if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
  344.         name_window_set = true
  345.         name_text = $1
  346.         if Regex_Player_Name =~ name_text
  347.           name_text = $game_actors[$1.to_i].name
  348.         end
  349.         @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
  350.       end
  351.       # 人物姓名颜色
  352.       name_color = text_color(Name_Color_Default)
  353.       if (/\\[Nn]c\[(\d+)\]/.match(@now_text)) != nil
  354.         name_color = text_color($1.to_i)
  355.         @now_text.sub!(/\\[Nn]c\[(\d+)\]/) { "" }
  356.       end
  357.       # 文字位置的判定
  358.       if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text)) != nil then
  359.         @popchar = $1.to_i
  360.         @now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
  361.       end
  362.       # 自动结束判定
  363.       @auto_terminate = Auto_Terminate_Frame if $game_switches[Auto_Terminate]
  364.       if (/\\[Tt]\[(\d+)\]/).match(@now_text)
  365.         @auto_terminate = $1.to_i
  366.         @now_text.gsub!(/\\[Tt]\[(\d+)\]/) { "" }
  367.       end
  368.       # 开始替换文字(\v)
  369.       begin
  370.         last_text = @now_text.clone
  371.         @now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  372.       end until @now_text == last_text
  373.       # 替换控制码
  374.       @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  375.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  376.       end
  377.       @now_text.gsub!(/\\\\/) { "\000" }
  378.       @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  379.       @now_text.gsub!(/\\[Gg]/) { "\002" }
  380.       @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  381.       @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  382.       @now_text.gsub!(/\\[.]/) { "\005" }
  383.       @now_text.gsub!(/\\[|]/) { "\006" }
  384.       @now_text.gsub!(/\\[Ii]c\[(.*?)\]/) { "\030[#{$1}] "}
  385.       @now_text.gsub!(/\\[>]/) { "\016" }
  386.       @now_text.gsub!(/\\[<]/) { "\017" }
  387.       @now_text.gsub!(/\\[!]/) { "\020" }
  388.       @now_text.gsub!(/\\[~]/) { "\021" }
  389.       @now_text.gsub!(/\\[Ii]/) { "\023" }
  390.       @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  391.       @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  392.       @now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
  393.       # 根据 \p 的不同设置对话框大小
  394.       if @popchar >= 0 # \p 的情况下自动调节
  395.         @text_save = @now_text.clone
  396.         process_real_text
  397.         @max_x = name_window_set ? contents.text_size(name_text).width : 0
  398.         @max_y = Max_Lines
  399.         for i in 0...Max_Lines
  400.           line = @text_save.split(/\n/)[Max_Lines-i-1]
  401.           @max_y -= 1 if line == nil && @max_y <= Max_Lines - i
  402.           next if line == nil
  403.           contents.font.size = Size
  404.           cx = contents.text_size(line).width
  405.           @max_x = cx if cx > @max_x
  406.         end
  407.         if @right_picture != nil && !@right_picture.disposed?
  408.           self.width = @max_x + 48 + @face_indent + @right_picture.bitmap.width
  409.         else
  410.           self.width = @max_x + 48 + @face_indent
  411.         end
  412.         @face_h = @face_bitmap == nil ? 0 : [120, @face_bitmap.height].min
  413.         if $game_temp.num_input_variable_id > 0
  414.           self.height = [(@max_y - 1) * line_height + 96, @face_h + 32].max
  415.         else
  416.           self.height = [(@max_y - 1) * line_height + 64, @face_h + 32].max
  417.         end
  418.         # 生成气泡图标
  419.         @k_tale = Sprite.new
  420.       elsif @popchar == -1
  421.         line_count = @now_text.split(/\n/).size
  422.         line_count = [Max_Lines , [line_count, 4].max].min
  423.         self.width = Graphics_Width
  424.         self.height = [64 + line_height * (line_count - 1), @face_h + 32].max
  425.         @max_x = self.width - 32 - @face_indent
  426.       else
  427.         self.width = Graphics_Width * 0.6
  428.         self.height = 64 + line_height * 3
  429.         @max_x = self.width - 32 - @face_indent
  430.       end
  431.       # 如果设置了姓名框
  432.       if name_window_set
  433.         off_x = 0
  434.         off_y = -40
  435.         space = 2
  436.         x = self.x + off_x - space / 2
  437.         y = self.y + off_y - space / 2
  438.         w = self.contents.text_size(name_text).width + 26 + space
  439.         h = 40 + space
  440.         x = self.x + off_x + 4
  441.         y = self.y + off_y
  442.         @name_window_text = Air_Text.new(self.x + @face_indent+4+8, self.y+16, name_text, name_color)
  443.         @name_window_text.z = self.z + 2
  444.         @bar = Sprite.new
  445.         @bar.bitmap = Bitmap.new(self.width, 24)
  446.         face_cut = @face_bitmap == nil ? 0 : @face_indent + 2
  447.         @bar.x = self.x + 8 + face_cut
  448.         @bar.y = self.y + 16
  449.         @bar.z = self.z + 2
  450.         @bar.bitmap.fill_rect(0,0,self.width-16-face_cut,24, Name_Bar_Color)
  451.       end
  452.       # 一切设置完毕后,创建 contents
  453.       if self.contents != nil
  454.         self.contents.dispose
  455.         self.contents = nil
  456.       end
  457.       self.contents = Bitmap.new(width - 32, height - 32)
  458.       self.contents.font.color = normal_color
  459.       self.contents.font.size = Size
  460.     end
  461.     # 如果选择项被设置
  462.     if $game_temp.choice_max > 0
  463.       @item_max = $game_temp.choice_max
  464.       self.active = true
  465.       self.index = 0
  466.     end
  467.     # 如果数值输入被设置
  468.     if $game_temp.num_input_variable_id > 0
  469.       digits_max = $game_temp.num_input_digits_max
  470.       number = $game_variables[$game_temp.num_input_variable_id]
  471.       @input_number_window = Window_InputNumber.new(digits_max)
  472.       @input_number_window.number = number
  473.     end
  474.     # 更新窗口位置
  475.     update_window_pos
  476.   end
  477.   #--------------------------------------------------------------------------
  478.   # ● 更新
  479.   #--------------------------------------------------------------------------
  480.   def update
  481.     super
  482.     # 使用默认窗口外观的情况下,如果窗口的外关被变更了、再设置
  483.     if $game_system.windowskin_name != @windowskin_name && Mes_Windowskin == ""
  484.       @windowskin_name = $game_system.windowskin_name
  485.       self.windowskin = RPG::Cache.windowskin(@windowskin_name)
  486.     end
  487.     # 地图中实时更新位置
  488.     if @k_tale != nil && @k_tale.visible && !$game_temp.in_battle
  489.       update_window_pos
  490.     end
  491.     # [空格键]跳过描绘
  492.     if $game_switches[Write_Skip] && Input.trigger?(Input::C)
  493.       @write_skip = true
  494.     end
  495.     # CTRL 高速跳过对话
  496.     if $game_switches[Text_Skip_Fast] && Input.trigger?(Input::CTRL)
  497.       # 选择项或数字输入时无法高速跳过
  498.       if $game_temp.choice_max > 0 || @input_number_window != nil
  499.         @write_skip = true
  500.       else
  501.         @text_skip = true
  502.       end
  503.     end
  504.     # 描绘头像
  505.     if @face_bitmap != nil && !@face_ok
  506.       face_real_w = [120, @face_bitmap.width].min
  507.       face_real_h = [120, @face_bitmap.height].min
  508.       self.contents.stretch_blt(Rect.new(0, 0, face_real_w, face_real_h), @face_bitmap, Rect.new(0, 0, @face_bitmap.width, @face_bitmap.height))
  509.       @face_ok = true
  510.     end
  511.     # 淡入中的情况下
  512.     if @fade_in
  513.       self.contents_opacity += 24
  514.       if @input_number_window != nil
  515.         @input_number_window.contents_opacity += 24
  516.       end
  517.       if self.contents_opacity == 255
  518.         @fade_in = false
  519.       end
  520.       return
  521.     end
  522.     @now_text = nil if @now_text == ""
  523.     # 逐个描绘文字
  524.     if @now_text != nil && @mid_stop == false && !@text_skip
  525.       if @write_wait > 0
  526.         @write_wait -= 1
  527.         return
  528.       end
  529.       while true
  530.         @max_x = @x if @max_x < @x
  531.         @max_y = @y if @max_y < @y
  532.         # 处理字符
  533.         if (c = @now_text.slice!(/./m)) != nil
  534.           # \\的情况下
  535.           if c == "\000"
  536.             c = "\"
  537.           end
  538.           # \c的情况下
  539.           if c == "\001"
  540.             @now_text.sub!(/\[([0-9]+)\]/, "")
  541.             color = $1.to_i
  542.             if color >= 0 and color <= 7
  543.               self.contents.font.color = text_color(color)
  544.             end
  545.             c = ""
  546.           end
  547.           # \g的情况下
  548.           if c == "\002"
  549.             if @gold_window == nil && @popchar <= 0
  550.               @gold_window = Window_Gold.new
  551.               @gold_window.x = 560 - @gold_window.width
  552.               if $game_temp.in_battle
  553.                 @gold_window.y = 192
  554.               else
  555.                 @gold_window.y = self.y >= 128 ? 32 : 384
  556.               end
  557.               @gold_window.opacity = self.opacity
  558.               @gold_window.back_opacity = self.back_opacity
  559.             end
  560.             c = ""
  561.           end
  562.           # \s的情况下
  563.           if c == "\003"
  564.             @now_text.sub!(/\[([0-9]+)\]/, "")
  565.             speed = $1.to_i
  566.             if speed >= 0 and speed <= 19
  567.               @write_speed = speed
  568.             end
  569.             c = ""
  570.           end
  571.           # \a的情况下
  572.           if c == "\004"
  573.             @now_text.sub!(/\[(.*?)\]/, "")
  574.             se_filename = "Audio/SE/#{$1}"
  575.             if FileTest.exist?(se_filename)
  576.               Audio.se_play(se_filename)
  577.             end
  578.             c = ""
  579.           end
  580.           # \.的情况下
  581.           if c == "\005"
  582.             @write_wait += 5
  583.             c = ""
  584.           end
  585.           # \|的情况下
  586.           if c == "\006"
  587.             @write_wait += 20
  588.             c = ""
  589.           end
  590.           # \>的情况下
  591.           if c == "\016"
  592.             text_not_skip = false
  593.             c = ""
  594.           end
  595.           # \<的情况下
  596.           if c == "\017"
  597.             text_not_skip = true
  598.             c = ""
  599.           end
  600.           # \!的情况下
  601.           if c == "\020"
  602.             @mid_stop = true
  603.             c = ""
  604.           end
  605.           # \~的情况下
  606.           if c == "\021"
  607.             terminate_message
  608.             return
  609.           end
  610.           # \i的情况下
  611.           if c == "\023"
  612.             @indent = @x
  613.             c = ""
  614.           end
  615.           # \o的情况下
  616.           if c == "\024"
  617.             @now_text.sub!(/\[([0-9]+)\]/, "")
  618.             @opacity = $1.to_i
  619.             c = ""
  620.           end
  621.           # \h的情况下
  622.           if c == "\025"
  623.             @now_text.sub!(/\[([0-9]+)\]/, "")
  624.             self.contents.font.size = [[$1.to_i, 6].max, 32].min
  625.             c = ""
  626.           end
  627.           # \b的情况下
  628.           if c == "\026"
  629.             @now_text.sub!(/\[([0-9]+)\]/, "")
  630.             @x += $1.to_i
  631.             c = ""
  632.           end
  633.           # 图标的情况
  634.           if c == "\030"
  635.             @now_text.sub!(/\[(.*?)\]/, "")
  636.             self.contents.blt(@x , @y * line_height + (line_height - 24) / 2, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  637.             if $game_system.soundname_on_speak != ""
  638.               Audio.se_play($game_system.soundname_on_speak)
  639.             end
  640.             @x += 24
  641.             c = ""
  642.           end
  643.           # 另起一行的情况下
  644.           if c == "\n"
  645.             if @lines >= $game_temp.choice_start
  646.               @cursor_width = [@cursor_width, @max_x - @face_indent].max
  647.             end
  648.             @lines += 1
  649.             @y += 1
  650.             @x = 0 + @indent + @face_indent
  651.             if @lines >= $game_temp.choice_start
  652.               @x = 8 + @indent + @face_indent
  653.             end
  654.             c = ""
  655.           end
  656.           if c != ""
  657.             # 文字描画
  658.             @x += opacity_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size) / 2, c, @opacity)
  659.             if $game_system.soundname_on_speak != "" then
  660.               Audio.se_play($game_system.soundname_on_speak)
  661.             end
  662.           end
  663.         else
  664.           break
  665.         end
  666.         if !$game_switches[No_Typing] && !@write_skip
  667.           break
  668.         end
  669.       end
  670.       @write_wait += @write_speed
  671.       return
  672.     end
  673.     # 数值输入的处理
  674.     if @input_number_window != nil
  675.       @input_number_window.update
  676.       # 确认
  677.       if Input.trigger?(Input::C)
  678.         $game_system.se_play($data_system.decision_se)
  679.         $game_variables[$game_temp.num_input_variable_id] =
  680.           @input_number_window.number
  681.         $game_map.need_refresh = true
  682.         @input_number_window.dispose
  683.         @input_number_window = nil
  684.         terminate_message
  685.       end
  686.       return
  687.     end
  688.     # 跳过对话
  689.     if @text_skip
  690.       @now_text = nil
  691.       terminate_message
  692.       return
  693.     end
  694.     # 文章显示中的情况下
  695.     if @contents_showing
  696.       if $game_temp.choice_max == 0
  697.         self.pause = true
  698.       end
  699.       # auto terminate
  700.       if $game_temp.choice_max == 0 && @auto_terminate > 0
  701.         @auto_terminate -= 1
  702.         if @auto_terminate == 0
  703.           terminate_message
  704.         end
  705.         return
  706.       end
  707.       # 取消
  708.       if Input.trigger?(Input::B)
  709.         if $game_temp.choice_max > 0 && $game_temp.choice_cancel_type > 0
  710.           $game_system.se_play($data_system.cancel_se)
  711.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  712.           terminate_message
  713.         end
  714.       end
  715.       # 确定
  716.       if Input.trigger?(Input::C)
  717.         if @mid_stop
  718.           @mid_stop = false
  719.           return
  720.         else
  721.           if $game_temp.choice_max > 0
  722.             $game_system.se_play($data_system.decision_se)
  723.             $game_temp.choice_proc.call(self.index)
  724.           end
  725.           terminate_message
  726.         end
  727.       end
  728.       return
  729.     end
  730.     if @fade_out == false and $game_temp.message_text != nil
  731.       @contents_showing = true
  732.       $game_temp.message_window_showing = true
  733.       refresh
  734.       Graphics.frame_reset
  735.       self.visible = true
  736.       self.contents_opacity = 0
  737.       if @input_number_window != nil
  738.         @input_number_window.contents_opacity = 0
  739.       end
  740.       @fade_in = true
  741.       return
  742.     end
  743.     if self.visible
  744.       @fade_out = true
  745.       self.opacity -= 48
  746.       if self.opacity == 0
  747.         self.visible = false
  748.         @fade_out = false
  749.         $game_temp.message_window_showing = false
  750.       end
  751.       return
  752.     end
  753.   end
  754.   #--------------------------------------------------------------------------
  755.   # ● 预览实际描绘内容(计算窗口宽用)
  756.   #--------------------------------------------------------------------------
  757.   #    实际对 @text_save 进行操作
  758.   #    此方法用于去除某些控制码引起窗口过长的影响
  759.   #--------------------------------------------------------------------------
  760.   def process_real_text
  761.     return if @text_save.nil?
  762.     regex = /[\001-\006\016\017\020\021\024](\[.*?\]){0,1}/
  763.     regex30 = /\030\[.*?\]/
  764.     @text_save.gsub!(regex, "")
  765.     @text_save.gsub!(regex30, "   ")
  766.   end
  767.   #--------------------------------------------------------------------------
  768.   # ● 获得角色(\p功能)
  769.   #--------------------------------------------------------------------------
  770.   def get_character(parameter)
  771.     case parameter
  772.     when 0
  773.       return $game_player
  774.     else
  775.       events = $game_map.events
  776.       return events == nil ? nil : events[parameter]
  777.     end
  778.   end
  779.   #--------------------------------------------------------------------------
  780.   # ● 获得战斗者(\p功能,此功能仅在战斗中有效)
  781.   #--------------------------------------------------------------------------
  782.   #    parameter : 1-999 表示主角 ID,1001-1008 表示索引为1-8的各个敌人
  783.   #--------------------------------------------------------------------------
  784.   def get_battler(parameter)
  785.     if parameter < 1000
  786.       return $game_actors[parameter]
  787.     else
  788.       return $game_troop.enemies[parameter - 1001]
  789.     end
  790.   end
  791.   #--------------------------------------------------------------------------
  792.   # ● 计算 y 偏移量(\p功能,这是考虑到不同战斗图/行走图的高度不同)
  793.   #--------------------------------------------------------------------------
  794.   #    character : 角色/战斗者
  795.   #--------------------------------------------------------------------------
  796.   def process_y_shift(character)
  797.     rate = character.is_a?(Game_Battler) ? 1 : 4
  798.     bmp = character.is_a?(Game_Battler) ?
  799.       RPG::Cache.battler(character.battler_name, character.battler_hue) :
  800.       RPG::Cache.character(character.character_name, character.character_hue)
  801.     return bmp.height / rate + 16
  802.   end
  803.   #--------------------------------------------------------------------------
  804.   # ● 更新窗口位置(所有组件)
  805.   #--------------------------------------------------------------------------
  806.   def update_window_pos
  807.     # 如果使用了 \p 设置位置
  808.     if @popchar >= 0
  809.       character = $game_temp.in_battle ? get_battler(@popchar) : get_character(@popchar)
  810.       final_pos = $game_system.message_position
  811.       if character != nil
  812.         x = [[character.screen_x - self.width / 2, 4].max, Graphics_Width - 4 - self.width].min
  813.         # adjust final_pos automatically when it is enabled
  814.         # ignore the case when pos == 1
  815.         if $game_switches[Auto_Adjust_Mes_Pos] && final_pos != 1
  816.           # try default mes_pos first
  817.           temp_y = final_pos == 2 ? [character.screen_y + 16, 4].max :
  818.             character.screen_y - process_y_shift(character) - self.height
  819.          
  820.           # set pos == 0 if temp_y exceeds the boundary of the screen
  821.           final_pos = 0 if temp_y > Graphics_Height - 4 - self.height && final_pos == 2
  822.           final_pos = 2 if temp_y < 4 && final_pos == 0
  823.         end
  824.         if final_pos == 2
  825.           y = [[character.screen_y + 16, 4].max, Graphics_Height - 4 - self.height].min
  826.         elsif final_pos == 0
  827.           y = [[character.screen_y - process_y_shift(character) - self.height, 4].max, Graphics_Height - 4 - self.height].min
  828.         else
  829.           x = (Graphics_Width - self.width) / 2
  830.           y = (Graphics_Height - self.height) / 2
  831.         end
  832.         self.x = x
  833.         self.y = y
  834.         # 设置气泡图标
  835.         if @k_tale != nil
  836.           @k_tale.x = character.is_a?(Game_Character) ?
  837.             ( character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16 :
  838.             character.screen_x
  839.           k_tale_filename = Mes_Windowskin == "" ? $game_system.windowskin_name : Mes_Windowskin
  840.           suffix = final_pos == 2 ? "-under" : "-top"
  841.           # reload @k_tale's bitmap
  842.           @k_tale.bitmap = RPG::Cache.windowskin(k_tale_filename + suffix)
  843.           if final_pos == 2
  844.             @k_tale.y = self.y - 16
  845.           elsif final_pos == 0
  846.             @k_tale.y = self.y + self.height - 16
  847.           else
  848.             @k_tale.visible = false
  849.           end
  850.           @k_tale.z = 9999
  851.         end
  852.       end
  853.     elsif @popchar == -1
  854.       self.x = 0
  855.       self.y = Graphics_Height - self.height
  856.     else # 无 \p 的情况下
  857.       self.x = (Graphics_Width - self.width) / 2
  858.       # 处于战斗中时
  859.       if $game_temp.in_battle
  860.         self.y = 16
  861.       else
  862.         # 显示文章位置的分支
  863.         case $game_system.message_position
  864.         when 0 # 上
  865.           self.y = 16
  866.         when 1 # 中
  867.           self.y = (Graphics_Height - self.height) / 2
  868.         when 2 # 下
  869.           self.y = (Graphics_Height - self.height - 16)
  870.         end
  871.       end
  872.     end # of @popchar >= 0
  873.     # 设置左侧立绘
  874.     if @left_picture != nil and !@left_picture.disposed?
  875.       @left_picture.x = self.x + 8
  876.       @left_picture.y = self.y - @left_picture.bitmap.height + self.height - 8
  877.       @left_picture.z = self.z + 4
  878.     end
  879.     # 设置右侧立绘
  880.     if @right_picture != nil and !@right_picture.disposed?
  881.       @right_picture.x = self.x + self.width - @right_picture.bitmap.width - 8
  882.       @right_picture.y = self.y - @right_picture.bitmap.height + self.height - 8
  883.       @right_picture.z = self.z + 4
  884.     end
  885.     # 设置姓名空气文字坐标
  886.     if @name_window_text != nil
  887.       @name_window_text.x = self.x + @face_indent - 4
  888.       @name_window_text.y = self.y
  889.     end
  890.     # 设置姓名蓝条坐标
  891.     if @bar != nil
  892.       face_cut = @face_bitmap == nil ? 0 : @face_indent + 2
  893.       @bar.x = self.x + 8 + face_cut
  894.       @bar.y = self.y + 16
  895.     end
  896.     # 设置数字处理
  897.     if @input_number_window != nil
  898.       @input_number_window.x = self.x + @face_indent
  899.       @input_number_window.y = self.y + 8 + $game_temp.num_input_start * line_height
  900.     end
  901.     # 设置不透明度
  902.     if $game_system.message_frame == 0
  903.       self.opacity = 255
  904.       self.back_opacity = 200
  905.     else
  906.       self.opacity = 0
  907.       self.back_opacity = 200
  908.     end
  909.   end
  910.   #--------------------------------------------------------------------------
  911.   # ● line_height
  912.   #--------------------------------------------------------------------------
  913.   # 返回值 : 行高
  914.   #--------------------------------------------------------------------------
  915.   def line_height
  916.     return [[Size * 15 / 10, 18].max, 32].min
  917.   end
  918.   #--------------------------------------------------------------------------
  919.   # ● 文字描画
  920.   #--------------------------------------------------------------------------
  921.   # target :描绘的目标 bitmap 对象
  922.   # x      :x 坐标
  923.   # y      :y 坐标
  924.   # str   :描绘的文字
  925.   # opacity:不透明度(0~255)
  926.   # 返回值 :文字宽度(@x 的增加值)。
  927.   #--------------------------------------------------------------------------
  928.   def opacity_draw_text(target, x, y, str,opacity)
  929.     height = target.font.size
  930.     width = target.text_size(str).width
  931.     opacity = [[opacity, 0].max, 255].min
  932.     if opacity == 255
  933.       target.draw_text(x, y, width, height, str)
  934.       return width
  935.     else
  936.       if @opacity_text_buf.width < width or @opacity_text_buf.height < height
  937.         @opacity_text_buf.dispose
  938.         @opacity_text_buf = Bitmap.new(width, height)
  939.       else
  940.         @opacity_text_buf.clear
  941.       end
  942.       @opacity_text_buf.font.size = target.font.size
  943.       @opacity_text_buf.draw_text(0, 0, width, height, str)
  944.       target.blt(x, y, @opacity_text_buf, Rect.new(0, 0, width, height), opacity)
  945.     return width
  946.     end
  947.   end
  948.   #--------------------------------------------------------------------------
  949.   # ● \V 变换
  950.   #--------------------------------------------------------------------------
  951.   # option : 选项,'i'物品,'w'武器,'a'防具,'s'技能
  952.   # index  : 数据库的索引
  953.   #--------------------------------------------------------------------------
  954.   def convart_value(option, index)
  955.     option == nil ? option = "" : nil
  956.     option.downcase!
  957.     case option
  958.       when "i"
  959.         unless $data_items[index].name == nil
  960.           r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
  961.         end
  962.       when "w"
  963.         unless $data_weapons[index].name == nil
  964.           r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
  965.         end
  966.       when "a"
  967.         unless $data_armors[index].name == nil
  968.           r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
  969.         end
  970.       when "s"
  971.         unless $data_skills[index].name == nil
  972.           r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
  973.         end
  974.       else
  975.       r = $game_variables[index]
  976.     end
  977.     r == nil ? r = "" : nil
  978.     return r
  979.   end
  980.   #--------------------------------------------------------------------------
  981.   # ● 释放
  982.   #--------------------------------------------------------------------------
  983.   def dispose
  984.     terminate_message
  985.     unless @opacity_text_buf.disposed?
  986.       @opacity_text_buf.dispose
  987.     end
  988.     $game_temp.message_window_showing = false
  989.     if @input_number_window != nil
  990.       @input_number_window.dispose
  991.     end
  992.     super
  993.   end
  994.   #--------------------------------------------------------------------------
  995.   # ● 刷新光标矩形
  996.   #--------------------------------------------------------------------------
  997.   def update_cursor_rect
  998.     if @index >= 0
  999.       n = $game_temp.choice_start + @index
  1000.       self.cursor_rect.set(4 + @indent + @face_indent, n * line_height, @cursor_width, line_height)
  1001.     else
  1002.       self.cursor_rect.empty
  1003.     end
  1004.   end
  1005. end
  1006. #==============================================================================
  1007. # ■ Air_Text
  1008. #------------------------------------------------------------------------------
  1009. #   空气文字,借助窗口显示文字,但是不显示窗口载体。
  1010. #==============================================================================
  1011. class Air_Text < Window_Base
  1012.   #--------------------------------------------------------------------------
  1013.   # ● 对象初始化
  1014.   #--------------------------------------------------------------------------
  1015.   def initialize(x, y, designate_text, color)
  1016.     super(x-16, y-16, 32 + designate_text.size * 12, 56)
  1017.     self.opacity = 0
  1018.     self.back_opacity = 0
  1019.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1020.     self.contents.font.size = 20
  1021.     self.contents.font.color = color
  1022.     w = self.contents.width
  1023.     h = self.contents.height
  1024.     self.contents.draw_text(0, 0, w, h, designate_text)
  1025.   end
  1026.   #--------------------------------------------------------------------------
  1027.   # ● 释放
  1028.   #--------------------------------------------------------------------------
  1029.   def dispose
  1030.     self.contents.clear
  1031.     super
  1032.   end
  1033. end

  1034. class Interpreter
  1035.   include RB::Mes_Config
  1036.   #--------------------------------------------------------------------------
  1037.   # ● 显示文章
  1038.   #--------------------------------------------------------------------------
  1039.   def command_101
  1040.     # 另外的文章已经设置过 message_text 的情况下
  1041.     if $game_temp.message_text != nil
  1042.       # 结束
  1043.       return false
  1044.     end
  1045.     # 设置信息结束后待机和返回调用标志
  1046.     @message_waiting = true
  1047.     $game_temp.message_proc = Proc.new { @message_waiting = false }
  1048.     # message_text 设置为 1 行
  1049.     # check whether \+ exists
  1050.     append = /\\\+$/ =~ @list[@index].parameters[0]
  1051.     line = @list[@index].parameters[0].sub(/\\\+$/, "")
  1052.     $game_temp.message_text = line + "\n"
  1053.     line_count = 1
  1054.     # 循环
  1055.     loop do
  1056.       # 下一个事件指令为文章两行以上的情况
  1057.       if @list[@index+1].code == 401 || @list[@index+1].code == 101 && append
  1058.         append = /\\\+$/ =~ @list[@index+1].parameters[0]
  1059.         line = @list[@index+1].parameters[0].sub(/\\\+$/, "")
  1060.         # message_text 添加到第 2 行以下
  1061.         $game_temp.message_text += line + "\n"
  1062.         line_count += 1
  1063.       # 事件指令不在文章两行以下的情况
  1064.       else
  1065.         # 下一个事件指令为显示选择项的情况下
  1066.         if @list[@index+1].code == 102
  1067.           # 如果选择项能收纳在画面里
  1068.           if @list[@index+1].parameters[0].size <= Max_Lines - line_count
  1069.             # 推进索引
  1070.             @index += 1
  1071.             # 设置选择项
  1072.             $game_temp.choice_start = line_count
  1073.             setup_choices(@list[@index].parameters)
  1074.           end
  1075.         # 下一个事件指令为处理输入数值的情况下
  1076.         elsif @list[@index+1].code == 103
  1077.           # 如果数值输入窗口能收纳在画面里
  1078.           if line_count < Max_Lines
  1079.             # 推进索引
  1080.             @index += 1
  1081.             # 设置输入数值
  1082.             $game_temp.num_input_start = line_count
  1083.             $game_temp.num_input_variable_id = @list[@index].parameters[0]
  1084.             $game_temp.num_input_digits_max = @list[@index].parameters[1]
  1085.           end
  1086.         end
  1087.         # 继续
  1088.         return true
  1089.       end
  1090.       # 推进索引
  1091.       @index += 1
  1092.     end
  1093.   end
  1094. end

  1095. class Scene_Map
  1096.   include RB::Mes_Config
  1097.   alias rb_update_20160408 update
  1098.   def update
  1099.     if @rb_mes_disabled != $game_switches[Mes_Disabled]
  1100.       @rb_mes_disabled = $game_switches[Mes_Disabled]
  1101.       @message_window.dispose if @message_window != nil
  1102.       @message_window = @rb_mes_disabled ? Window_Message.new : Window_Message_RB.new
  1103.     end
  1104.     rb_update_20160408
  1105.   end
  1106. end

  1107. class Scene_Battle
  1108.   include RB::Mes_Config
  1109.   alias rb_update_20160408 update
  1110.   def update
  1111.     if @rb_mes_disabled != $game_switches[Mes_Disabled]
  1112.       @rb_mes_disabled = $game_switches[Mes_Disabled]
  1113.       @message_window.dispose if @message_window != nil
  1114.       @message_window = @rb_mes_disabled ? Window_Message.new : Window_Message_RB.new
  1115.     end
  1116.     rb_update_20160408
  1117.   end
  1118. end


  1119. #==============================================================================
  1120. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  1121. #==============================================================================
复制代码

[/fold]

66加强对话框与Fuki对话框整合 附送功能.zip

274.28 KB, 下载次数: 22

梦石
0
星屑
9557
在线时间
5074 小时
注册时间
2013-6-21
回帖
3459

开拓者贵宾剧作品鉴家

发表于 2021-10-12 13:44:59 | 显示全部楼层
原因是一个淡入淡出的功能做的有问题,已经修改。

可以到原发布页下载 v2.1.0
回复

使用道具 举报

梦石
24
星屑
8942
在线时间
248 小时
注册时间
2020-12-4
回帖
259

极短24获奖极短23获奖极短22获奖

 楼主| 发表于 2021-10-13 14:23:22 | 显示全部楼层
RyanBern 发表于 2021-10-12 13:44
原因是一个淡入淡出的功能做的有问题,已经修改。

可以到原发布页下载 v2.1.0 ...

感恩,问题已经解决~~~
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部