Does anyone know of a plugin that can make my idea work? (MZ)

I have an idea for a battle system that is very similar to that of Pokémon. Each party member has 4 move slots, and instead of learning new moves through level up, interacting with certain items will prompt the user to learn a new move (like a TM or HM in Pokémon). They'll keep the basic Attack, Guard, and Item options for variety.

Every party member will be able to learn the same moves, but each member will have an ability that will incentivize the player to teach them certain moves (ex1: a character's ability could be that fire moves are doubled, making you want to teach them fire moves. ex2: a character's ability could be that status-inflicting moves move first, making you want to teach them status-inflicting moves).

The issue is, I have no idea how I'd implement the code to make this happen. I don't know if RPG Maker MZ has any way to create the "However, (party member) already knows 4 moves. Replace a move with (new move)?" prompt. Would anyone know a way to do that, or know of some plugin that could help? I would really appreciate any tips!
there are some plugins for skill slots in battle, but most of what you describe should NOT be done with a plugin but with events.

especially the interaction to upgrade skills would be an event checking which skills an actor knows, which improvements it already has and selecting the appropiate changes (unlearn skill, learn skill etc) based on that.


you also might want to check for a "dynamic traits" plugin as that would help some of those events.
I agree that this is better framed in an event, but you'll probably want to use some script calls and a plugin to help.

- Pasting $gameActors.actor(42).skills().length == 4 into the Script field of Conditional Branch will check whether actor ID 42 already knows 4 skills.

- Using HimeWorks' Conditional Choice Text, you can populate your 4 choices with the names of the learned skills, in order.
$gameActors.actor(42).skills()[0].name will produce the name of their first skill. Change the 0 in brackets to 1, 2, or 3 for the other skills.
Then you could use the Script command
Code:
$gameActors.actor(42).forgetSkill($gameActors.actor(42).skills()[0].id
to forget their first skill.

Andar might have a different method in mind than what I outlined, but I think this is easier than trying to figure out how to use a dynamic traits plugin.
Thanks! I can see how Common Events would work, as they can be called almost anywhere (using a skill, using an item, etc.)

I would really like a way to show Skill names in the player's choice options when it's time to forget a move. Unfortunately, I can't use HimeWorks' Conditional Choice Text as I only have MZ at the moment. Would you happen to know of any similar plugin, or maybe another way?
as I only have MZ at the moment.
then you should change ypur profile to primarily uses MZ.
the suggestion was likely given because it currently claims MV.

That said, have you tried if hime's plugin is FOSSIL-compatible?
As Andar said, I gave an MV solution because your profile says you use MV.

Would you happen to know of any similar plugin, or maybe another way?
Have you Googled it? I did a search for "rpg maker mz conditional choices" and got several results. That takes much less time than asking us and waiting for a response 😉

Unfortunately, I can't use HimeWorks' Conditional Choice Text as I only have MZ at the moment.
Did you try it? Most of MZ's code is the same as MV's. It makes sense not to expect MV plugins to work, but it also makes sense to try them before saying they don't (and your post doesn't indicate that).

I've moved this thread to MZ Support. Thank you.

As Andar said, I gave an MV solution because your profile says you use MV.


Have you Googled it? I did a search for "rpg maker mz conditional choices" and got several results. That takes much less time than asking us and waiting for a response 😉


Did you try it? Most of MZ's code is the same as MV's. It makes sense not to expect MV plugins to work, but it also makes sense to try them before saying they don't (and your post doesn't indicate that).
You were right, HimeWorks' Conditional Choice Text works just fine in MZ. I was able to make the idea work using a Common Event that starts as soon as the item is used. Sorry!

I was able to find a way to make it work. I made the the character who used the skill-giving item into a variable, as well as the ID of the skill itself. That way, the 4 skills of the specific character would show up depending on who used the item.

$gameActors.actor($gameVariables.value(5)).forgetSkill($gameActors.actor($gameVariables.value(5)).skills()[(0, 1, 2, or 3)].id

worked like a charm to forget the move, and I used

$gameActors.actor($gameVariables.value(5)).learnSkill($gameVariables.value(6))
[Variable 5 was the specific player, and Variable 6 was the specific move]

to help them learn the chosen move. I have the entire Common Event saved in my PC now for use on my project. I'll also try to change what's on my bio from MV to MZ. Thanks so much for your help Andar and Turan!
You don't need to jump through so many hoops. The engine already has the ID of the actor you're using the item on.

You can get rid of the variable and do $gameActors.actor($gameParty._targetActorId)

And I'm not sure why you need to put the ID of the skill into a variable when you're making the common event for that item...just type the number.
I made the ID of the skill into a variable so that the item ID number correlates to the skill ID number. Each one item is linked to the learning of its specific one move. For example, if the Fire Gem (item ID 033) helps the character learn Fire Blast (skill ID 033), I'd want a variable so that the game knows exactly what move the character is learning. Then Item 046 will teach them skill 046, and so on and so forth. If there's a less convoluted way of making that happen though, I'm all ears!

I didn't think to do that with $gameParty._targetActorId. After substituting it with the variable, it worked exactly the same. Thanks for the tip!
If there's a less convoluted way of making that happen though, I'm all ears!
And I'm not sure why you need to put the ID of the skill into a variable when you're making the common event for that item...just type the number.

Code:
learnSkill($gameVariables.value(6))
Code:
learnSkill(15)
(or whatever the ID of the skill is)
Wow. I really need to start taking a JavaScript programming class, lol. Thanks a lot again!

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/does-anyone-know-of-a-plugin-that-can-make-my-idea-work-mz.169031/