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

Project1

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

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

[复制链接]

Lv2.观梦者

梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
帖子
26
跳转到指定楼层
1
发表于 2020-3-21 20:34:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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

RUBY 代码复制
  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. #——说明
  21.  
  22. # 使用时,要在Graphics文件夹下新建一个名为Faces的文件夹,用于存储头像
  23. # 对话框的窗口素材可不必和系统窗口相同,请将对话框窗口素材放到
  24. # Graphics/Windowskins文件夹下,并附上两个气泡箭头素材,用于指向说话者,
  25. # 命名规则为“对话框窗口素材名-top”和“对话框窗口素材名-under”
  26. # 然后在本脚本的设置区域修改。
  27.  
  28. # 默认为一个字一个字的方式,如果需要一次全部显示,
  29. # 请打开特定开关(默认为 21 号)
  30.  
  31. # 打开开关(默认为 22 号)后,对话时按下[空格键]可以瞬间显示全部对话。
  32.  
  33. # 打卡开关(默认为 23 号)后,屏蔽加强对话框,将使用 XP 默认对话框。
  34.  
  35. # 打开开关(默认为 24 号)后,对话框可以在对话显示完毕后自动消失,适合制作
  36. # 场景 CG,需要进行选择或数字输入的情况不会自动消失。此外在文本框中使用\t[数字]
  37. # 也可达到相似效果,不过作用范围仅限本次对话框。
  38.  
  39. # 打开开关(默认为 25 号)后,按下 CTRL 键可以快速跳过对话,需要进行选择或者数字
  40. # 输入的情况不会跳过。
  41.  
  42. # 打开开关(默认为 26 号)后,对话框的位置会自动调节,使其不会遮挡说话者
  43. # 默认对话字没有声音,如果需要声音,
  44. # 请在游戏中使用脚本:$game_system.soundname_on_speak = "这里输入文件名"
  45. # 我唯一一个见过“胡乱配音”的游戏是天使帝国2代,该游戏说话的时候每个字符随机发一个外星语音
  46.  
  47. # 其他在对话中可以使用的功能:
  48.  
  49. # \n[1]:显示1号角色的姓名
  50.  
  51. # \name[李逍遥]:显示一个“李逍遥”方框,表示说话人姓名
  52. # \nc[0-7]:更改姓名框颜色
  53.  
  54. # 非战斗时,\p功能可以自动调整对话框位置
  55. # \p[1] :对话框出现在1号事件的上方
  56. # \p[0] :主人公上方出现对话框
  57. # \p[-1]:对话框出现在屏幕下方,这种特殊类型的对话框在有大型半身像时使用
  58. #——————————————————使用\p功能后可以自动调整对话框大小
  59. # 使用\p功能后,使用事件指令[更改文章选项]可更改对话框的位置
  60. #   [上] :对话框出现在说话者上方
  61. #   [下] :对话框出现在说话者下方
  62. #   [中] :对话框出现在屏幕正中
  63. # 战斗时,\p功能有所变化
  64. # \p[1]:对话框出现在ID为1的角色战斗图附近(这个角色必须是队伍中的成员)
  65. # \p[1001]:对话框出现在Index为1的敌人战斗图附近--也就是说敌人的位置从
  66. #           1001开始算起,1002则是代表Index为2的敌人。
  67. # 战斗时使用\p指令+[更改文章选项]依然是有效的,但是如果不使用\p指令,那么
  68. # 对话框则会一直出现在屏幕正上方。
  69.  
  70. # \\:显示"\"这个符号
  71.  
  72. # \v[1] :显示变量1
  73.  
  74. # \v[a1] :显示防具1
  75.  
  76. # \v[w1] :显示武器1
  77.  
  78. # \v[i1] :显示物品1
  79.  
  80. # \v[s1] :显示特技1
  81.  
  82. # \ic[001-Weapon01] : 显示图标"001-Weapon01.png"
  83.  
  84. # \c[0-7]:更改颜色
  85.  
  86. # \g:显示金钱窗口
  87.  
  88. # \a[SE文件名]:对话的时候播放SE
  89.  
  90. # \s[1-19]:更改弹字的速度
  91.  
  92. # \.   :停顿一刹那(1、2帧)
  93. # \|   :停顿片刻(20帧)
  94.  
  95. # \>   :文字不用打字方式
  96. # \<   :文字使用打字方式
  97.  
  98. # \!   :等待玩家按回车再继续
  99. # \~   :文字直接消失
  100.  
  101. # \I   :下一行从这个位置开始
  102.  
  103. # \o[123]:文字透明度改为123,模拟将死之人(汗)
  104.  
  105. # \h[12]:改用12号字
  106.  
  107. # \b[50]:空50象素
  108.  
  109. # \t[20]:对话显示完毕后等待 20 帧自动消失
  110.  
  111. # \L[001]:在左边显示半身像"Graphics/Faces/001.png",并左右镜像反转
  112. # \R[001]:在右边显示半身像"Graphics/Faces/001.png"
  113. # \f[001]:在左边显示正方形头像"Graphics/Faces/001.png"
  114. # 注:不推荐同时使用显示半身像的功能和显示头像的功能。显示的头像图片大小
  115. #     不得超过 120x120,如果图片超过这个大小,图片将会被放缩
  116. # \gf[001, 0]:在左边显示正方形头像组"Graphics/Faces/001.png"的第一个
  117. # 注:头像组排序方式默认如下(先数第一行,再数第二行,可调节每行的头像个数)
  118. #  -----------------
  119. #  | 0 | 1 | 2 | 3 |
  120. #  -----------------
  121. #  | 4 | 5 | 6 | 7 |
  122. #  -----------------
  123.  
  124. # \+:必须放在每一行的末尾,表示连行,它将合并下一个【显示文章】指令(需要
  125. #     在下面的设置区域调节 Max_Lines 以保证文字能正常显示出来)
  126.  
  127. #==============================================================================
  128. # 设置区域(其他参数的调节请看这里)
  129. #==============================================================================
  130. module RB
  131. end
  132. module RB::Mes_Config
  133.   # 打开 XX 号开关后,关闭打字效果
  134.   No_Typing = 201
  135.   # 打开 XX 号开关后,按下[空格键]可以瞬间显示全部文字
  136.   Write_Skip = 202
  137.   # 打开 XX 号开关后,屏蔽加强对话框(使用默认对话框)
  138.   Mes_Disabled = 203
  139.   # 主角名字字符缩写
  140.   Regex_Player_Name = /pn(\d+)/
  141.   # 主角姓名框底色(RGBA)
  142.   Name_Bar_Color = Color.new(120, 180, 250, 80)
  143.   # 字体大小
  144.   Size = 20
  145.   # 对话框窗口皮肤(不写为和系统皮肤相同)
  146.   Mes_Windowskin = "01"
  147.   # 最大行数(初值为 4,尽量不要修改,如果考虑合并选择项和连行,可以设置为 6 以上)
  148.   # 此最大行数仅在 \p 指令下有效,如果不使用 \p 指令那么对话框还是 4 行的高度
  149.   Max_Lines = 8
  150.   # 画面宽度和高度(width / height)
  151.   # 此设置一般不需要更改,当使用分辨率扩张脚本时,将如下的值改成你游戏的分辨率即可。
  152.   Graphics_Width = 640
  153.   Graphics_Height = 480
  154.   # 打开 XX 号开关后,对话自动结束(不用按下 C 键)
  155.   Auto_Terminate = 204
  156.   # 打开 XX 号开关后,按下 CTRL 可以高速跳过对话
  157.   Text_Skip_Fast = 205
  158.   # 打开 XX 号开关后,自动调节对话框使其不会挡住说话者
  159.   Auto_Adjust_Mes_Pos = 206
  160.   # 对话自动结束延迟(单位:帧)
  161.   Auto_Terminate_Frame = 10
  162.   # 头像组:横向单元数
  163.   Face_Group_W = 4
  164.   # 头像组:纵向单元数
  165.   Face_Group_H = 2  
  166.   # 默认姓名文字颜色(和系统默认编号一致)
  167.   Name_Color_Default = 6
  168.   # 快捷指令,定义后,可以直接在文本框中输入快捷指令
  169.   # 定义方式为 快捷指令 => 完整指令 ,使用方式为 \sc[快捷指令]
  170.   # 注意,指令中通常包含反斜线'\',因此需要使用单引号的字符串,
  171.   # 或者用"\\"进行转义。下面是一个例子:
  172.   # 这样定义后,输入\sc[pn1]就等效为 \name[pn1]\r[L1]\p[-1]
  173.   Shortcuts = {
  174.     #'pn1' => '\name[pn1]\r[L1]\p[-1]'
  175.   }
  176.   # 高级快捷指令定义,类似于宏展开,需要借助正则表达式(高级用户使用)
  177.   Shortcuts_Regexp = {
  178.     /\\pn1/ => '\name[pn1]\r[L1]\p[-1]',
  179.     /\\[Rr]ed\[(.*?)\]/m => '\c[2]\1\c[0]',
  180.     /\\[Cc]ol\[(\d+)\]\{(.*?)\}/m => '\c[\1]\2\c[0]',
  181.   }
  182. end
  183. #==============================================================================
  184. # RPG::Cache
  185. #------------------------------------------------------------------------------
  186. # RPG::Cache 追加定义
  187. #==============================================================================
  188. module RPG::Cache
  189.   def self.face(filename)
  190.     self.load_bitmap("Graphics/Faces/", filename)
  191.   end
  192. end
  193.  
  194. #==============================================================================
  195. # ■ Game_System
  196. #------------------------------------------------------------------------------
  197. #  处理系统附属数据的类。也可执行诸如 BGM 管理之类的功能。本类的实例请参考
  198. # $game_system 。
  199. #==============================================================================
  200.  
  201. class Game_System
  202.   attr_accessor :soundname_on_speak
  203.   alias carol3_ini initialize
  204.   def initialize
  205.     carol3_ini
  206.     @soundname_on_speak = nil
  207.   end
  208. end
  209.  
  210. #==============================================================================
  211. # ■ Window_Message
  212. #------------------------------------------------------------------------------
  213. #   修改的对话框类。
  214. #==============================================================================
  215. class Window_Message_RB < Window_Selectable
  216.   include RB::Mes_Config
  217.   #--------------------------------------------------------------------------
  218.   # ● 初始化状态
  219.   #--------------------------------------------------------------------------
  220.   def initialize
  221.     super(80, 304, 680, 160)
  222.     self.contents = Bitmap.new(1, 1)
  223.     self.visible = false
  224.     self.z = 9998
  225.     @fade_in = false
  226.     @fade_out = false
  227.     @contents_showing = false
  228.     @write_skip = false
  229.     @text_skip = false
  230.     @cursor_width = 0
  231.     @face_h = 0
  232.     @waitplease=0
  233.     self.active = false
  234.     self.index = -1
  235.     if $game_system.soundname_on_speak == nil then
  236.       $game_system.soundname_on_speak = ""
  237.     end
  238.     self.windowskin = RPG::Cache.windowskin(Mes_Windowskin) if Mes_Windowskin != ""
  239.     @opacity_text_buf = Bitmap.new(32, 32)
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # ● 释放
  243.   #--------------------------------------------------------------------------
  244.   def dispose
  245.     terminate_message
  246.     $game_temp.message_window_showing = false
  247.     if @input_number_window != nil
  248.       @input_number_window.dispose
  249.     end
  250.     super
  251.   end
  252.   #--------------------------------------------------------------------------
  253.   # ● 处理信息结束
  254.   #--------------------------------------------------------------------------
  255.   def terminate_message
  256.     self.active = false
  257.     self.pause = false
  258.     self.index = -1
  259.     self.contents.clear
  260.     # 清除显示中标志
  261.     @contents_showing = false
  262.     # 呼叫信息调用
  263.     if $game_temp.message_proc != nil
  264.       $game_temp.message_proc.call
  265.     end
  266.     # 清除文章、选择项、输入数值的相关变量
  267.     $game_temp.message_text = nil
  268.     $game_temp.message_proc = nil
  269.     $game_temp.choice_start = 99
  270.     $game_temp.choice_max = 0
  271.     $game_temp.choice_cancel_type = 0
  272.     $game_temp.choice_proc = nil
  273.     $game_temp.num_input_start = 99
  274.     $game_temp.num_input_variable_id = 0
  275.     $game_temp.num_input_digits_max = 0
  276.     # 清除头像(由于是 RPG::Cache 所以无需释放)
  277.     @face_bitmap = nil
  278.     @face_group_bitmap = nil
  279.     @face_ok = false
  280.     # 清除跳过标志
  281.     @write_skip = false
  282.     @text_skip = false
  283.     # 释放金钱窗口
  284.     if @gold_window != nil
  285.       @gold_window.dispose
  286.       @gold_window = nil
  287.     end
  288.     # 释放姓名窗口
  289.     if @name_window_text != nil
  290.       @name_window_text.dispose
  291.       @name_window_text = nil
  292.     end
  293.     # 释放右侧立绘
  294.     if @right_picture != nil
  295.       @right_picture.dispose
  296.       @right_picture = nil
  297.     end   
  298.     # 释放左侧立绘
  299.     if @left_picture != nil
  300.       @left_picture.dispose
  301.       @left_picture = nil
  302.     end
  303.     # 释放姓名蓝条
  304.     if @bar != nil
  305.       @bar.bitmap.dispose
  306.       @bar.dispose
  307.       @bar = nil
  308.     end
  309.     # 释放气泡图标
  310.     if @k_tale != nil
  311.       @k_tale.dispose
  312.       @k_tale = nil
  313.     end
  314.   end
  315.   #--------------------------------------------------------------------------
  316.   # ● 刷新
  317.   #--------------------------------------------------------------------------
  318.   def refresh
  319.     # 初期化
  320.     @x = @y = @max_x = @max_y = @indent = @lines = 0
  321.     @face_indent = 0
  322.     @opacity = 255
  323.     @cursor_width = 0
  324.     @write_speed = 1
  325.     @write_wait = 0
  326.     @mid_stop = false
  327.     @popchar = -2
  328.     @auto_terminate = -1
  329.     if $game_temp.choice_start == 0
  330.       @x = 8
  331.     end
  332.     if $game_temp.message_text != nil
  333.       @now_text = $game_temp.message_text
  334.       # Shortcuts 预处理
  335.       @now_text.gsub!(/\\sc\[(.*?)\]/) { Shortcuts[$1] || "" }
  336.       # Shortcuts_Regexp 预处理
  337.       Shortcuts_Regexp.each_pair do |regex, str|
  338.         @now_text.gsub!(regex, str)
  339.       end
  340.       # 头像设置
  341.       if (/\\[Ff]\[(.+?)\]/.match(@now_text)) != nil
  342.         @face_bitmap = RPG::Cache.face($1)
  343.         @x = @face_indent = [128, @face_bitmap.width + 4].min
  344.         @now_text.gsub!(/\\[Ff]\[(.+?)\]/) { "" }
  345.       end
  346.       # 头像组设置
  347.       if (/\\[Gg]f\[(.+?)\s*,\s*(\d+)\]/).match(@now_text) != nil
  348.         @face_group_bitmap = RPG::Cache.face($1)
  349.         idx = $2.to_i
  350.         ix, iy = idx % Face_Group_W, idx / Face_Group_W
  351.         w, h = @face_group_bitmap.width / Face_Group_W, @face_group_bitmap.height / Face_Group_H
  352.         @face_bitmap = Bitmap.new(w, h)
  353.         @face_bitmap.blt(0, 0, @face_group_bitmap, Rect.new(ix * w, iy * h, w, h))
  354.         @x = @face_indent = [128, @face_bitmap.width + 4].min
  355.         @now_text.gsub!(/\\[Gg]f\[(.+?)\s*,\s*(\d+)\]/) { "" }
  356.       end
  357.       #——左半身像设置
  358.       if (/\\[Ll]\[(.+?)\]/.match(@now_text)) != nil then
  359.         @face = $1
  360.         if @left_picture != nil
  361.           @left_picture.dispose
  362.         end
  363.         @left_picture = Sprite.new
  364.         @left_picture.bitmap = RPG::Cache.face(@face)
  365.         @left_picture.mirror = true
  366.         @x = @face_indent = @left_picture.bitmap.width
  367.         @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  368.       end
  369.       #——右半身像设置
  370.       if (/\\[Rr]\[(.+?)\]/.match(@now_text)) != nil then
  371.         @face = $1
  372.         if @right_picture != nil
  373.           @right_picture.dispose
  374.         end
  375.         @right_picture = Sprite.new
  376.         @right_picture.bitmap = RPG::Cache.face(@face)
  377.         @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  378.       end
  379.       # 显示人物姓名
  380.       name_window_set = false
  381.       if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
  382.         name_window_set = true
  383.         name_text = $1
  384.         if Regex_Player_Name =~ name_text
  385.           name_text = $game_actors[$1.to_i].name
  386.         end
  387.         @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
  388.       end
  389.       # 人物姓名颜色
  390.       name_color = text_color(Name_Color_Default)
  391.       if (/\\[Nn]c\[(\d+)\]/.match(@now_text)) != nil
  392.         name_color = text_color($1.to_i)
  393.         @now_text.sub!(/\\[Nn]c\[(\d+)\]/) { "" }
  394.       end
  395.       # 文字位置的判定
  396.       if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text)) != nil then
  397.         @popchar = $1.to_i
  398.         @now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
  399.       end
  400.       # 自动结束判定
  401.       @auto_terminate = Auto_Terminate_Frame if $game_switches[Auto_Terminate]
  402.       if (/\\[Tt]\[(\d+)\]/).match(@now_text)
  403.         @auto_terminate = $1.to_i
  404.         @now_text.gsub!(/\\[Tt]\[(\d+)\]/) { "" }
  405.       end
  406.       # 开始替换文字(\v)
  407.       begin
  408.         last_text = @now_text.clone
  409.         @now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  410.       end until @now_text == last_text
  411.       # 替换控制码
  412.       @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  413.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  414.       end
  415.       @now_text.gsub!(/\\\\/) { "\000" }
  416.       @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  417.       @now_text.gsub!(/\\[Gg]/) { "\002" }
  418.       @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  419.       @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  420.       @now_text.gsub!(/\\[.]/) { "\005" }
  421.       @now_text.gsub!(/\\[|]/) { "\006" }
  422.       @now_text.gsub!(/\\[Ii]c\[(.*?)\]/) { "\030[#{$1}] "}
  423.       @now_text.gsub!(/\\[>]/) { "\016" }
  424.       @now_text.gsub!(/\\[<]/) { "\017" }
  425.       @now_text.gsub!(/\\[!]/) { "\020" }
  426.       @now_text.gsub!(/\\[~]/) { "\021" }
  427.       @now_text.gsub!(/\\[Ii]/) { "\023" }
  428.       @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  429.       @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  430.       @now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
  431.       # 根据 \p 的不同设置对话框大小
  432.       if @popchar >= 0 # \p 的情况下自动调节
  433.         @text_save = @now_text.clone
  434.         process_real_text
  435.         @max_x = name_window_set ? contents.text_size(name_text).width : 0
  436.         @max_y = Max_Lines
  437.         for i in 0...Max_Lines
  438.           line = @text_save.split(/\n/)[Max_Lines-i-1]
  439.           @max_y -= 1 if line == nil && @max_y <= Max_Lines - i
  440.           next if line == nil
  441.           contents.font.size = Size
  442.           cx = contents.text_size(line).width
  443.           @max_x = cx if cx > @max_x
  444.         end
  445.         if @right_picture != nil && !@right_picture.disposed?
  446.           self.width = @max_x + 48 + @face_indent + @right_picture.bitmap.width
  447.         else
  448.           self.width = @max_x + 48 + @face_indent
  449.         end
  450.         @face_h = @face_bitmap == nil ? 0 : [120, @face_bitmap.height].min
  451.         if $game_temp.num_input_variable_id > 0
  452.           self.height = [(@max_y - 1) * line_height + 96, @face_h + 32].max
  453.         else
  454.           self.height = [(@max_y - 1) * line_height + 64, @face_h + 32].max
  455.         end
  456.         # 生成气泡图标
  457.         @k_tale = Sprite.new
  458.       elsif @popchar == -1
  459.         line_count = @now_text.split(/\n/).size
  460.         line_count = [Max_Lines , [line_count, 4].max].min
  461.         self.width = Graphics_Width
  462.         self.height = [64 + line_height * (line_count - 1), @face_h + 32].max
  463.         @max_x = self.width - 32 - @face_indent
  464.       else
  465.         self.width = Graphics_Width * 0.6
  466.         self.height = 64 + line_height * 3
  467.         @max_x = self.width - 32 - @face_indent
  468.       end
  469.       # 如果设置了姓名框
  470.       if name_window_set
  471.         off_x = 0
  472.         off_y = -40
  473.         space = 2
  474.         x = self.x + off_x - space / 2
  475.         y = self.y + off_y - space / 2
  476.         w = self.contents.text_size(name_text).width + 26 + space
  477.         h = 40 + space
  478.         x = self.x + off_x + 4
  479.         y = self.y + off_y
  480.         @name_window_text = Air_Text.new(self.x + @face_indent+4+8, self.y+16, name_text, name_color)
  481.         @name_window_text.z = self.z + 2
  482.         @bar = Sprite.new
  483.         @bar.bitmap = Bitmap.new(self.width, 24)
  484.         face_cut = @face_bitmap == nil ? 0 : @face_indent + 2
  485.         @bar.x = self.x + 8 + face_cut
  486.         @bar.y = self.y + 16
  487.         @bar.z = self.z + 2
  488.         @bar.bitmap.fill_rect(0,0,self.width-16-face_cut,24, Name_Bar_Color)
  489.       end
  490.       # 一切设置完毕后,创建 contents
  491.       if self.contents != nil
  492.         self.contents.dispose
  493.         self.contents = nil
  494.       end
  495.       self.contents = Bitmap.new(width - 32, height - 32)
  496.       self.contents.font.color = normal_color
  497.       self.contents.font.size = Size
  498.     end
  499.     # 如果选择项被设置
  500.     if $game_temp.choice_max > 0
  501.       @item_max = $game_temp.choice_max
  502.       self.active = true
  503.       self.index = 0
  504.     end
  505.     # 如果数值输入被设置
  506.     if $game_temp.num_input_variable_id > 0
  507.       digits_max = $game_temp.num_input_digits_max
  508.       number = $game_variables[$game_temp.num_input_variable_id]
  509.       @input_number_window = Window_InputNumber.new(digits_max)
  510.       @input_number_window.number = number
  511.     end
  512.     # 更新窗口位置
  513.     update_window_pos
  514.   end
  515.   #--------------------------------------------------------------------------
  516.   # ● 更新
  517.   #--------------------------------------------------------------------------
  518.   def update
  519.     @waitplease-=1 if @waitplease>0
  520.     super
  521.     # 使用默认窗口外观的情况下,如果窗口的外关被变更了、再设置
  522.     if $game_system.windowskin_name != @windowskin_name && Mes_Windowskin == ""
  523.       @windowskin_name = $game_system.windowskin_name
  524.       self.windowskin = RPG::Cache.windowskin(@windowskin_name)
  525.     end
  526.     # 地图中实时更新位置
  527.     if @k_tale != nil && @k_tale.visible && !$game_temp.in_battle
  528.       update_window_pos
  529.     end
  530.     # [空格键]跳过描绘
  531.     if $game_switches[Write_Skip] && Input.trigger?(Input::C)
  532.       @write_skip = true
  533.     end
  534.     # CTRL 高速跳过对话
  535.     if $game_switches[Text_Skip_Fast] && Input.press?(Input::CTRL) #trigger?(Input::CTRL)
  536.       # 选择项或数字输入时无法高速跳过
  537.       if @waitplease==0
  538.         @waitplease=3
  539.       if $game_temp.choice_max > 0 || @input_number_window != nil
  540.         @write_skip = true
  541.       else
  542.         @text_skip = true
  543.       end
  544.       else
  545.         @write_skip = true
  546.      end
  547.     end
  548.     # 描绘头像
  549.     if @face_bitmap != nil && !@face_ok
  550.       face_real_w = [120, @face_bitmap.width].min
  551.       face_real_h = [120, @face_bitmap.height].min
  552.       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))
  553.       @face_ok = true
  554.     end
  555.     # 淡入中的情况下
  556.     if @fade_in
  557.       self.contents_opacity += 24
  558.       if @input_number_window != nil
  559.         @input_number_window.contents_opacity += 24
  560.       end
  561.       if self.contents_opacity == 255
  562.         @fade_in = false
  563.       end
  564.       return
  565.     end
  566.     @now_text = nil if @now_text == ""
  567.     # 逐个描绘文字
  568.     if @now_text != nil && @mid_stop == false && !@text_skip
  569.       if @write_wait > 0
  570.         @write_wait -= 1
  571.         return
  572.       end
  573.       while true
  574.         @max_x = @x if @max_x < @x
  575.         @max_y = @y if @max_y < @y
  576.         # 处理字符
  577.         if (c = @now_text.slice!(/./m)) != nil
  578.           # \\的情况下
  579.           if c == "\000"
  580.             c = "\\"
  581.           end
  582.           # \c的情况下
  583.           if c == "\001"
  584.             @now_text.sub!(/\[([0-9]+)\]/, "")
  585.             color = $1.to_i
  586.             if color >= 0 and color <= 7
  587.               self.contents.font.color = text_color(color)
  588.             end
  589.             c = ""
  590.           end
  591.           # \g的情况下
  592.           if c == "\002"
  593.             if @gold_window == nil && @popchar <= 0
  594.               @gold_window = Window_Gold.new
  595.               @gold_window.x = 560 - @gold_window.width
  596.               if $game_temp.in_battle
  597.                 @gold_window.y = 192
  598.               else
  599.                 @gold_window.y = self.y >= 128 ? 32 : 384
  600.               end
  601.               @gold_window.opacity = self.opacity
  602.               @gold_window.back_opacity = self.back_opacity
  603.             end
  604.             c = ""
  605.           end
  606.           # \s的情况下
  607.           if c == "\003"
  608.             @now_text.sub!(/\[([0-9]+)\]/, "")
  609.             speed = $1.to_i
  610.             if speed >= 0 and speed <= 19
  611.               @write_speed = speed
  612.             end
  613.             c = ""
  614.           end
  615.           # \a的情况下
  616.           if c == "\004"
  617.             @now_text.sub!(/\[(.*?)\]/, "")
  618.             se_filename = "Audio/SE/#{$1}"
  619.             if FileTest.exist?(se_filename)
  620.               Audio.se_play(se_filename)
  621.             end
  622.             c = ""
  623.           end
  624.           # \.的情况下
  625.           if c == "\005"
  626.             @write_wait += 5
  627.             c = ""
  628.           end
  629.           # \|的情况下
  630.           if c == "\006"
  631.             @write_wait += 20
  632.             c = ""
  633.           end
  634.           # \>的情况下
  635.           if c == "\016"
  636.             text_not_skip = false
  637.             c = ""
  638.           end
  639.           # \<的情况下
  640.           if c == "\017"
  641.             text_not_skip = true
  642.             c = ""
  643.           end
  644.           # \!的情况下
  645.           if c == "\020"
  646.             @mid_stop = true
  647.             c = ""
  648.           end
  649.           # \~的情况下
  650.           if c == "\021"
  651.             terminate_message
  652.             return
  653.           end
  654.           # \i的情况下
  655.           if c == "\023"
  656.             @indent = @x
  657.             c = ""
  658.           end
  659.           # \o的情况下
  660.           if c == "\024"
  661.             @now_text.sub!(/\[([0-9]+)\]/, "")
  662.             @opacity = $1.to_i
  663.             c = ""
  664.           end
  665.           # \h的情况下
  666.           if c == "\025"
  667.             @now_text.sub!(/\[([0-9]+)\]/, "")
  668.             self.contents.font.size = [[$1.to_i, 6].max, 72].min
  669.             c = ""
  670.           end
  671.           # \b的情况下
  672.           if c == "\026"
  673.             @now_text.sub!(/\[([0-9]+)\]/, "")
  674.             @x += $1.to_i
  675.             c = ""
  676.           end
  677.           # 图标的情况
  678.           if c == "\030"
  679.             @now_text.sub!(/\[(.*?)\]/, "")
  680.             self.contents.blt(@x , @y * line_height + (line_height - 32) / 2, RPG::Cache.icon($1), Rect.new(0, 0, 32, 32))
  681.             if $game_system.soundname_on_speak != ""
  682.               Audio.se_play($game_system.soundname_on_speak)
  683.             end
  684.             @x += 32
  685.             c = ""
  686.           end
  687.           # 另起一行的情况下
  688.           if c == "\n"
  689.             if @lines >= $game_temp.choice_start
  690.               @cursor_width = [@cursor_width, @max_x - @face_indent].max
  691.             end
  692.             @lines += 1
  693.             @y += 1
  694.             @x = 0 + @indent + @face_indent
  695.             if @lines >= $game_temp.choice_start
  696.               @x = 8 + @indent + @face_indent
  697.             end
  698.             c = ""
  699.           end
  700.           if c != ""
  701.             # 文字描画
  702.             @x += opacity_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size) / 2, c, @opacity)
  703.             if $game_system.soundname_on_speak != "" then
  704.               Audio.se_play($game_system.soundname_on_speak)
  705.             end
  706.           end
  707.         else
  708.           break
  709.         end
  710.         if !$game_switches[No_Typing] && !@write_skip
  711.           break
  712.         end
  713.       end
  714.       @write_wait += @write_speed
  715.       return
  716.     end
  717.     # 数值输入的处理
  718.     if @input_number_window != nil
  719.       @input_number_window.update
  720.       # 确认
  721.       if Input.trigger?(Input::C)
  722.         $game_system.se_play($data_system.decision_se)
  723.         $game_variables[$game_temp.num_input_variable_id] =
  724.           @input_number_window.number
  725.         $game_map.need_refresh = true
  726.         @input_number_window.dispose
  727.         @input_number_window = nil
  728.         terminate_message
  729.       end
  730.       return
  731.     end
  732.     # 跳过对话
  733.     if @text_skip
  734.       @now_text = nil
  735.       terminate_message
  736.       return
  737.     end
  738.     # 文章显示中的情况下
  739.     if @contents_showing
  740.       if $game_temp.choice_max == 0
  741.         self.pause = true
  742.       end
  743.       # auto terminate
  744.       if $game_temp.choice_max == 0 && @auto_terminate > 0
  745.         @auto_terminate -= 1
  746.         if @auto_terminate == 0
  747.           terminate_message
  748.         end
  749.         return
  750.       end
  751.       # 取消
  752.       if Input.trigger?(Input::B)
  753.         if $game_temp.choice_max > 0 && $game_temp.choice_cancel_type > 0
  754.           $game_system.se_play($data_system.cancel_se)
  755.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  756.           terminate_message
  757.         end
  758.       end
  759.       # 确定
  760.       if Input.trigger?(Input::C)
  761.         if @mid_stop
  762.           @mid_stop = false
  763.           return
  764.         else
  765.           if $game_temp.choice_max > 0
  766.             $game_system.se_play($data_system.decision_se)
  767.             $game_temp.choice_proc.call(self.index)
  768.           end
  769.           terminate_message
  770.         end
  771.       end
  772.       return
  773.     end
  774.     if @fade_out == false and $game_temp.message_text != nil
  775.       @contents_showing = true
  776.       $game_temp.message_window_showing = true
  777.       refresh
  778.       Graphics.frame_reset
  779.       self.visible = true
  780.       self.contents_opacity = 0
  781.       if @input_number_window != nil
  782.         @input_number_window.contents_opacity = 0
  783.       end
  784.       @fade_in = true
  785.       return
  786.     end
  787.     if self.visible
  788.       @fade_out = true
  789.       self.opacity -= 48
  790.       if self.opacity == 0
  791.         self.visible = false
  792.         @fade_out = false
  793.         $game_temp.message_window_showing = false
  794.       end
  795.       return
  796.     end
  797.   end
  798.   #--------------------------------------------------------------------------
  799.   # ● 预览实际描绘内容(计算窗口宽用)
  800.   #--------------------------------------------------------------------------
  801.   #    实际对 @text_save 进行操作
  802.   #    此方法用于去除某些控制码引起窗口过长的影响
  803.   #--------------------------------------------------------------------------
  804.   def process_real_text
  805.     return if @text_save.nil?
  806.     regex = /[\001-\006\016\017\020\021\024](\[.*?\]){0,1}/
  807.     regex30 = /\030\[.*?\]/
  808.     @text_save.gsub!(regex, "")
  809.     @text_save.gsub!(regex30, "   ")
  810.   end
  811.   #--------------------------------------------------------------------------
  812.   # ● 获得角色(\p功能)
  813.   #--------------------------------------------------------------------------
  814.   def get_character(parameter)
  815.     case parameter
  816.     when 0
  817.       return $game_player
  818.     else
  819.       events = $game_map.events
  820.       return events == nil ? nil : events[parameter]
  821.     end
  822.   end
  823.   #--------------------------------------------------------------------------
  824.   # ● 获得战斗者(\p功能,此功能仅在战斗中有效)
  825.   #--------------------------------------------------------------------------
  826.   #    parameter : 1-999 表示主角 ID,1001-1008 表示索引为1-8的各个敌人
  827.   #--------------------------------------------------------------------------
  828.   def get_battler(parameter)
  829.     if parameter < 1000
  830.       return $game_actors[parameter]
  831.     else
  832.       return $game_troop.enemies[parameter - 1001]
  833.     end
  834.   end
  835.   #--------------------------------------------------------------------------
  836.   # ● 计算 y 偏移量(\p功能,这是考虑到不同战斗图/行走图的高度不同)
  837.   #--------------------------------------------------------------------------
  838.   #    character : 角色/战斗者
  839.   #--------------------------------------------------------------------------
  840.   def process_y_shift(character)
  841.     rate = character.is_a?(Game_Battler) ? 1 : 4
  842.     bmp = character.is_a?(Game_Battler) ?
  843.       RPG::Cache.battler(character.battler_name, character.battler_hue) :
  844.       RPG::Cache.character(character.character_name, character.character_hue)
  845.     return bmp.height / rate + 16
  846.   end
  847.   #--------------------------------------------------------------------------
  848.   # ● 更新窗口位置(所有组件)
  849.   #--------------------------------------------------------------------------
  850.   def update_window_pos
  851.     # 如果使用了 \p 设置位置
  852.     if @popchar >= 0
  853.       character = $game_temp.in_battle ? get_battler(@popchar) : get_character(@popchar)
  854.       final_pos = $game_system.message_position
  855.       if character != nil
  856.         x = [[character.screen_x - self.width / 2, 4].max, Graphics_Width - 4 - self.width].min
  857.         # adjust final_pos automatically when it is enabled
  858.         # ignore the case when pos == 1
  859.         if $game_switches[Auto_Adjust_Mes_Pos] && final_pos != 1
  860.           # try default mes_pos first
  861.           temp_y = final_pos == 2 ? [character.screen_y + 16, 4].max :
  862.             character.screen_y - process_y_shift(character) - self.height
  863.  
  864.           # set pos == 0 if temp_y exceeds the boundary of the screen
  865.           final_pos = 0 if temp_y > Graphics_Height - 4 - self.height && final_pos == 2
  866.           final_pos = 2 if temp_y < 4 && final_pos == 0
  867.         end
  868.         if final_pos == 2
  869.           y = [[character.screen_y + 16, 4].max, Graphics_Height - 4 - self.height].min
  870.         elsif final_pos == 0
  871.           y = [[character.screen_y - process_y_shift(character) - self.height, 4].max, Graphics_Height - 4 - self.height].min
  872.         else
  873.           x = (Graphics_Width - self.width) / 2
  874.           y = (Graphics_Height - self.height) / 2
  875.         end
  876.         self.x = x
  877.         self.y = y
  878.         # 设置气泡图标
  879.         if @k_tale != nil
  880.           @k_tale.x = character.is_a?(Game_Character) ?
  881.             ( character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16 :
  882.             character.screen_x
  883.           k_tale_filename = Mes_Windowskin == "" ? $game_system.windowskin_name : Mes_Windowskin
  884.           suffix = final_pos == 2 ? "-under" : "-top"
  885.           # reload @k_tale's bitmap
  886.           @k_tale.bitmap = RPG::Cache.windowskin(k_tale_filename + suffix)
  887.           if final_pos == 2
  888.             @k_tale.y = self.y - 16
  889.           elsif final_pos == 0
  890.             @k_tale.y = self.y + self.height - 16
  891.           else
  892.             @k_tale.visible = false
  893.           end
  894.           @k_tale.z = 9999
  895.         end
  896.       end
  897.     elsif @popchar == -1
  898.       self.x = 0
  899.       self.y = Graphics_Height - self.height
  900.     else # 无 \p 的情况下
  901.       self.x = (Graphics_Width - self.width) / 2
  902.       # 处于战斗中时
  903.       if $game_temp.in_battle
  904.         self.y = 16
  905.       else
  906.         # 显示文章位置的分支
  907.         case $game_system.message_position
  908.         when 0 # 上
  909.           self.y = 16
  910.         when 1 # 中
  911.           self.y = (Graphics_Height - self.height) / 2
  912.         when 2 # 下
  913.           self.y = (Graphics_Height - self.height - 16)
  914.         end
  915.       end
  916.     end # of @popchar >= 0
  917.     # 设置左侧立绘
  918.     if @left_picture != nil and !@left_picture.disposed?
  919.       @left_picture.x = self.x + 8
  920.       @left_picture.y = self.y - @left_picture.bitmap.height + self.height - 8
  921.       @left_picture.z = self.z + 4
  922.     end
  923.     # 设置右侧立绘
  924.     if @right_picture != nil and !@right_picture.disposed?
  925.       @right_picture.x = self.x + self.width - @right_picture.bitmap.width - 8
  926.       @right_picture.y = self.y - @right_picture.bitmap.height + self.height - 8
  927.       @right_picture.z = self.z + 4
  928.     end
  929.     # 设置姓名空气文字坐标
  930.     if @name_window_text != nil
  931.       @name_window_text.x = self.x + @face_indent - 4
  932.       @name_window_text.y = self.y
  933.     end
  934.     # 设置姓名蓝条坐标
  935.     if @bar != nil
  936.       face_cut = @face_bitmap == nil ? 0 : @face_indent + 2
  937.       @bar.x = self.x + 8 + face_cut
  938.       @bar.y = self.y + 16
  939.     end
  940.     # 设置数字处理
  941.     if @input_number_window != nil
  942.       @input_number_window.x = self.x + @face_indent
  943.       @input_number_window.y = self.y + 8 + $game_temp.num_input_start * line_height
  944.     end
  945.     # 设置不透明度
  946.     if $game_system.message_frame == 0
  947.       self.opacity = 255
  948.       self.back_opacity = 200
  949.     else
  950.       self.opacity = 0
  951.       self.back_opacity = 200
  952.     end
  953.   end
  954.   #--------------------------------------------------------------------------
  955.   # ● line_height
  956.   #--------------------------------------------------------------------------
  957.   # 返回值 : 行高
  958.   #--------------------------------------------------------------------------
  959.   def line_height
  960.     return [[Size * 15 / 10, 18].max, 32].min
  961.   end
  962.   #--------------------------------------------------------------------------
  963.   # ● 文字描画
  964.   #--------------------------------------------------------------------------
  965.   # target :描绘的目标 bitmap 对象
  966.   # x      :x 坐标
  967.   # y      :y 坐标
  968.   # str   :描绘的文字
  969.   # opacity:不透明度(0~255)
  970.   # 返回值 :文字宽度(@x 的增加值)。
  971.   #--------------------------------------------------------------------------
  972.   def opacity_draw_text(target, x, y, str,opacity)
  973.     height = target.font.size
  974.     width = target.text_size(str).width
  975.     opacity = [[opacity, 0].max, 255].min
  976.     if opacity == 255
  977.       target.draw_text(x, y, width, height, str)
  978.       return width
  979.     else
  980.       if @opacity_text_buf.width < width or @opacity_text_buf.height < height
  981.         @opacity_text_buf.dispose
  982.         @opacity_text_buf = Bitmap.new(width, height)
  983.       else
  984.         @opacity_text_buf.clear
  985.       end
  986.       @opacity_text_buf.font.size = target.font.size
  987.       @opacity_text_buf.draw_text(0, 0, width, height, str)
  988.       target.blt(x, y, @opacity_text_buf, Rect.new(0, 0, width, height), opacity)
  989.     return width
  990.     end
  991.   end
  992.   #--------------------------------------------------------------------------
  993.   # ● \V 变换
  994.   #--------------------------------------------------------------------------
  995.   # option : 选项,'i'物品,'w'武器,'a'防具,'s'技能
  996.   # index  : 数据库的索引
  997.   #--------------------------------------------------------------------------
  998.   def convart_value(option, index)
  999.     option == nil ? option = "" : nil
  1000.     option.downcase!
  1001.     case option
  1002.       when "i"
  1003.         unless $data_items[index].name == nil
  1004.           r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
  1005.         end
  1006.       when "w"
  1007.         unless $data_weapons[index].name == nil
  1008.           r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
  1009.         end
  1010.       when "a"
  1011.         unless $data_armors[index].name == nil
  1012.           r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
  1013.         end
  1014.       when "s"
  1015.         unless $data_skills[index].name == nil
  1016.           r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
  1017.         end
  1018.       else
  1019.       r = $game_variables[index]
  1020.     end
  1021.     r == nil ? r = "" : nil
  1022.     return r
  1023.   end
  1024.   #--------------------------------------------------------------------------
  1025.   # ● 释放
  1026.   #--------------------------------------------------------------------------
  1027.   def dispose
  1028.     terminate_message
  1029.     unless @opacity_text_buf.disposed?
  1030.       @opacity_text_buf.dispose
  1031.     end
  1032.     $game_temp.message_window_showing = false
  1033.     if @input_number_window != nil
  1034.       @input_number_window.dispose
  1035.     end
  1036.     super
  1037.   end
  1038.   #--------------------------------------------------------------------------
  1039.   # ● 刷新光标矩形
  1040.   #--------------------------------------------------------------------------
  1041.   def update_cursor_rect
  1042.     if @index >= 0
  1043.       n = $game_temp.choice_start + @index
  1044.       self.cursor_rect.set(4 + @indent + @face_indent, n * line_height, @cursor_width, line_height)
  1045.     else
  1046.       self.cursor_rect.empty
  1047.     end
  1048.   end
  1049. end
  1050. #==============================================================================
  1051. # ■ Air_Text
  1052. #------------------------------------------------------------------------------
  1053. #   空气文字,借助窗口显示文字,但是不显示窗口载体。
  1054. #==============================================================================
  1055. class Air_Text < Window_Base
  1056.   #--------------------------------------------------------------------------
  1057.   # ● 对象初始化
  1058.   #--------------------------------------------------------------------------
  1059.   def initialize(x, y, designate_text, color)
  1060.     super(x-16, y-16, 32 + designate_text.size * 12, 56)
  1061.     self.opacity = 0
  1062.     self.back_opacity = 0
  1063.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1064.     self.contents.font.size = 20
  1065.     self.contents.font.color = color
  1066.     w = self.contents.width
  1067.     h = self.contents.height
  1068.     self.contents.draw_text(0, 0, w, h, designate_text)
  1069.   end
  1070.   #--------------------------------------------------------------------------
  1071.   # ● 释放
  1072.   #--------------------------------------------------------------------------
  1073.   def dispose
  1074.     self.contents.clear
  1075.     super
  1076.   end
  1077. end
  1078.  
  1079. class Interpreter
  1080.   include RB::Mes_Config
  1081.   #--------------------------------------------------------------------------
  1082.   # ● 显示文章
  1083.   #--------------------------------------------------------------------------
  1084.   def command_101
  1085.     # 另外的文章已经设置过 message_text 的情况下
  1086.     if $game_temp.message_text != nil
  1087.       # 结束
  1088.       return false
  1089.     end
  1090.     # 设置信息结束后待机和返回调用标志
  1091.     @message_waiting = true
  1092.     $game_temp.message_proc = Proc.new { @message_waiting = false }
  1093.     # message_text 设置为 1 行
  1094.     # check whether \+ exists
  1095.     append = /\\\+$/ =~ @list[@index].parameters[0]
  1096.     line = @list[@index].parameters[0].sub(/\\\+$/, "")
  1097.     $game_temp.message_text = line + "\n"
  1098.     line_count = 1
  1099.     # 循环
  1100.     loop do
  1101.       # 下一个事件指令为文章两行以上的情况
  1102.       if @list[@index+1].code == 401 || @list[@index+1].code == 101 && append
  1103.         append = /\\\+$/ =~ @list[@index+1].parameters[0]
  1104.         line = @list[@index+1].parameters[0].sub(/\\\+$/, "")
  1105.         # message_text 添加到第 2 行以下
  1106.         $game_temp.message_text += line + "\n"
  1107.         line_count += 1
  1108.       # 事件指令不在文章两行以下的情况
  1109.       else
  1110.         # 下一个事件指令为显示选择项的情况下
  1111.         if @list[@index+1].code == 102
  1112.           # 如果选择项能收纳在画面里
  1113.           if @list[@index+1].parameters[0].size <= Max_Lines - line_count
  1114.             # 推进索引
  1115.             @index += 1
  1116.             # 设置选择项
  1117.             $game_temp.choice_start = line_count
  1118.             setup_choices(@list[@index].parameters)
  1119.           end
  1120.         # 下一个事件指令为处理输入数值的情况下
  1121.         elsif @list[@index+1].code == 103
  1122.           # 如果数值输入窗口能收纳在画面里
  1123.           if line_count < Max_Lines
  1124.             # 推进索引
  1125.             @index += 1
  1126.             # 设置输入数值
  1127.             $game_temp.num_input_start = line_count
  1128.             $game_temp.num_input_variable_id = @list[@index].parameters[0]
  1129.             $game_temp.num_input_digits_max = @list[@index].parameters[1]
  1130.           end
  1131.         end
  1132.         # 继续
  1133.         return true
  1134.       end
  1135.       # 推进索引
  1136.       @index += 1
  1137.     end
  1138.   end
  1139. end
  1140.  
  1141. class Scene_Map
  1142.   include RB::Mes_Config
  1143.   alias rb_update_20160408 update
  1144.   def update
  1145.     if @rb_mes_disabled != $game_switches[Mes_Disabled]
  1146.       @rb_mes_disabled = $game_switches[Mes_Disabled]
  1147.       @message_window.dispose if @message_window != nil
  1148.       @message_window = @rb_mes_disabled ? Window_Message.new : Window_Message_RB.new
  1149.     end
  1150.     rb_update_20160408
  1151.   end
  1152. end
  1153.  
  1154. class Scene_Battle
  1155.   include RB::Mes_Config
  1156.   alias rb_update_20160408 update
  1157.   def update
  1158.     if @rb_mes_disabled != $game_switches[Mes_Disabled]
  1159.       @rb_mes_disabled = $game_switches[Mes_Disabled]
  1160.       @message_window.dispose if @message_window != nil
  1161.       @message_window = @rb_mes_disabled ? Window_Message.new : Window_Message_RB.new
  1162.     end
  1163.     rb_update_20160408
  1164.   end
  1165. end
  1166.  
  1167.  
  1168. #==============================================================================
  1169. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  1170. #==============================================================================

Lv4.逐梦者 (版主)

梦石
0
星屑
9497
在线时间
5073 小时
注册时间
2013-6-21
帖子
3580

开拓者贵宾剧作品鉴家

来自 5楼
发表于 2020-3-27 20:26:51 | 只看该作者
在不加 \p 选项的情况下,对话框默认宽度是 640 * 0.6 = 384,如果觉得窄可以改这个值。

在脚本 465 行。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
帖子
26
2
 楼主| 发表于 2020-3-21 20:36:56 | 只看该作者
我试过修改221行“super(80, 304, 680, 160)”中的680,但是没有用。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
帖子
26
3
 楼主| 发表于 2020-3-21 22:55:12 | 只看该作者
本帖最后由 波与粒的境界 于 2020-3-22 00:38 编辑

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

使用道具 举报

Lv2.观梦者

梦石
0
星屑
606
在线时间
40 小时
注册时间
2020-1-21
帖子
26
4
 楼主| 发表于 2020-3-23 00:50:59 | 只看该作者
本帖最后由 波与粒的境界 于 2020-3-23 11:16 编辑

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

评分

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

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

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

在脚本 465 行。 ...

谢谢解答,该问题确认解决。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-26 19:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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