RMXP用に『イーサバウンド』のような戦闘ナレーションを行うスクリプトはありますか?
https://forum.chaos-project.com/index.php/topic,9411.0.html
こちらのフォーラムを見つけたのですが、リンクが効いていないようで、他のスクリプトも見つかりません。
RMXP用に『イーサバウンド』のような戦闘ナレーションを行うスクリプトはありますか?
https://forum.chaos-project.com/index.php/topic,9411.0.html
こちらのフォーラムを見つけたのですが、リンクが効いていないようで、他のスクリプトも見つかりません。
問題のサイトは、很久前に終了した古いホスティングサービス上にあり、残念ながらその痕跡も見つかりませんでした。現状では、誰かが何らかの理由で自分のドライブにそれを保管していないか尋ねるしかないようです。
二つ目の選択肢は別のサイトを見つけることですが、これも私には見つかりません。面白いことに、あなたが投稿したスレッドへ誘導する別のスレッドを見つけました… ![]()
三つ目の選択肢は自分で作成することですが、これには5分以上かかると思います。 ![]()
わかりました。引き続き探しますが、Rubyの勉強もしているので、自分で作る必要があるかもしれません。
2020年に作成したスクリプトの不安定なバージョンです。自由に改変してください。
戦闘ログ機能ですが、現在『地球の裏側』(EarthBound) のシステムを再現したスクリプトパックを作成中なので、もう少し待ったほうが良いかもしれません。
Cap’n Coco Charm が昔 Starmen.net で公開していたスクリプトを流用しています。いずれより完全なバージョンの開発も検討できますが、とりあえずこれを送りますので、ご自由にお使いください。
#==============================================================================
# ** Moveto's Battle Log 1.0 - 10/28/2020 **
#
#-------------------------------------------------
# このバージョンは安定性があまり高くありません。
# 放棄されたプロジェクトのために作成されたものですが、
# 正常に動作します(ただしレビューは行っていません)。
#==============================================================================
module MVBLSYS
#-------
# 設定
#-------
# ログウィンドウの位置
X = 8
Y = 8
# ログエリアのサイズ
WIDTH = 624
HEIGHT = 82
# 行数
MAX_LINES = 4
# フォントサイズ
FONT_SIZE = 20
# 表示速度
# 1 = 速い
# 2 = 普通
# 3 = 遅い
LETTER_SPEED = 2
# 行間隔
LINE_HEIGHT = 20
# メッセージ完了後、画面に表示される時間
MESSAGE_WAIT = 35
#-------------
# * ログ作成
#-------------
def self.create
dispose
@sprite = Sprite.new
@sprite.x = X
@sprite.y = Y
@sprite.z = 9999
@bitmap = Bitmap.new(WIDTH, HEIGHT)
@sprite.bitmap = @bitmap
@messages = []
@current_text = ""
@display_text = ""
@text_index = 0
@wait = 0
@active = true
refresh
end
#---------
# * 更新
#---------
def self.update
return if @sprite == nil
return if @bitmap == nil
# 書き込み中のメッセージがない場合
if @current_text == nil or @current_text == ""
return
end
# 続ける前に待機
if @wait > 0
@wait -= 1
return
end
# メッセージのタイピング中
if @text_index < @current_text.length
if Graphics.frame_count % LETTER_SPEED == 0
@text_index += 1
@display_text = @current_text[0, @text_index]
refresh
end
else
# メッセージ終了
@wait = MESSAGE_WAIT
end
end
#--------------
# * メッセージ追加
#--------------
def self.add(text)
return if text == nil
text = text.to_s
@messages = [] if @messages == nil
@messages.push(text)
while @messages.size > MAX_LINES
@messages.shift
end
@current_text = text
@display_text = ""
@text_index = 0
@wait = 0
refresh
end
#---------------
# * メッセージ表示
#---------------
def self.message(text)
add(text)
end
#----------------------
# * 描画の更新
#----------------------
def self.refresh
return if @bitmap == nil
@bitmap.clear
# ログの背景
@bitmap.fill_rect(
0,
0,
WIDTH,
HEIGHT,
Color.new(0, 0, 0, 180)
)
# 縁取り
border = Color.new(255, 255, 255, 255)
@bitmap.fill_rect(0, 0, WIDTH, 2, border)
@bitmap.fill_rect(0, HEIGHT - 2, WIDTH, 2, border)
@bitmap.fill_rect(0, 0, 2, HEIGHT, border)
@bitmap.fill_rect(WIDTH - 2, 0, 2, HEIGHT, border)
# フォント
@bitmap.font.name = "Arial"
@bitmap.font.size = FONT_SIZE
@bitmap.font.bold = false
@bitmap.font.italic = false
@bitmap.font.color = Color.new(255, 255, 255, 255)
#------------------------
# 過去のメッセージを描画
#------------------------
if @messages != nil
count = @messages.size
# 最後のメッセージは現在タイピング中のバージョンに置き換えられる
if count > 0
last_index = count - 1
else
last_index = -1
end
y = 5
for i in 0...count
text = @messages[i]
# 現在のメッセージの場合、タイピング済みのバージョンを使用
if i == last_index and
@current_text != nil and
@current_text != ""
text = @display_text
end
@bitmap.draw_text(
10,
y,
WIDTH - 20,
LINE_HEIGHT,
text,
0
)
y += LINE_HEIGHT
end
end
end
#----------------------
# * 存在確認
#----------------------
def self.exist?
return false if @sprite == nil
return false if @bitmap == nil
return true
end
#----------
# * 削除
#----------
def self.clear
@messages = []
@current_text = ""
@display_text = ""
@text_index = 0
@wait = 0
refresh
end
#-----------------
# * ログの破棄
#-----------------
def self.dispose
if @sprite != nil
@sprite.bitmap = nil
@sprite.dispose
@sprite = nil
end
if @bitmap != nil
@bitmap.dispose
@bitmap = nil
end
@messages = []
@current_text = ""
@display_text = ""
@text_index = 0
@wait = 0
end
end
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
#------------------
# * メイン処理
#------------------
alias mvbl_battle_log_main main
def main
# 戦闘開始前にログを作成
MVBLSYS.create
# 初期メッセージ
MVBLSYS.add("戦闘が開始された!")
# 元の Scene_Battle を実行
mvbl_battle_log_main
# セキュリティ(クリーンアップ)
MVBLSYS.dispose
end
#--------------------------------------------------------------------------
# * フレーム更新
#--------------------------------------------------------------------------
alias mvbl_battle_log_update update
def update
# 元の戦闘システムを更新
mvbl_battle_log_update
# ログを更新
MVBLSYS.update
end
#-------------
# * 戦闘終了
#-------------
alias mvbl_battle_log_battle_end battle_end
def battle_end(result)
MVBLSYS.dispose
mvbl_battle_log_battle_end(result)
end
#---------------
# * 基本アクション
#---------------
alias mvbl_battle_log_basic_action make_basic_action_result
def make_basic_action_result
# アクション前に攻撃者を保持
battler = @active_battler
# 元のアクションを実行
mvbl_battle_log_basic_action
# バトラーが存在しない場合
return if battler == nil
# 通常攻撃
if battler.current_action.basic == 0
name = battler.name
if name == nil or name == ""
name = "敵"
end
MVBLSYS.add(name + " が攻撃した!")
# 結果
if @target_battlers != nil
for target in @target_battlers
next if target == nil
if target.damage == "Miss"
MVBLSYS.add("外れた!")
elsif target.damage.is_a?(Numeric)
if target.critical
MVBLSYS.add("クリティカルヒット!")
end
if target.damage < 0
MVBLSYS.add(
target.name + " は " +
(-target.damage).to_s + " の HP を回復した!"
)
else
MVBLSYS.add(
target.name + " は " +
target.damage.to_s + " のダメージを受けた!"
)
end
end
if target.hp <= 0
MVBLSYS.add(target.name + " は倒れた!")
end
end
end
end
end
#---------------
# * スキルアクション
#---------------
alias mvbl_battle_log_skill_action make_skill_action_result
def make_skill_action_result
battler = @active_battler
# 能力を保存
skill_id = nil
if battler != nil
skill_id = battler.current_action.skill_id
end
skill = nil
if skill_id != nil
skill = $data_skills[skill_id]
end
# 元のアクションを実行
mvbl_battle_log_skill_action
return if battler == nil
return if skill == nil
name = battler.name
if name == nil or name == ""
name = "敵"
end
MVBLSYS.add(
name + " は " + skill.name + " を使った!"
)
# 結果
if @target_battlers != nil
for target in @target_battlers
next if target == nil
if target.damage == "Miss"
MVBLSYS.add("外れた!")
elsif target.damage.is_a?(Numeric)
if target.critical
MVBLSYS.add("クリティカルヒット!")
end
if target.damage < 0
MVBLSYS.add(
target.name + " は " +
(-target.damage).to_s + " の HP を回復した!"
)
elsif target.damage > 0
MVBLSYS.add(
target.name + " は " +
target.damage.to_s + " のダメージを受けた!"
)
end
end
if target.hp <= 0
MVBLSYS.add(target.name + " は倒れた!")
end
end
end
end
#--------------------------------------------------------------------------
# * アイテムアクション
#--------------------------------------------------------------------------
alias mvbl_battle_log_item_action make_item_action_result
def make_item_action_result
battler = @active_battler
item_id = nil
if battler != nil
item_id = battler.current_action.item_id
end
item = nil
if item_id != nil
item = $data_items[item_id]
end
# 元のアクションを実行
mvbl_battle_log_item_action
return if battler == nil
return if item == nil
name = battler.name
if name == nil or name == ""
name = "敵"
end
MVBLSYS.add(
name + " は " + item.name + " を使った!"
)
# 結果
if @target_battlers != nil
for target in @target_battlers
next if target == nil
if target.damage == "Miss"
MVBLSYS.add("効果なし…")
elsif target.damage.is_a?(Numeric)
if target.damage < 0
MVBLSYS.add(
target.name + " は " +
(-target.damage).to_s + " の HP を回復した!"
)
elsif target.damage > 0
MVBLSYS.add(
target.name + " は " +
target.damage.to_s + " のダメージを受けた!"
)
end
end
if target.hp <= 0
MVBLSYS.add(target.name + " は倒れた!")
end
end
end
end
end
#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
# イベント経由でログを呼び出せるようにする。
#
# 例:
#
# $game_temp.battle_log("敵は激怒しているようだ!")
#==============================================================================
class Game_Temp
def battle_log(text)
MVBLSYS.add(text)
end
end
まだ古い『アースボーン』の「キャプン・ココ・チャーム・スターター・キット」プロジェクトが残っています。かなり未完成ですが、RPG Maker XP で『アースボーン』に最も近いものです。おそらく私しか持っていないので、プロジェクトを送ることができます。
それは素晴らしいですね!あと、前に送ってくれたスクリプトもチェックしてみます!
スクリプトを試してみましたが、本当に良く動きます!カスタマイズしようとするのは少し分かりにくいですが、それ以外は素晴らしいです!
うーん、僕ならRMXP用のEarthBoundシステムが完成するまで待つかな。現在制作中で、関連動画も作ったのでぜひ見てみてね。まだ初期段階だけど、毎日作業を進めているから、今年中に公開できると思うよ。