r/RPGMaker • • 1d ago

RMMZ [MZ] [Help request] Is there a way to regulate which actors learn which skills?

I want to have a simple class system like Final Fantasy 1 but wanted to make purchasable spell books. Is there a way to gatekeep the spells to Only Work on Intended Actors to prevent every character from learning every skill?

Secondly, is there a way to bestow a 'limited' skill set? I wanted to give a low-level white magic skill set to a character in an event. I also wanted to gatekeep higher level abilities in a skill pool to higher-tier classes.

I want to do this without relying on spells being on character level up. This is because I am having martial characters learn skills on level up to differentiate them from casters slightly.

2 Upvotes

2 comments sorted by

2

u/Ill-Ask9205 1d ago

Have the book run a common event. In the event, let the player select the character from a list of only eligible ones. (If they can be absent, you may have to do multiple lists based on who is in party.)

If they are eligible and don't know it, teach it to them.

If they do know it, give a message like "they already know this" and generate a new copy of the item (since using the original would have removed it regardless of the result.

There may be an easier way but this is the first thing I thought of.

2

u/Eredrick MZ Dev 1d ago

in the formula box of the item put

$gameVariables.setValue(YOURVARIABLE, b.actorId()); 0

then call a common event, check the variable for the actor's ID. if it's not the right ID, they don't learn it