okay so, i found this script on a random rm website and for the life of me i can't figure out how to make it transform the character's graphic in battle, its a transformation script that basically changes your class depending on the specified state you have applied to you anyways i was wondering if somone could possibly help me edit it a bit so it will change graphics depending on the the state applied,
Content Hidden
Code:
=begin
Transformation States
by Fomar0153
Version 1.0
----------------------
Notes
----------------------
This script allows you to transform in battle through the
application of states.
----------------------
Instructions
----------------------
Notetag the states:
<transformclass x>
Where x is the class id of the class you want to use.
<transformequips x>
<transformequips x,x>
<transformequips x,x,x,x,x>
Where x = -1 -> Use the original equipment
Where x = 0 -> Blank the equipment
Where x > 0 -> Use the equipment of id
Note your current equipment is copied and then the changes
are applied. So you only need as many entries to cover you
upto the last piece of equipment you want to change.
Note: Both are optional so use them as you want.
<transformequips 0> for example could be used for a disarm state.
----------------------
Known bugs
----------------------
None
=end
class Game_Actor < Game_Battler
def transform_class
for state in @states
if $data_states[state].transform_class > 0
return $data_states[state].transform_class
end
end
return 0
end
def transform_equips
for state in @states
unless $data_states[state].transform_equips == []
return $data_states[state].transform_equips
end
end
return []
end
alias ft_class class
def class
if transform_class > 0
$data_classes[transform_class]
else
ft_class
end
end
alias ft_skills skills
def skills
if transform_class > 0
skills = []
self.class.learnings.each do |learning|
skills.push($data_skills[learning.skill_id]) if learning.level <= @level
end
return skills
else
ft_skills
end
end
alias ft_equips equips
def equips
unless transform_equips == []
equip_ids = transform_equips
new_equips = ft_equips
for i in 0..equip_ids.size - 1
if equip_ids[i] == -1
new_equips[i] = @equips[i].object
elsif equip_ids[i] == 0
new_equips[i] = nil
else
if index_to_etype_id(i) == 0
new_equips[i] = $data_weapons[equip_ids[i]]
else
new_equips[i] = $data_armors[equip_ids[i]]
end
end
end
return new_equips
else
ft_equips
end
end
end
module RPG
class State
def transform_class
if @note =~ /<transformclass (.*)>/i
return $1.to_i
end
return 0
end
def transform_equips
if @note =~ /<transformequips (.*)>/i
equips = []
for equip in $1.split(",")
equips.push(equip.to_i)
end
return equips
end
return []
end
end
end
i tried adding a character_name definition and character index definition like so
Code:
def character_name
case transform_class
when 14# the class id
return "$assassin"#name of the file to grab
when 16
return "$final_form"
else
return @character_name
end
end
def character_index
case transform_class
when 14
return 0
when 16
return 0
else
return @character_index
end
end
but idk if this is working right, also i'm using yanfly's battle