RMMV YEP_SkillMasteryLevels

Pootscooter

Veteran
Veteran
Joined
Jun 7, 2020
Messages
116
Reaction score
63
First Language
Mandarin
Primarily Uses
RMMV
Hello, I'm trying to get the functionality of Yanfly's Skill Mastery plugin but in the form of a Common Event. Basically, I just need it to increment the skill's use upon when this Common Event is called. This is the code I found, but I want it to dynamically reference the ID of the skill being used and the actor ID of the user:
JavaScript:
var skillId = 1;
var skillUses = $gameActors.actor(1).skillMasteryUses(skillId);
$gameActors.actor(1).setSkillMasteryUses(skillId, intSkillUses + 1);
Right now, the code above would have to be copy pasted for every skill/actor combination since the IDs are hardcoded. I'm looking for the script call to reference these 2 IDs. Ty!
 

zaraku

Time Keeper
Veteran
Joined
Apr 19, 2018
Messages
70
Reaction score
64
First Language
English
Primarily Uses
RMMV
If you're merely leveling a recovery skill then you can put this in an After Eval or the damage formula instead of using a common event:
JavaScript:
if (!$gameParty.inBattle()) user.setSkillMasteryUses(item.id, user.skillMasteryUses(item.id) + 1);

If it absolutely needs to be through a common event then you could change it to a recovery skill, set two gameVariables using item.id and user.actorId() in the damage formula, then use your initial code with the gameVariables.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts


When you thought you'd be finished with the grid, and spend ~8-9 hours on an arrow. How is this more difficult to than player movement?

Still some bugs hiding in there, but it's nearly complete.

I'm having it strictly follow the path a user draws, because there will be booby trap and other similar mechanics where you want to avoid specific cells.
I feel like banging my head against a wall every time I want to find that post that shows all the plugin header codes. Then I think "next time I find it, I'm going to bookmark it". Then I think "wait a minute ... maybe I bookmarked it last time because it took me so long to find it". Check bookmarks, and there it is :)
... a few of my main characters standing around doing nothing lol. I mostly wanted to see them together on screen.

Forum statistics

Threads
107,822
Messages
1,032,438
Members
139,972
Latest member
elCodes
Top