Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: [XP] Unlearn Skills on Class Change ?
- Original author: jay10990
- Original date: November 27, 2015
- Source thread: https://forums.rpgmakerweb.com/threads/xp-unlearn-skills-on-class-change.51670/
- Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSSx Script Support
Summary
hey everyone, im using Legacy Class Change --> demo http://legacyblade.com/downloads/scripts/LSC/LegacyClassChangev1_68.zip when i change my class to another it keeps the same skills from that class regardless of changing it to another class. is there a way to modify this script, so the skills defer from one class to another ? changeclassscript.txt a text file with the script
Archived First Post
hey everyone, im using Legacy Class Change --> demo http://legacyblade.com/downloads/scripts/LSC/LegacyClassChangev1_68.zip
when i change my class to another it keeps the same skills from that class regardless of changing it to another class.
is there a way to modify this script, so the skills defer from one class to another ?
changeclassscript.txt a text file with the script
and finally heres a snippet of code :
def actor_class_change(actor_id, class_id)
#setup which actors' class needs to be changed.
changed_actors = LBConf.linked_actors(actor_id)
changed_actors.push actor_id
#memorize which class specific skills the actor has learned for the current
#class, then make the actor forget them
LBConf.class_spells($game_actors[actor_id].class_id).each{|skill_id|
$game_actors[actor_id].forget_skill(skill_id)}
#change the actor(s) class.
changed_actors.each{|actorz|
$game_actors[actorz].class_id = class_id
#remember any class specific spells the actor has forgotten forthe class
#they're changing to.
$game_actors[actorz].learned_class_skills.each{|skill_id|
if LBConf.class_spells($game_actors[actorz].class_id).include?(skill_id)
$game_actors[actorz].learn_skill(skill_id)
end}
#if graphic changing is enabled, change the actor's graphic.
if LBConf::CLASS_GRAPHIC_CHANGE == true
actor_graphics_change(actorz)
end}
end
i think the answer is in that part, but im not sure, any help would be greatly appreciated
when i change my class to another it keeps the same skills from that class regardless of changing it to another class.
is there a way to modify this script, so the skills defer from one class to another ?
changeclassscript.txt a text file with the script
and finally heres a snippet of code :
def actor_class_change(actor_id, class_id)
#setup which actors' class needs to be changed.
changed_actors = LBConf.linked_actors(actor_id)
changed_actors.push actor_id
#memorize which class specific skills the actor has learned for the current
#class, then make the actor forget them
LBConf.class_spells($game_actors[actor_id].class_id).each{|skill_id|
$game_actors[actor_id].forget_skill(skill_id)}
#change the actor(s) class.
changed_actors.each{|actorz|
$game_actors[actorz].class_id = class_id
#remember any class specific spells the actor has forgotten forthe class
#they're changing to.
$game_actors[actorz].learned_class_skills.each{|skill_id|
if LBConf.class_spells($game_actors[actorz].class_id).include?(skill_id)
$game_actors[actorz].learn_skill(skill_id)
end}
#if graphic changing is enabled, change the actor's graphic.
if LBConf::CLASS_GRAPHIC_CHANGE == true
actor_graphics_change(actorz)
end}
end
i think the answer is in that part, but im not sure, any help would be greatly appreciated
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...