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

Project1

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

[已经解决] fuki对话框显示不了头像

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
108 小时
注册时间
2015-1-18
帖子
151
跳转到指定楼层
1
发表于 2015-5-10 04:44:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
我把Heads文件夹添加了并且改好了文件名,这样输 入

\name[小紫儿]\p[2]\l[001]:

显示不了头像,上面这句还显示在了对话框上本该是对白内容里面,求解?





RUBY 代码复制
  1. #============================================================================
  2. # 66加强对话框Fuki对话框整合+附送功能
  3. # By whbm
  4. #============================================================================
  5.  
  6. #   说明:
  7. #     这是一个整合了66加强对话框和Fuki对话框功能脚本,你可以靠改变开关来切换
  8. #     两个脚本。
  9.  
  10. #     附送功能:
  11. #     在对话中按enter键跳过打字效果
  12.  
  13. #   33号开关控制对话框的切换:
  14. #     打开--使用66加强对话框
  15. #     关闭--使用Fuki对话框
  16. #   34号开关控制附送功能的打开与关闭:
  17. #     打开--使用附送功能
  18. #     关闭--不使用附送功能
  19.  
  20. #============================================================================
  21. # 66加强对话框说明--66rpg
  22. #============================================================================
  23.  
  24. #默认为一个字一个字的方式,如果需要一次全部显示,
  25. #请在游戏中使用脚本:$game_system.typing = true
  26.  
  27. #默认对话字没有声音,如果需要声音,
  28. #请在游戏中使用脚本:$game_system.soundname_on_speak = "这里输入文件名"
  29. #我唯一一个见过“胡乱配音”的游戏是天使帝国2代,该游戏说话的时候每个字符随机发一个外星语音
  30.  
  31. # 其他在对话中可以使用的功能:
  32.  
  33. # \n[1]:显示1号角色的姓名
  34.  
  35. # \name[李逍遥]:显示一个“李逍遥”方框,表示说话人姓名
  36.  
  37. # \p[1]:对话框出现在1号事件的上方
  38. # \p[0]:主人公上方出现对话框
  39. #——————————————————使用\p功能后可以自动调整对话框大小
  40.  
  41. # \\:显示"\"这个符号
  42.  
  43. # \v[1] :显示变量1
  44.  
  45. # \v[a1] :显示防具1
  46.  
  47. # \v[w1] :显示武器1
  48.  
  49. # \v[i1] :显示物品1
  50.  
  51. # \v[s1] :显示特技1
  52.  
  53. # \c[1-8]:更改颜色
  54.  
  55. # \g:显示金钱窗口
  56.  
  57. # \a[SE文件名]:对话的时候播放SE
  58.  
  59. # \s[1-19]:更改弹字的速度
  60.  
  61. # \.   :停顿一刹那(1、2帧)
  62. # \|   :停顿片刻(20帧)
  63.  
  64. # \>   :文字不用打字方式
  65. # \<   :文字使用打字方式
  66.  
  67. # \!   :等待玩家按回车再继续
  68. # \~   :文字直接消失
  69.  
  70. # \I   :下一行从这个位置开始
  71.  
  72. # \o[123]:文字透明度改为123,模拟将死之人(汗)
  73.  
  74. # \h[12]:改用12号字
  75.  
  76. # \b[50]:空50象素
  77.  
  78. # \K[今天天气不错]:在出现“今天天气不错”这几个字的时候播放$game_system.soundname_on_speak设置的音效
  79.  
  80. # \L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h.png”
  81. # \R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h.png”
  82.  
  83. # \Lk:清除左边的图像
  84. # \Rk:清除右边的图像
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92. #============================================================================
  93. # Fuki对话框说明--bbschat
  94. #============================================================================
  95. #
  96. #    呼出对话框 ver. 1.31 By パラ犬(日)
  97. #  来自 [url]http://rpg.para.s3p.net/[/url]
  98. #
  99. #  汉化修改 66RPG bbschat(2006.1.5)
  100. #    来自
  101. #
  102. #    ●准备工作-窗口Skin
  103. #
  104. #    首先,确认自己使用的对话框窗口Skin,(数据库-系统-窗口外观图形)
  105. #    然后根据该窗口Skin制作对话框尾部使用的两个箭头图形
  106. #    尾部箭头图形命名方式:“窗口skin名-top”,“窗口skin名-under”
  107. #    将该图形文件存放在“Graphics/Windowskins”文件夹下。
  108. #
  109. #    本演示游戏内置2套窗口和箭头图形,
  110. #    一套是游戏默认的“001-Blue01”,一套是定制的“fk”
  111. #    玩家可以根据自己的需要参照样本定制自己的呼出对话框窗口Skin。
  112. #
  113. #    ●呼出对话框使用方法
  114. #
  115. #    在事件命令行使用[脚本]将事件ID代入[$mes_id]
  116. #    该事件就可以使用呼出对话框了。
  117. #   (举例:$mes_id=4)
  118. #
  119. #    ID 代入 -1 表示玩家,代入 0 表示事件自身。
  120. #    代入 nil 或者 "" 则返回成通常的信息窗口。
  121. #    对话框的表示位置可以通过事件的“更改文章选项”来设定(上、中、下)。
  122. #    表示位置为“中央”的话,不管事件位置在哪里,对话框都将显示在画面中央。
  123. #
  124. #    ●角色名字窗口的使用文字的方法
  125. #
  126. #    在事件命令行使用[脚本]将文字列代入[$mes_name]
  127. #    对话框就会显示角色名字窗口
  128. #   (举例:$mes_name="阿尔西斯")
  129. #    代入 nil 或者 "" 则不显示角色名字窗口。
  130. #
  131. #    以上两个机能是独立的,所以可以单独使用
  132. #
  133. #   $mes_id=(ID) + $mes_name="名字"  :呼出对话框显示 + 角色名字窗口
  134. #   $mes_id=(ID) + $mes_name=""      :呼出对话框显示(没有角色名字)
  135. #   $mes_id=nil  + $mes_name="名字"  :默认信息窗口 + 角色名字窗口
  136. #   $mes_id=nil  + $mes_name=""      :默认信息窗口(没有角色名字)
  137. #
  138. #    ●角色名字窗口使用角色图片的方法(汉化特别追加功能,原脚本只能使用文字)
  139. #   
  140. #    如果能在对应文件夹中找到文件名和角色名字相同的图片,   
  141. #    则角色名字窗口显示角色头像图片,角色图片最好能包括角色的名字。
  142. #    默认头像图片保存目录为“Graphics/Heads/”,玩家可自行修改。
  143. #
  144. #    如果不想使用角色名字直接作为头像文件名。
  145. #    可以使用下面在 Game_Temp 类里增加的namebmp属性。
  146. #    重新设定角色名字与文件名的对应关系。
  147. #
  148. #    ●信息表示速度的变更方法
  149. #
  150. #    在事件命令行使用[脚本]将数值代入[$mes_speed]
  151. #    速度为 0 即瞬间显示全部信息,数字越大,信息表示速度越慢。
  152. #   (举例:$mes_speed=1)
  153. #
  154. #    ●其他设置
  155. #
  156. #    请参照下面的注释
  157. #
  158. #    补一句,用脚本chat(id,"名字")就相当于$mes_id=ID;$mes_name="名字"
  159. #==============================================================================
  160.  
  161. module FUKI
  162.  
  163. # 头像图片保存目录的设定
  164. HEAD_PIC_DIR = "Graphics/Heads/"
  165.  
  166. # 是否显示尾部图标
  167. TAIL_SHOW = true
  168.  
  169. # Skin的设定
  170. # 使用数据库默认窗口Skin情况下这里使用[""]
  171. FUKI_SKIN_NAME = "fk2"   # 呼出对话框用Skin
  172. NAME_SKIN_NAME = "fk2"   # 角色名字窗口用Skin
  173.  
  174. # 字体大小
  175. MES_FONT_SIZE = 20    # 呼出对话框
  176. NAME_FONT_SIZE = 14   # 角色名字窗口
  177.  
  178. # 字体颜色
  179. #(设定为 Color.new(0, 0, 0, 0) 表示使用普通文字色)
  180. FUKI_COLOR = Color.new(255, 255, 255, 255)  # 呼出对话框
  181. NAME_COLOR = Color.new(255, 255, 255, 255)  # 角色名字窗口
  182.  
  183. # 窗口透明度
  184. # 如修改窗口透明度请同时修改尾部箭头图形内部的透明度
  185. FUKI_OPACITY = 255    # 呼出对话框
  186. MES_OPACITY = 255     # 默认信息窗口
  187. NAME_OPACITY = 255    # 角色名字窗口
  188.  
  189. # 角色名字窗口的相对位置
  190. NAME_SHIFT_X = 0      # 横坐标
  191. NAME_SHIFT_Y = 16     # 纵坐标
  192.  
  193. # 窗口表示时是否根据画面大小自动检查窗口出现的位置,
  194. # 自动改变位置( true / false )
  195. # 设置成 true 可能出现箭头图标颠倒的问题 <- bbschat
  196. POS_FIX = false
  197.  
  198. # 在画面最边缘表示时的稍微挪动
  199. # 使用圆形Skin的角和方框的角重合的情况下为 true
  200. CORNER_SHIFT = false
  201. SHIFT_PIXEL = 4   # true 时挪动的象素
  202.  
  203. # 角色高度尺寸
  204. CHARACTOR_HEIGHT = 48
  205. # 呼出对话框的相对位置(纵坐标)
  206. POP_SHIFT_TOP = 0         # 表示位置为上的时候
  207. POP_SHIFT_UNDER = 0       # 表示位置为下的时候
  208.  
  209. # 信息的表示速度(数字越小速度越快,0为瞬间表示)
  210. # 游戏中 可随时用数字代入 $mes_speed 来改变消息表示速度。
  211. MES_SPEED = 1
  212.  
  213. end
  214.  
  215. #==============================================================================
  216. # 方便用户同时设置2个常用参数而使用的函数
  217. #==============================================================================
  218. def chat(id = 0,name = "")
  219. $mes_id = id
  220. $mes_name = name
  221. end
  222.  
  223. #==============================================================================
  224. # □ Game_Temp
  225. #==============================================================================
  226.  
  227. class Game_Temp
  228. attr_accessor  :namebmp              #保存头像图片的Hash表
  229. alias initialize_fuki initialize
  230. def initialize
  231.    initialize_fuki
  232.    # 如果不想使用角色名字直接作为头像文件名
  233.    # 可在这里重新设定角色名字与文件名的对应关系
  234.    @namebmp ={"玩家"=>"001-Player-Face", "维斯特"=>"002-Player-Face"}
  235. end
  236. end
  237. #==============================================================================
  238. # □ Game_System
  239. #==============================================================================
  240. class Game_System
  241. attr_accessor :typing
  242. attr_accessor :soundname_on_speak
  243. alias carol3_ini initialize
  244. def initialize
  245.    carol3_ini
  246.    @typing = true
  247.    @soundname_on_speak = nil
  248. end
  249. end
  250. #==============================================================================
  251. # □ Window_FukiMessage
  252. #==============================================================================
  253.  
  254. class Window_FukiMessage < Window_Selectable
  255.  
  256. #--------------------------------------------------------------------------
  257. # ● 初始化状态
  258. #--------------------------------------------------------------------------
  259. def initialize
  260.    super(80, 304, 480, 160)
  261.    self.contents = Bitmap.new(width - 32, height - 32)
  262.    self.visible = false
  263.    self.z = 9998
  264.    @fade_in = false
  265.    @fade_out = false
  266.    @contents_showing = false
  267.    @cursor_width = 0
  268.    self.active = false
  269.    self.index = -1
  270.    #........................................................................
  271.    if $game_system.soundname_on_speak == nil then
  272.      $game_system.soundname_on_speak = ""
  273.    end
  274.    @opacity_text_buf = Bitmap.new(32, 32)
  275.    #........................................................................
  276.    @w = 0
  277.    @h = 0
  278.    @wait = 0
  279.    @dx = 0
  280.    @dy = 0
  281.    $mes_speed = FUKI::MES_SPEED
  282. end
  283.  
  284. #--------------------------------------------------------------------------
  285. # ○ 决定窗口尺寸并生成窗口
  286. #--------------------------------------------------------------------------
  287. def refresh_create
  288.    self.contents.clear
  289.    self.contents.font.color = normal_color
  290.    self.contents.font.size = FUKI::MES_FONT_SIZE
  291.    # 取得窗口尺寸
  292.    get_windowsize
  293.    w = @w + 32 + 8
  294.    h = @h * (self.contents.font.size + 10) + 26
  295.    # 生成呼出窗口
  296.    set_fukidasi(self.x, self.y, w, h)
  297.    # 生成角色名字窗口
  298.    set_namewindow
  299.    # 初始化信息表示使用的变量
  300.    @dx = @dy = 0
  301.    @cursor_width = 0
  302.    @contents_drawing = true
  303.    # 瞬间表示的情况下
  304.    if $mes_speed == 0
  305.      # 循环信息描绘处理
  306.      while $game_temp.message_text != ""
  307.        draw_massage
  308.      end
  309.      draw_opt_text
  310.      @contents_showing_end = true
  311.      @contents_drawing = false
  312.    else
  313.      # 一个一个描绘文字
  314.      refresh_drawtext
  315.    end
  316. end
  317.  
  318. #--------------------------------------------------------------------------
  319. # ○ 一个一个描绘文字
  320. #--------------------------------------------------------------------------
  321. def refresh_drawtext
  322.    #........................................................................
  323.    if Input.trigger?(Input::C) and $game_switches[34]
  324.      # 循环信息描绘处理
  325.      while $game_temp.message_text != ""
  326.        draw_massage
  327.      end
  328.      draw_opt_text
  329.      @contents_showing_end = true
  330.      @contents_drawing = false
  331.    end
  332.    #........................................................................
  333.    if $game_temp.message_text != nil
  334.      if @wait > 0
  335.        @wait -= 1
  336.      elsif @wait == 0
  337.        # 描绘处理
  338.        draw_massage
  339.        @wait = $mes_speed
  340.      end
  341.    end
  342.    # 描绘结束
  343.    if $game_temp.message_text == ""
  344.      draw_opt_text
  345.      @contents_showing_end = true
  346.      @contents_drawing = false
  347.    end
  348. end
  349.  
  350. #--------------------------------------------------------------------------
  351. # ○ 66rpg-refresh
  352. #--------------------------------------------------------------------------
  353.   def refresh
  354.     # 初期化
  355.     self.contents.clear
  356.     self.contents.font.color = normal_color
  357.     self.contents.font.size = Font.default_size
  358.     @x = @y = @max_x = @max_y = @indent = @lines = 0
  359.     @left_keep = @right_keep = false
  360.     @face_indent = 0
  361.     @opacity = 255
  362.     @cursor_width = 0
  363.     @write_speed = 0
  364.     @write_wait = 0
  365.     @mid_stop = false
  366.     @face_file = nil
  367.     @popchar = -2
  368.     if $game_temp.choice_start == 0
  369.       @x = 8
  370.     end
  371.     if $game_temp.message_text != nil
  372.       @now_text = $game_temp.message_text
  373.       #——头像设置
  374.       if (/\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
  375.         @face_file = $1 + ".png"
  376.         @x = @face_indent = 128
  377.         if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
  378.           self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  379.         end
  380.         @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
  381.       end
  382.       #——左半身像设置
  383.       if (/\\[Ll]\[(.+?)\]/.match(@now_text))!=nil then
  384.         @face = "66rpg_" + $1 + "_h.png"
  385.         if $加密 == true
  386.           if @left_picture != nil
  387.             @left_picture.dispose
  388.           end
  389.           @left_picture = Sprite.new
  390.           @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  391.           @left_picture.y = [email]480-@left_picture.bitmap.height[/email]
  392.           @left_picture.x = 0
  393.           @left_picture.mirror = true
  394.           @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  395.         else         
  396.           if FileTest.exist?("Graphics/battlers/#{@face}")
  397.             if @left_picture != nil
  398.               @left_picture.dispose
  399.             end
  400.             @left_picture = Sprite.new
  401.             @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  402.             @left_picture.y = [email]480-@left_picture.bitmap.height[/email]
  403.             @left_picture.x = 0
  404.             @left_picture.mirror = true
  405.             @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  406.           end
  407.         end        
  408.       end
  409.       #——右半身像设置
  410.       if (/\\[Rr]\[(.+?)\]/.match(@now_text))!=nil then
  411.         @face = "66rpg_" + $1 + "_h.png"
  412.         if $加密 == true
  413.           if @right_picture != nil
  414.             @right_picture.dispose
  415.           end
  416.           @right_picture = Sprite.new
  417.           @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  418.           @right_picture.y = [email]480-@right_picture.bitmap.height[/email]
  419.           @right_picture.x = [email]640-@right_picture.bitmap.width[/email]
  420.           @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  421.         else
  422.           if FileTest.exist?("Graphics/battlers/#{@face}")
  423.             if @right_picture != nil
  424.               @right_picture.dispose
  425.             end
  426.             @right_picture = Sprite.new
  427.             @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  428.             @right_picture.y = [email]480-@right_picture.bitmap.height[/email]
  429.             @right_picture.x = [email]640-@right_picture.bitmap.width[/email]
  430.             @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  431.           end
  432.         end
  433.       end
  434.       if (/\\[Rr]k/.match(@now_text)) != nil
  435.         @right_keep = true
  436.         @now_text.sub!(/\\[Rr]k/) { "" }
  437.       end
  438.       if (/\\[Ll]k/.match(@now_text)) != nil
  439.         @left_keep = true
  440.         @now_text.sub!(/\\[Ll]k/) { "" }
  441.       end
  442.       # 显示人物姓名
  443.       name_window_set = false
  444.       if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
  445.         name_window_set = true
  446.         name_text = $1
  447.         @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
  448.       end
  449.  
  450.       # 文字位置的判定
  451.       if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then
  452.         @popchar = $1.to_i
  453.         if @popchar == -1
  454.           @x = @indent = 48
  455.           @y = 4
  456.         end
  457.         @now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
  458.       end
  459.  
  460.       # 开始
  461.       begin
  462.         last_text = @now_text.clone
  463.         @now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  464.       end until @now_text == last_text
  465.       @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  466.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  467.     end
  468.     @now_text.gsub!(/\\\\/) { "\000" }
  469.     @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  470.     @now_text.gsub!(/\\[Gg]/) { "\002" }
  471.     @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  472.     @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  473.     @now_text.gsub!(/\\[.]/) { "\005" }
  474.     @now_text.gsub!(/\\[|]/) { "\006" }
  475.  
  476.     @now_text.gsub!(/\\[>]/) { "\016" }
  477.     @now_text.gsub!(/\\[<]/) { "\017" }
  478.     @now_text.gsub!(/\\[!]/) { "\020" }
  479.     @now_text.gsub!(/\\[~]/) { "\021" }
  480.  
  481.     @now_text.gsub!(/\\[Ii]/) { "\023" }
  482.     @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  483.     @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  484.     @now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
  485.     @now_text.gsub!(/\\[Kk]\[(.*?)\]/) { "\027[#{$1}]" }
  486.     if @popchar >= 0
  487.       @text_save = @now_text.clone
  488.       @max_x = 0
  489.       @max_y = 4
  490.       for i in 0..3
  491.         line = @now_text.split(/\n/)[3-i]
  492.         @max_y -= 1 if line == nil and @max_y <= 4-i
  493.         next if line == nil
  494.         cx = contents.text_size(line).width
  495.         @max_x = cx if cx > @max_x
  496.       end
  497.       self.width = @max_x + 48 + @face_indent
  498.       self.height = (@max_y - 1) * 32 + 64
  499.     else
  500.       @max_x = self.width - 32 - @face_indent
  501.     end
  502.     reset_window
  503.       if name_window_set
  504.         off_x = 0
  505.         off_y = -40
  506.         space = 2
  507.         x = self.x + off_x - space / 2
  508.         y = self.y + off_y - space / 2
  509.         w = self.contents.text_size(name_text).width + 26 + space
  510.         h = 40 + space
  511.         @name_window_frame = Window_Frame.new(x, y, w, h)
  512.         @name_window_frame.z = self.z + 1
  513.         x = self.x + off_x + 4
  514.         y = self.y + off_y
  515.         @name_window_text = Air_Text.new(x+4, y+6, name_text)
  516.         @name_window_text.z = self.z + 2
  517.       end
  518.     end
  519.     reset_window
  520.     if $game_temp.choice_max > 0
  521.       @item_max = $game_temp.choice_max
  522.       self.active = true
  523.       self.index = 0
  524.     end
  525.     if $game_temp.num_input_variable_id > 0
  526.       digits_max = $game_temp.num_input_digits_max
  527.       number = $game_variables[$game_temp.num_input_variable_id]
  528.       @input_number_window = Window_InputNumber.new(digits_max)
  529.       @input_number_window.number = number
  530.       @input_number_window.x = self.x + 8
  531.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  532.     end
  533.   end
  534.  
  535.  
  536.  
  537. #==============================================================================
  538. # ■ Window_Frame (枠だけで中身の無いウィンドウ)
  539. #==============================================================================
  540. class Window_Frame < Window_Base
  541. #--------------------------------------------------------------------------
  542. # ● オブジェクト初期化
  543. #--------------------------------------------------------------------------
  544. def initialize(x, y, width, height)
  545.    super(x, y, width, height)
  546.    self.contents = nil
  547.    self.back_opacity = 100
  548. end
  549. #--------------------------------------------------------------------------
  550. # ● 解放
  551. #--------------------------------------------------------------------------
  552. def dispose
  553.    super
  554. end
  555. end
  556.  
  557. #==============================================================================
  558. # ■ Air_Text (何も無いところに文字描写 = 枠の無い瞬間表示メッセージウィンドウ)
  559. #==============================================================================
  560. class Air_Text < Window_Base
  561.   #--------------------------------------------------------------------------
  562.   # ● オブジェクト初期化
  563.   #--------------------------------------------------------------------------
  564.   def initialize(x, y, designate_text)
  565.     super(x-16, y-16, 32 + designate_text.size * 12, 56)
  566.     self.opacity = 0
  567.     self.back_opacity = 0
  568.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  569.     w = self.contents.width
  570.     h = self.contents.height
  571.     self.contents.draw_text(0, 0, w, h, designate_text)
  572.   end
  573.   #--------------------------------------------------------------------------
  574.   # ● 解放
  575.   #--------------------------------------------------------------------------
  576.   def dispose
  577.     self.contents.clear
  578.     super
  579.   end
  580. end
  581.  
  582.  
  583. #--------------------------------------------------------------------------
  584. # ○ 取得窗口尺寸
  585. #--------------------------------------------------------------------------
  586. def get_windowsize
  587.    x = y = 0
  588.    @h = @w = 0
  589.    @cursor_width = 0
  590.    # 有选择项的话,处理字的缩进
  591.    if $game_temp.choice_start == 0
  592.      x = 16
  593.    end
  594.    # 有等待显示的文字的情况下
  595.    if $game_temp.message_text != nil
  596.    text = $game_temp.message_text.clone
  597.      # 限制文字处理
  598.      begin
  599.        last_text = text.clone
  600.        text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  601.      end until text == last_text
  602.      text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  603.        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  604.      end
  605.      # 为了方便、将 "\\\\" 变换为 "\000"
  606.      text.gsub!(/\\\\/) { "\000" }
  607.      # "\\C" 变为 "\001" 、"\\G" 变为 "\002"
  608.      text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001" }
  609.      text.gsub!(/\\[Gg]/) { "\002" }
  610.      # c 获取 1 个字 (如果不能取得文字就循环)
  611.      while ((c = text.slice!(/./m)) != nil)
  612.        # \\ 的情况下
  613.        if c == "\000"
  614.          # 还原为本来的文字
  615.          c = "\\"
  616.        end
  617.        # \C[n] 或者 \G 的情况下
  618.        if c == "\001" or c == "\002"
  619.          # 下面的文字
  620.          next
  621.        end
  622.        # 另起一行文字的情况下
  623.        if c == "\n"
  624.          # y 累加 1
  625.          y += 1
  626.          # 取得纵横尺寸
  627.          @h = y
  628.          @w = x > @w ? x : @w
  629.          if y >= $game_temp.choice_start
  630.            @w = x + 8 > @w ? x + 8 : @w
  631.          end
  632.          x = 0
  633.          # 移动到选择项的下一行
  634.          if y >= $game_temp.choice_start
  635.            x = 8
  636.          end
  637.          # 下面的文字
  638.          next
  639.        end
  640.        # x 为要描绘文字的宽度加法运算
  641.        x += self.contents.text_size(c).width
  642.      end
  643.    end
  644.    # 输入数值的情况
  645.    if $game_temp.num_input_variable_id > 0
  646.      digits_max = $game_temp.num_input_digits_max
  647.      number = $game_variables[$game_temp.num_input_variable_id]
  648.      @h += 1
  649.      x = digits_max * self.contents.font.size + 16
  650.      @w = x > @w ? x : @w
  651.    end
  652. end
  653.  
  654. #--------------------------------------------------------------------------
  655. # ○ 描绘信息处理
  656. #--------------------------------------------------------------------------
  657. def draw_massage
  658.    # 有等待显示的文字的情况下
  659.    if $game_temp.message_text != nil
  660.      text = $game_temp.message_text
  661.      # 限制文字处理
  662.      begin
  663.        last_text = text.clone
  664.        text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  665.      end until text == last_text
  666.      text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  667.        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  668.      end
  669.      # 为了方便、将 "\\\\" 变换为 "\000"
  670.      text.gsub!(/\\\\/) { "\000" }
  671.      # "\\C" 变为 "\001"、"\\G" 变为 "\002"
  672.      text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  673.      text.gsub!(/\\[Gg]/) { "\002" }
  674.      # c 获取 1 个字
  675.      if ((c = text.slice!(/./m)) != nil)
  676.        # 选择项的情况
  677.        if @dy >= $game_temp.choice_start
  678.          # 处理字的缩进
  679.          @dx = 8
  680.          # 描绘文字
  681.          self.contents.draw_text(4 + @dx, 32 * @dy, 40, 32, c)
  682.          # x 为要描绘文字宽度的加法运算
  683.          @dx += self.contents.text_size(c).width
  684.          # 循环
  685.          while ((c = text.slice!(/./m)) != "\n")
  686.            # 描绘文字
  687.            self.contents.draw_text(4 + @dx, 32 * @dy, 40, 32, c)
  688.            # x 为要描绘文字宽度的加法运算
  689.            @dx += self.contents.text_size(c).width
  690.          end
  691.          if c == "\n"
  692.            # 更新光标宽度
  693.            @cursor_width = [@cursor_width, @dx].max
  694.            # dy 累加 1
  695.            @dy += 1
  696.            @dx = 0
  697.          end
  698.          return
  699.        end
  700.        # \\ 的情况下
  701.        if c == "\000"
  702.          # 还原为本来的文字
  703.          c = "\\"
  704.        end
  705.        #\C[n] 的情况下
  706.        if c == "\001"
  707.          # 更改文字色
  708.          text.sub!(/\[([0-9]+)\]/, "")
  709.          color = $1.to_i
  710.          if color >= 0 and color <= 7
  711.            self.contents.font.color = text_color(color)
  712.          end
  713.        end
  714.        # \G 的情况下
  715.        if c == "\002"
  716.          # 生成金钱窗口
  717.          if @gold_window == nil
  718.            @gold_window = Window_Gold.new
  719.            @gold_window.x = 560 - @gold_window.width
  720.            if $game_temp.in_battle
  721.              @gold_window.y = 192
  722.            else
  723.              @gold_window.y = self.y >= 128 ? 32 : 384
  724.            end
  725.            @gold_window.opacity = self.opacity
  726.            @gold_window.back_opacity = self.back_opacity
  727.          end
  728.        end
  729.        # 另起一行文字的情况下
  730.        if c == "\n"
  731.          # dy 累加 1
  732.          @dy += 1
  733.          @dx = 0
  734.        end
  735.        # 描绘文字
  736.        self.contents.font.size = FUKI::MES_FONT_SIZE
  737.        font_size = self.contents.font.size
  738.         if c == "\001" or c == "\002" or c == "\003" or c == "\n"
  739.          c = ""
  740.        else
  741.          self.contents.draw_text(4+@dx, (font_size+10)*@dy, font_size, font_size, c)
  742.        end
  743.        # dx 为要描绘文字的宽度加法运算
  744.        @dx += self.contents.text_size(c).width
  745.      end
  746.    end
  747. end
  748.  
  749. #--------------------------------------------------------------------------
  750. # ○ 选择项和输入数值的情况下
  751. #--------------------------------------------------------------------------
  752. def draw_opt_text
  753.    # 选择项的情况下
  754.    if $game_temp.choice_max > 0
  755.      @item_max = $game_temp.choice_max
  756.      self.active = true
  757.      self.index = 0
  758.    end
  759.    # 输入数值的情况下
  760.    if $game_temp.num_input_variable_id > 0
  761.      digits_max = $game_temp.num_input_digits_max
  762.      number = $game_variables[$game_temp.num_input_variable_id]
  763.      @input_number_window = Window_InputNumber.new(digits_max)
  764.      @input_number_window.number = number
  765.      @input_number_window.x = self.x + 8
  766.      @input_number_window.y = self.y + $game_temp.num_input_start * 32
  767.    end
  768. end
  769.  
  770. #--------------------------------------------------------------------------
  771. # ○ 设置呼出对话框
  772. #--------------------------------------------------------------------------
  773. def set_fukidasi(x, y, width, height)
  774.    # $mes_id 为空的时候,不显示呼出对话框
  775.    if $mes_id == nil or $mes_id == ""
  776.      del_fukidasi
  777.      reset_window
  778.    else
  779.      # 不显示暂停标志
  780.      self.pause = false
  781.      # 取得对话框位置
  782.      pos = get_fuki_pos(width, height)
  783.      x = pos[0]
  784.      y = pos[1]
  785.      skin = FUKI::FUKI_SKIN_NAME != "" ? FUKI::FUKI_SKIN_NAME : $game_system.windowskin_name
  786.      # 生成呼出对话框
  787.      self.windowskin = RPG::Cache.windowskin(skin)
  788.      self.x = x
  789.      self.y = y
  790.      self.height = height
  791.      self.width = width
  792.      self.contents.dispose
  793.      self.contents = Bitmap.new(width - 32, height - 32)
  794.      self.back_opacity = FUKI::FUKI_OPACITY
  795.      self.contents.clear
  796.      self.contents.font.color = normal_color
  797.      self.contents.font.size = FUKI::MES_FONT_SIZE
  798.      # 描绘尾部图标
  799.      if $game_system.message_frame == 0
  800.        # 取得位置
  801.        tale_pos = get_tale_pos
  802.        @tale = Sprite.new
  803.        # 是否显示尾部图标 <- bbschat
  804.        if FUKI::TAIL_SHOW == true
  805.          case @message_position
  806.            when 0  # 上
  807.              @tale.bitmap = RPG::Cache.windowskin(skin + "-top")
  808.              @tale.x = tale_pos[0]
  809.              @tale.y = tale_pos[1]
  810.              @tale.z = self.z + 1
  811.            when 1  # 中
  812.              @tale.dispose
  813.              @tale = nil
  814.            when 2  # 下
  815.              @tale.bitmap = RPG::Cache.windowskin(skin + "-under")
  816.              @tale.x = tale_pos[0]
  817.              @tale.y = tale_pos[1]
  818.              @tale.z = self.z + 1
  819.          end
  820.        end
  821.      end
  822.    end
  823. end
  824.  
  825. #--------------------------------------------------------------------------
  826. # ○ 计算呼出对话框的位置
  827. #--------------------------------------------------------------------------
  828. def get_fuki_pos(width, height)
  829.  
  830.    # 取得角色
  831.    @character = get_character($mes_id)
  832.    if @character == nil
  833.      # 角色不存在的情况下使用默认信息框
  834.      del_fukidasi
  835.      reset_window
  836.      return
  837.    end
  838.    # 处理坐标
  839.    x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - (width / 2)
  840.    # 为尽量显示在画面内而移动横坐标
  841.    if x + width > 640
  842.      x = 640 - width
  843.    elsif x < 0
  844.      x = 0
  845.    end
  846.    # 决定窗口位置
  847.    case $game_system.message_position
  848.      when 0  # 上
  849.        y = (@character.real_y - $game_map.display_y + 64) * 32 / 128 - height - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP
  850.      when 1  # 中
  851.        y = (480 - height) / 2
  852.        x = (640 - width) / 2
  853.      when 2  # 下
  854.        y =  (@character.real_y - $game_map.display_y + 64) * 32 / 128 + 32 + FUKI::POP_SHIFT_UNDER
  855.    end
  856.    # 纪录文章显示位置
  857.    @message_position = $game_system.message_position
  858.    # 如果选择自动修正,则如果文章会显示到画面外则自动改变窗口的尺寸(高度)
  859.    if FUKI::POS_FIX
  860.      case @message_position
  861.        when 0  # 上
  862.          if y <= 0
  863.            @message_position = 2
  864.            y =  (@character.real_y - $game_map.display_y + 64) * 32 / 128 + 32 + FUKI::POP_SHIFT_UNDER
  865.          end
  866.        when 2  # 下
  867.          if y + height >= 480
  868.            p "上"
  869.            @message_position = 0
  870.            y = (@character.real_y - $game_map.display_y + 64) * 32 / 128 - height - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP
  871.          end
  872.      end
  873.    end
  874.    return [x,y]
  875.  
  876. end
  877.  
  878. #--------------------------------------------------------------------------
  879. # ○ 计算尾部图标的位置
  880. #--------------------------------------------------------------------------
  881. def get_tale_pos
  882.    case @message_position
  883.      when 0  # 上
  884.        # 处理坐标
  885.        x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16
  886.        # 画面边缘的话则移动位置
  887.        if FUKI::CORNER_SHIFT
  888.          if x == 0
  889.            x = FUKI::SHIFT_PIXEL
  890.          elsif x == 640 - 32
  891.            x = 640 - 32 - FUKI::SHIFT_PIXEL
  892.          end
  893.        end
  894.        y = self.y + self.height - 16
  895.      when 1  # 中
  896.        x = nil
  897.        y = nil
  898.      when 2  # 下
  899.        # 处理坐标
  900.        x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16
  901.        # 画面边缘的话则移动位置
  902.        if FUKI::CORNER_SHIFT
  903.          if x == 0
  904.            x = FUKI::SHIFT_PIXEL
  905.          elsif @tale.x == 640 - 32
  906.            x = 640 - 32 - FUKI::SHIFT_PIXEL
  907.          end
  908.        end
  909.        y = self.y - 16
  910.    end
  911.    return [x,y]
  912. end
  913.  
  914. #--------------------------------------------------------------------------
  915. # ○ 计算名字窗口的位置
  916. #--------------------------------------------------------------------------
  917. def get_name_pos
  918.    case @face_pic_txt
  919.      when 0  # 文字
  920.        x = self.x + FUKI::NAME_SHIFT_X
  921.        y = self.y - FUKI::NAME_FONT_SIZE - 16 + FUKI::NAME_SHIFT_Y
  922.      when 1  # 图片
  923.        if self.x >= @pic_width + 5
  924.          # 默认头像显示在对话框左边
  925.          x = self.x-@pic_width-5
  926.        else
  927.          # 对话框左边放不下时头像显示在右边
  928.          x = self.x + self.width
  929.        end
  930.        y = self.y+self.height/2 - (@pic_height + 5)/2
  931.      end
  932.  
  933.    return [x,y]
  934. end
  935.  
  936. #--------------------------------------------------------------------------
  937. # ○ 设置角色名字窗口
  938. #--------------------------------------------------------------------------
  939. def set_namewindow
  940.  
  941.    # $mes_name为空时不显示角色名字窗口
  942.    if $mes_name == nil or $mes_name == ""
  943.      return
  944.    else
  945.      # 设定变量
  946.      mes_name = $mes_name
  947.      skin = FUKI::NAME_SKIN_NAME != "" ? FUKI::NAME_SKIN_NAME : $game_system.windowskin_name
  948.  
  949.      #判断名称是否有对应的图片"Graphics/heads/" +
  950.      if $game_temp.namebmp[mes_name] == nil then
  951.        sFile = "Graphics/heads/" + mes_name + ".png"
  952.      else
  953.        sFile = "Graphics/heads/" + $game_temp.namebmp[mes_name] + ".png"
  954.      end
  955.  
  956.      if FileTest.exist?(sFile) == true then
  957.  
  958.        @face_pic_txt = 1                       #名字窗口使用头像<- bbschat
  959.  
  960.        # 生成头像
  961.        bmp = Bitmap.new(sFile)
  962.        @pic_width = bmp.width
  963.        @pic_height = bmp.height
  964.  
  965.        if self.x >= @pic_width + 5
  966.          # 默认头像显示在对话框左边
  967.          name_x = self.x-@pic_width-5
  968.        else
  969.          # 对话框左边放不下时头像显示在右边
  970.          name_x = self.x + self.width
  971.        end
  972.        name_y = self.y+self.height/2 - (@pic_height + 5)/2
  973.  
  974.        # 生成角色头像窗口
  975.        @name_win = Window_Base.new(name_x, name_y, @pic_width + 5, @pic_height + 5)
  976.        @name_win.windowskin = RPG::Cache.windowskin(skin)
  977.        @name_win.back_opacity =0     
  978.        @name_win.z = self.z + 1
  979.  
  980.        @name_contents = Sprite.new
  981.        @name_contents.x = name_x + 2
  982.        @name_contents.y = name_y + 2
  983.        @name_contents.bitmap = bmp
  984.        #@name_contents.z = @name_win.z + 2     #这个用了似乎效果不好<- bbschat
  985.  
  986.      else
  987.  
  988.        @face_pic_txt = 0                       #名字窗口使用文字<- bbschat
  989.  
  990.        # 生成名字
  991.        name_width = mes_name.size / 2 * FUKI::NAME_FONT_SIZE
  992.        name_height = FUKI::NAME_FONT_SIZE
  993.        name_x = self.x + FUKI::NAME_SHIFT_X
  994.        name_y = self.y - name_height - 16 + FUKI::NAME_SHIFT_Y
  995.  
  996.        # 生成角色名字窗口(只有边框)
  997.        @name_win = Window_Base.new(name_x, name_y, name_width + 16, name_height + 16)
  998.        @name_win.windowskin = RPG::Cache.windowskin(skin)
  999.        @name_win.back_opacity = FUKI::NAME_OPACITY
  1000.        @name_win.z = self.z + 1
  1001.  
  1002.        # 为了使空白比Windows类限定的更小使用双重结构
  1003.        @name_contents = Sprite.new
  1004.        @name_contents.x = name_x + 12
  1005.        @name_contents.y = name_y + 8
  1006.        @name_contents.bitmap = Bitmap.new(name_width, name_height)
  1007.        @name_contents.z = @name_win.z + 2
  1008.  
  1009.        # 设定文字色
  1010.        nil_color = Color.new(0,0,0,0)
  1011.        if FUKI::NAME_COLOR != nil_color
  1012.          @name_contents.bitmap.font.color = FUKI::NAME_COLOR
  1013.        else
  1014.          @name_contents.bitmap.font.color = normal_color
  1015.        end
  1016.        @name_contents.bitmap.font.size = FUKI::NAME_FONT_SIZE
  1017.        # 调整窗口尺寸
  1018.        rect = @name_contents.bitmap.text_size(mes_name)
  1019.        @name_win.width = rect.width + 32
  1020.        # 描画名字
  1021.        @name_contents.bitmap.draw_text(rect, mes_name)
  1022.      end
  1023.    end
  1024.  
  1025. end
  1026.  
  1027. #--------------------------------------------------------------------------
  1028. # ○ 释放呼出对话框和角色名字窗口
  1029. #--------------------------------------------------------------------------
  1030. def del_fukidasi
  1031.    if @tale != nil
  1032.      @tale.dispose
  1033.      @tale = nil
  1034.    end
  1035.    if @name_win != nil
  1036.      @name_win.dispose
  1037.      @name_win = nil
  1038.      @name_contents.dispose
  1039.      @name_contents = nil
  1040.    end
  1041.    self.opacity = 0
  1042.    self.x = 80
  1043.    self.width = 480
  1044.    self.height = 160
  1045.    self.contents.dispose
  1046.    self.contents = Bitmap.new(width - 32, height - 32)
  1047.    self.pause = true
  1048. end
  1049.  
  1050. #--------------------------------------------------------------------------
  1051. # ○ 取得角色
  1052. #     parameter : 参数
  1053. #--------------------------------------------------------------------------
  1054. def get_character(parameter)
  1055.   if $game_switches[33]
  1056.    #........................................................................
  1057.    case parameter
  1058.    when 0
  1059.      return $game_player
  1060.    else
  1061.      events = $game_map.events
  1062.      return events == nil ? nil : events[parameter]
  1063.    end
  1064.    #........................................................................
  1065.   else
  1066.    # 参数分歧
  1067.    case parameter
  1068.    when -1  # 玩家
  1069.      return $game_player
  1070.    when 0   # 该事件
  1071.      events = $game_map.events
  1072.      return events == nil ? nil : events[$active_event_id]
  1073.    else     # 特定事件
  1074.     if parameter >0
  1075.       events = $game_map.events
  1076.       return events == nil ? nil : events[parameter]
  1077.     else
  1078.       $game_party.return_char(-parameter-2)
  1079.     end
  1080.    end
  1081.   end
  1082. end
  1083.  
  1084. #--------------------------------------------------------------------------
  1085. # ● 设定窗口位置和不透明度
  1086. #--------------------------------------------------------------------------
  1087. def reset_window
  1088.   if $game_switches[33]
  1089.     #........................................................................
  1090.     # 判定
  1091.     if @popchar >= 0
  1092.       events = $game_map.events
  1093.       if events != nil
  1094.         character = get_character(@popchar)
  1095.         x = [[character.screen_x - 0 - self.width / 2, 4].max, 636 - self.width].min
  1096.         y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
  1097.         self.x = x
  1098.         self.y = y
  1099.       end
  1100.     elsif @popchar == -1
  1101.       self.x = -4
  1102.       self.y = -4
  1103.       self.width = 648
  1104.       self.height = 488
  1105.     else
  1106.       if $game_temp.in_battle
  1107.         self.y = 16
  1108.       else
  1109.         case $game_system.message_position
  1110.         when 0 # 上
  1111.           self.y = 16
  1112.         when 1 # 中
  1113.           self.y = 160
  1114.         when 2 # 下
  1115.           self.y = 304
  1116.         end
  1117.         self.x = 80
  1118.         if @face_file == nil
  1119.           self.width = 480
  1120.         else
  1121.           self.width = 600
  1122.           self.x -= 60
  1123.         end
  1124.         self.height = 160
  1125.       end
  1126.     end
  1127.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1128.     if @face_file != nil
  1129.       self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  1130.     end
  1131.     if @popchar == -1
  1132.       self.opacity = 255
  1133.       self.back_opacity = 0
  1134.     elsif $game_system.message_frame == 0
  1135.       self.opacity = 255
  1136.       self.back_opacity = 200
  1137.     else
  1138.       self.opacity = 0
  1139.       self.back_opacity = 200
  1140.     end
  1141.     #........................................................................
  1142.   else
  1143.    if $game_temp.in_battle
  1144.      self.y = 16
  1145.    else
  1146.      case $game_system.message_position
  1147.      when 0  # 上
  1148.        self.y = 16
  1149.      when 1  # 中
  1150.        self.y = 160
  1151.      when 2  # 下
  1152.        self.y = 304
  1153.      end
  1154.    end
  1155.    if $game_system.message_frame == 0
  1156.      self.opacity = 255
  1157.    else
  1158.      self.opacity = 0
  1159.    end
  1160.    self.back_opacity = FUKI::MES_OPACITY
  1161.   end
  1162. end
  1163.  
  1164. #--------------------------------------------------------------------------
  1165. # ● line_height-66rpg
  1166. #--------------------------------------------------------------------------
  1167. # 返回値:行高
  1168. #--------------------------------------------------------------------------
  1169. def line_height
  1170.    return 32
  1171.    if self.contents.font.size >= 20 and self.contents.font.size <= 24
  1172.      return 32
  1173.    else
  1174.      return self.contents.font.size * 15 / 10
  1175.    end
  1176. end
  1177. #--------------------------------------------------------------------------
  1178. # ● \V 变换-66rpg
  1179. #--------------------------------------------------------------------------
  1180. def convart_value(option, index)
  1181.    option == nil ? option = "" : nil
  1182.    option.downcase!
  1183.    case option
  1184.      when "i"
  1185.        unless $data_items[index].name == nil
  1186.          r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
  1187.        end
  1188.      when "w"
  1189.        unless $data_weapons[index].name == nil
  1190.          r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
  1191.        end
  1192.      when "a"
  1193.        unless $data_armors[index].name == nil
  1194.          r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
  1195.        end
  1196.      when "s"
  1197.        unless $data_skills[index].name == nil
  1198.          r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
  1199.        end
  1200.      else
  1201.      r = $game_variables[index]
  1202.    end
  1203.    r == nil ? r = "" : nil
  1204.    return r
  1205. end
  1206. #--------------------------------------------------------------------------
  1207. # ● 刷新画面
  1208. #--------------------------------------------------------------------------
  1209. def update
  1210.    if $game_switches[33]
  1211.     #........................................................................
  1212.     super
  1213.     if @fade_in
  1214.       self.contents_opacity += 24
  1215.       if @input_number_window != nil
  1216.         @input_number_window.contents_opacity += 24
  1217.       end
  1218.       if self.contents_opacity == 255
  1219.         @fade_in = false
  1220.       end
  1221.       return
  1222.     end
  1223.     @now_text = nil if @now_text == ""
  1224.  
  1225.     if @now_text != nil and @mid_stop == false
  1226.       if @write_wait > 0
  1227.         @write_wait -= 1
  1228.         return
  1229.       end
  1230.       text_not_skip = $game_system.typing
  1231.       while true
  1232.         @max_x = @x if @max_x < @x
  1233.         @max_y = @y if @max_y < @y
  1234.         if (c = @now_text.slice!(/./m)) != nil
  1235.           if c == "\000"
  1236.             c = "\\"
  1237.           end
  1238.           if c == "\001"
  1239.             @now_text.sub!(/\[([0-9]+)\]/, "")
  1240.             color = $1.to_i
  1241.             if color >= 0 and color <= 7
  1242.               self.contents.font.color = text_color(color)
  1243.             end
  1244.             c = ""
  1245.           end
  1246.           if c == "\002"
  1247.             if @gold_window == nil and @popchar <= 0
  1248.               @gold_window = Window_Gold.new
  1249.               @gold_window.x = 560 - @gold_window.width
  1250.               if $game_temp.in_battle
  1251.                 @gold_window.y = 192
  1252.               else
  1253.                 @gold_window.y = self.y >= 128 ? 32 : 384
  1254.               end
  1255.               @gold_window.opacity = self.opacity
  1256.               @gold_window.back_opacity = self.back_opacity
  1257.             end
  1258.             c = ""
  1259.           end
  1260.           if c == "\003"
  1261.             @now_text.sub!(/\[([0-9]+)\]/, "")
  1262.             speed = $1.to_i
  1263.             if speed >= 0 and speed <= 19
  1264.               @write_speed = speed
  1265.             end
  1266.             c = ""
  1267.           end
  1268.           if c == "\004"
  1269.             @now_text.sub!(/\[(.*?)\]/, "")
  1270.             buftxt = $1.dup.to_s
  1271.             if buftxt.match(/\//) == nil and buftxt != "" then
  1272.               $game_system.soundname_on_speak = "Audio/SE/" + buftxt
  1273.             else
  1274.               $game_system.soundname_on_speak = buftxt.dup
  1275.             end
  1276.             c = ""
  1277.           elsif c == "\004"
  1278.             c = ""
  1279.           end
  1280.           if c == "\005"
  1281.             @write_wait += 5
  1282.             c = ""
  1283.           end
  1284.           if c == "\006"
  1285.             @write_wait += 20
  1286.             c = ""
  1287.           end
  1288.           if c == "\016"
  1289.             text_not_skip = false
  1290.             c = ""
  1291.           end
  1292.           if c == "\017"
  1293.             text_not_skip = true
  1294.             c = ""
  1295.           end
  1296.           if c == "\020"
  1297.             @mid_stop = true
  1298.             c = ""
  1299.           end
  1300.           if c == "\021"
  1301.             terminate_message
  1302.             return
  1303.           end
  1304.           if c == "\023"
  1305.             @indent = @x
  1306.             c = ""
  1307.           end
  1308.           if c == "\024"
  1309.             @now_text.sub!(/\[([0-9]+)\]/, "")
  1310.             @opacity = $1.to_i
  1311.             c = ""
  1312.           end
  1313.           if c == "\025"
  1314.             @now_text.sub!(/\[([0-9]+)\]/, "")
  1315.             self.contents.font.size = [[$1.to_i, 6].max, 32].min
  1316.             c = ""
  1317.           end
  1318.           if c == "\026"
  1319.             @now_text.sub!(/\[([0-9]+)\]/, "")
  1320.             @x += $1.to_i
  1321.             c = ""
  1322.           end
  1323.           if c == "\027"
  1324.             @now_text.sub!(/\[(.*?)\]/, "")
  1325.             @x += ruby_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity)
  1326.             if $game_system.soundname_on_speak != ""
  1327.               Audio.se_play($game_system.soundname_on_speak)
  1328.             end
  1329.             c = ""
  1330.           end
  1331.           if c == "\030"
  1332.             @now_text.sub!(/\[(.*?)\]/, "")
  1333.             self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  1334.            if $game_system.soundname_on_speak != ""
  1335.               Audio.se_play($game_system.soundname_on_speak)
  1336.             end
  1337.             @x += 24
  1338.             c = ""
  1339.           end
  1340.           if c == "\n"
  1341.             if @lines >= $game_temp.choice_start
  1342.               @cursor_width = [@cursor_width, @max_x - @face_indent].max
  1343.             end
  1344.             @lines += 1
  1345.             @y += 1
  1346.             @x = 0 + @indent + @face_indent
  1347.             if @lines >= $game_temp.choice_start
  1348.               @x = 8 + @indent + @face_indent
  1349.             end
  1350.             c = ""
  1351.           end
  1352.           if c != ""
  1353.             # 文字描画
  1354.             @x += opacity_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), c, @opacity)
  1355.             if $game_system.soundname_on_speak != "" then
  1356.             Audio.se_play($game_system.soundname_on_speak)
  1357.             end
  1358.           end
  1359.           if Input.press?(Input::C) and $game_switches[34]
  1360.             text_not_skip = false
  1361.           end
  1362.           if Input.press?(Input::B)
  1363.             text_not_skip = false
  1364.           end
  1365.         else
  1366.           text_not_skip = true
  1367.           break
  1368.         end
  1369.         # 終了判定
  1370.         if text_not_skip
  1371.           break
  1372.         end
  1373.       end
  1374.       @write_wait += @write_speed
  1375.       return
  1376.     end
  1377.     if @input_number_window != nil
  1378.       @input_number_window.update
  1379.       # 決定
  1380.       if Input.trigger?(Input::C)
  1381.         $game_system.se_play($data_system.decision_se)
  1382.         $game_variables[$game_temp.num_input_variable_id] =
  1383.         @input_number_window.number
  1384.         $game_map.need_refresh = true
  1385.         @input_number_window.dispose
  1386.         @input_number_window = nil
  1387.         terminate_message
  1388.       end
  1389.       return
  1390.     end
  1391.     if @contents_showing
  1392.       if $game_temp.choice_max == 0
  1393.         self.pause = true
  1394.       end
  1395.       # 取消
  1396.       if Input.trigger?(Input::B)
  1397.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  1398.           $game_system.se_play($data_system.cancel_se)
  1399.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  1400.           terminate_message
  1401.         end
  1402.       end
  1403.       # 決定
  1404.       if Input.trigger?(Input::C)
  1405.         if $game_temp.choice_max > 0
  1406.           $game_system.se_play($data_system.decision_se)
  1407.           $game_temp.choice_proc.call(self.index)
  1408.         end
  1409.         if @mid_stop
  1410.           @mid_stop = false
  1411.           return
  1412.         else
  1413.           terminate_message
  1414.         end
  1415.       end
  1416.       return
  1417.     end
  1418.     if @fade_out == false and $game_temp.message_text != nil
  1419.       @contents_showing = true
  1420.       $game_temp.message_window_showing = true
  1421.       refresh
  1422.       Graphics.frame_reset
  1423.       self.visible = true
  1424.       self.contents_opacity = 0
  1425.     if @input_number_window != nil
  1426.       @input_number_window.contents_opacity = 0
  1427.     end
  1428.       @fade_in = true
  1429.       return
  1430.     end
  1431.     if self.visible
  1432.       @fade_out = true
  1433.       self.opacity -= 48
  1434.       if self.opacity == 0
  1435.         self.visible = false
  1436.         @fade_out = false
  1437.         $game_temp.message_window_showing = false
  1438.       end
  1439.       return
  1440.     end
  1441.     #........................................................................
  1442.   else
  1443.    super
  1444.    # 呼出模式下跟随事件移动
  1445.    if @tale != nil
  1446.      pos = get_fuki_pos(self.width, self.height)
  1447.      self.x = pos[0]
  1448.      self.y = pos[1]
  1449.  
  1450.      tale_pos = get_tale_pos
  1451.      @tale.x = tale_pos[0]
  1452.      @tale.y = tale_pos[1]
  1453.  
  1454.      if @name_win != nil
  1455.        name_pos = get_name_pos
  1456.        @name_win.x = name_pos[0]
  1457.        @name_win.y = name_pos[1]
  1458.        case @face_pic_txt
  1459.          when 0  # 文字
  1460.            @name_contents.x = @name_win.x + 12
  1461.            @name_contents.y = @name_win.y + 8
  1462.          when 1  # 图片
  1463.            @name_contents.x = @name_win.x + 2
  1464.            @name_contents.y = @name_win.y + 2
  1465.          end
  1466.      end
  1467.    end
  1468.  
  1469.    # 渐变的情况下
  1470.    if @fade_in
  1471.      self.contents_opacity += 24
  1472.      if @name_win != nil
  1473.        @name_win.opacity += 24
  1474.      end
  1475.      if @tale != nil
  1476.        @tale.opacity += 24
  1477.      end
  1478.      if @input_number_window != nil
  1479.        @input_number_window.contents_opacity += 24
  1480.      end
  1481.      if self.contents_opacity == 255
  1482.        @fade_in = false
  1483.      end
  1484.      return
  1485.    end
  1486.    # 显示信息中的情况下
  1487.    if @contents_drawing
  1488.      refresh_drawtext
  1489.      return
  1490.    end
  1491.    # 输入数值的情况下
  1492.    if @input_number_window != nil
  1493.      @input_number_window.update
  1494.      # 确定
  1495.      if Input.trigger?(Input::C)
  1496.        $game_system.se_play($data_system.decision_se)
  1497.        $game_variables[$game_temp.num_input_variable_id] =
  1498.          @input_number_window.number
  1499.        $game_map.need_refresh = true
  1500.        # 释放输入数值窗口
  1501.        @input_number_window.dispose
  1502.        @input_number_window = nil
  1503.        terminate_message
  1504.      end
  1505.      return
  1506.    end
  1507.    # 显示信息结束的情况下
  1508.    if @contents_showing_end
  1509.      # 不是显示选择项且不是呼出对话模式则显示暂停标志
  1510.      if $game_temp.choice_max == 0 and @tale == nil
  1511.        self.pause = true
  1512.      else
  1513.        self.pause = false
  1514.      end
  1515.      # 取消
  1516.      if Input.trigger?(Input::B)
  1517.        if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  1518.          $game_system.se_play($data_system.cancel_se)
  1519.          $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  1520.          terminate_message
  1521.        end
  1522.      end
  1523.      # 确定
  1524.      if Input.trigger?(Input::C)
  1525.        if $game_temp.choice_max > 0
  1526.          $game_system.se_play($data_system.decision_se)
  1527.          $game_temp.choice_proc.call(self.index)
  1528.        end
  1529.        terminate_message
  1530.        # 释放呼出窗口
  1531.        del_fukidasi
  1532.      end
  1533.      return
  1534.    end
  1535.    # 在渐变以外的状态下有等待显示的信息与选择项的场合
  1536.    if @fade_out == false and $game_temp.message_text != nil
  1537.      @contents_showing = true
  1538.      $game_temp.message_window_showing = true
  1539.      reset_window
  1540.      refresh_create
  1541.      if @name_win != nil
  1542.        @name_win.opacity = 0
  1543.      end
  1544.      if @tale != nil
  1545.        @tale.opacity = 0
  1546.      end
  1547.      Graphics.frame_reset
  1548.      self.visible = true
  1549.      self.contents_opacity = 0
  1550.      if @input_number_window != nil
  1551.        @input_number_window.contents_opacity = 0
  1552.      end
  1553.      @fade_in = true
  1554.      return
  1555.    end
  1556.    # 没有可以显示的信息、但是窗口为可见的情况下
  1557.    if self.visible
  1558.      @fade_out = true
  1559.      self.opacity -= 48
  1560.      if @name_win != nil
  1561.        @name_win.opacity -= 48
  1562.      end
  1563.      if @tale != nil
  1564.        @tale.opacity -= 48
  1565.      end
  1566.      if self.opacity == 0
  1567.        self.visible = false
  1568.        @fade_out = false
  1569.        $game_temp.message_window_showing = false
  1570.        del_fukidasi
  1571.      end
  1572.      return
  1573.    end
  1574.   end
  1575. end
  1576.  
  1577. #--------------------------------------------------------------------------
  1578. # ● 透過文字描画 - 66rpg
  1579. #--------------------------------------------------------------------------
  1580. # target :描画対象。Bitmapクラスを指定。
  1581. # x :x座標
  1582. # y :y座標
  1583. # str  :描画文字列
  1584. # opacity:透過率(0~255)
  1585. # 返回値 :文字幅(@x増加値)。
  1586. #--------------------------------------------------------------------------
  1587. def opacity_draw_text(target, x, y, str,opacity)
  1588.    height = target.font.size
  1589.    width = target.text_size(str).width
  1590.    opacity = [[opacity, 0].max, 255].min
  1591.    if opacity == 255
  1592.      target.draw_text(x, y, width, height, str)
  1593.      return width
  1594.    else
  1595.      if @opacity_text_buf.width < width or @opacity_text_buf.height < height
  1596.        @opacity_text_buf.dispose
  1597.        @opacity_text_buf = Bitmap.new(width, height)
  1598.      else
  1599.        @opacity_text_buf.clear
  1600.      end
  1601.      @opacity_text_buf.font.size = target.font.size
  1602.      @opacity_text_buf.draw_text(0, 0, width, height, str)
  1603.      target.blt(x, y, @opacity_text_buf, Rect.new(0, 0, width, height), opacity)
  1604.    return width
  1605.    end
  1606. end
  1607. def ruby_draw_text(target, x, y, str,opacity)
  1608.    sizeback = target.font.size
  1609.    target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2
  1610.    rubysize = [rubysize, 6].max
  1611.  
  1612.    opacity = [[opacity, 0].max, 255].min
  1613.    split_s = str.split(/,/)
  1614.  
  1615.    split_s[0] == nil ? split_s[0] = "" : nil
  1616.    split_s[1] == nil ? split_s[1] = "" : nil
  1617.  
  1618.    height = sizeback + rubysize
  1619.    width = target.text_size(split_s[0]).width
  1620.  
  1621.    target.font.size = rubysize
  1622.    ruby_width = target.text_size(split_s[1]).width
  1623.    target.font.size = sizeback
  1624.  
  1625.    buf_width = [target.text_size(split_s[0]).width, ruby_width].max
  1626.  
  1627.    width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0
  1628.  
  1629.    if opacity == 255
  1630.      target.font.size = rubysize
  1631.      target.draw_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1])
  1632.      target.font.size = sizeback
  1633.      target.draw_text(x, y, width, target.font.size, split_s[0])
  1634.      return width
  1635.    else
  1636.      if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height
  1637.        @opacity_text_buf.dispose
  1638.        @opacity_text_buf = Bitmap.new(buf_width, height)
  1639.      else
  1640.        @opacity_text_buf.clear
  1641.      end
  1642.      @opacity_text_buf.font.size = rubysize
  1643.      @opacity_text_buf.draw_text(0 , 0, buf_width, rubysize, split_s[1], 1)
  1644.      @opacity_text_buf.font.size = sizeback
  1645.      @opacity_text_buf.draw_text(0 , rubysize, buf_width, sizeback, split_s[0], 1)
  1646.      if sub_x >= 0
  1647.        target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  1648.      else
  1649.        target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  1650.      end
  1651.      return width
  1652.    end
  1653. end
  1654.  
  1655. #--------------------------------------------------------------------------
  1656. # ● 释放
  1657. #--------------------------------------------------------------------------
  1658. def dispose
  1659.   if $game_switches[33]
  1660.    #........................................................................
  1661.    terminate_message
  1662.    if @gaiji_cache != nil
  1663.      unless @gaiji_cache.disposed?
  1664.        @gaiji_cache.dispose
  1665.      end
  1666.    end
  1667.    unless @opacity_text_buf.disposed?
  1668.      @opacity_text_buf.dispose
  1669.    end
  1670.    $game_temp.message_window_showing = false
  1671.    if @input_number_window != nil
  1672.      @input_number_window.dispose
  1673.    end
  1674.    super
  1675.    #........................................................................
  1676.   else
  1677.    terminate_message
  1678.    $game_temp.message_window_showing = false
  1679.    if @input_number_window != nil
  1680.      @input_number_window.dispose
  1681.    end
  1682.    super
  1683.   end
  1684. end
  1685.  
  1686. #--------------------------------------------------------------------------
  1687. # ● 信息结束处理
  1688. #--------------------------------------------------------------------------
  1689. def terminate_message
  1690.   if $game_switches[33]
  1691.    #........................................................................
  1692.    self.active = false
  1693.    self.pause = false
  1694.    self.index = -1
  1695.    self.contents.clear
  1696.    # 清除显示中标志
  1697.    @contents_showing = false
  1698.    # 呼叫信息调用
  1699.    if $game_temp.message_proc != nil
  1700.      $game_temp.message_proc.call
  1701.    end
  1702.    # 清除文章、选择项、输入数值的相关变量
  1703.    $game_temp.message_text = nil
  1704.    $game_temp.message_proc = nil
  1705.    $game_temp.choice_start = 99
  1706.    $game_temp.choice_max = 0
  1707.    $game_temp.choice_cancel_type = 0
  1708.    $game_temp.choice_proc = nil
  1709.    $game_temp.num_input_start = 99
  1710.    $game_temp.num_input_variable_id = 0
  1711.    $game_temp.num_input_digits_max = 0
  1712.    # 开放金钱窗口
  1713.    if @gold_window != nil
  1714.      @gold_window.dispose
  1715.      @gold_window = nil
  1716.    end
  1717.    if @name_window_frame != nil
  1718.      @name_window_frame.dispose
  1719.      @name_window_frame = nil
  1720.    end
  1721.    if @name_window_text != nil
  1722.      @name_window_text.dispose
  1723.      @name_window_text = nil
  1724.    end
  1725.    if @right_picture != nil and @right_keep == true
  1726.      @right_picture.dispose
  1727.    end   
  1728.    if @left_picture != nil and @left_keep == true
  1729.      @left_picture.dispose
  1730.    end
  1731.    #........................................................................
  1732.   else
  1733.    self.active = false
  1734.    self.pause = false
  1735.    self.index = -1
  1736.    self.contents.clear
  1737.    # 清除显示中标志
  1738.    @contents_showing = false
  1739.    @contents_showing_end = false
  1740.    # 呼叫信息调用
  1741.    if $game_temp.message_proc != nil
  1742.      $game_temp.message_proc.call
  1743.    end
  1744.    # 清除文章、选择项、输入数值的相关变量
  1745.    $game_temp.message_text = nil
  1746.    $game_temp.message_proc = nil
  1747.    $game_temp.choice_start = 99
  1748.    $game_temp.choice_max = 0
  1749.    $game_temp.choice_cancel_type = 0
  1750.    $game_temp.choice_proc = nil
  1751.    $game_temp.num_input_start = 99
  1752.    $game_temp.num_input_variable_id = 0
  1753.    $game_temp.num_input_digits_max = 0
  1754.    # 释放金钱窗口
  1755.    if @gold_window != nil
  1756.      @gold_window.dispose
  1757.      @gold_window = nil
  1758.    end
  1759.   end
  1760. end
  1761.  
  1762. #--------------------------------------------------------------------------
  1763. # ● 刷新光标矩形
  1764. #--------------------------------------------------------------------------
  1765. def update_cursor_rect
  1766.   if $game_switches[33]
  1767.    #.........................................................................
  1768.    if @index >= 0
  1769.      n = $game_temp.choice_start + @index
  1770.      self.cursor_rect.set(4 + @indent + @face_indent, n * 32 + 4, @cursor_width, 32)
  1771.    else
  1772.      self.cursor_rect.empty
  1773.    end
  1774.    #.........................................................................
  1775.   else
  1776.    if @index >= 0
  1777.      n = $game_temp.choice_start + @index
  1778.      self.cursor_rect.set(8, n * 32, @cursor_width, 32)
  1779.    else
  1780.      self.cursor_rect.empty
  1781.    end
  1782.   end
  1783. end
  1784. #--------------------------------------------------------------------------
  1785. # ● 取得普通文字色
  1786. #--------------------------------------------------------------------------
  1787. def normal_color
  1788.    nil_color = Color.new(0,0,0,0)
  1789.    if FUKI::FUKI_COLOR != nil_color
  1790.      color = FUKI::FUKI_COLOR
  1791.    else
  1792.      color = super
  1793.    end
  1794.    return color
  1795. end
  1796. end
  1797.  
  1798. #==============================================================================
  1799. # ■ Interpreter
  1800. #==============================================================================
  1801.  
  1802. class Interpreter
  1803. #--------------------------------------------------------------------------
  1804. # ● 设置事件
  1805. #     event_id : 事件 ID
  1806. #--------------------------------------------------------------------------
  1807. alias setup_fuki setup
  1808. def setup(list, event_id)
  1809.    setup_fuki(list, event_id)
  1810.    # 如果不是战斗中
  1811.    if !($game_temp.in_battle)
  1812.      # 记录事件 ID
  1813.      $active_event_id = event_id
  1814.    end
  1815. end
  1816. end
  1817.  
  1818. #==============================================================================
  1819. # ■ Scene_Map
  1820. #==============================================================================
  1821.  
  1822. class Scene_Map
  1823. #--------------------------------------------------------------------------
  1824. # ● 主处理
  1825. #--------------------------------------------------------------------------
  1826. def main
  1827.    # 生成活动块
  1828.    @spriteset = Spriteset_Map.new
  1829.    # 生成信息窗口
  1830.    @message_window = Window_FukiMessage.new
  1831.    # 执行过渡
  1832.    Graphics.transition
  1833.    # 主循环
  1834.    loop do
  1835.      # 刷新游戏画面
  1836.      Graphics.update
  1837.      # 刷新输入信息
  1838.      Input.update
  1839.      # 刷新画面
  1840.      update
  1841.      # 如果画面切换的话就中断循环
  1842.      if $scene != self
  1843.        break
  1844.      end
  1845.    end
  1846.    # 准备过渡
  1847.    Graphics.freeze
  1848.    # 释放活动块
  1849.    @spriteset.dispose
  1850.    # 释放信息窗口
  1851.    @message_window.dispose
  1852.    # 标题画面切换中的情况下
  1853.    if $scene.is_a?(Scene_Title)
  1854.      # 淡入淡出画面
  1855.      Graphics.transition
  1856.      Graphics.freeze
  1857.    end
  1858. end
  1859. end
  1860.  
  1861. #==============================================================================
  1862. # ■ Window_InputNumber
  1863. #==============================================================================
  1864.  
  1865. class Window_InputNumber < Window_Base
  1866. #--------------------------------------------------------------------------
  1867. # ● 初始化对像
  1868. #     digits_max : 位数
  1869. #--------------------------------------------------------------------------
  1870. def initialize(digits_max)
  1871.    @digits_max = digits_max
  1872.    @number = 0
  1873.    # 从数字的幅度计算(假定与 0~9 等幅)光标的幅度
  1874.    dummy_bitmap = Bitmap.new(32, 32)
  1875.    dummy_bitmap.font.size = FUKI::MES_FONT_SIZE
  1876.    @cursor_width = dummy_bitmap.text_size("0").width + 8
  1877.    dummy_bitmap.dispose
  1878.    super(0, 0, @cursor_width * @digits_max + 32, 64)
  1879.    self.contents = Bitmap.new(width - 32, height - 32)
  1880.    self.contents.font.size = FUKI::MES_FONT_SIZE
  1881.    self.z += 9999
  1882.    self.opacity = 0
  1883.    @index = 0
  1884.    refresh
  1885.    update_cursor_rect
  1886. end
  1887. end

Lv5.捕梦者 (版主)

梦石
20
星屑
1840
在线时间
6925 小时
注册时间
2012-12-14
帖子
11485

短篇十战斗者组别冠军开拓者贵宾短篇九勇士组亚军

2
发表于 2015-5-10 11:27:13 | 只看该作者
本帖最后由 美丽晨露 于 2015-5-10 22:01 编辑
  1. # 如果不想使用角色名字直接作为头像文件名
  2.    # 可在这里重新设定角色名字与文件名的对应关系
  3.    @namebmp ={"玩家"=>"001-Player-Face", "维斯特"=>"002-Player-Face"}
复制代码
这里说明了问题的说。
如果楼主要显示头像的话,可以重新设定角色名字与文件名的对应关系。
如:@namebmp ={"小紫儿"=>"001-Player-Face"}
然后头像名改为:001-Player-Face
最后在事件脚本中输入:chat(事件序号,"小紫儿")
以上。

附上工程范例一枚:
FUKI对话框.zip (274.28 KB, 下载次数: 150)

点评

我指的是66加强对话框的坐标,并不是Fuki的坐标  发表于 2015-5-11 00:20
↓ 脚本261行,这里super(80, 304, 480, 160),请自行修改以达到自己想要的效果谢谢。  发表于 2015-5-10 23:18
这个脚本的普通对话框坐标不对,我想将普通对话框的坐标我想改成左下角,在哪里改,坐标应该写多少  发表于 2015-5-10 23:01
↓ 显示图片吧,这脚本默认没有这个功能。  发表于 2015-5-10 22:10
范例的普通对话框没有头像,如果普通对话框我也想有头像怎么调出?  发表于 2015-5-10 22:09

评分

参与人数 2星屑 +150 梦石 +1 收起 理由
明特·布兰马修 + 150 认可答案
RyanBern + 1 认可答案

查看全部评分

大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
108 小时
注册时间
2015-1-18
帖子
151
3
 楼主| 发表于 2015-5-11 01:44:09 | 只看该作者
问题已解决
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-25 20:09

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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