赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 3 |
经验 | 0 |
最后登录 | 2023-5-22 |
在线时间 | 17 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 330
- 在线时间
- 17 小时
- 注册时间
- 2022-1-1
- 帖子
- 45
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 D_Lohy 于 2022-1-3 14:05 编辑
RT ,脚本如下X
自动换行和文字音效同时使用导致了文字音效脚本失效(单独使用没有问题)
有没有解决方法或者有别的可以脚本可以兼容呢?
文字音效作者:@喵呜喵5 (我自己加了一点东西X
自动换行作者:@iisnow
文字音效:
- =begin
- ===============================================================================
- 来自喵呜喵5加强的 ひきも記文字制作的效果音 的修改版
- ===============================================================================
- 《喵呜喵5加强的ひきも記的<★ RGSS3_メッセージ効果音 Ver1.1>》的修改版(?)
- 添加2个定义 一个是音量一个是声调XD
- =
- ===============================================================================
- ひきも記文字效果音加强 By喵呜喵5
- ===============================================================================
- 【说明】
- ひきも記的《★ RGSS3_メッセージ効果音 Ver1.1》的修改版
- (原脚本:http://hikimoki.sakura.ne.jp/rgss3/script_neta/tmmessagese.rb)
- 使用的文字效果音分别命名为Cursor0、Cursor1、Cursor2……放到SE文件夹下
- 接着修改变量的数值,即可实现不同对话使用不同文字效果音,
- 不能实现一句对话中途修改效果音的效果,因为我懒得去研究转义字符怎么写……
-
- =
- ==============================================================================
- ★ RGSS3_メッセージ効果音 Ver1.1
- ==============================================================================
- 作者:tomoaky
- webサイト:ひきも記 (http://hikimoki.sakura.ne.jp/)
- 文章の表示コマンド実行時、文字の表示と一緒に効果音を鳴らします。
- 制御文字 \B を使って効果音を再生するかどうかを設定できます。
- \B が出てくるたびに切り替わりますが AUTO_SE が true の場合は
- 最初から効果音が鳴る状態になっています。
- おまけ機能として文章の表示速度を変更することができます。
- 设定了游戏变量(初期设定是8号)的数值越大
- 显示速度越慢。1 是默认速度最低值。
- 使用游戏变量(初期设定)
- 0008
-
- 2012.01.22 Ver1.1
- おまけ機能の文章表示速度変更を追加
-
- 2012.01.21 Ver1.0
- 公开
- =end
-
- module TMMESSAGESE
-
- AUTO_SE = true #true为自动播放
- VN_MESSAGE_WAIT = 93 #设置文字显示速度的变量
- SE_TYPE = 94 #设置使用哪个效果音的变量
- SE_VOLUME = 95 #设置效果音音量的变量
- SE_PITCH = 96 #设置效果音声调的变量
- end
-
- #==============================================================================
- # ■ Window_Message
- #==============================================================================
- class Window_Message
- #--------------------------------------------------------------------------
- # ● フラグのクリア
- #--------------------------------------------------------------------------
- alias tmmessagese_window_message_clear_flags clear_flags
- def clear_flags
- tmmessagese_window_message_clear_flags
- @se_flag = TMMESSAGESE::AUTO_SE
- @se_name = "Cursor"+$game_variables[TMMESSAGESE::SE_TYPE].to_s
- @se_volume = $game_variables[TMMESSAGESE::SE_VOLUME]
- @se_pitch = $game_variables[TMMESSAGESE::SE_PITCH]
- end
- #--------------------------------------------------------------------------
- # ● 一文字出力後のウェイト
- #--------------------------------------------------------------------------
- alias tmessagese_window_message_wait_for_one_character wait_for_one_character
- def wait_for_one_character
- [$game_variables[TMMESSAGESE::VN_MESSAGE_WAIT], 1].max.times do |i|
- tmessagese_window_message_wait_for_one_character
- end
- end
- #--------------------------------------------------------------------------
- # ● 文字效果音处理(?
- #--------------------------------------------------------------------------
- alias tmmessagese_window_message_process_normal_character process_normal_character
- def process_normal_character(c, pos)
- tmmessagese_window_message_process_normal_character(c, pos)
- RPG::SE.new(@se_name,@se_volume,@se_pitch).play if @se_flag
- end
- #--------------------------------------------------------------------------
- # ● 制御文字の処理
- # code : 制御文字の本体部分(「\C[1]」なら「C」)
- # text : 描画処理中の文字列バッファ(必要なら破壊的に変更)
- # pos : 描画位置 {:x, :y, :new_x, :height}
- #--------------------------------------------------------------------------
- alias tmmessage_window_message_process_escape_character process_escape_character
- def process_escape_character(code, text, pos)
- case code.upcase
- when 'B'
- @se_flag ^= true
- else
- tmmessage_window_message_process_escape_character(code, text, pos)
- end
- end
- end
复制代码
自动换行:
- class Window_Base
- alias :iisnow_convert_escape_characters :convert_escape_characters
- def convert_escape_characters(text)
- result = iisnow_convert_escape_characters(text)
- result.gsub!(/\ek/) { "\k" }
- result.gsub!(/\ef/) { "\f" }
- result
- end
- def process_character(c, text, pos)
- case c
- when "\r"
- return
- when "\n"
- process_new_line(text, pos) if !@auto_n
- when "\k"
- @auto_n = false
- when "\f"
- process_new_page(text, pos)
- when "\e"
- process_escape_character(obtain_escape_code(text), text, pos)
- else
- process_normal_character(c,text,pos)
- end
- end
- def process_normal_character(c,text,pos)
- @auto_n = true
- text_width = text_size(c).width
- if real_width - pos[:x] > text_width
- draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c)
- pos[:x] += text_width
- else
- process_new_line(text,pos)
- process_normal_character(c,text,pos)
- end
- end
- def real_width
- return self.width - 2 * standard_padding
- end
- end
- class Window_Message
- def process_normal_character(c,text,pos)
- super
- wait_for_one_character
- end
- end
复制代码
|
|