Unlock Skills through Party Composition

Hello forum people!

I'm working a character/class who can use skills inspired by his party member's fighting styles.
I'm trying to figure out if there is a way to have a skill appear in his menu only if a specific party member is present.

The character wouldn't be using their party member's skills, he would gain a new skill entirely if they are present.

For example, if there is a party member who specializes in fire magic, having them in the party would allow this character
to use a fire-based attack of their own. If the fire specialist were not in the party, the character would not have access to the fire attack until they were added back.

I love the idea behind it, the problem is I'm completely at a loss as how I would do this.
Is it possible? Inquiring minds want to know!
This can be accomplished with the Actor specification under Conditional Branch, have him learn the skill if said ally is present, and remove it if he's not present. If you want it to be visible but not usable, you'll have to make two versions of the skill, one normal, one with Occasion set to Never.
if you want to get more specific than the simple conditional branch, you need to combine control variable with conditional branch.
with the game data section (the one that defaults to map id) you can load a lot of the party data and actor data into a variable, and then check the variable with the conditional branch.
I was just able to test this, thank you both very much.
It works perfectly.

Original thread: https://forums.rpgmakerweb.com/threads/unlock-skills-through-party-composition.150256/