Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

How to have custom Leveling (For skills and such) without Plugins

Saruteku

Villager
Xy$
0.00
I saw a post on here (https://rpgmakermv.co/threads/crafting-and-fishing.1760/#post-17523) that was about trying to add a leveling system to his fishing, but it was so old I didn't want to necropost it, plus this could be useful for other things and I wanted to put something out there to correct the thought you need a plugin to get custom levels.

The system I used for my game requires 3 variables for each skill that will be using the leveling system. One for the Level, one for CurrentXP, and one for RequiredXP. It's rather simple. First thing you need to do is set ReguiredXP to the amount of XP you need to gain your first level, in my case it was 100. You can do that with a parallel event at the start of the game. Then the hardest part of this simple system is creating the Level Formula.

My level formula at the moment is RequiredXP + RequiredXP * .10 which basically adds 10% more required XP from the last level. Not much but a decent formula. When all of that is done you can create a new parallel Common event with it's trigger to a switch that is always on (Or checks real quick right after you fish if you're concerned about lag)

Start with a conditional branch checking if CurrentXP is greater than or equal to Required XP

If it is you can play a sound and add 1 to your Level

Here you can add a message such as "Your fishing level has raised to level \v[Level]" (I made the mistake of leveling up after the message. Hahah)

Now you will subtract the RequiredXP from your CurrentXP just in case you had more XP than required so you don't lose it.

And last you determine how much XP is required to level up again. You do this with the script command and I'll explain mine:

var EXP = $gameVariables.value(42) + $gameVariables.value(42) * 0.10;
$gameVariables.setValue(42,EXP);
This creates a variable in the event called EXP and figures out my formula, in my case the value of Variable 42 (My requiredXP variable) then it adds 10% of the requiredXP.

Then right under that in the same Script command use the set Value command. In the parenthesis the first number (42 in my case) is the variable you want to set, followed by a comma, and after the comma is the value you want to change the variable to. Because EXP equals my formula it will set it up. And there ya go.

May seem very basic to actual scripters out there, but I figured this out listening to a very long overly complicated tutorial on fishing systems where he set the required XP manually for each level, which would have been HUGE for my project. This way it's only about 6 commands for every level, and here's hoping someone finds it useful.
 
Top