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

Project1

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

[已经解决] 【求助】主角初期位置想设置剧情和文本速度问题

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
10 小时
注册时间
2013-1-3
帖子
5
跳转到指定楼层
1
发表于 2013-4-28 14:11:11 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
版本是【1.02 简体中文版】
如题,请问有谁知道,如何在游戏一开始就进行剧情?(在主角初期位置)
如题2,请问如何设置文本速度?【 \|不管用 】

Lv5.捕梦者 (版主)

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

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

2
发表于 2013-4-28 14:32:51 | 只看该作者
1.自动执行事件:显示文章+显示图片+播放BGM
2.默认对话好像设定不了,这个不清楚。反正我没有用过默认对话脚本

评分

参与人数 1星屑 +100 收起 理由
hys111111 + 100 我很赞同

查看全部评分

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

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
10 小时
注册时间
2013-1-3
帖子
5
3
 楼主| 发表于 2013-5-21 07:57:47 | 只看该作者
美丽晨露 发表于 2013-4-28 14:32
1.自动执行事件:显示文章+显示图片+播放BGM
2.默认对话好像设定不了,这个不清楚。反正我没有用过默认对话 ...

这么久才回来看见真抱歉_(:з」∠)_
谢谢姑娘w
关于第一个问题,主角初期位置是不能编辑的该怎么办呢......?
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (版主)

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

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

4
发表于 2013-5-21 16:11:15 | 只看该作者
混蛋桦子 发表于 2013-5-21 07:57
这么久才回来看见真抱歉_(:з」∠)_
谢谢姑娘w
关于第一个问题,主角初期位置是不能编辑的该怎么办呢.... ...

在事件编辑模式下
在地图上鼠标右击,选择设定主角初期位置
大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复 支持 反对

使用道具 举报

Lv2.观梦者

故九江太守

梦石
0
星屑
569
在线时间
2160 小时
注册时间
2012-12-5
帖子
4463
5
发表于 2013-5-21 22:13:31 | 只看该作者
文本速度的话,在论坛随便找个对话框脚本。都有文字显示速度,例如这个。
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息 将脚本复制加到Main上面
  3. # ————————————————————————————————————

  4. #——说明

  5. #默认为一个字一个字的方式,如果需要一次全部显示,
  6. #请在游戏中使用脚本:$game_system.typing = true
  7.       
  8. #默认对话字没有声音,如果需要声音,
  9. #请在游戏中使用脚本:$game_system.soundname_on_speak = "这里输入文件名"wav
  10.   #我唯一一个见过“胡乱配音”的游戏是天使帝国2代,该游戏说话的时候每个字符随机发一个外星语音

  11. # 其他在对话中可以使用的功能:
  12.   
  13. # \n[1]:显示1号角色的姓名

  14. # \name[李逍遥]:显示一个“李逍遥”方框,表示说话人姓名

  15. # \p[1]:对话框出现在1号事件的上方
  16. # \p[0]:主人公上方出现对话框
  17. #——————————————————使用\p功能后可以自动调整对话框大小

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

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

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

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

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

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

  24. # \c[1-8]:更改颜色

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

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

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

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

  30. # \>   :文字不用打字方式
  31. # \<   :文字使用打字方式

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

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

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

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

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

  38. # \K[今天天气不错]:在出现“今天天气不错”这几个字的时候播放$game_system.soundname_on_speak设置的音效

  39. # \L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h.png”
  40. # \R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h.png”

  41. # \Lk:清除左边的图像
  42. # \Rk:清除右边的图像
  43. #\f:文件名显示图片名称

  44. #==============================================================================
  45. # ■ Game_System
  46. #------------------------------------------------------------------------------
  47. #  处理系统附属数据的类。也可执行诸如 BGM 管理之类的功能。本类的实例请参考
  48. # $game_system 。
  49. #==============================================================================

  50. class Game_System
  51.   attr_accessor :typing
  52.   attr_accessor :soundname_on_speak
  53.   alias carol3_ini initialize
  54.   def initialize
  55.     carol3_ini
  56.     @typing = true
  57.     @soundname_on_speak = ""
  58.   end
  59. end
  60. $加密 = true
  61. #==============================================================================
  62. # ■ Window_Message
  63. #------------------------------------------------------------------------------
  64. class Window_Message < Window_Selectable
  65.   #--------------------------------------------------------------------------
  66.   # ● 初始化状态
  67.   #--------------------------------------------------------------------------
  68.   def initialize
  69.     super(80, 304, 480, 160)
  70.     self.contents = Bitmap.new(width - 32, height - 32)
  71.     self.visible = false
  72.     self.z = 9998
  73.     @fade_in = false
  74.     @fade_out = false
  75.     @contents_showing = false
  76.     @cursor_width = 0
  77.     $game_system.typing = true
  78.     self.active = false
  79.     self.index = -1
  80.     if $game_system.soundname_on_speak == nil then
  81.       $game_system.soundname_on_speak = ""
  82.     end
  83.     @opacity_text_buf = Bitmap.new(32, 32)
  84.   end
  85.   #--------------------------------------------------------------------------
  86.   # ● 释放
  87.   #--------------------------------------------------------------------------
  88.   def dispose
  89.     terminate_message
  90.     $game_temp.message_window_showing = false
  91.     if @input_number_window != nil
  92.       @input_number_window.dispose
  93.     end
  94.     super
  95.   end
  96.   #--------------------------------------------------------------------------
  97.   # ● 处理信息结束
  98.   #--------------------------------------------------------------------------
  99.   def terminate_message
  100.     self.active = false
  101.     self.pause = false
  102.     self.index = -1
  103.     self.contents.clear
  104.     # 清除显示中标志
  105.     @contents_showing = false
  106.     # 呼叫信息调用
  107.     if $game_temp.message_proc != nil
  108.       $game_temp.message_proc.call
  109.     end
  110.     # 清除文章、选择项、输入数值的相关变量
  111.     $game_temp.message_text = nil
  112.     $game_temp.message_proc = nil
  113.     $game_temp.choice_start = 99
  114.     $game_temp.choice_max = 0
  115.     $game_temp.choice_cancel_type = 0
  116.     $game_temp.choice_proc = nil
  117.     $game_temp.num_input_start = 99
  118.     $game_temp.num_input_variable_id = 0
  119.     $game_temp.num_input_digits_max = 0
  120.     # 开放金钱窗口
  121.     if @gold_window != nil
  122.       @gold_window.dispose
  123.       @gold_window = nil
  124.     end
  125.     if @name_window_frame != nil
  126.       @name_window_frame.dispose
  127.       @name_window_frame = nil
  128.     end
  129.     if @name_window_text != nil
  130.       @name_window_text.dispose
  131.       @name_window_text = nil
  132.     end
  133.     if @right_picture != nil and @right_keep == true
  134.       @right_picture.dispose
  135.     end   
  136.     if @left_picture != nil and @left_keep == true
  137.       @left_picture.dispose
  138.     end
  139.   end
  140.   def refresh
  141.     # 初期化
  142.     self.contents.clear
  143.     self.contents.font.color = normal_color
  144.     self.contents.font.size = Font.default_size
  145.     @x = @y = @max_x = @max_y = @indent = @lines = 0
  146.     @left_keep = @right_keep = false
  147.     @face_indent = 0
  148.     [url=home.php?mod=space&uid=316553]@opacity[/url] = 255
  149.     @cursor_width = 0
  150.     @write_speed = 0
  151.     @write_wait = 0
  152.     @mid_stop = false
  153.     @face_file = nil
  154.     @popchar = -2
  155.     if $game_temp.choice_start == 0
  156.       @x = 8
  157.     end
  158.     if $game_temp.message_text != nil
  159.       @now_text = $game_temp.message_text
  160.       #——头像设置
  161.       if (/\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
  162.         @face_file = $1 + ".png"
  163.         @x = @face_indent = 128
  164.         if FileTest.exist?("Graphics/Battlers/face/" + $1 + ".png")
  165.           self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  166.         end
  167.         @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
  168.       end
  169.       #——左半身像设置
  170.       if (/\\[Ll]\[(.+?)\]/.match(@now_text))!=nil then
  171.         [url=home.php?mod=space&uid=84331]@face[/url] = $1 + ".png"
  172.         if $加密 == true
  173.           if @left_picture != nil
  174.             @left_picture.dispose
  175.           end
  176.           @left_picture = Sprite.new
  177.           @left_picture.bitmap = Bitmap.new("Graphics/Battlers/face/#{@face}")
  178.           @left_picture.y = 480-@left_picture.bitmap.height
  179.           @left_picture.x = 0
  180.           @left_picture.mirror = true
  181.           @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  182.         else         
  183.           if FileTest.exist?("Graphics/Battlers/face/#{face}")
  184.             if @left_picture != nil
  185.               @left_picture.dispose
  186.             end
  187.             @left_picture = Sprite.new
  188.             @left_picture.bitmap = Bitmap.new("Graphics/Battlers/face/#{@face}")
  189.             @left_picture.y = 480-@left_picture.bitmap.height
  190.             @left_picture.x = 0
  191.             @left_picture.mirror = true
  192.             @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  193.           end
  194.         end        
  195.       end
  196.       #——右半身像设置
  197.       if (/\\[Rr]\[(.+?)\]/.match(@now_text))!=nil then
  198.         @face = $1 + ".png"
  199.         if $加密 == true
  200.           if @right_picture != nil
  201.             @right_picture.dispose
  202.           end
  203.           @right_picture = Sprite.new
  204.           @right_picture.bitmap = Bitmap.new("Graphics/Battlers/face/#{@face}")
  205.           @right_picture.y = 480-@right_picture.bitmap.height
  206.           @right_picture.x = 640-@right_picture.bitmap.width
  207.           @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  208.         else
  209.           if FileTest.exist?("Graphics/battlers/#{@face}")
  210.             if @right_picture != nil
  211.               @right_picture.dispose
  212.             end
  213.             @right_picture = Sprite.new
  214.             @right_picture.bitmap = Bitmap.new("Graphics/Battlers/face/#{@face}")
  215.             @right_picture.y = 480-@right_picture.bitmap.height
  216.             @right_picture.x = 640-@right_picture.bitmap.width
  217.             @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  218.           end
  219.         end
  220.       end
  221.       if (/\\[Rr]k/.match(@now_text)) != nil
  222.         @right_keep = true
  223.         @now_text.sub!(/\\[Rr]k/) { "" }
  224.       end
  225.       if (/\\[Ll]k/.match(@now_text)) != nil
  226.         @left_keep = true
  227.         @now_text.sub!(/\\[Ll]k/) { "" }
  228.       end
  229.       # 显示人物姓名
  230.       name_window_set = false
  231.       if (/\\[Mm]\[(.+?)\]/.match(@now_text)) != nil
  232.         name_window_set = true
  233.         name_text = $1
  234.         @now_text.sub!(/\\[Mm]\[(.*?)\]/) { "" }
  235.       end
  236.       
  237.       # 文字位置的判定
  238.       if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then
  239.         @popchar = $1.to_i
  240.         if @popchar == -1
  241.           @x = @indent = 48
  242.           @y = 4
  243.         end
  244.         @now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
  245.       end
  246.       
  247.       # 开始
  248.       begin
  249.         last_text = @now_text.clone
  250.         @now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  251.       end until @now_text == last_text
  252.       @now_text.gsub!(/\\[Mm]\[([0-9]+)\]/) do
  253.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  254.     end
  255.     @now_text.gsub!(/\\\\/) { "\000" }
  256.     @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  257.     @now_text.gsub!(/\\[Gg]/) { "\002" }
  258.     @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  259.     @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  260.     @now_text.gsub!(/\\[.]/) { "\005" }
  261.     @now_text.gsub!(/\\[|]/) { "\006" }

  262.     @now_text.gsub!(/\\[>]/) { "\016" }
  263.     @now_text.gsub!(/\\[<]/) { "\017" }
  264.     @now_text.gsub!(/\\[!]/) { "\020" }
  265.     @now_text.gsub!(/\\[~]/) { "\021" }
  266.    
  267.     @now_text.gsub!(/\\[Ii]/) { "\023" }
  268.     @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  269.     @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  270.     @now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
  271.     @now_text.gsub!(/\\[Kk]\[(.*?)\]/) { "\027[#{$1}]" }
  272.     if @popchar >= 0
  273.       @text_save = @now_text.clone
  274.       @max_x = 0
  275.       @max_y = 4
  276.       for i in 0..3
  277.         line = @now_text.split(/\n/)[3-i]
  278.         @max_y -= 1 if line == nil and @max_y <= 4-i
  279.         next if line == nil
  280.         cx = contents.text_size(line).width
  281.         @max_x = cx if cx > @max_x
  282.       end
  283.       self.width = @max_x + 48 + @face_indent
  284.       self.height = (@max_y - 1) * 32 + 64
  285.     else
  286.       @max_x = self.width - 32 - @face_indent
  287.     end
  288.     reset_window
  289.       if name_window_set
  290.         off_x = 0
  291.         off_y = -40
  292.         space = 2
  293.         x = self.x + off_x - space / 2
  294.         y = self.y + off_y - space / 2
  295.         w = self.contents.text_size(name_text).width + 26 + space
  296.         h = 40 + space
  297.         @name_window_frame = Window_Frame.new(x, y, w, h)
  298.         @name_window_frame.z = self.z + 1
  299.         x = self.x + off_x + 4
  300.         y = self.y + off_y
  301.         @name_window_text = Air_Text.new(x+4, y+6, name_text)
  302.         @name_window_text.z = self.z + 2
  303.       end
  304.     end
  305.     reset_window
  306.     if $game_temp.choice_max > 0
  307.       @item_max = $game_temp.choice_max
  308.       self.active = true
  309.       self.index = 0
  310.     end
  311.     if $game_temp.num_input_variable_id > 0
  312.       digits_max = $game_temp.num_input_digits_max
  313.       number = $game_variables[$game_temp.num_input_variable_id]
  314.       @input_number_window = Window_InputNumber.new(digits_max)
  315.       @input_number_window.number = number
  316.       @input_number_window.x = self.x + 8
  317.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  318.     end
  319.   end
  320.   #--------------------------------------------------------------------------
  321.   # ● 更新
  322.   #--------------------------------------------------------------------------
  323.   def update
  324.     super
  325.     if @fade_in
  326.       self.contents_opacity += 24
  327.       if @input_number_window != nil
  328.         @input_number_window.contents_opacity += 24
  329.       end
  330.       if self.contents_opacity == 255
  331.         @fade_in = false
  332.       end
  333.       return
  334.     end
  335.     @now_text = nil if @now_text == ""
  336.    
  337.     if @now_text != nil and @mid_stop == false
  338.       if @write_wait > 0
  339.         @write_wait -= 1
  340.         return
  341.       end
  342.       text_not_skip = $game_system.typing
  343.       while true
  344.         @max_x = @x if @max_x < @x
  345.         @max_y = @y if @max_y < @y
  346.         if (c = @now_text.slice!(/./m)) != nil
  347.           if c == "\000"
  348.             c = "\\"
  349.           end
  350.           if c == "\001"
  351.             @now_text.sub!(/\[([0-9]+)\]/, "")
  352.             color = $1.to_i
  353.             if color >= 0 and color <= 7
  354.               self.contents.font.color = text_color(color)
  355.             end
  356.             c = ""
  357.           end
  358.           if c == "\002"
  359.             if @gold_window == nil and @popchar <= 0
  360.               @gold_window = Window_Gold.new
  361.               @gold_window.x = 560 - @gold_window.width
  362.               if $game_temp.in_battle
  363.                 @gold_window.y = 192
  364.               else
  365.                 @gold_window.y = self.y >= 128 ? 32 : 384
  366.               end
  367.               @gold_window.opacity = self.opacity
  368.               @gold_window.back_opacity = self.back_opacity
  369.             end
  370.             c = ""
  371.           end
  372.           if c == "\003"
  373.             @now_text.sub!(/\[([0-9]+)\]/, "")
  374.             speed = $1.to_i
  375.             if speed >= 0 and speed <= 19
  376.               @write_speed = speed
  377.             end
  378.             c = ""
  379.           end
  380.           if c == "\004"
  381.             @now_text.sub!(/\[(.*?)\]/, "")
  382.             buftxt = $1.dup.to_s
  383.             if buftxt.match(/\//) == nil and buftxt != "" then
  384.               $game_system.soundname_on_speak = "Audio/SE/" + buftxt
  385.             else
  386.               $game_system.soundname_on_speak = buftxt.dup
  387.             end
  388.             c = ""
  389.           elsif c == "\004"
  390.             c = ""
  391.           end
  392.           if c == "\005"
  393.             @write_wait += 5
  394.             c = ""
  395.           end
  396.           if c == "\006"
  397.             @write_wait += 20
  398.             c = ""
  399.           end
  400.           if c == "\016"
  401.             text_not_skip = false
  402.             c = ""
  403.           end
  404.           if c == "\017"
  405.             text_not_skip = true
  406.             c = ""
  407.           end
  408.           if c == "\020"
  409.             @mid_stop = true
  410.             c = ""
  411.           end
  412.           if c == "\021"
  413.             terminate_message
  414.             return
  415.           end
  416.           if c == "\023"
  417.             @indent = @x
  418.             c = ""
  419.           end
  420.           if c == "\024"
  421.             @now_text.sub!(/\[([0-9]+)\]/, "")
  422.             @opacity = $1.to_i
  423.             c = ""
  424.           end
  425.           if c == "\025"
  426.             @now_text.sub!(/\[([0-9]+)\]/, "")
  427.             self.contents.font.size = [[$1.to_i, 6].max, 32].min
  428.             c = ""
  429.           end
  430.           if c == "\026"
  431.             @now_text.sub!(/\[([0-9]+)\]/, "")
  432.             @x += $1.to_i
  433.             c = ""
  434.           end
  435.           if c == "\027"
  436.             @now_text.sub!(/\[(.*?)\]/, "")
  437.             @x += ruby_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity)
  438.             if $game_system.soundname_on_speak != ""
  439.               Audio.se_play($game_system.soundname_on_speak)
  440.             end
  441.             c = ""
  442.           end
  443.           if c == "\030"
  444.             @now_text.sub!(/\[(.*?)\]/, "")
  445.             self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  446.            if $game_system.soundname_on_speak != ""
  447.               Audio.se_play($game_system.soundname_on_speak)
  448.             end
  449.             @x += 24
  450.             c = ""
  451.           end
  452.           if c == "\n"
  453.             if @lines >= $game_temp.choice_start
  454.               @cursor_width = [@cursor_width, @max_x - @face_indent].max
  455.             end
  456.             @lines += 1
  457.             @y += 1
  458.             @x = 0 + @indent + @face_indent
  459.             if @lines >= $game_temp.choice_start
  460.               @x = 8 + @indent + @face_indent
  461.             end
  462.             c = ""
  463.           end
  464.           if c != ""
  465.             # 文字描画
  466.             @x += opacity_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), c, @opacity)
  467.             #if $game_system.soundname_on_speak != "" then
  468.             #Audio.se_play($game_system.soundname_on_speak)
  469.             #end
  470.             Audio.se_play("Audio/SE/打字音乐.wav")
  471.           end
  472.           if Input.press?(Input::B)
  473.             text_not_skip = false
  474.           end
  475.         else
  476.           text_not_skip = true
  477.           break
  478.         end
  479.         # 終了判定
  480.         if text_not_skip
  481.           break
  482.         end
  483.       end
  484.       @write_wait += @write_speed
  485.       return
  486.     end
  487.     if @input_number_window != nil
  488.       @input_number_window.update
  489.       # 決定
  490.       if Input.trigger?(Input::C)
  491.         $game_system.se_play($data_system.decision_se)
  492.         $game_variables[$game_temp.num_input_variable_id] =
  493.         @input_number_window.number
  494.         $game_map.need_refresh = true
  495.         @input_number_window.dispose
  496.         @input_number_window = nil
  497.         terminate_message
  498.       end
  499.       return
  500.     end
  501.     if @contents_showing
  502.       if $game_temp.choice_max == 0
  503.         self.pause = true
  504.       end
  505.       # 取消
  506.       if Input.trigger?(Input::B)
  507.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  508.           $game_system.se_play($data_system.cancel_se)
  509.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  510.           terminate_message
  511.         end
  512.       end
  513.       # 決定
  514.       if Input.trigger?(Input::C)
  515.         if $game_temp.choice_max > 0
  516.           $game_system.se_play($data_system.decision_se)
  517.           $game_temp.choice_proc.call(self.index)
  518.         end
  519.         if @mid_stop
  520.           @mid_stop = false
  521.           return
  522.         else
  523.           terminate_message
  524.         end
  525.       end
  526.       return
  527.     end
  528.     if @fade_out == false and $game_temp.message_text != nil
  529.       @contents_showing = true
  530.       $game_temp.message_window_showing = true
  531.       refresh
  532.       Graphics.frame_reset
  533.       self.visible = true
  534.       self.contents_opacity = 0
  535.     if @input_number_window != nil
  536.       @input_number_window.contents_opacity = 0
  537.     end
  538.       @fade_in = true
  539.       return
  540.     end
  541.     if self.visible
  542.       @fade_out = true
  543.       self.opacity -= 48
  544.       if self.opacity == 0
  545.         self.visible = false
  546.         @fade_out = false
  547.         $game_temp.message_window_showing = false
  548.       end
  549.       return
  550.     end
  551.   end
  552.   #--------------------------------------------------------------------------
  553.   # ● 获得字符
  554.   #--------------------------------------------------------------------------
  555.   def get_character(parameter)
  556.     case parameter
  557.     when 0
  558.       return $game_player
  559.     else
  560.       events = $game_map.events
  561.       return events == nil ? nil : events[parameter]
  562.     end
  563.   end
  564.   #--------------------------------------------------------------------------
  565.   # ● ウィンドウの位置と不透明度の設定
  566.   #--------------------------------------------------------------------------
  567.   def reset_window
  568.     # 判定
  569.     if @popchar >= 0
  570.       events = $game_map.events
  571.       if events != nil
  572.         character = get_character(@popchar)
  573.         x = [[character.screen_x - 0 - self.width / 2, 4].max, 636 - self.width].min
  574.         y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
  575.         self.x = x
  576.         self.y = y
  577.       end
  578.     elsif @popchar == -1
  579.       self.x = -4
  580.       self.y = -4
  581.       self.width = 648
  582.       self.height = 488
  583.     else
  584.       ##################################
  585.       #if $scene=Scene_Menu.new
  586.         #self.y = 320
  587.         #self.width = 640
  588.         #self.height = 160
  589.         #self.z = 888888
  590.         #self.x = 0
  591.         
  592.       #end
  593.         #################################
  594.       if $game_temp.in_battle
  595.         self.y = 360
  596.         #self.width = 648
  597.         self.height = 120
  598.         #self.z = 888888
  599.         #self.x = 0
  600.         
  601.       else
  602.         case $game_system.message_position
  603.         when 0 # 上
  604.           self.y = 16
  605.         when 1 # 中
  606.           self.y = 160
  607.         when 2 # 下
  608.           self.y = 320
  609.         end
  610.         self.x = 201#80
  611.         if @face_file == nil
  612.           self.width = 435
  613.         else
  614.           self.width = 600
  615.           self.x -= 60
  616.         end
  617.         self.height = 160
  618.       end
  619.     end
  620.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  621.     if @face_file != nil
  622.       self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  623.     end
  624.     if @popchar == -1
  625.       self.opacity = 255
  626.       self.back_opacity = 0
  627.     elsif $game_system.message_frame == 0
  628.       self.opacity = 255
  629.     else
  630.       self.opacity = 0
  631.     end
  632.     self.back_opacity = 255
  633.   end
  634.   #--------------------------------------------------------------------------
  635.   # ● line_height
  636.   #--------------------------------------------------------------------------
  637.   # 返回値:行高
  638.   #--------------------------------------------------------------------------
  639.   def line_height
  640.     return 32
  641.     if self.contents.font.size >= 20 and self.contents.font.size <= 24
  642.       return 32
  643.     else
  644.       return self.contents.font.size * 15 / 10
  645.     end
  646.   end
  647.   #--------------------------------------------------------------------------
  648.   # ● 透過文字描画
  649.   #--------------------------------------------------------------------------
  650.   # target :描画対象。Bitmapクラスを指定。
  651.   # x :x座標
  652.   # y :y座標
  653.   # str  :描画文字列
  654.   # opacity:透過率(0~255)
  655.   # 返回値 :文字幅(@x増加値)。
  656.   #--------------------------------------------------------------------------
  657.   def opacity_draw_text(target, x, y, str,opacity)
  658.     height = target.font.size
  659.     width = target.text_size(str).width
  660.     opacity = [[opacity, 0].max, 255].min
  661.     if opacity == 255
  662.       target.draw_text(x, y, width, height, str)
  663.       return width
  664.     else
  665.       if @opacity_text_buf.width < width or @opacity_text_buf.height < height
  666.         @opacity_text_buf.dispose
  667.         @opacity_text_buf = Bitmap.new(width, height)
  668.       else
  669.         @opacity_text_buf.clear
  670.       end
  671.       @opacity_text_buf.font.size = target.font.size
  672.       @opacity_text_buf.draw_text(0, 0, width, height, str)
  673.       target.blt(x, y, @opacity_text_buf, Rect.new(0, 0, width, height), opacity)
  674.     return width
  675.     end
  676.   end
  677.   def ruby_draw_text(target, x, y, str,opacity)
  678.     sizeback = target.font.size
  679.     target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2
  680.     rubysize = [rubysize, 6].max
  681.    
  682.     opacity = [[opacity, 0].max, 255].min
  683.     split_s = str.split(/,/)
  684.    
  685.     split_s[0] == nil ? split_s[0] = "" : nil
  686.     split_s[1] == nil ? split_s[1] = "" : nil
  687.    
  688.     height = sizeback + rubysize
  689.     width = target.text_size(split_s[0]).width
  690.    
  691.     target.font.size = rubysize
  692.     ruby_width = target.text_size(split_s[1]).width
  693.     target.font.size = sizeback
  694.    
  695.     buf_width = [target.text_size(split_s[0]).width, ruby_width].max
  696.    
  697.     width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0
  698.    
  699.     if opacity == 255
  700.       target.font.size = rubysize
  701.       target.draw_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1])
  702.       target.font.size = sizeback
  703.       target.draw_text(x, y, width, target.font.size, split_s[0])
  704.       return width
  705.     else
  706.       if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height
  707.         @opacity_text_buf.dispose
  708.         @opacity_text_buf = Bitmap.new(buf_width, height)
  709.       else
  710.         @opacity_text_buf.clear
  711.       end
  712.       @opacity_text_buf.font.size = rubysize
  713.       @opacity_text_buf.draw_text(0 , 0, buf_width, rubysize, split_s[1], 1)
  714.       @opacity_text_buf.font.size = sizeback
  715.       @opacity_text_buf.draw_text(0 , rubysize, buf_width, sizeback, split_s[0], 1)
  716.       if sub_x >= 0
  717.         target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  718.       else
  719.         target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  720.       end
  721.       return width
  722.     end
  723.   end
  724.   #--------------------------------------------------------------------------
  725.   # ● \V 变换
  726.   #--------------------------------------------------------------------------
  727.   def convart_value(option, index)
  728.     option == nil ? option = "" : nil
  729.     option.downcase!
  730.     case option
  731.       when "i"
  732.         unless $data_items[index].name == nil
  733.           r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
  734.         end
  735.       when "w"
  736.         unless $data_weapons[index].name == nil
  737.           r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
  738.         end
  739.       when "a"
  740.         unless $data_armors[index].name == nil
  741.           r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
  742.         end
  743.       when "s"
  744.         unless $data_skills[index].name == nil
  745.           r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
  746.         end
  747.       else
  748.       r = $game_variables[index]
  749.     end
  750.     r == nil ? r = "" : nil
  751.     return r
  752.   end
  753.   #--------------------------------------------------------------------------
  754.   # ● 解放
  755.   #--------------------------------------------------------------------------
  756.   def dispose
  757.     terminate_message
  758.     if @gaiji_cache != nil
  759.       unless @gaiji_cache.disposed?
  760.         @gaiji_cache.dispose
  761.       end
  762.     end
  763.     unless @opacity_text_buf.disposed?
  764.       @opacity_text_buf.dispose
  765.     end
  766.     $game_temp.message_window_showing = false
  767.     if @input_number_window != nil
  768.       @input_number_window.dispose
  769.     end
  770.     super
  771.   end
  772.   #--------------------------------------------------------------------------
  773.   # ● 矩形更新
  774.   #--------------------------------------------------------------------------
  775.   def update_cursor_rect
  776.     if @index >= 0
  777.       n = $game_temp.choice_start + @index
  778.       self.cursor_rect.set(4 + @indent + @face_indent, n * 32 + 4, @cursor_width, 32)
  779.     else
  780.       self.cursor_rect.empty
  781.     end
  782.   end
  783. end
  784. #==============================================================================
  785. # ■ Window_Frame (枠だけで中身の無いウィンドウ)
  786. #==============================================================================
  787. class Window_Frame < Window_Base
  788.   #--------------------------------------------------------------------------
  789.   # ● オブジェクト初期化
  790.   #--------------------------------------------------------------------------
  791.   def initialize(x, y, width, height)
  792.     super(x, y, width, height)
  793.     self.contents = nil
  794.     self.back_opacity = 255
  795.   end
  796.   #--------------------------------------------------------------------------
  797.   # ● 解放
  798.   #--------------------------------------------------------------------------
  799.   def dispose
  800.     super
  801.     end
  802.   end
  803. #==============================================================================
  804. # ■ Air_Text (何も無いところに文字描写 = 枠の無い瞬間表示メッセージウィンドウ)
  805. #==============================================================================
  806. class Air_Text < Window_Base
  807.   #--------------------------------------------------------------------------
  808.   # ● オブジェクト初期化
  809.   #--------------------------------------------------------------------------
  810.   def initialize(x, y, designate_text)
  811.     super(x-16, y-16, 32 + designate_text.size * 12, 56)
  812.     self.opacity = 0
  813.     self.back_opacity = 0
  814.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  815.     w = self.contents.width
  816.     h = self.contents.height
  817.     self.contents.draw_text(0, 0, w, h, designate_text)
  818.   end
  819.   #--------------------------------------------------------------------------
  820.   # ● 解放
  821.   #--------------------------------------------------------------------------
  822.   def dispose
  823.     self.contents.clear
  824.     super
  825.   end
  826. end
复制代码

评分

参与人数 1星屑 +66 收起 理由
hys111111 + 66 我很赞同

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
10 小时
注册时间
2013-1-3
帖子
5
6
 楼主| 发表于 2013-5-22 10:26:56 | 只看该作者
美丽晨露 发表于 2013-5-21 16:11
在事件编辑模式下
在地图上鼠标右击,选择设定主角初期位置

啊对的,是关于这个初期位置,因为如果设置了初期位置的话就不能立刻设定剧情了呀.....
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
36 小时
注册时间
2013-5-21
帖子
54
7
发表于 2013-5-22 10:49:25 | 只看该作者
混蛋桦子 发表于 2013-5-22 10:26
啊对的,是关于这个初期位置,因为如果设置了初期位置的话就不能立刻设定剧情了呀..... ...

很简单啊,先做一个地图,背景为全黑。然后把主角出现的位置设置在那里。然后随便一个格子设立一个事件。里面为剧情,设置为自动执行。执行完加入地图传送就可以了。

4`7%3$4X}UO37_1MIH3ID6C.jpg (100.47 KB, 下载次数: 2)

4`7%3$4X}UO37_1MIH3ID6C.jpg

评分

参与人数 1星屑 +100 收起 理由
hys111111 + 100 我很赞同

查看全部评分

回复 支持 反对

使用道具 举报

Lv5.捕梦者 (版主)

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

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

8
发表于 2013-5-22 14:18:59 | 只看该作者
混蛋桦子 发表于 2013-5-22 10:26
啊对的,是关于这个初期位置,因为如果设置了初期位置的话就不能立刻设定剧情了呀..... ...

可以在这个地图上新建一个事件。
事件执行设置为自动执行,专门用来做开头剧情的。
不需要在初始位置设定的。
大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
10 小时
注册时间
2013-1-3
帖子
5
9
 楼主| 发表于 2013-8-1 17:04:43 | 只看该作者
美丽晨露 发表于 2013-5-22 14:18
可以在这个地图上新建一个事件。
事件执行设置为自动执行,专门用来做开头剧情的。
不需要在初始位置设定 ...

懂了!非常感谢ヾ(*´∀`*)ノ
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
10 小时
注册时间
2013-1-3
帖子
5
10
 楼主| 发表于 2013-8-1 17:05:17 | 只看该作者
A345784172 发表于 2013-5-22 10:49
很简单啊,先做一个地图,背景为全黑。然后把主角出现的位置设置在那里。然后随便一个格子设立一个事件。 ...

谢谢的说!会了(ぅω・`*)
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-28 15:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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