Adding a Skill Type during the story

I have a character who is a Healer who later on in the game also becomes a Summoner. There are a number of summon skills attached to the Summon skill type which are learned as the game progresses.

However, I don't want the Summon skill to show up in the Skill or Battle menus until later, as this would be a spoiler.

I can hide the Summon Skill Type using the VisuStella SkillsStatesCore. However, I don't see a way to unhide the Skill Type programatically.

I do have a workaround: I created a State called Summoner which has "Add Skill Type: Summon" as a Trait, then just apply it to the actor with a Change State command. It seems to persist when the game reloads, which is good.

Are there any pitfalls with this method? Is there a better way to add a Skill Type to an actor via code?

1743289798920.png
Normally all states are removed on death, so that's something to watch out for. Plugins exist that allow specific states to persist through death...maybe you're already using one!

Alternatively, without plugins, you could make a duplicate of the Healer class and give it the new skill type. Then use the Change Class command to switch to the new class when appropriate.

Another option is to tie it to a certain (type of) equipment, e.g. a "summoner's staff". That might not fit your game's storyline, though.
I would prefer an alternative class.
Or a plugin to remove skill types from the menu if you haven't learned a single skill of that type.
to elaborate on @utunnels statement, you can just copy and paste a class to make it the exact same, just making one add the skill type, and the use Change Class in an event to unlock it.

Alternatively, if summoning is accessed because of an item or something, you could make it an equipment item that locks itself into a slot and grants the skill type, that's something with a little specific flavor.
You're right @caethyril; I did lose my Summon ability when my character was KO'd.

Thanks for the duplicate class advice @utunnels and @Timeline_man. Although it sounds the most robust, I can see it getting fiddly once I start adjusting parameter curves.

The item idea has appeal. The summoned creature is a rabbit, so a Bunny Packpack item of clothing could actually work with the story. It allows the Skill Type to transfer to the person wearing the backpack. However, I don't want players to accidentally sell it.

I think I've got another solution which works; I have the VisuStella plugin Skills & States Core, so adding this to the Notetag of my Summoner state worked to keep it persistent:

<No Death Clear>
<No Recover All Clear>

Fingers crossed nothing else upends this workaround...
For MV there was a plugin called "dynamic traits" that allowed adding or removing traits from an actor during gameplay, without any need to use states and so on.

I do not know if this is compatible to MZ (try with FOSSIL), but you might be better off looking for a similar plugin for MZ instead of trying to make a permanent state.
However, I don't want players to accidentally sell it.
In case you do need to come back to this and/or someone else in the future see this thread, I think if you set an item price to 0, it can't be sold?

Original thread: https://forums.rpgmakerweb.com/threads/adding-a-skill-type-during-the-story.176625/