查看: 2838|回复: 5

[已经解决] 对话加强脚本如何修改在默认文章中部显示时的宽度

[复制链接]
梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
回帖
24
发表于 2020-3-21 20:34:06 | 显示全部楼层 |阅读模式

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

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

×
如题,用了这个脚本以后,文章位置为中时,默认的对话框宽度一下子变窄了许多。脚本小白不知道怎么修改,在p1搜索了一下好像也只有修改原始脚本的教程,我使用的对话加强脚本如下

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

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

  1102. class Scene_Map
  1103.   include RB::Mes_Config
  1104.   alias rb_update_20160408 update
  1105.   def update
  1106.     if @rb_mes_disabled != $game_switches[Mes_Disabled]
  1107.       @rb_mes_disabled = $game_switches[Mes_Disabled]
  1108.       @message_window.dispose if @message_window != nil
  1109.       @message_window = @rb_mes_disabled ? Window_Message.new : Window_Message_RB.new
  1110.     end
  1111.     rb_update_20160408
  1112.   end
  1113. end

  1114. class Scene_Battle
  1115.   include RB::Mes_Config
  1116.   alias rb_update_20160408 update
  1117.   def update
  1118.     if @rb_mes_disabled != $game_switches[Mes_Disabled]
  1119.       @rb_mes_disabled = $game_switches[Mes_Disabled]
  1120.       @message_window.dispose if @message_window != nil
  1121.       @message_window = @rb_mes_disabled ? Window_Message.new : Window_Message_RB.new
  1122.     end
  1123.     rb_update_20160408
  1124.   end
  1125. end


  1126. #==============================================================================
  1127. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  1128. #==============================================================================
复制代码
梦石
0
星屑
9557
在线时间
5074 小时
注册时间
2013-6-21
回帖
3459

开拓者贵宾剧作品鉴家

发表于 2020-3-27 20:26:51 | 显示全部楼层
在不加 \p 选项的情况下,对话框默认宽度是 640 * 0.6 = 384,如果觉得窄可以改这个值。

在脚本 465 行。
回复

使用道具 举报

梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
回帖
24
 楼主| 发表于 2020-3-21 20:36:56 | 显示全部楼层
我试过修改221行“super(80, 304, 680, 160)”中的680,但是没有用。
回复

使用道具 举报

梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
回帖
24
 楼主| 发表于 2020-3-21 22:55:12 | 显示全部楼层
本帖最后由 波与粒的境界 于 2020-3-22 00:38 编辑

如果打开203号开关的确可以恢复默认对话框,但怎么在加强对话框中修改宽度呢?
回复

使用道具 举报

梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
回帖
24
 楼主| 发表于 2020-3-23 00:50:59 | 显示全部楼层
本帖最后由 波与粒的境界 于 2020-3-23 11:16 编辑

可能我没有说明白,现在的文字显示效果是这样,但是我想让这个文字框更宽一点。
…………
谢谢版主,但是试了下还是没法发图,显示“server(io)error”,网上查了下可能是xp系统的原因(然而可以上传头像,很奇怪),不过问题已经差不多用3f这样一个绕弯的方法解决了。

评分

参与人数 1星屑 +300 收起 理由
guoxiaomi + 300 现在应该可以发图了

查看全部评分

回复

使用道具 举报

梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
回帖
24
 楼主| 发表于 2020-3-28 17:16:05 | 显示全部楼层
RyanBern 发表于 2020-3-27 20:26
在不加 \p 选项的情况下,对话框默认宽度是 640 * 0.6 = 384,如果觉得窄可以改这个值。

在脚本 465 行。 ...

谢谢解答,该问题确认解决。
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部