赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 0 |
最后登录 | 2016-8-17 |
在线时间 | 8 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 840
- 在线时间
- 8 小时
- 注册时间
- 2014-2-8
- 帖子
- 1
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
- =begin
- RGSS3
-
- ★ バトルボイス ★
-
- 戦闘中の行動に応じてボイスを再生します。
-
- ● 使い方 ●========================================================
- Audioフォルダ配下に「VOICE」というフォルダを作成し、
- そこにボイスファイルを保存してください。
- --------------------------------------------------------------------
- アイテム・スキルの使用前にボイスを再生する機能がありますが、
- メモ欄に「使用ボイス無し」と記述されたアイテム・スキルを使用した
- 際には、その機能は無効化されます。
- ====================================================================
-
- ● イベントコマンド ●==============================================
- 初期状態ではアクターにはアクターIDと等しいIDのボイス設定が適応されています。
- 例) アクターIDが 2 のアクターには ボイス設定の 2 が対応
- --------------------------------------------------------------------
- イベントコマンドのスクリプトより下記のコードを実行することで、
- アクターが使用するボイス設定を任意のものに変更できます。
- --------------------------------------------------------------------
- change_voice(actor_id, voice_id)
- --------------------------------------------------------------------
- actor_id : ボイス設定を変更したいアクターID
- voice_id : 利用したいボイス設定ID
- --------------------------------------------------------------------
- 例) change_voice(2, 14)
- 上記スクリプトを実行すると、
- 「アクターIDが 2 のアクターには ボイス設定の 14 が対応」
- といったように設定が変更されます。
- ====================================================================
-
- ● 注意 ●==========================================================
- ニューゲームから始めないとエラーを吐きます。
- ====================================================================
-
- ver1.00
-
- Last Update : 2012/06/10
- 06/10 : 新規
-
- ろかん http://kaisou-ryouiki.sakura.ne.jp/
- =end
- #===========================================
- # 設定箇所
- #===========================================
- module BattleVoice
- #-----------------------------------------------------------------------------
- # 各戦闘行動に対してボイスを設定してください。
- # 設定のないバトラーのボイスは再生されません。
- # 設定の基本形式は以下のとおりです。
- #【形式】
- # ① => [②, ②, ②.....],
- # ① ボイス設定ID(数値)
- # 初期状態ではこの値はアクターID もしくは エネミーIDに対応しています。
- # エネミーのボイスを設定する場合には ID を"負の値にして"設定してください。
- # 例) IDが 4 のエネミーを設定する場合、-4 とする。
- #
- # ② ボイスファイル名(文字列,拡張子不要)
- # 同キャラクターに複数のボイスが設定されている場合、
- # ランダムで再生されるファイルが選択されます。
- #-----------------------------------------------------------------------------
- VOICE_LIST = {
- :battle_start_normal => {
- # ◆ 戦闘開始時:通常(生存メンバーからランダムで一人選んで再生されます)
- # エネミー未対応
- 1 => [],
- },
-
- :battle_start_pinch => {
- # ◆ 戦闘開始時:ピンチ(生存メンバーからランダムで一人選んで再生されます)
- # 戦闘開始時に戦闘不能のメンバーが一人でもいる場合に再生
- # エネミー未対応
- 1 => [],
- },
-
- :battle_start_surprise => {
- # ◆ 戦闘開始時:不意打ち(生存メンバーからランダムで一人選んで再生されます)
- # ピンチよりも優先されます。
- # エネミー未対応
- 1 => [],
- },
-
- :battle_start_preemptive => {
- # ◆ 戦闘開始時:先制攻撃(生存メンバーからランダムで一人選んで再生されます)
- # ピンチよりも優先されます。
- # エネミー未対応
- 1 => [],
- },
-
- :attack => {
- # ◆ 通常攻撃
- 1 => [],
- },
-
- :guard => {
- # ◆ 防御
- 1 => [],
- },
-
- :damage => {
- # ◆ 被ダメージ
- 1 => [],
- -3=> ["fm8","fm25","fm33","fm34","fn7","fn22"],#オボ
- -4=> ["bm1","bm8","bm11","bm17","bm19","bm21","bm28","bm29"],#ウィスパ
- -5=> ["bn1","bn2","bn5","bn6","bn9","bn11","bn16","bn19","bn21"],#ウィスパ
- -6=> ["fm1","fm8","fm16","fm19","fm22","fm32","fm34","fn7","fn22"],#ゴス
- -8=> ["cm2","cm4","cm8","cm10","cm12","cm16","cm22","cm23","cm32"],#ミミック
- -9=> ["cm2","cm4","cm8","cm10","cm12","cm16","cm22","cm23","cm32"],#ミミック
- -10=>["em22","en1","en2","en3","en7","en22","en23"],#エンジェ
- -11=> ["gm8","gm15","gm19","gm33","gm34"],#ハイシーフホム
- -12=> ["gn7","gn12","gn22","gn23"],#ハイシーフホム
- -13=> ["gm8","gm15","gm19","gm33","gm34"],#ハイシーフホム
- -14=> ["gm8","gm15","gm19","gm33","gm34"],#騎士ホム
- -15=> ["gn7","gn12","gn22","gn23"],#騎士ホム
- -16=> ["gm8","gm15","gm19","gm33","gm34"],#オーラ騎士ホム
- -17=> ["gn7","gn12","gn22","gn23"],#オーラ騎士ホム
- -18=> ["cm1","cm7","cm9","cm11","cm19","cm33"],#ルーン
- -19=> ["cm1","cm7","cm8","cm9","cm11","cm16","cm19","cm24","cm33","cm34"],#ルーン
- -20=> ["cn3","cn4","cn8","cn14","cn22","cn23"],#ルーン
- -21=> ["am1","am2","am3","am4","am5","am10","am22","am32","am33"],#マリオ
- -22=> ["an1","an2","an7","an10","an22","an23"],#マリオ
- -23=> ["am1","am2","am3","am4","am5","am10","am22","am32","am33"],#マリオ
- -24=> ["an1","an2","an7","an10","an22","an23"],#マリオ
- -25=> ["bn1","bn2","bn5","bn6","bn9","bn11","bn16","bn19","bn21"],#ウィスパ
- -26=> ["fm1","fm8","fm16","fm19","fm22","fm32","fm34","fn7","fn22"],#ゴス
- -27=> ["gm8","gm15","gm19","gm33","gm34"],#ハイシーフホム
- -33=> ["bm1","bm2","bm34","bn1","bn2","bn20","bn23"],#ポリン
- -34=> ["gm8","gm15","gm19","gm33","gm34"],#シーフホム
- -35=> ["am1","am2","am4","am9","am13","am15","am33","am34"],#ファミリア
- -36=> ["em1","em2","em8","em13","em33","em34"],#クルセコ
- -37=> ["em2","em34","en1","en2","en3","en4","en7","en10","en22","en23"],#クルセコ
- -38=> ["em2","em34","en1","en2","en3","en4","en7","en10","en22","en23"],#クルセコ
- -39=> ["an1","an2","an9","an12","an22","an23"],#ファミリア
- -40=> ["gn7","gn12","gn22","gn23"],#シーフホム
- -41=> ["am1","am2","am8","am13","am14","am18","am25","am33","am34"],#ドレイン
- -42=> ["bm1","bm8","bm33","bn1","bn2","bn22"],#ポポリン
- -43=> ["an1","an2","an7","an16","an22","an23"],#ドレイン
- -44=> ["cm2","cm11","cm7","cm8","cm15","cm17","cm33","cm34"],#シーフ
- -45=> ["cn1","cn21","cn7","cn9","cn11","cn16","cn18","cn22","cn23"],#シーフ
- -46=> ["dm33","dm34","dn22","dn23"],#ゾンビ
- -47=> ["dm33","dm34","dn22","dn23"],#ゾンビ
- -48=> ["em1","em2","em4","em10","em22","em30","em32"],#ヒドラ
- -49=> ["em1","em2","em4","em10","em22","em30","em32"],#ヒドラ
- -50=> ["cn1","cn2","cm7","cm33","cm34","cn3","cn4","cn14"],#ドロップ
- -51=>["em22","em1","em2","em4","en7","em10","en20"],#マスタリン
- -52=> ["dm1","dm8","dm18","dm19","dm24","dn12"],#アンドレ
- -53=> ["dm2","dm13","dm20","dn2","dn10","dn22"],#アンドレ
- -54=> ["em1","em4","em5","em10","em22","em30","em32"],#ピエール
- -55=> ["en1","en2","en3","en4","en7","en18","en20","en23","em2","em16","em26"],#ピエール
- -56=> ["cm2","cm7","cm8","cm13","cm15","cm24","cn1","cn2","cn12"],#デニーロ
- -57=> ["fm1","fm2","fm8","fm13","fm18","fm33","fm34"],#オーク
- -58=> ["fn1","fn2","fn7","fn10","fn22","fn23"],#オーク
- -60=> ["fm1","fm2","fm34","fn2","fn3","fn4","fn23"],#アルゴス
- -61=> ["am1","am3","am4","am10","am18","am22","am23","am32"],#バフォ子
- -62=> ["fm1","fm2","fm34","fn2","fn3","fn4","fn23"],#アルゴス
- -63=> ["bm1","bm2","bm8","bm11","bm19","bm33","bm34"],#プリコ
- -64=> ["bm2","bm6","bm11","bm17","bm21","bm28","bm29","bm30","bm31"],#プリコ
- -65=> ["bn2","bn3","bn5","bn7","bn11","bn14","bn16","bn18","bn19","bn21","bn23"],#プリコ
- -66=> ["fm1","fm2","fm8","fm13","fm14","fm33","fm34"],#クスミ
- -67=> ["fm1","fm2","fm8","fm13","fm14","fm33","fm34"],#クスミ
- -68=> ["fn1","fn2","fn7","fn10","fn22","fn23"],#クスミ
- -69=> ["cm1","cm3","cm7","cm8","cm14","cm17","cm20","cm28"],#ヒメプ
- -70=> ["cm1","cm7","cm8","cm15","cm17","cm23","cn1"],#ヒメプ
- -71=> ["cn1","cn2","cn9","cn11","cn16","cn23"],#ヒメプ
- -72=> ["gm8","gm15","gm19","gm33","gm34"],#ムナ
- -73=> ["cn1","cn2","cn3","cn12","cn22","cn23"],#ムナ
- -74=> ["bm1","bm2","bm6","bm7","bm8","bm11","bm17","bm19","bm33"],#ソヒー
- -75=> ["bm2","bm6","bm8","bm17","bm21","bm29","bm30","bm34"],#ソヒー
- -76=> ["bn2","bn5","bn6","bn11","bn12","bn16","bn18","bn19","bn21","bn23"],#ソヒー
- -77=> ["am1","am2","am8","am19","am30","am33","am34"],#ナインテイル
- -78=> ["an13","an17","am4","am10","am12","am16","am22","am26","am32"],#ナインテイル
- -80=> ["am1","am8","am10","am14","am25","am30","am33","am34"],#バスリ
- -81=> ["am1","am2","am8","am14","am25","am30","am34"],#バスリ
- -82=> ["an2","an3","an10","an12","an16","an23","am31"],#バスリ
- -83=> ["dm1","dm2","dm33","dm34"],#グール
- -84=> ["dn1","dn2","dn7","dn22","dn23"],#グール
- -85=> ["fm1","fm2","fm8","fm13","fm19","fm20","fm25","fm33","fn1"],#メア
- -86=> ["fm22","fm23","fm32","fm33"],#DOP
- -87=> ["fm8","fm19","fm22","fm23","fm25","fm32","fm33","fm34"],#DOP
- -88=> ["fm1","fm34","fn1","fn7","fn10","fn22","fn23"],#DOP
- -89=> ["fm1","fm8","fm22","fm23","fm25","fm34","fn7","fn12","fn22"],#マヤパ
- -90=> ["fm1","fm8","fm22","fm23","fm25","fm34","fn7","fn12","fn22"],#マヤパ
- -91=> ["cm1","cm2","cm7","cm8","cm19","cm24","cm33","cm34"],#エイミー
- -92=> ["cn1","cn2","cn7","cn10","cn12","cn22","cn23"],#エイミー
- -93=> ["fm1","fm2","fm8","fm13","fm18","fm33","fm34"],#廃屋
- -94=> ["fn1","fn2","fn7","fn10","fn22","fn23"],#廃屋
- -95=>["dm33","dn1","dn22","dn23","dm18","dm25"],#暗殺者
- -96=>["dm1","dm8","dm13","dm20","dm34"],#暗殺者
- -98=> ["em1","em2","em4","em5","em10","em12","em14","em22","em23","em30","em32"],#イシス
- -99=> ["am1","am2","am8","am13","am15","am19","am27","am32","am33"],#ミノ
- -100=> ["an1","an2","an3","an4","an8","an10","an12","an14","an21","an23"],#ミノ
- -101=> ["dm1","dm2","dm19","dm23","dm33","dm34","dn12"],#マミー
- -102=> ["dn1","dn2","dn3","dn7","dn22","dn23"],#マミー
- -103=> ["fm8","fm33","fm34"],#古代
- -104=> ["fm8","fm33","fm34","fn1","fn7","fn12","fn22"],#古代
- -105=> ["em4","em5","em10","em12","em14","em22","em23","em30","em32"],#イシス
- -106=> ["am1","am6","am7","am11","am13","am17","am21","am28","am29","am30"],#花売り
- -107=> ["am2","am6","am7","am13","am17","am21","am28","am29","am30","am31"],#花売り
- -108=> ["an5","an6","an11","an12","an15","an18","an19","an20"],#花売り
- -109=> ["an5","an6","an11","an12","an15","an18","an19","an20"],#花売り
- -110=> ["am1","am3","am4","am5","am10","am12","am22","am23","am32","am33"],#ヤファ
- -111=> ["an1","an3","an4","an13","an16","an17","an23"],#ヤファ
- -112=> ["cm2","cm11","cm7","cm8","cm15","cm17","cm33","cm34"],#シーフ
- -113=> ["cn1","cn21","cn7","cn9","cn11","cn16","cn18","cn22","cn23"],#シーフ
- -114=> ["cm1","cm2","cm7","cm8","cm19","cm24","cm33","cm34"],#エイミー
- -115=> ["cn1","cn2","cn7","cn10","cn12","cn22","cn23"],#エイミー
- -116=> ["em1","em2","em4","em10","em22","em32"],#シロップ
- -117=> ["em2","em34","en1","en2","en4","en7","en11","en22","en23"],#シロップ
- -118=> ["em1","em2","em8","em13","em33","em34"],#クルセコ
- -119=> ["em2","em34","en1","en2","en3","en4","en7","en10","en22","en23"],#クルセコ
- -120=> ["em2","em34","en1","en2","en3","en4","en7","en10","en22","en23"],#クルセコ
- -121=> ["dn12","dm1","dm8","dm18","dm19","dm25","dm33"],#ヒュッケ
- -122=> ["dn1","dn2","dn10","dn13","dn22","dn23","dm24","dm20"],#ヒュッケ
- -123=> ["dn1","dn2","dn10","dn13","dn22","dn23"],#ヒュッケ
- -124=> ["fm1","fm2","fm8","fm13","fm18","fm22","fm23","fm33","fm34"],#JK
- -125=> ["fn1","fn2","fn7","fn10","fn22","fn23"],#JK
- -126=> ["fm1","fm2","fm8","fm13","fm18","fm22","fm23","fm33","fm34"],#JK
- -127=> ["fm1","fm2","fm8","fm13","fm18","fm19","fm25","fm33","fm34"],#レイド
- -128=> ["fn1","fn2","fn3","fn4","fn7","fn10","fn12","fm20","fn22","fn23"],#レイド
- -130=> ["am1","am3","am8","am18","am19","am25","am33"],#深淵
- -131=> ["am2","am9","am11","am14","am15","am17","am20","am24","am31"],#深淵
- -132=> ["an2","an3","an4","an12","an14","an16","an17","an21"],#深淵
- -133=> ["fm1","fm2","fm8","fm13","fm18","fm19","fm23","fm25","fm33","fm34"],#ジルタス
- -134=> ["fn1","fn2","fn7","fn10","fn12","fn22","fn23"],#ジルタス
- -135=> ["bm1","bm2","bm6","bm7","bm11","bm17","bm21","bm28","bm29","bm30","bm31"],#アリス
- -136=> ["bn1","bn2","bn5","bn6","bn11","bn12","bn16","bn18","bn19","bn21"],#アリス
- -137=> ["em4","em5","em10","em12","em14","em22","em23","em30","em32","en20"],#ペノメナ
- -138=> ["em4","em5","em10","em12","em14","em22","em23","em30","em32","en20"],#ペノメナ
- -139=> ["dm1","dm2","dm13","dm18","dm19","dm23","dm24","dm25","dm33","dn10","dn12"],#ごつ
- -140=> ["fm2","fm16","fn1","fn2","fn3","fn4","fn23"],#Gスパ
- -141=> ["fm2","fm16","fn1","fn2","fn3","fn4","fn23"],#Gスパ
- -142=> ["em1","em7","em11","em12","em16","em19","em24","em26","em33","em34"],#オシリス
- -143=> ["en1","en2","en3","en6","en11","en16","en22","en23","em24","em26"],#オシリス
- -144=> ["am1","am7","am11","am13","am14","am18","am25","am27","am33"],#ミストレス
- -145=> ["am1","am7","am11","am13","am14","am18","am25","am27","am33"],#ミストレス
- -146=> ["am2","am9","am15","an1","an2","an9","an22","an23"],#ミストレス
- -147=> ["em1","em4","em5","em10","em14","em22","em23","em27","em30","em32"],#マヤー
- -148=> ["em1","em2","em8","em13","em19","em23","em24","em33","en2","en3","en10","en22","en23"],#マヤー
- -149=> ["em1","em2","em8","em13","em19","em23","em24","em33","en2","en3","en10","en22","en23"],#マヤー
- -150=> ["dm1","dm8","dm18","dm19","dm24","dn12"],#アンドレ
- -151=> ["dm2","dm13","dm20","dn2","dn10","dn22"],#アンドレ
- -152=> ["em1","em4","em5","em10","em22","em30","em32"],#ピエール
- -153=> ["en1","en2","en3","en4","en7","en18","en20","en23","em2","em16","em26"],#ピエール
- -154=> ["cm2","cm7","cm8","cm13","cm15","cm24","cn1","cn2","cn12"],#デニーロ
- -155=> ["fm1","fm8","fm13","fm18","fm19","fm25","fm33"],#DL
- -156=> ["fm1","fm2","fm8","fm13","fm18","fm19","fm25","fm33","fm34"],#DL
- -157=> ["fn1","fn7","fn10","fn12","fn22"],#DL
- -158=> ["fn1","fn2","fn7","fn10","fn12","fn22","fn23"],#DL
- -159=> ["fn2","fn3","fn4","fn7","fn10","fn23"],#DL
- -160=> ["em1","em4","em7","em10","em11","em16","em22","em32","em33"],#DI
- -161=> ["em1","em4","em2","em10","em17","em16","em22","em26","em34"],#DI
- -162=> ["en1","en2","en6","en7","en12","en22","em26"],#DI
- -163=> ["en3","en2","en5","en9","en11","en16","en23"],#DI
- -164=> ["en3","en2","en5","en9","en11","en16","en23"],#DI
- -165=> ["fm1","fm2","fm3","fm8","fm18","fm22","fm23","fm32","fm33","fm34"],#バフォ
- -166=> ["fm1","fm2","fm8","fm18","fm22","fm23","fm32","fm33","fm34"],#バフォ
- -167=> ["fm1","fm2","fm8","fm13","fm14","fm33","fm34"],#クスミ
- -170=> ["bm2","bm6","bm11","bm17","bm21","bm28","bm29","bm30","bm31"],#アリス
- -176=> ["fm8","fm19","fm22","fm23","fm25","fm32","fm33","fm34"],#剣士子
- -177=> ["fm1","fm34","fn1","fn7","fn10","fn22","fn23"],#剣士子
- -178=> ["dm1","dm8","dm13","dm19","dm23","dm33","dm34"],#グラリス
- -179=> ["dn1","dn2","dn7","dn22","dn23"],#グラリス
- -180=> ["gm8","gm15","gm33","gm34"],#テリン
- -181=> ["gm15","gm19","gm33","gm34"],#テリン
- -182=> ["gn7","gn12","gn22","gn23"],#テリン
- -183=> ["cm1","cm3","cm6","cm7","cm8","cm11","cm13","cm14","cm15","cm19"],#ビニット
- -184=> ["cm2","cm16","cm24","cm28","cm29","cm31","cm34","cn5","cn22"],#ビニット
- -185=> ["em1","em4","em10","em12","em14","em22","em32"],#ソリン
- -186=> ["em2","em11","em16","em17","em24","em26","em30","em34"],#ソリン
- -187=> ["em1","em4","em10","em11","em17","em19","em27","em34","em33"],#ディフォルテ
- -188=> ["en1","en2","en3","en4","en7","en11","en22","en23"],#ディフォルテ
- -192=> ["gm8","gm15","gm33","gm34"],#アラーム
- -193=> ["fm1","fm2","fm8","fm13","fm18","fm33","fm34"],#廃屋
- -194=> ["fn1","fn2","fn7","fn10","fn22","fn23"],#廃屋
- -195=> ["dm1","dm2","dm8","dm13","dm19","dm20","dm23","dm24","dm25","dm33"],#アノリアン
- -196=> ["dn1","dn2","dn3","dn7","dn10","dn22","dn23"],#アノリアン
- -197=> ["fm8","fm13","fm25","fm34","fn7","fn22"],#ギオペ
- -198=> ["em1","em4","em5","em10","em12","em16","em22","em23","em26","em30"],#デューク
- -199=> ["em1","em4","em8","em14","em19","em30","em32","em34"],#バロン
- -200=> ["en1","en2","en4","en7","en12","en22","en23"],#バロン
- -201=> ["dm1","dm8","dm18","dm19","dm23","dm25","dm33"],#ヒーロー
- -202=> ["dm1","dm2","dm8","dm13","dm19","dm20","dm24","dm25","dm34"],#ヒーロー
- -203=> ["dn1","dn2","dn3","dn7","dn10","dn12","dn22","dn23"],#ヒーロー
- -204=> ["dm1","dm8","dm16","dm18","dm19","dm23","dm25","dm33"],#ヒーロー
- -205=> ["dm2","dm19","dn2","dn3","dn7","dn10","dn12","dn23"],#ヒーロー
- -207=> ["am3","am4","am5","am10","am12","am22","am23","am32"],#W
- -208=> ["am3","am4","am5","am10","am12","am18","am22","am23","am27","am32"],#W
- -209=> ["an1","an2","an3","an4","an9","an12","an13","an16","an17","an22","an23"],#W
- -214=> ["fm3","fm19","fm18","fm23","fn12","fn22"],#エンシ
- -215=> ["fm3","fm19","fm18","fm23","fn12","fn22"],#エンシ
- -216=> ["em1","em7","em8","em11","em13","em16","em17","em19","em34"],#雅
- -217=> ["em24","em6","en1","en7","en22","en23"],#雅
- -218=> ["em1","em7","em8","em11","em13","em16","em17","em19","em34"],#雅
- -219=> ["em24","em6","en1","en7","en22","en23"],#雅
- -220=> ["dm1","dm8","dm18","dm19","dm24","dm25","dm33","dn12"],#忍者
- -221=> ["dm2","dm13","dm20","dn2","dn7","dn10","dn22"],#忍者
- -222=> ["cm1","cm2","cm4","cm8","cm19","cm23","cm33","cm34"],#河童
- -223=> ["cn1","cn3","cn7","cn10","cn12","cn22","cn20"],#河童
- -224=> ["am1","am8","am13","am19","am21","am30"],#怨霊
- -225=> ["an1","an7","an10","an12","an22"],#怨霊
- -226=> ["em1","em7","em8","em11","em17","em19","em30"],#武士子
- -227=> ["en1","en2","en4","en7","en10","en22","en23"],#武士子
- },
-
- :evasion => {
- # ◆ 回避
- },
-
- :miss => {
- # ◆ ミス
- 1 => [],
- },
-
- :use_item => {
- # ◆ アイテム使用
- # エネミー未対応
- 1 => [],
- },
-
- :use_skill => {
- # ◆ スキル使用
- 1 => [],
- },
-
- :dead => {
- # ◆ 戦闘不能
- 1 => [],
- },
-
- :recovery => {
- # ◆ 自分以外の仲間からの回復
- # HP の回復, バッドステートの解除
- 1 => [],
- },
-
- :support_state => {
- # ◆ 自分以外の仲間からのサポートステート付加
- 1 => [],
- },
-
- :bad_state => {
- # ◆ バッドステートが付加
- # バッドステート解除、サポートステート付加よりも優先されます。
- 1 => [],
- -33=> [],
- },
-
- :victory_normal => {
- # ◆ 勝利:通常(生存メンバーからランダムで一人選んで再生されます)
- # エネミー未対応
- 1 => [],
- },
-
- :victory_pinch => {
- # ◆ 勝利:ピンチ(生存メンバーからランダムで一人選んで再生されます)
- # 勝利時にピ戦闘不能のメンバーが一人でもいる場合に再生
- # エネミー未対応
- 1 => [],
- },
-
- :victory_perfect => {
- # ◆ 勝利:ノーダメージ(生存メンバーからランダムで一人選んで再生されます)
- # ピンチよりも優先されます。
- # エネミー未対応
- 1 => [],
- },
-
- :escape => {
- # ◆ 逃走(アクター側は生存メンバーからランダムで一人選んで再生されます)
- 1 => [],
- },
- }
- # ◆ 沈黙ステートID
- # ここに登録されたステートが付加しているキャラクターのボイスは
- # 再生されなくなります。(沈黙や睡眠など....)
- SILENT_STATES = []
- # ◆ ボイス再生を無効化するスイッチ番号
- # ここで指定したスイッチが ON の場合、全てのボイスが再生されなくなります。
- SILENT_SWITCH = 13
- # ◆ ボイスの音量
- VOICE_VOLUME = 90
- # ◆ ボイス再生直後に挟むウェイト
- # ボイスファイルの頭に無音帯がある等の理由で
- # タイミングが合わない場合に利用してください(0~15程度が無難)。
- # 必要ない場合は 0 に。
- VOICE_WAIT = 10
- end
- class Window_BattleLog < Window_Selectable
- # ◆ サポートステート定義 (パラメーター上昇系など....)
- SUPPORT_STATES = [14, 15, 16, 21, 22, 23]
-
- # ◆ バッドステート定義 (毒や麻痺など....)
- BAD_STATES = [2, 3, 4, 5, 6, 7, 8]
- end
- #===========================================
- # ここまで
- #===========================================
- $rsi ||= {}
- $rsi["バトルボイス"] = true
- class RPG::UsableItem < RPG::BaseItem
- def play_voice?
- [email protected]?("使用ボイス無し")
- end
- end
- module BattleVoice
- module_function
- #--------------------------------------------------------------------------
- # ● 生存しておりボイス再生可能なメンバーからランダムで取得
- #--------------------------------------------------------------------------
- def get_rand_member_id(scene_symbol)
- battler = $game_party.alive_members.select{|member|
- if !VOICE_LIST[scene_symbol].has_key?(member.voice_id)
- false
- elsif SILENT_STATES.empty?
- true
- else
- !silent_battler?(member)
- end
- }.sample
- battler ? battler.voice_id : 0
- end
- #--------------------------------------------------------------------------
- # ● ボイス再生不可判定
- #--------------------------------------------------------------------------
- def silent_battler?(battler)
- SILENT_STATES.any?{|state_id| battler.state?(state_id)}
- end
- #--------------------------------------------------------------------------
- # ● 再生するファイル名の取得(nilが返る場合は再生されません)
- #--------------------------------------------------------------------------
- def get_filename(scene_symbol, key)
- if VOICE_LIST[scene_symbol][key]
- VOICE_LIST[scene_symbol][key].sample
- else
- nil
- end
- end
- #--------------------------------------------------------------------------
- # ● バトルボイスの再生
- #--------------------------------------------------------------------------
- def play(scene_symbol, battler = nil)
- unless $game_switches[SILENT_SWITCH]
- if battler
- key = battler.actor? ? battler.voice_id : (battler.enemy_id * -1)
- return if silent_battler?(battler)
- else
- key = get_rand_member_id(scene_symbol)
- end
- filename = get_filename(scene_symbol, key)
- if filename
- Audio.se_play('Audio/VOICE/' + filename, VOICE_VOLUME, 100)
- wait(VOICE_WAIT)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● ウェイト
- #--------------------------------------------------------------------------
- def wait(duration)
- SceneManager.scene.wait(VOICE_WAIT)
- end
- end
- class << BattleManager
- #--------------------------------------------------------------------------
- # ● 戦闘開始
- #--------------------------------------------------------------------------
- alias battle_start_voice_plus battle_start
- def battle_start
- $game_temp.no_damage = true
- $game_party.on_battle_start
- if @preemptive
- BattleVoice.play(:battle_start_preemptive)
- elsif @surprise
- BattleVoice.play(:battle_start_surprise)
- elsif $game_party.pinch?
- BattleVoice.play(:battle_start_pinch)
- else
- BattleVoice.play(:battle_start_normal)
- end
- battle_start_voice_plus
- end
- #--------------------------------------------------------------------------
- # ● 勝利の処理
- #--------------------------------------------------------------------------
- alias process_victory_voice_plus process_victory
- def process_victory
- if $game_temp.no_damage
- BattleVoice.play(:victory_perfect)
- elsif $game_party.pinch?
- BattleVoice.play(:victory_pinch)
- else
- BattleVoice.play(:victory_normal)
- end
- process_victory_voice_plus
- end
- #--------------------------------------------------------------------------
- # ● 逃走の処理 ※再定義
- #--------------------------------------------------------------------------
- def process_escape
- $game_message.add(sprintf(Vocab::EscapeStart, $game_party.name))
- success = @preemptive ? true : (rand < @escape_ratio)
- Sound.play_escape
- if success
- BattleVoice.play(:escape)
- process_abort
- else
- @escape_ratio += 0.1
- $game_message.add('\.' + Vocab::EscapeFailure)
- $game_party.clear_actions
- end
- wait_for_message
- return success
- end
- end
- class Game_Temp
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :no_damage # 戦闘中ノーダメージフラグ
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- alias initialize_voice_plus initialize
- def initialize
- initialize_voice_plus
- @no_damage = true
- end
- end
- class Game_Action
- #--------------------------------------------------------------------------
- # ● 防御判定
- #--------------------------------------------------------------------------
- def guard?
- item == $data_skills[subject.guard_skill_id]
- end
- end
- class Game_ActionResult
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :added_new_states
- #--------------------------------------------------------------------------
- # ● ステータス効果のクリア
- #--------------------------------------------------------------------------
- alias clear_status_effects_voice_plus clear_status_effects
- def clear_status_effects
- @added_new_states = []
- clear_status_effects_voice_plus
- end
- end
- class Game_Battler < Game_BattlerBase
- #--------------------------------------------------------------------------
- # ● 新しいステートの付加
- #--------------------------------------------------------------------------
- alias add_new_state_voice_plus add_new_state
- def add_new_state(state_id)
- @result.added_new_states.push(state_id).uniq!
- add_new_state_voice_plus(state_id)
- end
- end
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :voice_id
- #--------------------------------------------------------------------------
- # ● セットアップ
- #--------------------------------------------------------------------------
- alias setup_voice_plus setup
- def setup(actor_id)
- setup_voice_plus(actor_id)
- @voice_id = @actor_id
- end
- #--------------------------------------------------------------------------
- # ● 被ダメージ時の処理
- #--------------------------------------------------------------------------
- def on_damage(value)
- super(value)
- $game_temp.no_damage = false
- end
- #--------------------------------------------------------------------------
- # ● ダメージ効果の実行
- #--------------------------------------------------------------------------
- alias perform_damage_effect_voice_plus perform_damage_effect
- def perform_damage_effect
- BattleVoice.play(:damage, self) unless dead?
- perform_damage_effect_voice_plus
- end
- #--------------------------------------------------------------------------
- # ● HP の再生
- #--------------------------------------------------------------------------
- def regenerate_hp
- super
- $game_temp.no_damage = false if @result.hp_damage > 0
- end
- #--------------------------------------------------------------------------
- # ● コラプス効果の実行
- #--------------------------------------------------------------------------
- alias perform_collapse_effect_voice_plus perform_collapse_effect
- def perform_collapse_effect
- perform_collapse_effect_voice_plus
- BattleVoice.play(:dead, self) if $game_party.in_battle
- end
- end
- class Game_Enemy < Game_Battler
- #--------------------------------------------------------------------------
- # ● ダメージ効果の実行
- #--------------------------------------------------------------------------
- alias perform_damage_effect_voice_plus perform_damage_effect
- def perform_damage_effect
- BattleVoice.play(:damage, self) unless dead?
- perform_damage_effect_voice_plus
- end
- #--------------------------------------------------------------------------
- # ● コラプス効果の実行
- #--------------------------------------------------------------------------
- alias perform_collapse_effect_voice_plus perform_collapse_effect
- def perform_collapse_effect
- perform_collapse_effect_voice_plus
- BattleVoice.play(:dead, self)
- end
- #--------------------------------------------------------------------------
- # ● 逃げる
- #--------------------------------------------------------------------------
- def escape
- BattleVoice.play(:escape, self)
- super
- end
- end
- class Game_Party < Game_Unit
- #--------------------------------------------------------------------------
- # ● ピンチ状態判定
- #--------------------------------------------------------------------------
- def pinch?
- !dead_members.empty?
- end
- end
- class Game_Interpreter
- #--------------------------------------------------------------------------
- # ● アクターのボイス変更
- #--------------------------------------------------------------------------
- def change_voice(actor_id, voice_id)
- $game_actors[actor_id].voice_id = voice_id
- end
- end
- class Window_BattleLog < Window_Selectable
- #--------------------------------------------------------------------------
- # ● ダメージの表示
- #--------------------------------------------------------------------------
- alias display_damage_voice_plus display_damage
- def display_damage(target, item)
- subject = SceneManager.scene.subject
- if target.result.missed
- BattleVoice.play(:miss, subject)
- elsif target.result.evaded
- BattleVoice.play(:evasion, target)
- else
- if subject != target && subject.actor? == target.actor? && !target.dead? &&
- (target.result.hp_damage < 0 || target.result.mp_damage < 0 || target.result.tp_damage < 0)
- BattleVoice.play(:recovery, target)
- end
- end
- display_damage_voice_plus(target, item)
- end
- #--------------------------------------------------------------------------
- # ● 影響を受けたステータスの表示
- #--------------------------------------------------------------------------
- alias display_affected_status_voice_plus display_affected_status
- def display_affected_status(target, item)
- if item && target.result.status_affected?
- subject = SceneManager.scene.subject
- if subject != target
- if target.result.added_new_states.any?{|id| BAD_STATES.include?(id)}
- BattleVoice.play(:bad_state, target)
- elsif subject.actor? == target.actor?
- if target.result.removed_states.any?{|id| BAD_STATES.include?(id)}
- BattleVoice.play(:recovery, target)
- elsif target.result.added_new_states.any?{|id| SUPPORT_STATES.include?(id)}
- BattleVoice.play(:support_state, target)
- end
- end
- end
- end
- display_affected_status_voice_plus(target, item)
- end
- end
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_reader :subject
- #--------------------------------------------------------------------------
- # ● スキル/アイテムの使用
- #--------------------------------------------------------------------------
- alias use_item_voice_plus use_item
- def use_item
- if @subject.current_action.attack?
- BattleVoice.play(:attack, @subject)
- elsif @subject.current_action.guard?
- BattleVoice.play(:guard, @subject)
- else
- if @subject.current_action.item.play_voice?
- case @subject.current_action.item
- when RPG::Item
- BattleVoice.play(:use_item, @subject)
- when RPG::Skill
- BattleVoice.play(:use_skill, @subject)
- end
- end
- end
- use_item_voice_plus
- end
- end
复制代码 请问我想在一个事件后面播放出一次
BattleVoice.play(:damage 的音效,该如何用脚本调用
这里的damage音效已经分配了按ID的随机,不能用Audio.bgs_play达到目的了
|
|