RPGツクールXP/VX用のRGSS素材です。
一部英語版対応です。
(A few materials can be used for English RPG MAKER XP/VX.)
競合率はルファーの独断と偏見なのでたまにハズレます。
#==============================================================================
# ■ アニメーション修正セット
#------------------------------------------------------------------------------
# アニメーションに関するバグを修正します。
# (C) ルファー
# WebSite https://tkoolerlufar.pages.dev/
#==============================================================================
=begin
=対応RGSS
1 2
=他の素材との競合の可能性
!.. 多分しないと思います
=RPGツクールXPでの導入方法
最上部に新セクションを作成して、このプログラムをそこにコピーする
=修正内容
*敵を蘇生するときに、音だけが鳴って何も見えない (VXのみ)
*敵全体に画面アニメーションするとき、敵が多いとプレビューより濃くなる
=更新履歴
2013/12/01 RPGツクールXPに対応
プレビューが濃くなるバグの修正をより根本的なものに変えた
2010/05/22 画面アニメーション重複バグの修正を追加、同時に改名
2010/03/04 公開
=再定義しているメソッド (いずれもエイリアス使用)
Sprite_Battler#animation_set_sprites
Graphics.update
=新規定義しているメソッド
Sprite_Base._Lufar_AnimationFix_PreUpdate
=新規定義しているクラス
Sprite_Base::Array_Animations
=end
case RGSS_MAJOR_VERSION
when 1
#--------------------------------------------------------------------------
# ◆ RPG モジュール
#--------------------------------------------------------------------------
module RPG
#------------------------------------------------------------------------
# ◆ Sprite クラス
#------------------------------------------------------------------------
class Sprite < ::Sprite
#----------------------------------------------------------------------
# ◆ Array_Animations クラス
#----------------------------------------------------------------------
class Array_Animations < Array
#--------------------------------------------------------------------
# ● クリア
# really : 偽なら何もしない
#--------------------------------------------------------------------
def clear(really = false)
really ? super() : self
end
end
#----------------------------------------------------------------------
# ● クラス変数
#----------------------------------------------------------------------
@@_animations = Array_Animations.new# 現在フレームで再生するアニメーション
#----------------------------------------------------------------------
# ● フレーム最初の更新
#----------------------------------------------------------------------
def self._Lufar_AnimationFix_PreUpdate
@@_animations.clear(true)
end
end
end
#--------------------------------------------------------------------------
# ◆ Graphics モジュール
#--------------------------------------------------------------------------
module Graphics
#------------------------------------------------------------------------
# ● フレーム更新
#------------------------------------------------------------------------
instance_eval do
alias _Lufar_ScreenAnimationFix_Update update
end unless defined? _Lufar_ScreenAnimationFix_Update
def self.update
_Lufar_ScreenAnimationFix_Update
RPG::Sprite._Lufar_AnimationFix_PreUpdate
end
end
when 2
#--------------------------------------------------------------------------
# ◆ Sprite_Base クラス
#--------------------------------------------------------------------------
class Sprite_Base < Sprite
#------------------------------------------------------------------------
# ◆ Array_Animations クラス
#------------------------------------------------------------------------
class Array_Animations < Array
#----------------------------------------------------------------------
# ● クリア
# really : 偽なら何もしない
#----------------------------------------------------------------------
def clear(really = false)
really ? super() : self
end
end
#------------------------------------------------------------------------
# ● クラス変数
#------------------------------------------------------------------------
@@animations = Array_Animations.new # 現在フレームで再生するアニメーション
#------------------------------------------------------------------------
# ● フレーム最初の更新
#------------------------------------------------------------------------
def self._Lufar_AnimationFix_PreUpdate
@@animations.clear(true)
end
end
#--------------------------------------------------------------------------
# ◆ Sprite_Battler クラス
#--------------------------------------------------------------------------
class Sprite_Battler < Sprite_Base
#------------------------------------------------------------------------
# ● アニメーションスプライトの設定
# args : 引数
#------------------------------------------------------------------------
unless method_defined? :_Lufar_AnimationFix_Ass
alias _Lufar_AnimationFix_Ass animation_set_sprites
end
def animation_set_sprites(*args)
_Lufar_AnimationFix_Ass(*args)
cell_data = args[0].cell_data
for i in 0..15
sprite = @animation_sprites[i]
next if sprite == nil
pattern = cell_data[i, 0]
next if pattern == nil or pattern == -1
sprite.opacity = cell_data[i, 6]
end
end
end
#--------------------------------------------------------------------------
# ◆ Graphics モジュール
#--------------------------------------------------------------------------
module Graphics
#------------------------------------------------------------------------
# ● フレーム更新
#------------------------------------------------------------------------
instance_eval do
alias _Lufar_ScreenAnimationFix_Update update
end unless defined? _Lufar_ScreenAnimationFix_Update
def self.update
_Lufar_ScreenAnimationFix_Update
Sprite_Base._Lufar_AnimationFix_PreUpdate
end
end
end
戻る