How to make an item that takes away a skill of your choosing?

I'm making a game that allows you to heavily customize your characters' skills. So far I have made items that teach your character a skill.

I was wondering how to make a single item that would list the skills of the chosen character and upon choosing a skill removes the skill and gives you an item based on the skill that was removed.

Thanks.
why not just use an equip skills plugin?
know 80 skills but can only have 12 equiped at a time
why not just use an equip skills plugin?
know 80 skills but can only have 12 equiped at a time
I want the skills to be able to be switched between characters, which can't really be done through an equip skills plugin. Also I'm not very advanced at plugins so I only use them if they are needed.
You could link an item to a common event. The event would require a lot of conditional branches, variables, messages and choices. It may require some script calls too because there is no event command for 'select party member's skill' like there is for 'select item'.
I think creating a plugin for this (if one doesn't already exist) would be a more direct route and produce a better looking interface.

This is what you want to do if I read your post correctly:
  • use item
  • select party member
  • select selected party member's skill
  • remove selected skill from selected party member and add a specified item to party
A plugin to some effect is probably going to be your best bet. At the very least you're going to need some way of generating a dynamic list based on the actor's learned skills as doing this through standard show choices will be practically impossible. I'm not aware of anything like I've described though.

You might be able to combine something like ALOE's conditional show choices and something that allows extra choices in show choices (I'm sure Hime had one but I'm not sure). This would work, but would probably be pretty laborious. Another alternative would be to request a new plugin to make this easier.
Looks like I'm going to need to find/make a plugin for this. Guess I'll start looking.
You could use one of the scripts that duplicates FF7's materia system, like this one from galv

https://galvs-scripts.com/2015/11/18/mv-magic-shards/

or this one from victor

https://victorenginescripts.wordpress.com/rpg-maker-mv/materia-system/
another option is having the item remove all learned skills converting them to items.
or versions of the item that only unlearn a skill type (unlearn all support skills vs unlearn all phy attack skills)

item adds state to character > then triggers event
event would be rather large
check if character 1 has state ? = yes > remove state and check if knows skill (n1) ? yes > unlearn skill and add item for that skill > check if knows skill (n2) ...
do this for every character and every skill in 1 giant event.
then just reteach the skills you want

targeting a specific skill will be impossible without a plugin
another option is having the item remove all learned skills converting them to items.
item adds state to character > then triggers event
event would be rather large
check if character 1 has state ? = yes > remove state > check if knows skill (n1) ? yes > unlearn skill and add item for that skill > check if knows skill (n2) ...
do this for every character and every skill in 1 giant event.
then just reteach the skills you want
Seems possible, I'll try this for now.

Edit: Everything so far works for 2 skills but would it be possible to only remove the skills from the actor it was used on?
that is what the state is for. event checks for which actor has the state and then only removes the skills from them
all skill removal should be between "if actor has state: yes" and "if actor has state: no"
the only lines of the event that should not has a condition indenting them is the checking actors for "item target" state
that is what the state is for. event checks for which actor has the state and then only removes the skills from them
all skill removal should be between "if actor has state: yes" and "if actor has state: no"
the only lines of the event that should not has a condition indenting them is the checking actors for "item target" state
So the item gives the actor a state, checks which actor has the state, and removes the state from the actor when the common event ends?
item add state to target > then triggers event
event check who all has the state > removes the state > check for learned skills > removes learned skill and adds items for skill removed

every indent is caused by a conditional branch and the indented area of the event only triggers if the conditional branch result is a "yes"

the more actors u have multiplies the size of the event.
for every skill you have adds 3 lines to the event
which is why i said it would be a LARGE event
item add state to target > then triggers event
event check who all has the state > removes the state > check for learned skills > removes learned skill and adds items for skill removed
Gotcha, thanks a ton for the help!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-an-item-that-takes-away-a-skill-of-your-choosing.115686/