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

I find great satisfaction in smiting spambots. I'm not really sure why.
I finally added my newly updated demo back to the website! It only took like 4 weeks of work...
Where is the "world-weary sigh" comment response when you need it? I need that one more than anything, but the closest we have is "wow" or "angry".
My apologies if it's out-of-place for my goyim-lookin' ass to be the one to say it, but the mythology of "Golems" is that they were created by Rabbis to protect Jewish villages from Anti-semetic attacks.

Forum statistics

Threads
107,775
Messages
1,032,067
Members
139,918
Latest member
Sianar
Top