YEP learnSkillSystem change skill cost dynamically

Hello, I would like to change the cost of one skill dynamically, after that an event starts.
How can I do this?


I didn't see anything in the Lunatic Mode for do this, there is a JS command for this?


Thanks! 🙂
You can change the cost of a skill dynamically using JavaScript in RPG Maker MV. Here's a step-by-step guide on how to achieve this:

  1. First, identify the skill whose cost you want to change. Note its ID from the "Skills" tab in the RPG Maker MV database.
  2. Create a common event that will change the skill's cost. Go to the "Common Events" tab in the database and create a new common event.
  3. Add a "Script" command to the common event. Insert the following JavaScript code, replacing SKILL_ID with the ID of the skill you want to modify, and NEW_COST with the new cost of the skill:
javascriptCopy code
var skillId = SKILL_ID;
var newCost = NEW_COST;
$dataSkills[skillId].mpCost = newCost;

For example, if you want to change the cost of skill with ID 10 to 50, the code will look like this:

javascriptCopy code
var skillId = 10;
var newCost = 50;
$dataSkills[skillId].mpCost = newCost;

  1. Save the common event.
  2. In the event where you want to change the skill cost, add a "Common Event" command and select the common event you just created. This will call the common event and execute the JavaScript code to change the skill cost.
Now, whenever the event is triggered, the skill cost will be updated dynamically based on the code you provided. Note that this change will persist for the entire game session but will not be saved between game sessions. If you want the change to be permanent, consider using a plugin to modify and save game data.
Necro-post notice: @sirflickka

This post is almost SEVEN years old! I really think, if the OP still wanted to know, they would have bumped their post within the first week or two.

Original thread: https://forums.rpgmakerweb.com/threads/yep-learnskillsystem-change-skill-cost-dynamically.63649/