Forgetting Skills

The script call for forgetting a skill doesn't work for me if the skill is in the actor's Features list:

$game_actors[1].forget_skill(id)This only works on skills that the actor was not initialized with. Is this a known bug or an incompatibility with one of my scripts?
You don't have to use a script call for having an Actor forget a skill. In an event, there is already a section for having someone either learn or forget a skill.

On the first page in the ACTOR section there is an option for Change Skills. There, you can pick the actor and either Learn/Forget.

Or if you need it to be done as a script, then...you can just ignore me 😛 I don't know much about scripting...
I need to do it through scripting, but I've got a couple alternative methods. I was more or less just curious if it's a known quirk of the program.
Actually, skills from features are not added to learned skills. So you cannot delete that skill using forget_skill.

From Game_Actor

def skills (@skills | added_skills).sort.collect {|id| $data_skills[id] } endand from Game_BattlerBase

Code:
  def added_skills    features_set(FEATURE_SKILL_ADD)  end
Ah, interesting. So I should have my forget skill method run through the features array as well. Thanks!

This can be closed.
Ah, interesting. So I should have my forget skill method run through the features array as well. Thanks!
The fact is that features_set generates a fresh array every time it is called, so erasing an entry from it is futile.
I made a script that allows you to do exactly that 🙂 Look for Dynamic Features in the RGSS3 Scripts forum.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/forgetting-skills.25002/