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

Project1

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

[已经解决] 有關對話框表示的問題

[复制链接]

Lv1.梦旅人

梦石
0
星屑
60
在线时间
326 小时
注册时间
2010-5-4
帖子
173
跳转到指定楼层
1
发表于 2014-12-13 06:42:24 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
不知道....是不是我脫節這領域太久

在VXAxe中,還能有辦法做到對話時,呈現上方與下方..互動對話的方式嗎?

例如上方說完後...不會消失(或變暗),然後直接換下方對話,這樣交替輪流的

有這類的腳本...請務必告訴我~感謝QAQ

(另外問個傻問題...我爬文很久都沒看到相關腳本...有誰知道那種類似AVG、對話到一半可以調閱『對話紀錄』的腳本)

点评

有人问过,在哪未知  发表于 2014-12-13 08:27

Lv1.梦旅人

梦石
0
星屑
60
在线时间
326 小时
注册时间
2010-5-4
帖子
173
2
 楼主| 发表于 2014-12-14 09:50:51 | 只看该作者
不過找遍這裡,搜索也沒有...才會來發問求助啊QAQ...

希望有哪位還記得的朋友們~提供一下吧QAQ
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
22107
在线时间
8580 小时
注册时间
2011-12-31
帖子
3362
3
发表于 2014-12-14 11:02:53 | 只看该作者
本帖最后由 tseyik 于 2014-12-14 12:33 编辑

吹きだしウィンドウVXAce
https://rpg.blue/thread-255658-1-1.html
MultiMessage マルチメッセージスクリプト

Balloon
RUBY 代码复制
  1. #==============================================================================
  2. # ■ Balloon
  3. #------------------------------------------------------------------------------
  4. #  複数のメッセージを表示するクラスです。
  5. #==============================================================================
  6. #
  7. #     ■吹き出しメッセージ Ver 1.01    2012/11/7
  8. #
  9. #  使い方:イベントコマンド『文章の表示』内に吹き出しウィンドウの
  10. #     対象イベントのIDを入力するだけ
  11. #
  12. # 例:
  13. #
  14. # \w[8]村人
  15. #   「ここは***の村です。
  16. #
  17. # ↑8は対象のイベントID
  18. #
  19. # その他の操作
  20. #・\w[0]  …  主人公に表示
  21. #・\w[-1] …  通常ウィンドウで表示
  22. #・\w[-2] … 実行中のイベントに表示
  23. #・記述なし …  記述なしだとふきだしウィンドウの切り替えを行わず
  24. #               最後のウィンドウに文章の表示が継続されます。
  25. #               いちいち\w[~]と入力しなくても大丈夫です。
  26. #
  27. #       また、記述なしで対象イベントを設定しないまま
  28. #              いきなり文章の表示を実行しても、自動的に実行中のイベントが
  29. #              吹き出しウィンドウの対象となります。
  30. #
  31. #・バグの報告や質問、要望がありましたらこちらへお願いします。
  32. #
  33. #    Gossum magazine     [url]http://gossum.blog.fc2.com/[/url]
  34. #
  35. #==============================================================================
  36.  
  37. # 【使用フォントを変更する場合】
  38. # 文字のサイズがウィンドウの大きさに合わず、
  39. # 正しく表示されない場合は以下の数値で補正してみてください。
  40.  
  41. # 文字の横幅を補正
  42. GOSS_BALL_WIDTH = 2
  43.  
  44. # 文字の高さを補正
  45. GOSS_BALL_HEIGHT = 4
  46.  
  47.  
  48.  
  49. class Balloon
  50.   #--------------------------------------------------------------------------
  51.   # ● オブジェクト初期化
  52.   #--------------------------------------------------------------------------
  53.   def initialize
  54.     @index = nil
  55.     @balloons = {}
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● アクティブなウィンドウの取得
  59.   #--------------------------------------------------------------------------
  60.   def active_window
  61.     @balloons[@index]
  62.   end
  63.   #--------------------------------------------------------------------------
  64.   # ● アクティブなウィンドウの変更
  65.   #--------------------------------------------------------------------------
  66.   def change_balloon(index)
  67.     @index = index
  68.     if @index == -2
  69.       @index = $game_map.interpreter.event_id
  70.     end
  71.     if @balloons[@index] != nil
  72.       @balloons[@index].dispose
  73.     end
  74.     @balloons[@index] = Window_Balloon.new(@index)
  75.     @balloons.each_value do |v|
  76.       v.active = false
  77.       v.change_flag = false
  78.     end
  79.     @balloons[@index].active = true
  80.     return ""
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # ● 全ウィンドウを閉じる
  84.   #--------------------------------------------------------------------------
  85.   def all_window_close
  86.     @balloons.each_value do |window|
  87.       window.close
  88.       window.change_flag = false
  89.     end
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # ● 全ウィンドウを解放
  93.   #--------------------------------------------------------------------------
  94.   def dispose
  95.     @balloons.each_value do |v|
  96.       v.dispose_all_windows
  97.       v.dispose
  98.     end
  99.   end
  100.   #--------------------------------------------------------------------------
  101.   # ● フラグによる制御
  102.   #--------------------------------------------------------------------------
  103.   def flag_control
  104.     if active_window.change_flag == :close
  105.       all_window_close
  106.     end
  107.     if active_window.change_flag != false
  108.       change_balloon(active_window.change_flag)
  109.       @balloons.each_value do |v|
  110.         v.change_flag = false
  111.       end
  112.     end
  113.   end
  114.   #--------------------------------------------------------------------------
  115.   # ● ウィンドウ枠が空の状態で切り替えがあるか監視
  116.   #--------------------------------------------------------------------------
  117.   def active_check
  118.     text = $game_message.all_text.dup
  119.     return false if text == ""
  120.     unless text.include?("\w")
  121.       return change_balloon(-2)
  122.     end
  123.     text.gsub!(/\\/)            { "\e" }
  124.     text.gsub!(/\e\e/)          { "\\" }
  125.     text.gsub!(/\eW\[(-\d)\]/i) { change_balloon($1.to_i) }
  126.     text.gsub!(/\eW\[(\d+)\]/i) { change_balloon($1.to_i) }
  127.   end
  128.   #--------------------------------------------------------------------------
  129.   # ● 更新
  130.   #--------------------------------------------------------------------------
  131.   def update
  132.     if active_window != nil
  133.       active_window.update
  134.       flag_control
  135.     else
  136.       active_check
  137.     end
  138.     @balloons.each_value do |window|
  139.       window.update_all_windows_close
  140.       if window.id != @index and window.closing
  141.         window.update_close
  142.       end
  143.       if window.finish_close?
  144.         @balloons.delete(window.id)
  145.       end
  146.     end
  147.   end
  148. end
  149.  
  150. #==============================================================================
  151. # ■ Window_Balloon
  152. #------------------------------------------------------------------------------
  153. #  文章表示に使うメッセージウィンドウです。
  154. #==============================================================================
  155.  
  156. class Window_Balloon < Window_Message
  157.   attr_reader   :closing              # ウィンドウが閉じ中
  158.   attr_reader   :id                   # ウィンドウのID
  159.   attr_accessor :change_flag          # 変更先のウィンドウID
  160.   #--------------------------------------------------------------------------
  161.   # ● オブジェクト初期化
  162.   #--------------------------------------------------------------------------
  163.   def initialize(id)
  164.     super()
  165.     @id = id
  166.     @change_flag = false
  167.     @position = $game_message.position
  168.     set_position
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # ● 制御文字の事前変換
  172.   #    実際の描画を始める前に、原則として文字列に変わるものだけを置き換える。
  173.   #    文字「\」はエスケープ文字(\e)に変換。
  174.   #--------------------------------------------------------------------------
  175.   def convert_escape_characters(text)
  176.     result = super(text)
  177.     result.gsub!(/\eW\[(\d+)\]/i) { change_window($1.to_i) }
  178.     result.gsub!(/\eW\[(-\d+)\]/i) { change_window($1.to_i) }
  179.     result
  180.   end
  181.   #--------------------------------------------------------------------------
  182.   # ● 全テキストの処理
  183.   #--------------------------------------------------------------------------
  184.   def process_all_text
  185.     text = convert_escape_characters($game_message.all_text)
  186.     if @change_flag != false
  187.       return
  188.     end
  189.     fit_window_size(text.dup)
  190.     open_and_wait
  191.     pos = {}
  192.     new_page(text, pos)
  193.     process_character(text.slice!(0, 1), text, pos) until text.empty?
  194.   end
  195.   #--------------------------------------------------------------------------
  196.   # ● 改ページ処理
  197.   #--------------------------------------------------------------------------
  198.   def new_page(text, pos)
  199.     contents.clear
  200.     draw_face($game_message.face_name, $game_message.face_index, 0, 0)
  201.     reset_font_settings
  202.     pos[:x] = new_line_x
  203.     pos[:y] = 0
  204.     pos[:new_x] = new_line_x
  205.     pos[:height] = calc_line_height(text)
  206.     clear_flags
  207.   end
  208.   #--------------------------------------------------------------------------
  209.   # ● ファイバーのメイン処理
  210.   #--------------------------------------------------------------------------
  211.   def fiber_main
  212.     $game_message.visible = true
  213.     update_background
  214.     update_placement
  215.     loop do
  216.       process_all_text if $game_message.has_text?
  217.       process_input
  218.       $game_message.clear
  219.       @gold_window.close
  220.       Fiber.yield
  221.       break unless text_continue?
  222.     end
  223.     close
  224.     @change_flag = :close
  225.     $game_message.visible = false
  226.     @fiber = nil
  227.   end
  228.   #--------------------------------------------------------------------------
  229.   # ● アクティブなメッセージウィンドウの切り替え処理
  230.   #    id  : ふきだしの対象となるキャラクターのID
  231.   #    空の文字列を返す
  232.   #--------------------------------------------------------------------------
  233.   def change_window(id)
  234.     if @id != id and !(id == -2 and @id == $game_map.interpreter.event_id)
  235.       @change_flag = id
  236.     end
  237.     return ""
  238.   end
  239.   #--------------------------------------------------------------------------
  240.   # ● ウィンドウが完全に閉じた瞬間
  241.   #--------------------------------------------------------------------------
  242.   def finish_close?
  243.     if @finish_close
  244.       @finish_close = false
  245.       return true
  246.     end
  247.     return false
  248.   end
  249.   #--------------------------------------------------------------------------
  250.   # ● ウィンドウを閉じる
  251.   #--------------------------------------------------------------------------
  252.   def close
  253.     @closing = true unless close?
  254.     @opening = false
  255.     self
  256.   end
  257.   #--------------------------------------------------------------------------
  258.   # ● 閉じる処理の更新
  259.   #--------------------------------------------------------------------------
  260.   def update_close
  261.     self.openness -= 48
  262.     if all_close?
  263.       @closing = false
  264.       @finish_close = true
  265.     end
  266.   end
  267.   #--------------------------------------------------------------------------
  268.   # ● 全ウィンドウの閉じる処理の更新
  269.   #--------------------------------------------------------------------------
  270.   def update_all_windows_close
  271.     @gold_window.update_close if @gold_window.closing
  272.     @choice_window.update_close if @choice_window.closing
  273.     @number_window.update_close if @number_window.closing
  274.     @item_window.update_close if @item_window.closing
  275.   end
  276.   #--------------------------------------------------------------------------
  277.   # ● 背景と位置の変更判定
  278.   #--------------------------------------------------------------------------
  279.   def settings_changed?
  280.     @background != $game_message.background
  281.   end
  282.   #--------------------------------------------------------------------------
  283.   # ● ウィンドウの位置を決定
  284.   #--------------------------------------------------------------------------
  285.   def set_position
  286.     return if @id == -1
  287.     if @id != 0
  288.       [url=home.php?mod=space&uid=2631396]@character[/url] = $game_map.events[@id]
  289.     else
  290.       @character = $game_player
  291.     end
  292.     self.x = @character.screen_x - self.width / 2
  293.     self.y = @character.screen_y + 8
  294.     if @position == 0
  295.       self.y -= self.height + 40
  296.     end
  297.   end
  298.   #--------------------------------------------------------------------------
  299.   # ● ウィンドウのサイズをメッセージの内容にあわせる
  300.   #--------------------------------------------------------------------------
  301.   def fit_window_size(text)
  302.     return if @id == -1
  303.     txt = [0]
  304.     i = 0
  305.     until text.empty?
  306.       temp = text.slice!(0,1)
  307.       if temp == "\n"
  308.         i += 1
  309.         txt[i] = 0
  310.       else
  311.         if temp =~ /^[0-9A-Za-z]+$/
  312.           txt[i] += 5
  313.         else
  314.           txt[i] += 10
  315.         end
  316.       end
  317.     end
  318.     space = standard_padding * 2
  319.     self.width = (txt.max / 10 + txt.max % 10) * (22 + GOSS_BALL_WIDTH) + 8
  320.     self.height = space + $game_message.texts.size * (Font.default_size + GOSS_BALL_HEIGHT)
  321.     unless $game_message.face_name.empty?
  322.       self.width += 112
  323.       self.height = 120
  324.     end
  325.     self.arrows_visible = false
  326.     set_position
  327.   end
  328.   #--------------------------------------------------------------------------
  329.   # ● 更新
  330.   #--------------------------------------------------------------------------
  331.   def update
  332.     super
  333.     update_placement
  334.   end
  335.   #--------------------------------------------------------------------------
  336.   # ● ウィンドウ位置の更新
  337.   #--------------------------------------------------------------------------
  338.   def update_placement
  339.     if @id != -1
  340.       set_position
  341.     else
  342.       super()
  343.     end
  344.   end
  345. end
  346.  
  347. #==============================================================================
  348. # ■ Scene_Map
  349. #------------------------------------------------------------------------------
  350. #  マップ画面の処理を行うクラスです。
  351. #==============================================================================
  352.  
  353. class Scene_Map < Scene_Base
  354.   #--------------------------------------------------------------------------
  355.   # ● メッセージウィンドウの作成
  356.   #--------------------------------------------------------------------------
  357.   def create_message_window
  358.     @message_window = Balloon.new
  359.   end
  360.   #--------------------------------------------------------------------------
  361.   # ● 全ウィンドウの更新
  362.   #--------------------------------------------------------------------------
  363.   def update_all_windows
  364.     instance_variables.each do |varname|
  365.       ivar = instance_variable_get(varname)
  366.       ivar.update if ivar.is_a?(Window)
  367.     end
  368.     @message_window.update
  369.   end
  370.   #--------------------------------------------------------------------------
  371.   # ● 全ウィンドウの解放
  372.   #--------------------------------------------------------------------------
  373.   def dispose_all_windows
  374.     instance_variables.each do |varname|
  375.       ivar = instance_variable_get(varname)
  376.       ivar.dispose if ivar.is_a?(Window)
  377.     end
  378.     @message_window.dispose
  379.   end
  380. end
  381.  
  382. #==============================================================================
  383. # ■ Window_Base
  384. #------------------------------------------------------------------------------
  385. #  ゲーム中の全てのウィンドウのスーパークラスです。
  386. #==============================================================================
  387.  
  388. class Window_Base < Window
  389.   #--------------------------------------------------------------------------
  390.   # ● ちょっと追加
  391.   #--------------------------------------------------------------------------
  392.   def closing
  393.     return (@closing == true and openness != 0)
  394.   end
  395. end
  396.  
  397. #==============================================================================
  398. # ■ Window_ChoiceList
  399. #------------------------------------------------------------------------------
  400. #  イベントコマンド[選択肢の表示]に使用するウィンドウです。
  401. #==============================================================================
  402.  
  403. class Window_ChoiceList < Window_Command
  404.   #--------------------------------------------------------------------------
  405.   # ● ウィンドウ位置の更新
  406.   #--------------------------------------------------------------------------
  407.   def update_placement
  408.     self.width = [max_choice_width + 12, 96].max + padding * 2
  409.     self.width = [width, Graphics.width].min
  410.     self.height = fitting_height($game_message.choices.size)
  411.     self.x = @message_window.x + @message_window.width - self.width
  412.     if @message_window.y >= Graphics.height / 2
  413.       self.y = @message_window.y - height
  414.     else
  415.       self.y = @message_window.y + @message_window.height
  416.     end
  417.   end
  418. end



  

点评

剛剛這測試了一下,呼呼...只能兩者擇一了,似乎用了對話腳本,履歷腳本無法作用  发表于 2014-12-15 01:50
沒,是我眼花...抱歉>"<~  发表于 2014-12-14 18:28
另外,他這是RGSS2....用在RGSS3..會出錯?  发表于 2014-12-14 18:27
我不知道這...是不適用耶0.0...因為想說對話想做成只需要臉圖的上下框0.0...  发表于 2014-12-14 18:21
http://hime.be/rgss.html  发表于 2014-12-14 11:54
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
326 小时
注册时间
2010-5-4
帖子
173
4
 楼主| 发表于 2014-12-16 13:18:58 | 只看该作者
本帖最后由 亂堂和樹 于 2014-12-16 13:22 编辑
tseyik 发表于 2014-12-14 11:02
吹きだしウィンドウVXAce
https://rpg.blue/thread-255658-1-1.html
MultiMessage マルチメッセー ...


我知道我很笨=w="....請容我再問個問題..

吹きだしウィンドウVXAce這腳本...能夠在新增出獨立框嗎?

打算來顯示角色名子之外,還想改變顯示位置用的0.0...
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
22107
在线时间
8580 小时
注册时间
2011-12-31
帖子
3362
5
发表于 2014-12-16 13:43:12 | 只看该作者
本帖最后由 tseyik 于 2014-12-16 14:07 编辑
亂堂和樹 发表于 2014-12-16 13:18
我知道我很笨=w="....請容我再問個問題..

吹きだしウィンドウVXAce這腳本...能夠在新增出 ...

用這些功能較多的改版巴
吹き出しウィンドウVXACE
http://tamurarpgvx.blog137.fc2.com/category8-2.html
或吹きだしウィンドウVXAce改
http://nonameillustrator.blog.fc2.com/blog-entry-26.html
吹き出しウィンドウVXACE


●機能一覧
・イベントコマンド「スクリプト」で、$win_x $win_yに値を入力すると、
 ($win_x 、$win_y)の位置にウィンドウを表示する。画面左上が(0,0)。


必要圖片Graphics/System

吹きだしウィンドウVXAce改
還要二個(思考用)
Think-top,Think-under

点评

這個我試過了,但是他不知是否跟我腳本有點點小問題...按ESC時,他會一直連續撥放退出音效0.0...所以才放棄他  发表于 2014-12-16 14:19

评分

参与人数 1梦石 +1 收起 理由
taroxd + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
326 小时
注册时间
2010-5-4
帖子
173
6
 楼主| 发表于 2014-12-18 10:57:56 | 只看该作者
tseyik 发表于 2014-12-16 13:43
用這些功能較多的改版巴
吹き出しウィンドウVXACE
http://tamurarpgvx.blog137.fc2.com/category8-2.html

謝謝大大您的指導,雖然有些部分沒辦法做到...跟想像中的那樣~而且這腳本狂出錯誤啊0.0...看來SRPG腳本跟很多資源都不符合

經過小弟一再的修改後,履歷腳本捨棄了...取代的是固定上下式對話,成果圖如下XD

↓一般劇情模式~是上下式對話0.0...↓





↓SRPG戰鬥模式時,不知為何...對話框不能使用上方,只好全都擇一的在下方顯示了...((意外效果不錯=w=+↓



在一次感謝大大的熱心幫助~感激不盡>"<
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-30 16:57

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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