Hello everyone,
In the Rpg game i'm creating, I want to make a Shopkeeper that sells books thats makes you learn a skill like in Pokemon (tm/hm)
But I want for some skills to only be available for some actors. Like for example there is a book making you learn the skill "fire"
and I want only the actor N°2 and 4 to be able to learn that skill but not the others.
I know it is possible to make the skill able for 1 actor only but I can't find a way to make it able for like 2 or 3 of them.
Does anyone know how to do that with a plugin or something?
Thanks in advance!
How do I make Skills obtained with Items only available for a few actors/Pokemon tm's system.
● ARCHIVED · READ-ONLY
-
-
I depends on how you are teaching these skills. I'm also not familiar with making a skill only usable for 1 actor, like you've said. You might be able to use Yanfly's Skill Learn System. It doesn't look like it depends on any other plugins.
If you want a single-use TM system, it's easier. You can just make compatible Classes use the <Learn Skill: x> note tag, and then the Skill's <Learn Cost> would require the TM item.
If you want them to be multi-use, you'd need to use the <Learn Require Eval>, and make it only return true if the player owns the TM item. Then you would not add a <Learn Cost Eval> since it isn't removing the player's TM item. (This gets a little more complex because you'll need the JS code for the check.)
It looks pretty configurable, too. If you don't want the menu to spoil things, you can probably make it hide unavailable skills, rather than gray them out. There might be an option in the plugin's settings. Let me know if there isn't one; I can tweak the plugin and create it a setting for that. -
Sorry for the late reply I couldn't be there but it worked really nice! Thank you very much !
And there is no option to hide unavailable skills sadly, if you can create a setting for that I would be really thankful! -
You could do this completely without plugins, just by doing a Conditional check on the target. If it is e.g. Actors 2, 4, they learn the skill, if it's actors 1, 3, then they don't, along with a message saying e.g. "X cannot learn this skill."
-
You could do this completely without plugins, just by doing a Conditional check on the target. If it is e.g. Actors 2, 4, they learn the skill, if it's actors 1, 3, then they don't, along with a message saying e.g. "X cannot learn this skill."
I'm not really sure with how you'd do this with just events. (I came into RMMV with a lot of coding experience, but I'm still not the best at working with events.) I have no idea how to that kind of check when using an item. I can see calling a common event, but this common event won't know which actor we're targeting when using the TM item.
Do you think you could make an example? -
@Ttoastty
Alright, here you go! This is a pretty simplistic script; it just removes stuff from the list of skills depending on the plugin settings. But you cannot do some more complex checks. If I were to add anything else to this, I'd support a notetag. Then you could more easily control which skills show up in the menu.
But this should be fine for what you need atm. Let me know if you run into an issue! -
I'm not really sure with how you'd do this with just events. (I came into RMMV with a lot of coding experience, but I'm still not the best at working with events.) I have no idea how to that kind of check when using an item. I can see calling a common event, but this common event won't know which actor we're targeting when using the TM item.
Do you think you could make an example?
Actually, if the item is used on the menu, you can use this in the common event to get the target id to a variable which you can use to tell who the learn skill target will be
$gameParty._targetActorId
Alternatively, you can also use the damage formula for this since you can make it run any valid JS code. Basically you use the damage formula to check the target and add the skill if the target can learn it. But you will need to add a valid effect to the item or else the menu might not allow you to use it. For simplicity I use the Recover TP effect for this (set to 0 so it doesnt actually recover anything).