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

Project1

 找回密码
 注册会员
搜索
查看: 1558|回复: 11

[有事请教] vx关于脚本main下的字体显示问题

[复制链接]

Lv2.观梦者

梦石
0
星屑
800
在线时间
166 小时
注册时间
2019-6-11
帖子
52
发表于 2019-6-15 22:11:34 | 显示全部楼层 |阅读模式

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

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

x
vx关于脚本main下的字体显示问题。
图书馆说是,1.02版本以上,需要将一段脚本写入在begin的前面即可,脚本是Font.default_name = (["印品工版宋", "黑体"])
,第一个字体是网站下载后安装进电脑后,写上去的字体。测试游戏时,发现因脚本加入过vx对话框脚本,所以
npc名字只有显示印品工版宋,可是里面的内容字体还是原来的宋体。没有改过。
因为begin原为第7行,加入一段脚本后,则在第8行,加入脚本为第7行。
因为加入对话框脚本,所以这个脚本里的字体也换成了同样的印品工版宋。
所以测试游戏后,对话框内表示有npc名字的地方才一行是印品工版宋,可是下面的其余的字,都没有更改过字体。
怎么回事呢?
多问一下,关于vx是自加shift的加速键的,是不是表示这个速度是已经固定的速度呢。
我觉得用shift加速后,人物跑步的速度有一定慢度,可以在脚本上加快1,到3的速度吗?
  1. #==============================================================================
  2. # ** Main  需要字体begin前加入脚本Font.default_name = (["印品工版宋""印品宋"])
  3. #------------------------------------------------------------------------------
  4. #  定義完畢所有的類之後,真正的程式開始於此。
  5. #==============================================================================
  6. Font.default_name = ["simhei", "標楷體", "PMingLiU", "新細明體", "Verdana", "Arial Unicode MS"]
  7. Font.default_name = (["印品工版宋", "黑体"])
  8. begin
  9.   Graphics.freeze
  10.   $scene = Scene_Title.new
  11.   $scene.main while $scene != nil
  12.   Graphics.transition(20)
  13. rescue Errno::ENOENT
  14.   filename = $!.message.sub("沒有這樣的檔案或目錄——", "")
  15.   print("無法找到檔案:#{filename}。")
  16. end
复制代码

Lv4.逐梦者

梦石
0
星屑
19279
在线时间
3074 小时
注册时间
2013-1-11
帖子
1288
发表于 2019-6-15 22:30:38 | 显示全部楼层
shift 加速度可以修改Game_Character的308行 *= 2改大一点。
至于字体那个,去掉对话框脚本里面对字体的设置应该就可以了。

点评

上网聊天  发表于 2019-6-17 00:03
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
800
在线时间
166 小时
注册时间
2019-6-11
帖子
52
 楼主| 发表于 2019-6-16 00:38:56 | 显示全部楼层
张咚咚 发表于 2019-6-15 22:30
shift 加速度可以修改Game_Character的308行 *= 2改大一点。
至于字体那个,去掉对话框脚本里面对字体的设 ...

第一个问题可以了。
第二个问题,在对话框脚本里(这个是外挂脚本)
去除脚本里字体设置里的,仿宋,黑体这些字样吗?没有包括符号之类的。去除后,
进入游戏发现对框内没有字了。
还是用注释符号"#",注释掉47行
  1. FONT_ARRAY = ["黑体", "宋体", "仿宋"]
复制代码
呢。
进入游戏发现出现半身像对话框功能版683行错误的对话框:font_array(英文是大写)
半身像对话框脚本的683行脚本是
  1. return Font.new(FONT_ARRAY[MSG_FONT_NAME], MSG_FONT_SIZE)
复制代码

怎么解决
  1. #      要求所有半身像朝向一致(默认是正面偏右)
  2. #==============================================================================
  3. # ■ Window_Message
  4. #==============================================================================
  5. class Window_Message < Window_Selectable
  6.   #--------------------------------------------------------------------------
  7.   # ○ 参数设定
  8.   #--------------------------------------------------------------------------
  9.   # 预设字体组
  10.   FONT_ARRAY = ["", "", ""]
复制代码

点评

你可以把FONT_ARRAY里面改成"印品工版宋",去除其实不是只是把字体名称去掉,最好把脚本全发出来。  发表于 2019-6-16 08:48
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
800
在线时间
166 小时
注册时间
2019-6-11
帖子
52
 楼主| 发表于 2019-6-16 15:35:17 | 显示全部楼层
张咚咚
你可以把FONT_ARRAY里面改成"印品工版宋",去除其实不是只是把字体名称去掉,最好把脚本全发出来。  发表于 6 小时前
  1.   # 预设字体组,字体第一个原是黑体. "宋体", "仿宋_GB2312"
  2.   FONT_ARRAY = ["印品工版宋"]
复制代码
样的话,我是在半身像对话框功能版,的FONT_ARRAY去除其余字迹,只留下印品工版宋,
然后进入游戏测试,
发现除了设定为有名字的那一行,有字浮现出来,可是其余的字都没有了,就是那些字在对话框里完全不存在了。

脚本如下

  1. ==============================================================================
  2. # 半身像对话框功能版 v 1.01 by 沉影不器
  3. #------------------------------------------------------------------------------
  4. # 使用说明:
  5. #   ① 此脚本可代替默认 Window_Message 全脚本
  6. #
  7. #   ② 对话框第一行输入引号内文字"名称:",脚本会把名称提取出来美化显示
  8. #
  9. #   ③ 默认半身像在左边显示
  10. #      当您需要右边显示时,在第一行输入的名称之后加"@r"(大小写不限)
  11. #      例: "拉尔夫@r:"
  12. #          请注意此时半身像将进行左右翻转显示
  13. #
  14. #   ④ 在对话中更改字体的方法:
  15. #       \f[sX]:更改字号为X
  16. #       \f[nX]:更改字体名称为预设字体组第X号字体 (预设字体组请看参数设定)
  17. #       \f[cX]:更改字色为第X号颜色 (text_color中的定义)
  18. #
  19. #   ⑤ 在对话中显示(技能 物品 武器 防具)图标和名称的方法:
  20. #       \s[X]: 显示第X号技能图标和名称
  21. #       \i[X]: 显示第X号物品图标和名称
  22. #       \w[X]: 显示第X号武器图标和名称
  23. #       \a[X]: 显示第X号防具图标和名称
  24. #
  25. #   ⑥ 在对话中更改文字不透明度的方法:
  26. #       \o[X]: 把文字不透明度更改为X (取值范围在0~255)
  27. #
  28. #   ⑦ 指定时间后自动关闭对话框的方法:
  29. #       \x[X]: 对话框将在X帧后自动关闭
  30. #       \x:    省略参数时,将在AUTO_CLOSE帧后自动关闭 (AUTO_CLOSE在参数设定中)
  31. #
  32. #   ⑧ 由于半身像占据文字显示宽度,您在设定文章时每行字数将减少
  33. #
  34. #   ⑨ 参数设定在脚本第37~66行
  35. #
  36. # 素材要求:
  37. #   ① 按vx默认头像像素材(Graphics\Faces)的格式
  38. #      要求所有半身像朝向一致(默认是正面偏右)
  39. #==============================================================================
  40. # ■ Window_Message
  41. #==============================================================================
  42. class Window_Message < Window_Selectable
  43.   #--------------------------------------------------------------------------
  44.   # ○ 参数设定
  45.   #--------------------------------------------------------------------------
  46.   # 预设字体组,字体第一个原是黑体. "宋体", "仿宋_GB2312"
  47.   FONT_ARRAY = ["印品工版宋"]
  48.   
  49.   # 名称条参数
  50.   NAME_FONT_NAME = 0            # 名称文字字体在预设字体组中的序号
  51.   NAME_FONT_SIZE = 20           # 名称文字字号
  52.   NAME_FONT_COLOR = 16          # 名称文字颜色
  53.   NAME_X_ADJ = 6                # 名称条宽度缩进值
  54.   NAME_Y_ADJ = 6                # 名称与对话内容之间的附加距离
  55.   NAME_BAR_COLOR = 0            # 名称背景条颜色
  56.   NAME_BAR_OPACITY = 72         # 名称背景条透明度
  57.   AUTO_ADD = true               # 是否自动添加名称修饰符
  58.   SYMBOL = "【】"               # AUTO_ADD有效时为名称添加的修饰符(一对)
  59.   # 半身像参数
  60.   FACE_X_ADJ = 6                # 半身像横坐标微调
  61.   FACE_Y_ADJ = -6               # 半身像纵坐标微调
  62.   # 对话框参数
  63.   MSG_FONT_NAME = 1             # 对话文字字体在预设字体组中的序号
  64.   MSG_FONT_SIZE = 18            # 对话文字字号
  65.   MSG_FONT_COLOR = 0            # 对话文字颜色
  66.   # 自动关闭
  67.   AUTO_CLOSE = 80               # 默认自动关闭时间(以帧计时)
  68.   
  69.   #--------------------------------------------------------------------------
  70.   # ● 常量
  71.   #--------------------------------------------------------------------------
  72.   MAX_LINE = 4                            # 最大行数
  73.   #--------------------------------------------------------------------------
  74.   # ◎ 初始化对象
  75.   #--------------------------------------------------------------------------
  76.   def initialize
  77.     height = [NAME_FONT_SIZE, MSG_FONT_SIZE].max + 2 +
  78.              ( MSG_FONT_SIZE + 2) * 3 + NAME_Y_ADJ + 32
  79.     y = Graphics.height - height
  80.     super(0, y, Graphics.width, height)
  81.     self.z = 200
  82.     self.active = false
  83.     self.index = -1
  84.     self.openness = 0
  85.     @opening = false            # 窗口正在打开的标志
  86.     @closing = false            # 窗口正在关闭的标志
  87.     @text = nil                 # 已经没有可显示的文章
  88.     @contents_x = 0             # 下一条文字描绘的 X 坐标
  89.     @contents_y = 0             # 下一条文字描绘的 Y 坐标
  90.     @line_count = 0             # 现在描绘的行数
  91.     @wait_count = 0             # 等待计数
  92.     @background = 0             # 背景类型
  93.     @position = 2               # 显示位置
  94.     @show_fast = false          # 快速显示标志
  95.     @line_show_fast = false     # 以行为单位快速显示
  96.     @pause_skip = false         # 省略等待输入标志
  97.     create_gold_window
  98.     create_number_input_window
  99.     create_back_sprite
  100.     # 半身像左右判断
  101.     @show_right = false
  102.     # 半身像宽度
  103.     @face_width = 0
  104.     # 生成名称背景条
  105.     create_namebar_sprite
  106.     # 生成半身像
  107.     create_face_sprite
  108.     # 修改默认字体
  109.     contents.font = get_font(1)
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● 释放
  113.   #--------------------------------------------------------------------------
  114.   def dispose
  115.     super
  116.     dispose_gold_window
  117.     dispose_number_input_window
  118.     dispose_back_sprite
  119.   end
  120.   #--------------------------------------------------------------------------
  121.   # ◎ 更新画面
  122.   #--------------------------------------------------------------------------
  123.   def update
  124.     super
  125.     update_gold_window
  126.     update_number_input_window
  127.     update_back_sprite
  128.     update_show_fast
  129.     unless @opening or @closing             # 除窗口关闭以外
  130.       if @wait_count > 0                    # 文章内等待中
  131.         @wait_count -= 1
  132.       elsif self.pause                      # 等待文章翻页待机中
  133.         input_pause
  134.       elsif self.active                     # 正在输入选择项
  135.         input_choice
  136.       elsif @number_input_window.visible    # 正在输入数值
  137.         input_number
  138.       elsif @text != nil                    # 还有剩余的文章
  139.         update_message                        # 更新消息
  140.       elsif continue?                       # 继续的情况
  141.         start_message                         # 开始消息
  142.         open                                  # 打开窗口
  143.         $game_message.visible = true
  144.       else                                  # 不继续的情况
  145.         close                                 # 关闭窗口
  146.         $game_message.visible = @closing
  147.       end
  148.     end
  149.     # 自动关闭对话框
  150.     if @auto_close != nil
  151.       if @auto_close > 0
  152.         @auto_close -= 1
  153.       else
  154.         @auto_close = nil
  155.         terminate_message
  156.       end
  157.     end
  158.   end
  159.   #--------------------------------------------------------------------------
  160.   # ◎ 生成所持金窗口
  161.   #--------------------------------------------------------------------------
  162.   def create_gold_window
  163.     @gold_window = Window_Gold.new(384, 0)
  164.     @gold_window.openness = 0
  165.     # 统一字体
  166.     @gold_window.contents.font = get_font(1)
  167.   end
  168.   #--------------------------------------------------------------------------
  169.   # ◎ 生成数值输入窗口
  170.   #--------------------------------------------------------------------------
  171.   def create_number_input_window
  172.     @number_input_window = Window_NumberInput.new
  173.     @number_input_window.visible = false
  174.     # 统一字体
  175.     @number_input_window.contents.font = get_font(1)
  176.   end
  177.   #--------------------------------------------------------------------------
  178.   # ● 生成背景活动块
  179.   #--------------------------------------------------------------------------
  180.   def create_back_sprite
  181.     @back_sprite = Sprite.new
  182.     @back_sprite.bitmap = Cache.system("MessageBack")
  183.     @back_sprite.visible = (@background == 1)
  184.     @back_sprite.z = 190
  185.   end
  186.   #--------------------------------------------------------------------------
  187.   # ● 释放所持金窗口
  188.   #--------------------------------------------------------------------------
  189.   def dispose_gold_window
  190.     @gold_window.dispose
  191.   end
  192.   #--------------------------------------------------------------------------
  193.   # ● 释放数值输入窗口
  194.   #--------------------------------------------------------------------------
  195.   def dispose_number_input_window
  196.     @number_input_window.dispose
  197.   end
  198.   #--------------------------------------------------------------------------
  199.   # ● 释放背景活动块
  200.   #--------------------------------------------------------------------------
  201.   def dispose_back_sprite
  202.     @back_sprite.dispose
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # ● 更新所持金窗口
  206.   #--------------------------------------------------------------------------
  207.   def update_gold_window
  208.     @gold_window.update
  209.   end
  210.   #--------------------------------------------------------------------------
  211.   # ● 更新数值输入窗口
  212.   #--------------------------------------------------------------------------
  213.   def update_number_input_window
  214.     @number_input_window.update
  215.   end
  216.   #--------------------------------------------------------------------------
  217.   # ● 更新背景活动块
  218.   #--------------------------------------------------------------------------
  219.   def update_back_sprite
  220.     @back_sprite.visible = (@background == 1)
  221.     @back_sprite.y = y - 16
  222.     @back_sprite.opacity = openness
  223.     @back_sprite.update
  224.   end
  225.   #--------------------------------------------------------------------------
  226.   # ● 更新快速显示标志
  227.   #--------------------------------------------------------------------------
  228.   def update_show_fast
  229.     if self.pause or self.openness < 255
  230.       @show_fast = false
  231.     elsif Input.trigger?(Input::C) and @wait_count < 2
  232.       @show_fast = true
  233.     elsif not Input.press?(Input::C)
  234.       @show_fast = false
  235.     end
  236.     if @show_fast and @wait_count > 0
  237.       @wait_count -= 1
  238.     end
  239.   end
  240.   #--------------------------------------------------------------------------
  241.   # ● 判断下一消息继续显示
  242.   #--------------------------------------------------------------------------
  243.   def continue?
  244.     return true if $game_message.num_input_variable_id > 0
  245.     return false if $game_message.texts.empty?
  246.     if self.openness > 0 and not $game_temp.in_battle
  247.       return false if @background != $game_message.background
  248.       return false if @position != $game_message.position
  249.     end
  250.     return true
  251.   end
  252.   #--------------------------------------------------------------------------
  253.   # ◎ 开始显示消息
  254.   #--------------------------------------------------------------------------
  255.   def start_message
  256.     # 重设窗口背景与位置
  257.     reset_window
  258.     # 还原半身像左右判断
  259.     @show_right = false
  260.     # 暂存消息
  261.     temp_texts = []
  262.     $game_message.texts.each {|text| temp_texts.push(text.clone)}
  263.     if temp_texts[0] != nil and temp_texts[0].include?(":")
  264.       # 半身像左右判断
  265.       if temp_texts[0].split(/@/)[1] =~ /[Rr]/
  266.         @show_right = true
  267.         temp_texts[0] = temp_texts[0].split(/@/)[0]
  268.       end
  269.       # 去冒号加修饰符(可选)
  270.       if AUTO_ADD
  271.         temp_texts[0].sub!(/\:/) { "" }
  272.         temp_texts[0] = SYMBOL[0,SYMBOL.size/2] +
  273.         temp_texts[0] + SYMBOL[SYMBOL.size/2,SYMBOL.size/2]
  274.       end
  275.       # 设定文字颜色
  276.       temp_texts[0] = "\\C[#{NAME_FONT_COLOR}]" +
  277.       temp_texts[0] + "\\C[#{MSG_FONT_COLOR}]"
  278.       # 设定文字字体
  279.       temp_texts[0] = "\\F[N#{NAME_FONT_NAME}]" +
  280.       temp_texts[0] + "\\F[N#{MSG_FONT_NAME}]"
  281.       # 显示名称背景条
  282.       show_namebar_sprite
  283.     end
  284.     @text = ""
  285.     for i in 0...temp_texts.size
  286.       @text += "  " if i >= $game_message.choice_start
  287.       @text += temp_texts[i].clone + "\x00"
  288.     end
  289.     @item_max = $game_message.choice_max
  290.     convert_special_characters
  291.     ##reset_window
  292.     new_page
  293.   end
  294.   #--------------------------------------------------------------------------
  295.   # ◎ 更换页面处理
  296.   #--------------------------------------------------------------------------
  297.   def new_page
  298.     contents.clear
  299.     # 初始化文字描绘起点
  300.     @contents_x = 0
  301.     # 除名称外文字右移1字符
  302.     @contents_x += MSG_FONT_SIZE+2 unless show_name?
  303.     if $game_message.face_name.empty?
  304.       @face_sprite.bitmap.clear
  305.     else
  306.       name = $game_message.face_name
  307.       index = $game_message.face_index
  308.       # 获取半身像宽度
  309.       get_face_width(name)
  310.       # 计算文字横坐标起始
  311.       @contents_x += @face_width-16 unless @show_right
  312.       draw_msg_face(name, index)
  313.       # 设定半身像坐标
  314.       set_face_pos
  315.     end
  316.     @contents_y = 0
  317.     @line_count = 0
  318.     @show_fast = false
  319.     @line_show_fast = false
  320.     @pause_skip = false
  321.     contents.font.color = text_color(0)
  322.   end
  323.   #--------------------------------------------------------------------------
  324.   # ◎ 换行处理
  325.   #--------------------------------------------------------------------------
  326.   def new_line
  327.     @contents_x = 0
  328.     unless $game_message.face_name.empty?
  329.       # 半身像显示在左时
  330.       @contents_x = @face_width-16 unless @show_right
  331.     end
  332.     # 除名称外文字右移1字符
  333.     @contents_x += (MSG_FONT_SIZE+2)
  334.     # 显示名称之后,对话内容下移 NAME_Y_ADJ
  335.     @contents_y += NAME_Y_ADJ if @line_count == 0 and show_name?
  336.     # 以字号为新间距
  337.     @contents_y += (MSG_FONT_SIZE+2)
  338.     @line_count += 1
  339.     @line_show_fast = false
  340.   end
  341.   #--------------------------------------------------------------------------
  342.   # ◎ 特殊文字变换
  343.   #--------------------------------------------------------------------------
  344.   def convert_special_characters
  345.     @text.gsub!(/\\V\[(\d+)\]/i)  { $game_variables[$1.to_i] }
  346.     @text.gsub!(/\\V\[(\d+)\]/i)  { $game_variables[$1.to_i] }
  347.     @text.gsub!(/\\N\[(\d+)\]/i)  { $game_actors[$1.to_i].name }
  348.     @text.gsub!(/\\C\[(\d+)\]/i)  { "\x01[#{$1}]" }
  349.     @text.gsub!(/\\G/)            { "\x02" }
  350.     @text.gsub!(/\\\./)           { "\x03" }
  351.     @text.gsub!(/\\\|/)           { "\x04" }
  352.     @text.gsub!(/\\!/)            { "\x05" }
  353.     @text.gsub!(/\\>/)            { "\x06" }
  354.     @text.gsub!(/\\</)            { "\x07" }
  355.     @text.gsub!(/\\\^/)           { "\x08" }
  356.     @text.gsub!(/\\\\/)           { "\\" }
  357.     # 更改不透明度
  358.     @text.gsub!(/\\O\[(\d+)\]/i)  { "\x09[#{$1}]" }
  359.     # 显示数据库元素
  360.     @text.gsub!(/\\S\[(\d+)\]/i)  { "\x10[#{$1}]" + $data_skills[$1.to_i].name }
  361.     @text.gsub!(/\\I\[(\d+)\]/i)  { "\x11[#{$1}]" + $data_items[$1.to_i].name }
  362.     @text.gsub!(/\\W\[(\d+)\]/i)  { "\x12[#{$1}]" + $data_weapons[$1.to_i].name }
  363.     @text.gsub!(/\\A\[(\d+)\]/i)  { "\x13[#{$1}]" + $data_armors[$1.to_i].name }
  364.     # 更改字体
  365.     @text.gsub!(/\\F\[S(\d+)\]/i) { "\x14[#{$1}]" }
  366.     @text.gsub!(/\\F\[N(\d+)\]/i) { "\x15[#{$1}]" }
  367.     @text.gsub!(/\\F\[C(\d+)\]/i) { "\x16[#{$1}]" }
  368.     # 自动关闭
  369.     @text.gsub!(/\\X\[(\d+)\]/i)  { "\x17[#{$1}]" }
  370.     @text.gsub!(/\\X/i)            { "\x18" }
  371.   end
  372.   #--------------------------------------------------------------------------
  373.   # ◎ 设置窗口背景与位置
  374.   #--------------------------------------------------------------------------
  375.   def reset_window
  376.     @background = $game_message.background
  377.     @position = $game_message.position
  378.     if @background == 0   # 普通窗口
  379.       self.opacity = 255
  380.     else                  # 背景变暗、透明
  381.       self.opacity = 0
  382.     end
  383.     case @position
  384.     when 0  # 上
  385.       self.y = 0
  386.       @gold_window.y = 360
  387.     when 1  # 中
  388.       # 通过计算获取
  389.       self.y = (Graphics.height-self.height)/2
  390.       @gold_window.y = 0
  391.     when 2  # 下
  392.       # 通过计算获取
  393.       self.y = Graphics.height-self.height
  394.       @gold_window.y = 0
  395.     end
  396.   end
  397.   #--------------------------------------------------------------------------
  398.   # ◎ 消息结束
  399.   #--------------------------------------------------------------------------
  400.   def terminate_message
  401.     self.active = false
  402.     self.pause = false
  403.     self.index = -1
  404.     @gold_window.close
  405.     @number_input_window.active = false
  406.     @number_input_window.visible = false
  407.     $game_message.main_proc.call if $game_message.main_proc != nil
  408.     $game_message.clear
  409.     # 处理名称背景条和半身像
  410.     @namebar_sprite.visible = false
  411.     @face_sprite.visible = false
  412.     @face_sprite.bitmap.clear
  413.   end
  414.   #--------------------------------------------------------------------------
  415.   # ◎ 更新消息
  416.   #--------------------------------------------------------------------------
  417.   def update_message
  418.     loop do
  419.       c = @text.slice!(/./m)            # 获取下一条文字
  420.       case c
  421.       when nil                          # 没有可以显示的文字
  422.         finish_message                  # 更新结束
  423.         break
  424.       when "\x00"                       # 换行
  425.         new_line
  426.         if @line_count >= MAX_LINE      # 行数为最大时
  427.           unless @text.empty?           # 如果还有增加则继续
  428.             self.pause = true           # 等待输入
  429.             break
  430.           end
  431.         end
  432.       when "\x01"                       # \C[n]  (更改文字色)
  433.         @text.sub!(/\[([0-9]+)\]/, "")
  434.         contents.font.color = text_color($1.to_i)
  435.         next
  436.       when "\x02"                       # \G  (显示所持金)
  437.         @gold_window.refresh
  438.         @gold_window.open
  439.       when "\x03"                       # \.  (等待 1/4 秒)
  440.         @wait_count = 15
  441.         break
  442.       when "\x04"                       # \|  (等待 1 秒)
  443.         @wait_count = 60
  444.         break
  445.       when "\x05"                       # \!  (等待输入)
  446.         self.pause = true
  447.         break
  448.       when "\x06"                       # \>  (瞬间显示 ON)
  449.         @line_show_fast = true
  450.       when "\x07"                       # \<  (瞬间显示 OFF)
  451.         @line_show_fast = false
  452.       when "\x08"                       # \^  (不等待输入)
  453.         @pause_skip = true
  454.       # 更改不透明度的情况下
  455.       when "\x09"
  456.         @text.sub!(/\[(\d+)\]/, "")
  457.         contents.font.color.alpha = $1.to_i
  458.       # 显示技能情况下
  459.       when "\x10"
  460.         @text.sub!(/\[(\d+)\]/, "")
  461.         draw_icon($data_skills[$1.to_i].icon_index, @contents_x, @contents_y)
  462.         # 纵坐标增加图标宽度
  463.         @contents_x += 24
  464.       # 显示物品情况下
  465.       when "\x11"
  466.         @text.sub!(/\[(\d+)\]/, "")
  467.         draw_icon($data_items[$1.to_i].icon_index, @contents_x, @contents_y)
  468.         # 纵坐标增加图标宽度
  469.         @contents_x += 24
  470.       # 显示武器情况下
  471.       when "\x12"
  472.         @text.sub!(/\[(\d+)\]/, "")
  473.         draw_icon($data_weapons[$1.to_i].icon_index, @contents_x, @contents_y)
  474.         # 纵坐标增加图标宽度
  475.         @contents_x += 24
  476.       # 显示防具情况下
  477.       when "\x13"
  478.         @text.sub!(/\[(\d+)\]/, "")
  479.         draw_icon($data_armors[$1.to_i].icon_index, @contents_x, @contents_y)
  480.         # 纵坐标增加图标宽度
  481.         @contents_x += 24
  482.       # 更改字体的情况下
  483.       when "\x14"
  484.         @text.sub!(/\[(\d+)\]/, "")
  485.         contents.font.size = $1.to_i
  486.       when "\x15"
  487.         @text.sub!(/\[(\d+)\]/, "")
  488.         contents.font.name = FONT_ARRAY[$1.to_i]
  489.       when "\x16"
  490.         @text.sub!(/\[(\d+)\]/, "")
  491.         contents.font.color = text_color($1.to_i)
  492.       # 自动关闭对话框的情况下
  493.       when "\x17"
  494.         @text.sub!(/\[(\d+)\]/, "")
  495.         @auto_close = $1.to_i
  496.       when "\x18"
  497.         @auto_close = AUTO_CLOSE
  498.       # 普通文字的情况下
  499.       else
  500.         font_height = contents.font.size + 2
  501.         contents.draw_text(@contents_x, @contents_y, 40, font_height, c)
  502.         c_width = contents.text_size(c).width
  503.         @contents_x += c_width
  504.       end
  505.       break unless @show_fast or @line_show_fast
  506.     end
  507.   end
  508.   #--------------------------------------------------------------------------
  509.   # ◎ 消息更新结束
  510.   #--------------------------------------------------------------------------
  511.   def finish_message
  512.     if $game_message.choice_max > 0
  513.       start_choice
  514.     elsif $game_message.num_input_variable_id > 0
  515.       start_number_input
  516.     elsif @pause_skip
  517.       terminate_message
  518.     else
  519.       self.pause = true
  520.     end
  521.     @wait_count = 10
  522.     @text = nil
  523.   end
  524.   #--------------------------------------------------------------------------
  525.   # ● 开始选择项
  526.   #--------------------------------------------------------------------------
  527.   def start_choice
  528.     self.active = true
  529.     self.index = 0
  530.   end
  531.   #--------------------------------------------------------------------------
  532.   # ◎ 开始输入数值
  533.   #--------------------------------------------------------------------------
  534.   def start_number_input
  535.     digits_max = $game_message.num_input_digits_max
  536.     number = $game_variables[$game_message.num_input_variable_id]
  537.     @number_input_window.digits_max = digits_max
  538.     @number_input_window.number = number
  539.     if $game_message.face_name.empty?
  540.       @number_input_window.x = x
  541.     else
  542.       # 代入半身像宽度
  543.       @number_input_window.x = x + @face_width
  544.     end
  545.     @number_input_window.y = y + @contents_y
  546.     @number_input_window.active = true
  547.     @number_input_window.visible = true
  548.     @number_input_window.update
  549.   end
  550.   #--------------------------------------------------------------------------
  551.   # ◎ 更新光标 #可能仍须增加判断
  552.   #--------------------------------------------------------------------------
  553.   def update_cursor
  554.     if @index >= 0
  555.       if $game_message.face_name.empty?
  556.         x = 0
  557.         y = ($game_message.choice_start+@index)*(MSG_FONT_SIZE+2)
  558.         width = contents.width
  559.       else
  560.         x = @show_right ? 0 : @face_width
  561.         y = ($game_message.choice_start+@index)*(MSG_FONT_SIZE+2) + NAME_Y_ADJ
  562.         width = contents.width - @face_width
  563.       end
  564.       self.cursor_rect.set(x, y, width, (MSG_FONT_SIZE+2))
  565.     else
  566.       self.cursor_rect.empty
  567.     end
  568.   end
  569.   #--------------------------------------------------------------------------
  570.   # ● 文章显示输入处理
  571.   #--------------------------------------------------------------------------
  572.   def input_pause
  573.     if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  574.       self.pause = false
  575.       if @text != nil and not @text.empty?
  576.         new_page if @line_count >= MAX_LINE
  577.       else
  578.         terminate_message
  579.       end
  580.     end
  581.   end
  582.   #--------------------------------------------------------------------------
  583.   # ● 选择项输入处理
  584.   #--------------------------------------------------------------------------
  585.   def input_choice
  586.     if Input.trigger?(Input::B)
  587.       if $game_message.choice_cancel_type > 0
  588.         Sound.play_cancel
  589.         $game_message.choice_proc.call($game_message.choice_cancel_type - 1)
  590.         terminate_message
  591.       end
  592.     elsif Input.trigger?(Input::C)
  593.       Sound.play_decision
  594.       $game_message.choice_proc.call(self.index)
  595.       terminate_message
  596.     end
  597.   end
  598.   #--------------------------------------------------------------------------
  599.   # ● 数值输入处理
  600.   #--------------------------------------------------------------------------
  601.   def input_number
  602.     if Input.trigger?(Input::C)
  603.       Sound.play_decision
  604.       $game_variables[$game_message.num_input_variable_id] =
  605.         @number_input_window.number
  606.       $game_map.need_refresh = true
  607.       terminate_message
  608.     end
  609.   end
  610.   #--------------------------------------------------------------------------
  611.   # ○ 生成名称背景条
  612.   #--------------------------------------------------------------------------
  613.   def create_namebar_sprite
  614.     @namebar_sprite = Sprite.new
  615.     @namebar_sprite.bitmap = Bitmap.new(Graphics.width-NAME_X_ADJ, NAME_FONT_SIZE+4)
  616.     # 可视性
  617.     @namebar_sprite.visible = false
  618.     # 准备参数
  619.     rect = Rect.new(NAME_X_ADJ, 0, @namebar_sprite.width, @namebar_sprite.height)
  620.     color1 = text_color(NAME_BAR_COLOR)
  621.     color2 = text_color(NAME_BAR_COLOR)
  622.     color1.alpha = NAME_BAR_OPACITY
  623.     color2.alpha = 0
  624.     # 描绘渐变条
  625.     @namebar_sprite.bitmap.gradient_fill_rect(rect, color1, color2)
  626.   end
  627.   #--------------------------------------------------------------------------
  628.   # ○ 生成半身像
  629.   #--------------------------------------------------------------------------
  630.   def create_face_sprite
  631.     @face_sprite = Sprite.new
  632.     @face_sprite.bitmap = Bitmap.new(1,1)
  633.     @face_sprite.z = self.z + 2
  634.     @face_sprite.visible = false
  635.     @old_name = ""                        # 判断头像是否改变
  636.     @old_index = 0                        # 判断头像是否改变
  637.   end
  638.   #--------------------------------------------------------------------------
  639.   # ○ 显示名称背景条
  640.   #--------------------------------------------------------------------------
  641.   def show_namebar_sprite
  642.     # 坐标跟随
  643.     @namebar_sprite.x = self.x
  644.     @namebar_sprite.y = self.y + 16 - 1
  645.     @namebar_sprite.z = self.z + 1
  646.     # 可视性
  647.     @namebar_sprite.visible = true
  648.   end
  649.   #--------------------------------------------------------------------------
  650.   # ○ 描绘半身像
  651.   #     face_name  : 半身像图像文件名
  652.   #     face_index : 半身像图像索引
  653.   #--------------------------------------------------------------------------
  654.   def draw_msg_face(face_name, face_index)
  655.     bitmap = Cache.face(face_name)
  656.     width = bitmap.width / 4
  657.     height = bitmap.height / 2
  658.     rect = Rect.new(0, 0, 0, 0)
  659.     rect.x = face_index % 4 * width
  660.     rect.y = face_index / 4 * height
  661.     rect.width = width
  662.     rect.height = height
  663.     @face_sprite.bitmap = Bitmap.new(width, height)
  664.     @face_sprite.bitmap.blt(0, 0, bitmap, rect)
  665.     @face_sprite.mirror = @show_right
  666.     bitmap.dispose
  667.   end
  668.   #--------------------------------------------------------------------------
  669.   # ○ 是否显示名称
  670.   #--------------------------------------------------------------------------
  671.   def show_name?
  672.     return @namebar_sprite.visible
  673.   end
  674.   #--------------------------------------------------------------------------
  675.   # ○ 返回字体
  676.   #     index       : 编号
  677.   #--------------------------------------------------------------------------
  678.   def get_font(index)
  679.     case index
  680.     when 0
  681.       return Font.new(FONT_ARRAY[NAME_FONT_NAME], NAME_FONT_SIZE)
  682.     when 1
  683.       return Font.new(FONT_ARRAY[MSG_FONT_NAME], MSG_FONT_SIZE)
  684.     end
  685.   end
  686.   #--------------------------------------------------------------------------
  687.   # ○ 获取半身像宽度
  688.   #     face_name  : 半身像图像文件名
  689.   #--------------------------------------------------------------------------
  690.   def get_face_width(face_name)
  691.     bitmap = Cache.face(face_name)
  692.     @face_width = bitmap.width / 4
  693.     bitmap.dispose
  694.   end
  695.   #--------------------------------------------------------------------------
  696.   # ○ 设定半身像位置
  697.   #--------------------------------------------------------------------------
  698.   def set_face_pos
  699.     @face_sprite.y = self.y + (self.height-@face_sprite.height) + FACE_Y_ADJ
  700.     if @show_right
  701.       @face_sprite.x = self.width - @face_sprite.width - FACE_X_ADJ
  702.     else
  703.       @face_sprite.x = self.x + FACE_X_ADJ
  704.     end
  705.     # 可视性
  706.     @face_sprite.visible = true
  707.   end
  708. end
复制代码



vx游戏脚本main的那脚本,脚本如下,我vx的游戏版本是,1.0.2.1
  1. #==============================================================================
  2. # ** Main  需要字体begin前加入脚本Font.default_name = (["印品工版宋""印品宋"])
  3. #------------------------------------------------------------------------------
  4. #  定義完畢所有的類之後,真正的程式開始於此。
  5. #==============================================================================
  6. Font.default_name = ["simhei", "標楷體", "PMingLiU", "新細明體", "Verdana", "Arial Unicode MS"]
  7. Font.default_name = (["印品工版宋", "黑体"])
  8. begin
  9.   Graphics.freeze
  10.   $scene = Scene_Title.new
  11.   $scene.main while $scene != nil
  12.   Graphics.transition(20)
  13. rescue Errno::ENOENT
  14.   filename = $!.message.sub("沒有這樣的檔案或目錄——", "")
  15.   print("無法找到檔案:#{filename}。")
  16. end
复制代码

点评

脚本 109、166、175 行注释掉,就是使用Main里面设置的默认字体了  发表于 2019-6-16 15:57
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
800
在线时间
166 小时
注册时间
2019-6-11
帖子
52
 楼主| 发表于 2019-6-16 17:14:56 | 显示全部楼层
本帖最后由 丝月 于 2019-6-16 17:44 编辑

进入游戏测试,在事件旁按下确定以后,字迹都出来了。可是再第二次按确定键,处名字那行的字以外,其余显示人物说话的字,还有打在上面的
字,又全都没了。
何解。
原因好像是,半身像对话框的字体设置,font_array那里除了工版宋以外,没有其他的字体,所以测试游戏里字没有显示下面的内容,只有第一行显示关于名字的字行。
其实,我发现加上 在对话框脚本字体设置里重新加入"宋体", "仿宋_GB2312"两个字体后,就又可以显示字了。
RUBY 代码复制
  1. # 预设字体组,字体第一个原是黑体.
  2.   FONT_ARRAY = ["印品工版宋" "宋体", "仿宋_GB2312"]


例子,或者把印品宋后面的宋体和仿宋两个直接换成一个黑体,发现测试游戏时,游戏框内有黑体字体,(显示名字栏里的是印品工版宋。因为加入对话框脚本,所以名字那一行是蓝色。)
下面的字体,是黑体的,如果是工版宋后面的是宋体和仿宋,下面的字体显示的则是宋体文字,名字栏那里是印品工版宋字体。
["印品工版宋", "宋体", "仿宋_GB2312"][/pre]

现在的情况大致以上。注释那三行不管用。

点评

在原版使用你那对话框脚本测试是没问题的,可能是你有其他第三方脚本冲突?  发表于 2019-6-16 20:58
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
800
在线时间
166 小时
注册时间
2019-6-11
帖子
52
 楼主| 发表于 2019-6-16 21:30:14 | 显示全部楼层
本帖最后由 丝月 于 2019-6-16 21:34 编辑

没几个外挂脚本啊。我发上来,给你参考参考。
脚本1:
  1. #==============================================================================
  2. # ■ Scene_Menu
  3. #------------------------------------------------------------------------------
  4. #  处理菜单画面的类。
  5. #==============================================================================

  6. class Scene_Menu < Scene_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     menu_index : 命令窗口光标初始位置
  10.   #--------------------------------------------------------------------------
  11.   def initialize(menu_index = 0)
  12.     @menu_index = menu_index
  13.   end
  14.   #--------------------------------------------------------------------------
  15.   # ● 开始处理
  16.   #--------------------------------------------------------------------------
  17.   def start
  18.     super
  19.     create_menu_background
  20.     create_command_window
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 结束处理
  24.   #--------------------------------------------------------------------------
  25.   def terminate
  26.     super
  27.     dispose_menu_background
  28.     @command_window.dispose
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 更新画面
  32.   #--------------------------------------------------------------------------
  33.   def update
  34.     super
  35.     update_menu_background
  36.     @command_window.update
  37.     if @command_window.active
  38.       update_command_selection
  39.     end
  40.   end
  41.   #--------------------------------------------------------------------------
  42.   # ● 生成命令窗口
  43.   #--------------------------------------------------------------------------
  44.   def create_command_window
  45.     s1 = Vocab::item
  46.     s5 = Vocab::save
  47.     s6 = Vocab::game_end
  48.     @command_window = Window_Command.new(160, [s1, s5, s6])#原5,6改为了4,5
  49.     @command_window.index = @menu_index
  50.     if $game_party.members.size == 0          # 如果队伍为空
  51.       @command_window.draw_item(0, false)     # 无效化物品选项
  52.     end
  53.   end
  54.   #--------------------------------------------------------------------------
  55.   # ● 更新命令窗口
  56.   #--------------------------------------------------------------------------
  57.   def update_command_selection
  58.     if Input.trigger?(Input::B)
  59.       Sound.play_cancel
  60.       $scene = Scene_Map.new
  61.     elsif Input.trigger?(Input::C)
  62.       if $game_party.members.size == 0 and @command_window.index == 0
  63.         Sound.play_buzzer
  64.         return
  65.       end
  66.       Sound.play_decision
  67.       case @command_window.index
  68.       when 0      #
  69.         $scene = Scene_Item.new
  70.       when 1      # 存档
  71.         $scene = Scene_File.new(true, false, false)
  72.       when 2      # 结束游戏
  73.         $scene = Scene_End.new
  74.       end
  75.     end
  76.   end
  77.   #--------------------------------------------------------------------------
  78.   # ● 角色选择开始
  79.   #--------------------------------------------------------------------------
  80.   def start_actor_selection
  81.     @command_window.active = false
  82.     @status_window.active = true
  83.     if $game_party.last_actor_index < @status_window.item_max
  84.       @status_window.index = $game_party.last_actor_index
  85.     else
  86.       @status_window.index = 0
  87.     end
  88.   end
  89.   #--------------------------------------------------------------------------
  90.   # ● 角色选择结束
  91.   #--------------------------------------------------------------------------
  92.   def end_actor_selection
  93.     @command_window.active = true
  94.     @status_window.active = false
  95.     @status_window.index = -1
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # ● 角色选择更新
  99.   #--------------------------------------------------------------------------
  100.   def update_actor_selection
  101.     if Input.trigger?(Input::B)
  102.       Sound.play_cancel
  103.       end_actor_selection
  104.     elsif Input.trigger?(Input::C)
  105.       $game_party.last_actor_index = @status_window.index
  106.       Sound.play_decision
  107.       case @command_window.index
  108.       when 1  # 技能
  109.         $scene = Scene_Skill.new(@status_window.index)
  110.       when 2  # 装备
  111.         $scene = Scene_Equip.new(@status_window.index)
  112.       when 3  # 状态
  113.         $scene = Scene_Status.new(@status_window.index)
  114.       end
  115.     end
  116.   end
  117. end
复制代码

脚本2:
  1. #==============================================================================
  2. # ■ Scene_End
  3. #------------------------------------------------------------------------------
  4. #  处理游戏结束画面的类。
  5. #==============================================================================

  6. class Scene_End < Scene_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 开始处理
  9.   #--------------------------------------------------------------------------
  10.   def start
  11.     super
  12.     create_menu_background
  13.     create_command_window
  14.   end
  15.   #--------------------------------------------------------------------------
  16.   # ● 执行渐变
  17.   #--------------------------------------------------------------------------
  18.   def post_start
  19.     super
  20.     open_command_window
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 结束前处理
  24.   #--------------------------------------------------------------------------
  25.   def pre_terminate
  26.     super
  27.     close_command_window
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● 结束处理
  31.   #--------------------------------------------------------------------------
  32.   def terminate
  33.     super
  34.     dispose_command_window
  35.     dispose_menu_background
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ● 回到原画面
  39.   #--------------------------------------------------------------------------
  40.   def return_scene
  41.     $scene = Scene_Menu.new(1)
  42.   end
  43.   #--------------------------------------------------------------------------
  44.   # ● 更新画面
  45.   #--------------------------------------------------------------------------
  46.   def update
  47.     super
  48.     update_menu_background
  49.     @command_window.update
  50.     if Input.trigger?(Input::B)
  51.       Sound.play_cancel
  52.       return_scene
  53.     elsif Input.trigger?(Input::C)
  54.       case @command_window.index
  55.       when 0  # 回到标题画面
  56.         command_to_title
  57.       when 1  # 离开游戏
  58.         command_shutdown
  59.       when 2  # 取消
  60.         command_cancel
  61.       end
  62.     end
  63.   end
  64.   #--------------------------------------------------------------------------
  65.   # ● 更新菜单画面背景
  66.   #--------------------------------------------------------------------------
  67.   def update_menu_background
  68.     super
  69.     @menuback_sprite.tone.set(0, 0, 0, 128)
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● 生成命令窗口
  73.   #--------------------------------------------------------------------------
  74.   def create_command_window
  75.     s1 = Vocab::to_title
  76.     s2 = Vocab::shutdown
  77.     s3 = Vocab::cancel
  78.     @command_window = Window_Command.new(172, [s1, s2, s3])
  79.     @command_window.x = (544 - @command_window.width) / 2
  80.     @command_window.y = (416 - @command_window.height) / 2
  81.     @command_window.openness = 0
  82.   end
  83.   #--------------------------------------------------------------------------
  84.   # ● 释放命令窗口
  85.   #--------------------------------------------------------------------------
  86.   def dispose_command_window
  87.     @command_window.dispose
  88.   end
  89.   #--------------------------------------------------------------------------
  90.   # ● 开启命令窗口
  91.   #--------------------------------------------------------------------------
  92.   def open_command_window
  93.     @command_window.open
  94.     begin
  95.       @command_window.update
  96.       Graphics.update
  97.     end until @command_window.openness == 255
  98.   end
  99.   #--------------------------------------------------------------------------
  100.   # ● 关闭命令窗口
  101.   #--------------------------------------------------------------------------
  102.   def close_command_window
  103.     @command_window.close
  104.     begin
  105.       @command_window.update
  106.       Graphics.update
  107.     end until @command_window.openness == 0
  108.   end
  109.   #--------------------------------------------------------------------------
  110.   # ● 执行「回到标题画面」命令
  111.   #--------------------------------------------------------------------------
  112.   def command_to_title
  113.     Sound.play_decision
  114.     RPG::BGM.fade(800)
  115.     RPG::BGS.fade(800)
  116.     RPG::ME.fade(800)
  117.     $scene = Scene_Title.new
  118.     close_command_window
  119.     Graphics.fadeout(60)
  120.   end
  121.   #--------------------------------------------------------------------------
  122.   # ● 执行「离开游戏」命令
  123.   #--------------------------------------------------------------------------
  124.   def command_shutdown
  125.     Sound.play_decision
  126.     RPG::BGM.fade(800)
  127.     RPG::BGS.fade(800)
  128.     RPG::ME.fade(800)
  129.     $scene = nil
  130.   end
  131.   #--------------------------------------------------------------------------
  132.   # ● 执行「取消」命令
  133.   #--------------------------------------------------------------------------
  134.   def command_cancel
  135.     Sound.play_decision
  136.     return_scene
  137.   end
  138. end
复制代码

脚本3存档容量扩大脚本:
  1. # 存档容量扩大 by fux2


  2. class Window_SaveFile < Window_Base
  3.   
  4.   def initialize(file_index, filename)
  5.     super(0, 56 + file_index % 10 * 90, 544, 90)
  6.     @file_index = file_index
  7.     @filename = filename
  8.     load_gamedata
  9.     refresh
  10.     @selected = false
  11.   end

  12.   def file_index=(i)
  13.     @file_index = i
  14.   end
  15.    
  16. end

  17. class Scene_File < Scene_Base

  18.   def create_savefile_windows
  19.     @savefile_windows = []
  20.     for i in 0..9
  21.       @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
  22.     end
  23.     @item_max = 10
  24.   end

  25.   def cursor_down(wrap)
  26.     if @index < @item_max - 1 or wrap
  27.       @index = (@index + 1 + @item_max) % @item_max
  28.     end
  29.     for i in 0..9
  30.       @savefile_windows[i].y = (i - @index) * 90 + 56
  31.       if @savefile_windows[i].y < 56
  32.         @savefile_windows[i].opacity = 0
  33.         @savefile_windows[i].contents.clear
  34.       else
  35.         @savefile_windows[i].opacity = 255
  36.         @savefile_windows[i].refresh
  37.       end
  38.     end
  39.   end
  40.   
  41.   def cursor_up(wrap)
  42.     if @index > 0 or wrap
  43.       @index = (@index - 1 + @item_max) % @item_max
  44.     end
  45.     for i in 0..9
  46.       @savefile_windows[i].y = (i - @index) * 90 + 56
  47.       if @savefile_windows[i].y < 56
  48.         @savefile_windows[i].opacity = 0
  49.         @savefile_windows[i].contents.clear
  50.       else
  51.         @savefile_windows[i].opacity = 255
  52.         @savefile_windows[i].refresh
  53.       end
  54.     end
  55.   end
  56.   
  57. end
复制代码

脚本4固定远景图:
  1. class Spriteset_Map
  2.   #--------------------------------------------------------------------------
  3.   # ● [别名修改]更新远景
  4.   #--------------------------------------------------------------------------
  5.   alias update_parallax_cld99 update_parallax
  6.   def update_parallax
  7.     update_parallax_cld99
  8.     @parallax.ox = 0
  9.     @parallax.oy = 0
  10.   end
  11. end
复制代码

最后一个脚本状态栏消失脚本:
RUBY 代码复制
  1. #==============================================================================
  2. # ■ Window_MenuActor
  3. #==============================================================================
  4. class Window_MenuActor < Window_MenuStatus
  5.   #--------------------------------------------------------------------------
  6.   # ● 绘制项目
  7.   #--------------------------------------------------------------------------
  8.   def draw_item(index)
  9.     actor = $game_party.members[index]
  10.     enabled = $game_party.battle_members.include?(actor)
  11.     rect = item_rect(index)
  12.     draw_item_background(index)
  13.     draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
  14.     draw_actor_name(actor, rect.x + 97, rect.y + line_height * 0)
  15.     draw_actor_level(actor, rect.x + 97, rect.y + line_height * 1)
  16.     draw_actor_icons(actor, rect.x + 97, rect.y + line_height * 2)
  17.     draw_actor_class(actor, rect.x + 217, rect.y + line_height * 0)
  18.   end
  19. end


我觉得上面所述脚本,都和vx更换字体没有什么关系。最后问题好像就在于,你说的解决办法,注释
掉那三行,本来一开始测试游戏时,按桌子是可以显示下面的字体和上面有名字的字行的,可是,去别的桌子按确认件或者
再在那张桌子前按确认键是,字体莫名消失了。只有名字行有名字显示。(注明:
因为对话框要求名字显示的要求格式:"名字:")引号去掉,所以,事件里写好名字,后面还有空的那一行都可以填写,表示,测试游戏时,有名字的
那一行里都是有字的.但是名字下面的内容就没有字了.
例入:
阿拉:喜欢什么.
诸如此类.
测试游戏时,就是第一行,有阿拉姓名的那一行有字,后面的诸如此类,就没有显示字.

点评

额。。是我疏忽了,没测试完整(没有写名字格式直接测试的),279、280两行也注释掉就可以了。  发表于 2019-6-16 22:42
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
800
在线时间
166 小时
注册时间
2019-6-11
帖子
52
 楼主| 发表于 2019-6-17 05:32:51 | 显示全部楼层
谢谢。测试游戏已经可以看到字体了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-17 05:57

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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