PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : RMVX Verwandlungsscript



Amuggi
06.04.2013, 17:45
Hi, ich nutze ein für mein Projekt ein Script, das den Charakter in verschiedene Formen verwandeln kann.
Mein Problem dabei ist, dass die neue Charakterform von meinem "Visual Equip Script" von der Ausrüstung verdeckt wird.
Daher müsste das Script so abgeändert werden, dass während der Zeit der Verwandlung keine Ausrüstung angezogen werden kann.
Nach der Rückverwandlung sollte aber die alte Ausrüstung wieder angezogen sein (wenn nicht möglich, nicht ganz so schlimm).

Leider schaffe ich das nicht selbst. Bitte helft mir.
Hier das Script:
#==============================================================================
# Vampyr Transformations
#==============================================================================
Vampyr_Kernel.register("Vampyr Transformations", 1.1, "01/28/2009")
#------------------------------------------------------------------------------
# Putting command: Requires Bat in a skill, that skill will be usable only if you
# are transformed into a bat. the same is valid for wolf, putting command: Requires Wolf

Transform_Animation_id = 155 # Animation showed when transform

Use_Particle = true # Use Particle Engine?
#------------------------------------------------------------------------------
Wolf_Button = Keys::M # Key used to transformation into wolf

Wolf_Switch = 43 # ID of item necessary to allows transformation into wolf

Wolf_Item = 125 # ID of item necessary to allows transformation into wolf

Wolf_Graphic = ["$schwarzer Wolf", 0] # Character Sprite and Index of wolf

Wolf_Attack_Animation = 82 # Animation displayed when wolf attacks
#------------------------------------------------------------------------------
Bat_Button = Keys::N # Key used to transform into bat

Bat_Switch = 42 # Switched that need be activated to allows transformation into bat

Bat_Item = 0 # ID of item necessary to allows transformation into bat

Bat_Graphic = ["$Bat", 0] # Character Sprite and Index of bat

Bat_Attack_Animation = 82 # Animation displayed when bat attacks
#------------------------------------------------------------------------------
Mist_Button = Keys::H # Key used to transformation into mist

Mist_Switch = 45 # ID of item necessary to allows transformation into mist

Mist_Item = 0 # ID of item necessary to allows transformation into mist

Mist_Graphic = ["!Other2", 4] # Character Sprite and Index of mist
#------------------------------------------------------------------------------
Mouse_Button = Keys::J # Key used to transformation into mouse

Mouse_Switch = 44 # ID of item necessary to allows transformation into mouse

Mouse_Item = 0 # ID of item necessary to allows transformation into mouse

Mouse_Graphic = ["$E_Ratte", 0] # Character Sprite and Index of mouse

Mouse_Attack_Animation = 82 # Animation displayed when mouse attacks
#------------------------------------------------------------------------------
Creature_Button = Keys::L # Key used to transformation into monster

Creature_Switch = 46 # ID of item necessary to allows transformation into monster

Creature_Item = 0 # ID of item necessary to allows transformation into monster

Creature_Graphic = ["$Demon2", 0] # Character Sprite and Index of monster

Creature_Attack_Animation = 82 # Animation displayed when monster attacks
#==============================================================================
class Game_Player < Game_Character

attr_reader :bat_form
attr_reader :wolf_form
attr_reader :mist_form
attr_reader :mouse_form
attr_reader :creature_form

alias vampyr_transformations_initialize initialize
alias vampyr_transformations_update update
alias vampyr_transformations_dash dash?

def initialize
vampyr_transformations_initialize
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end

def update
vampyr_transformations_update
update_transformations
update_mp_consumation
end

def update_transformations
return if $game_map.interpreter.running?
if Use_Particle and @mist_form
$game_map.interpreter.add_effect(1, $scene.ap("energy-ball-white", self, 1, 0, "LittleSmoke"))
end
if Input.trigger?(Bat_Button)
return if $game_party.members[0].mp <= 0
return if Bat_Switch > 0 and !$game_switches[Bat_Switch]
return if Bat_Item > 0 and !$game_party.has_item?($data_items[Bat_Item])
if @bat_form
untransform
else
transform_into_bat
end
elsif Input.trigger?(Wolf_Button)
return if $game_party.members[0].mp <= 0
return if Wolf_Switch > 0 and !$game_switches[Wolf_Switch]
return if Wolf_Item > 0 and !$game_party.has_item?($data_items[Wolf_Item])
if @wolf_form
untransform
else
transform_into_wolf
end
elsif Input.trigger?(Mist_Button)
return if $game_party.members[0].mp <= 0
return if Mist_Switch > 0 and !$game_switches[Mist_Switch]
return if Mist_Item > 0 and !$game_party.has_item?($data_items[Mist_Item])
if @mist_form
untransform
else
transform_into_mist
end
elsif Input.trigger?(Mouse_Button)
return if $game_party.members[0].mp <= 0
return if Mouse_Switch > 0 and !$game_switches[Mouse_Switch]
return if Mouse_Item > 0 and !$game_party.has_item?($data_items[Mouse_Item])
if @mouse_form
untransform
else
transform_into_mouse
end
elsif Input.trigger?(Creature_Button)
return if $game_party.members[0].mp <= 0
return if Creature_Switch > 0 and !$game_switches[Creature_Switch]
return if Creature_Item > 0 and !$game_party.has_item?($data_items[Creature_Item])
if @creature_form
untransform
else
transform_into_creature
end
end
end

def transform_into_wolf
return unless $game_map.passable?(@x, @y)
@character_name = Wolf_Graphic[0]
@character_index = Wolf_Graphic[1]
@move_speed = 5
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-green", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = true
@mist_form = false
@mouse_form = false
@creature_form = false
end

def transform_into_bat
@character_name = Bat_Graphic[0]
@character_index = Bat_Graphic[1]
@move_speed = 4
@always_on_top = true
@step_anime = true
@through = false
@priority_type = 2
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-green", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
if !@bat_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-red", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = true
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end

def transform_into_mist
@character_name = Mist_Graphic[0]
@character_index = Mist_Graphic[1]
@move_speed = 3
@always_on_top = true
@step_anime = true
@through = true
@priority_type = 2
if !@mist_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-blue", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = true
@mouse_form = false
@creature_form = false
end

def transform_into_mouse
return unless $game_map.passable?(@x, @y)
@character_name = Mouse_Graphic[0]
@character_index = Mouse_Graphic[1]
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-purple", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = true
@creature_form = false
end

def transform_into_creature
return unless $game_map.passable?(@x, @y)
@character_name = Creature_Graphic[0]
@character_index = Creature_Graphic[1]
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-red", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = true
end

def untransform
return unless $game_map.passable?(@x, @y)
@character_name = $data_actors[$game_party.members[0].id].character_name
@character_index = $data_actors[$game_party.members[0].id].character_index
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if transformed?
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-purple", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end

def update_mp_consumation
return unless transformed?
if Graphics.frame_count % 60 <= 0 and $game_party.members[0].mp > 0
$game_party.members[0].mp -= 1
elsif $game_party.members[0].mp <= 0
if $game_map.passable?(@x, @y)
untransform
elsif Vampyr_Kernel.enabled?("Vampyr Horror")
$game_party.members[0].blood -= 1 if Graphics.frame_count % 60 <= 0
else
$game_party.members[0].hp -= 1 if Graphics.frame_count % 60 <= 0
end
end
end

def transformed?
return true if @bat_form
return true if @wolf_form
return true if @mist_form
return true if @mouse_form
return true if @creature_form
return false
end

def dash?
return false unless @wolf_form or @mouse_form
vampyr_transformations_dash
end

end

#==============================================================================
if Vampyr_Kernel.enabled?("Vampyr SBABS")
#------------------------------------------------------------------------------
module RPG

class BaseItem

def requires_bat?
self.note.each_line { |line| return true if line.include?("Requires Bat") }
return false
end

def requires_wolf?
self.note.each_line { |line| return true if line.include?("Requires Wolf") }
return false
end

def requires_mist?
self.note.each_line { |line| return true if line.include?("Requires Mist") }
return false
end

def requires_mouse?
self.note.each_line { |line| return true if line.include?("Requires Mouse") }
return false
end

def requires_creature?
self.note.each_line { |line| return true if line.include?("Requires Creature") }
return false
end

def requires_something?
return true if requires_bat?
return true if requires_wolf?
return true if requires_mist?
return true if requires_mouse?
return true if requires_creature?
return false
end

end

end

#------------------------------------------------------------------------------
class Game_Actor < Game_Battler

alias vampyr_transformations_atk_animation_id atk_animation_id
alias vampyr_transformations_atk_animation_id2 atk_animation_id2

def atk_animation_id
if @piece.is_a?(Game_Player)
if @piece.bat_form
return Bat_Attack_Animation
elsif @piece.wolf_form
return Wolf_Attack_Animation
elsif @piece.mouse_form
return Mouse_Attack_Animation
elsif @piece.creature_form
return Creature_Attack_Animation
end
end
vampyr_transformations_atk_animation_id
end

def atk_animation_id2
if @piece.is_a?(Game_Player)
if @piece.bat_form
return Bat_Attack_Animation
elsif @piece.wolf_form
return Wolf_Attack_Animation
elsif @piece.mouse_form
return Mouse_Attack_Animation
elsif @piece.creature_form
return Creature_Attack_Animation
end
end
vampyr_transformations_atk_animation_id2
end

end
#------------------------------------------------------------------------------
class Game_Event < Game_Character

alias vampyr_transformations_gevent_attack_normal attack_normal
alias vampyr_transformations_gevent_skill_attack_normal skill_attack_normal

def attack_normal
return if in_front?(self, $game_player) and $game_player.mist_form
vampyr_transformations_gevent_attack_normal
end

def skill_attack_normal
return if in_front?(self, $game_player) and $game_player.mist_form
vampyr_transformations_gevent_skill_attack_normal
end

end

#------------------------------------------------------------------------------
class Game_Player < Game_Character

alias vampyr_transformations_normal_attack_right normal_attack_right
alias vampyr_transformations_range_attack_right range_attack_right
alias vampyr_transformations_normal_attack_left normal_attack_left
alias vampyr_transformations_range_attack_left range_attack_left
alias vampyr_transformations_skill_attack_normal skill_attack_normal
alias vampyr_transformations_skill_attack_range skill_attack_range
alias vampyr_transformations_skill_attack_all skill_attack_all
alias vampyr_transformations_skill_explode_range skill_explode_range
alias vampyr_transformations_skill_recover skill_recover
alias vampyr_transformations_attack_with_item attack_with_item

def normal_attack_right
return if @mist_form
vampyr_transformations_normal_attack_right
end

def range_attack_right
return if transformed?
vampyr_transformations_range_attack_right
end

def normal_attack_left
return if @mist_form
vampyr_transformations_normal_attack_left
end

def range_attack_left
return if transformed?
vampyr_transformations_range_attack_left
end

def skill_attack_normal
return unless requires_transformation?
vampyr_transformations_skill_attack_normal
end

def skill_attack_range
return unless requires_transformation?
vampyr_transformations_skill_attack_range
end

def skill_attack_all
return unless requires_transformation?
vampyr_transformations_skill_attack_all
end

def skill_explode_range
return unless requires_transformation?
vampyr_transformations_skill_explode_range
end

def skill_recover
return unless requires_transformation?
vampyr_transformations_skill_recover
end

def attack_with_item
return if transformed?
vampyr_transformations_attack_with_item
end

def requires_transformation?
return true if @assigned_skill.requires_bat? and @bat_form
return true if @assigned_skill.requires_wolf? and @wolf_form
return true if @assigned_skill.requires_mist? and @mist_form
return true if @assigned_skill.requires_mouse? and @mouse_form
return true if @assigned_skill.requires_creature? and @creature_form
return true unless @assigned_skill.requires_something?
return false
end

end

#------------------------------------------------------------------------------
class Game_Range < Game_Character

alias vampyr_transformations_grange_hurt_hero_skill hurt_hero_skill
alias vampyr_transformations_grange_hurt_hero_skill_explode hurt_hero_skill_explode

def hurt_hero_skill(hero)
return if hero.is_a?(Game_Player) and $game_player.mist_form
vampyr_transformations_grange_hurt_hero_skill(hero)
end

def hurt_hero_skill_explode
return if $game_player.mist_form
vampyr_transformations_grange_hurt_hero_skill_explode
end

end

#------------------------------------------------------------------------------
class Sprite_Weapon < Sprite_Base

alias vampyr_transformations_update update

def update
if @character.is_a?(Game_Player) and @character.transformed?
self.visible = false
return
end
vampyr_transformations_update
end

end

#------------------------------------------------------------------------------
class Sprite_Shield < Sprite_Base

alias vampyr_transformations_update update

def update
if @character.is_a?(Game_Player) and @character.transformed?
self.visible = false
return
end
vampyr_transformations_update
end

end

#------------------------------------------------------------------------------
end

Zur größten Not gebt mir einfach den Script-Befehl für das komplette abrüsten, dann muss ich mir selbst was basteln.

Amuggi
29.04.2013, 22:06
Nur für den Fall, dass es jemand interessiert: Ich habe mein Problem jetzt alleine gelöst!

Dafür wird folgendes Script benötigt:
#==============================================================================
# ** Game_Party implementation
#------------------------------------------------------------------------------
# aliased methods : initialize
#==============================================================================
class Game_Party
alias :biged_old_init :initialize
def initialize
biged_old_init
@temp_items = {} # temp items hash
@temp_weapons = {} # temp weapons hash
@temp_armors = {} # temp armors hash
@temp_gold = nil # temp gold variable
end
#--------------------------------------------------------------------------
# * if the player has picked up some items since their's were wiped
# and backed up, we need to combine the totals of any common items
#--------------------------------------------------------------------------
def merge_like_key_values(dest, src)
return if dest == {}
for key in dest.keys
src[key] += dest[key] if src.has_key?(key)
end
end
#--------------------------------------------------------------------------
# * Make a copy of the current inventory
#--------------------------------------------------------------------------
def backup_items
@temp_items = Marshal::load(Marshal::dump(@items))
@temp_weapons = Marshal::load(Marshal::dump(@weapons))
@temp_armors = Marshal::load(Marshal::dump(@armors))
end
#--------------------------------------------------------------------------
# * Clear the current inventory
#--------------------------------------------------------------------------
def clear_items
@items.clear
@weapons.clear
@armors.clear
end
#--------------------------------------------------------------------------
# * Restore the backed up inventory if a backup exists
#--------------------------------------------------------------------------
def restore_items
unless @temp_items == {}
merge_like_key_values(@items, @temp_items)
@items = @items.merge(@temp_items)
end
unless @temp_weapons == {}
merge_like_key_values(@weapons, @temp_weapons)
@weapons = @weapons.merge(@temp_weapons)
end
unless @temp_armors == {}
merge_like_key_values(@armors, @temp_armors)
@armors = @armors.merge(@temp_armors)
end
@temp_items = @temp_weapons = @temp_armors = {}
end
#--------------------------------------------------------------------------
# * Backup All mparty member's equipment
#--------------------------------------------------------------------------
def backup_all_equips
for i in @actors
$game_actors[i].backup_equips
end
end
#--------------------------------------------------------------------------
# * unequip all party member
# THE EQUIPMENT WILL BE LOST FOREVER
# IF YOU DO NOT FIRST MAKE A BACKUP!
#--------------------------------------------------------------------------
def unequip_all
for i in @actors
$game_actors[i].clear_equips
end
end
#--------------------------------------------------------------------------
# * Backup All mparty member's equipment
#--------------------------------------------------------------------------
def restore_all_equips
for i in @actors
$game_actors[i].restore_equips
end
end
#--------------------------------------------------------------------------
# * Make a copy of the current gold total
#--------------------------------------------------------------------------
def backup_gold
@temp_gold = @gold
end
#--------------------------------------------------------------------------
# * Clear the current gold total
#--------------------------------------------------------------------------
def clear_gold
@gold = 0
end
#--------------------------------------------------------------------------
# * Restore the saved gold total if one exists
#--------------------------------------------------------------------------
def restore_gold
unless @temp_gold == nil
@gold += @temp_gold
@temp_gold = nil
end
end

end
#==============================================================================
# ** Game_Actor implementation
#------------------------------------------------------------------------------
# aliased methods : initialize
#==============================================================================
class Game_Actor < Game_Battler
alias :biged_old_init :initialize
def initialize(actor_id)
biged_old_init(actor_id)
@temp_weapons = [] #temporary store for weapons
@temp_armors = [] #temporary store for armor
end
#--------------------------------------------------------------------------
# * Make a copy of the currently equiped items
#--------------------------------------------------------------------------
def backup_equips
@temp_weapons = weapons
@temp_armors = armors
end
#--------------------------------------------------------------------------
# * Restore back up equipment if it exists
#--------------------------------------------------------------------------
def restore_equips
#un-equip the current equipment and place it in the inventory
unless @temp_weapons == [] && @temp_armors == [] #no backup made
for i in 0...5 do
change_equip(i, nil)
end
end
#-------------------------------------------------------------#
#we check each one individually here because if any slot #
#is set to nil, a default value is used (not nil). This #
#default value does actually correspond to an item, and we #
#don't want that, so we check. #
#-------------------------------------------------------------#
#the incrementor is there because the armor array size will be#
#different depending on whether the player is using 2 swords #
#-------------------------------------------------------------#
@weapon_id = @temp_weapons[0].id if @temp_weapons[0] != nil
if two_swords_style
@armor1_id = @temp_weapons[1].id if @temp_weapons[1] != nil
i = 0
else
@armor1_id = @temp_armors[0].id if @temp_armors[0] != nil
i = 1
end
@armor2_id = @temp_armors[i].id if @temp_armors[i] != nil
@armor3_id = @temp_armors[i+1].id if @temp_armors[i+1] != nil
@armor4_id = @temp_armors[i+2].id if @temp_armors[i+2] != nil
@armor5_id = @temp_armors[i+3].id if @temp_armors[i+3] != nil
@armor6_id = @temp_armors[i+4].id if @temp_armors[i+4] != nil
@armor7_id = @temp_armors[i+5].id if @temp_armors[i+5] != nil
@armor8_id = @temp_armors[i+6].id if @temp_armors[i+6] != nil
@armor9_id = @temp_armors[i+7].id if @temp_armors[i+7] != nil
@temp_weapons = @temp_armors = []
end
#--------------------------------------------------------------------------
# * Clear the currently equipped item set.
# THIS DOES NOT PLACE THE ITEMS IN INVENTORY!
# THEY WILL BE GONE FOREVER UNLESS YOU MAKE A BACKUP FIRST!
#--------------------------------------------------------------------------
def clear_equips
@weapon_id = 0
@armor1_id = 0
@armor2_id = 0
@armor3_id = 0
@armor4_id = 0
@armor5_id = 0
@armor6_id = 0
@armor7_id = 0
@armor8_id = 0
@armor9_id = 0
end
end
Danach muss das Script aus meinem ersten Post noch angepasst werden:
#==============================================================================
# Vampyr Transformations
#==============================================================================
Vampyr_Kernel.register("Vampyr Transformations", 1.1, "01/28/2009")
#------------------------------------------------------------------------------
# Putting command: Requires Bat in a skill, that skill will be usable only if you
# are transformed into a bat. the same is valid for wolf, putting command: Requires Wolf
# Abfrage, ob in Maus-Form: $game_player.mouse_form

Transform_Animation_id = 155 # Animation showed when transform

Use_Particle = true # Use Particle Engine?
#------------------------------------------------------------------------------
Wolf_Button = Keys::J # Key used to transformation into wolf

Wolf_Switch = 43 # ID of item necessary to allows transformation into wolf

Wolf_Item = 0 # ID of item necessary to allows transformation into wolf

Wolf_Graphic = ["$schwarzer Wolf", 0] # Character Sprite and Index of wolf

Wolf_Attack_Animation = 82 # Animation displayed when wolf attacks
#------------------------------------------------------------------------------
Bat_Button = Keys::N # Key used to transform into bat

Bat_Switch = 42 # Switched that need be activated to allows transformation into bat

Bat_Item = 0 # ID of item necessary to allows transformation into bat

Bat_Graphic = ["$Bat", 0] # Character Sprite and Index of bat

Bat_Attack_Animation = 82 # Animation displayed when bat attacks
#------------------------------------------------------------------------------
Mist_Button = Keys::H # Key used to transformation into mist

Mist_Switch = 45 # ID of item necessary to allows transformation into mist

Mist_Item = 0 # ID of item necessary to allows transformation into mist

Mist_Graphic = ["!Other2", 4] # Character Sprite and Index of mist
#------------------------------------------------------------------------------
Mouse_Button = Keys::M # Key used to transformation into mouse

Mouse_Switch = 44 # ID of item necessary to allows transformation into mouse

Mouse_Item = 0 # ID of item necessary to allows transformation into mouse

Mouse_Graphic = ["$E_Ratte", 0] # Character Sprite and Index of mouse

Mouse_Attack_Animation = 82 # Animation displayed when mouse attacks
#------------------------------------------------------------------------------
Creature_Button = Keys::L # Key used to transformation into monster

Creature_Switch = 46 # ID of item necessary to allows transformation into monster

Creature_Item = 0 # ID of item necessary to allows transformation into monster

Creature_Graphic = ["$Demon2", 0] # Character Sprite and Index of monster

Creature_Attack_Animation = 82 # Animation displayed when monster attacks
#==============================================================================
class Game_Player < Game_Character

attr_reader :bat_form
attr_reader :wolf_form
attr_reader :mist_form
attr_reader :mouse_form
attr_reader :creature_form

alias vampyr_transformations_initialize initialize
alias vampyr_transformations_update update
alias vampyr_transformations_dash dash?

def initialize
vampyr_transformations_initialize
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end

def update
vampyr_transformations_update
update_transformations
update_mp_consumation
end

def update_transformations
return if $game_map.interpreter.running?
if Use_Particle and @mist_form
$game_map.interpreter.add_effect(1, $scene.ap("energy-ball-white", self, 1, 0, "LittleSmoke"))
end
if Input.trigger?(Bat_Button)
return if $game_party.members[0].mp <= 0
return if Bat_Switch > 0 and !$game_switches[Bat_Switch]
return if Bat_Item > 0 and !$game_party.has_item?($data_items[Bat_Item])
if @bat_form
untransform
else
transform_into_bat
end
elsif Input.trigger?(Wolf_Button)
return if $game_party.members[0].mp <= 0
return if Wolf_Switch > 0 and !$game_switches[Wolf_Switch]
return if Wolf_Item > 0 and !$game_party.has_item?($data_items[Wolf_Item])
if @wolf_form
untransform
else
transform_into_wolf
end
elsif Input.trigger?(Mist_Button)
return if $game_party.members[0].mp <= 0
return if Mist_Switch > 0 and !$game_switches[Mist_Switch]
return if Mist_Item > 0 and !$game_party.has_item?($data_items[Mist_Item])
if @mist_form
untransform
else
transform_into_mist
end
elsif Input.trigger?(Mouse_Button)
return if $game_party.members[0].mp <= 0
return if Mouse_Switch > 0 and !$game_switches[Mouse_Switch]
return if Mouse_Item > 0 and !$game_party.has_item?($data_items[Mouse_Item])
if @mouse_form
untransform
else
transform_into_mouse
end
elsif Input.trigger?(Creature_Button)
return if $game_party.members[0].mp <= 0
return if Creature_Switch > 0 and !$game_switches[Creature_Switch]
return if Creature_Item > 0 and !$game_party.has_item?($data_items[Creature_Item])
if @creature_form
untransform
else
transform_into_creature
end
end
end

def transform_into_wolf
return unless $game_map.passable?(@x, @y)
$game_party.backup_all_equips
$game_party.unequip_all
@character_name = Wolf_Graphic[0]
@character_index = Wolf_Graphic[1]
@move_speed = 5
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-green", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = true
@mist_form = false
@mouse_form = false
@creature_form = false
end

def transform_into_bat
return unless $game_map.passable?(@x, @y)
$game_party.backup_all_equips
$game_party.unequip_all
@character_name = Bat_Graphic[0]
@character_index = Bat_Graphic[1]
@move_speed = 4
@always_on_top = true
@step_anime = true
@through = false
@priority_type = 2
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-green", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
if !@bat_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-red", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = true
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end

def transform_into_mist
$game_party.backup_all_equips
$game_party.unequip_all
@character_name = Mist_Graphic[0]
@character_index = Mist_Graphic[1]
@move_speed = 3
@always_on_top = true
@step_anime = true
@through = true
@priority_type = 2
if !@mist_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-blue", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = true
@mouse_form = false
@creature_form = false
end

def transform_into_mouse
return unless $game_map.passable?(@x, @y)
$game_party.backup_all_equips
$game_party.unequip_all
@character_name = Mouse_Graphic[0]
@character_index = Mouse_Graphic[1]
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-purple", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = true
@creature_form = false
end

def transform_into_creature
return unless $game_map.passable?(@x, @y)
$game_party.backup_all_equips
$game_party.unequip_all
@character_name = Creature_Graphic[0]
@character_index = Creature_Graphic[1]
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-red", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = true
end

def untransform
return unless $game_map.passable?(@x, @y)
$game_party.restore_all_equips
@character_name = $data_actors[$game_party.members[0].id].character_name
@character_index = $data_actors[$game_party.members[0].id].character_index
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if transformed?
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-purple", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end

def update_mp_consumation
return unless transformed?
if Graphics.frame_count % 60 <= 0 and $game_party.members[0].mp > 0
$game_party.members[0].mp -= 1
elsif $game_party.members[0].mp <= 0
if $game_map.passable?(@x, @y)
untransform
elsif Vampyr_Kernel.enabled?("Vampyr Horror")
$game_party.members[0].blood -= 1 if Graphics.frame_count % 60 <= 0
else
$game_party.members[0].hp -= 1 if Graphics.frame_count % 60 <= 0
end
end
end

def transformed?
return true if @bat_form
return true if @wolf_form
return true if @mist_form
return true if @mouse_form
return true if @creature_form
return false
end

def dash?
return false unless @wolf_form or @mouse_form
vampyr_transformations_dash
end

end

#==============================================================================
if Vampyr_Kernel.enabled?("Vampyr SBABS")
#------------------------------------------------------------------------------
module RPG

class BaseItem

def requires_bat?
self.note.each_line { |line| return true if line.include?("Requires Bat") }
return false
end

def requires_wolf?
self.note.each_line { |line| return true if line.include?("Requires Wolf") }
return false
end

def requires_mist?
self.note.each_line { |line| return true if line.include?("Requires Mist") }
return false
end

def requires_mouse?
self.note.each_line { |line| return true if line.include?("Requires Mouse") }
return false
end

def requires_creature?
self.note.each_line { |line| return true if line.include?("Requires Creature") }
return false
end

def requires_something?
return true if requires_bat?
return true if requires_wolf?
return true if requires_mist?
return true if requires_mouse?
return true if requires_creature?
return false
end

end

end

#------------------------------------------------------------------------------
class Game_Actor < Game_Battler

alias vampyr_transformations_atk_animation_id atk_animation_id
alias vampyr_transformations_atk_animation_id2 atk_animation_id2

def atk_animation_id
if @piece.is_a?(Game_Player)
if @piece.bat_form
return Bat_Attack_Animation
elsif @piece.wolf_form
return Wolf_Attack_Animation
elsif @piece.mouse_form
return Mouse_Attack_Animation
elsif @piece.creature_form
return Creature_Attack_Animation
end
end
vampyr_transformations_atk_animation_id
end

def atk_animation_id2
if @piece.is_a?(Game_Player)
if @piece.bat_form
return Bat_Attack_Animation
elsif @piece.wolf_form
return Wolf_Attack_Animation
elsif @piece.mouse_form
return Mouse_Attack_Animation
elsif @piece.creature_form
return Creature_Attack_Animation
end
end
vampyr_transformations_atk_animation_id2
end

end
#------------------------------------------------------------------------------
class Game_Event < Game_Character

alias vampyr_transformations_gevent_attack_normal attack_normal
alias vampyr_transformations_gevent_skill_attack_normal skill_attack_normal

def attack_normal
return if in_front?(self, $game_player) and $game_player.mist_form
vampyr_transformations_gevent_attack_normal
end

def skill_attack_normal
return if in_front?(self, $game_player) and $game_player.mist_form
vampyr_transformations_gevent_skill_attack_normal
end

end

#------------------------------------------------------------------------------
class Game_Player < Game_Character

alias vampyr_transformations_normal_attack_right normal_attack_right
alias vampyr_transformations_range_attack_right range_attack_right
alias vampyr_transformations_normal_attack_left normal_attack_left
alias vampyr_transformations_range_attack_left range_attack_left
alias vampyr_transformations_skill_attack_normal skill_attack_normal
alias vampyr_transformations_skill_attack_range skill_attack_range
alias vampyr_transformations_skill_attack_all skill_attack_all
alias vampyr_transformations_skill_explode_range skill_explode_range
alias vampyr_transformations_skill_recover skill_recover
alias vampyr_transformations_attack_with_item attack_with_item

def normal_attack_right
return if @mist_form
vampyr_transformations_normal_attack_right
end

def range_attack_right
return if transformed?
vampyr_transformations_range_attack_right
end

def normal_attack_left
return if @mist_form
vampyr_transformations_normal_attack_left
end

def range_attack_left
return if transformed?
vampyr_transformations_range_attack_left
end

def skill_attack_normal
return unless requires_transformation?
vampyr_transformations_skill_attack_normal
end

def skill_attack_range
return unless requires_transformation?
vampyr_transformations_skill_attack_range
end

def skill_attack_all
return unless requires_transformation?
vampyr_transformations_skill_attack_all
end

def skill_explode_range
return unless requires_transformation?
vampyr_transformations_skill_explode_range
end

def skill_recover
return unless requires_transformation?
vampyr_transformations_skill_recover
end

def attack_with_item
return if transformed?
vampyr_transformations_attack_with_item
end

def requires_transformation?
return true if @assigned_skill.requires_bat? and @bat_form
return true if @assigned_skill.requires_wolf? and @wolf_form
return true if @assigned_skill.requires_mist? and @mist_form
return true if @assigned_skill.requires_mouse? and @mouse_form
return true if @assigned_skill.requires_creature? and @creature_form
return true unless @assigned_skill.requires_something?
return false
end

end

#------------------------------------------------------------------------------
class Game_Range < Game_Character

alias vampyr_transformations_grange_hurt_hero_skill hurt_hero_skill
alias vampyr_transformations_grange_hurt_hero_skill_explode hurt_hero_skill_explode

def hurt_hero_skill(hero)
return if hero.is_a?(Game_Player) and $game_player.mist_form
vampyr_transformations_grange_hurt_hero_skill(hero)
end

def hurt_hero_skill_explode
return if $game_player.mist_form
vampyr_transformations_grange_hurt_hero_skill_explode
end

end

#------------------------------------------------------------------------------
class Sprite_Weapon < Sprite_Base

alias vampyr_transformations_update update

def update
if @character.is_a?(Game_Player) and @character.transformed?
self.visible = false
return
end
vampyr_transformations_update
end

end

#------------------------------------------------------------------------------
class Sprite_Shield < Sprite_Base

alias vampyr_transformations_update update

def update
if @character.is_a?(Game_Player) and @character.transformed?
self.visible = false
return
end
vampyr_transformations_update
end

end

#------------------------------------------------------------------------------
end
Durch das obere Skript werden folgende 3 Befehle möglich:

$game_party.backup_all_equips = Komplette Ausrüstung aller Actor wird gespeichert
$game_party.unequip_all = Komplette Ausrüstung aller Spieler wird gelöscht
$game_party.restore_all_equips = Komplette Ausrüstung aller Actor wird wieder angelegt

Ich denke, dieses Script findet sicher auch noch in anderen Bereichen Anwendung.