So let me make a deep explaination about what I'm doing, I'm trying to make a level up system in my game where the player can level up by using Makha (I'll come up with a cooler name later) For this effect I use a modified version of "Stat Upgrade with increased cost" composed of codes that I took here and there on this forum. The mechanic of this system is that for every time the player choose to upgrade a stat the overall cost rise for every other stat upgrade and he gain a level and the game has 5 main stats Muscles, Endurance, Magic, Agility and Intellect. My game is mostly based on manhwa like solo leveling so there is a rank system F-E-D-C-B-A-S-SS-SSS for every 10 levels the player goes up in ranks so upgrading stat is important but well here is the problem: I want the stat of Intellect to increase both Magical Power and MP regen but I don'tknow how to use Xparam and Sparam together with the code that I took from the tips and tricks.
Here is the code:
<Learn Cost Eval>
// Set the param ID of the stat you wish to adjust.
var id = 8;
// Increase the parameter by this amount.
user._xparamPlus[id] += 0.1;
// Adjust the number of times upgraded by 1.
user._upgradeParam += 1;
// Set the param ID of the stat you wish to adjust.
var id = 7;
// Increase the parameter by this amount.
user._paramPlus[id] += 1;
// Raise the level by + 1
user.changeLevel(user.level + 1)
// Make the user forget the skill.
user.forgetSkill(skill.id);
// Refresh the user.
user.refresh();
</Learn Cost Eval>
<Custom Learn JP Cost>
// Set the param ID of the stat you wish to adjust.
var id = 0;
// Default the user's upgrade parameter times to empty.
user._upgradeParam = user._upgradeParam || 0;
// Adjust the cost of
cost = user._upgradeParam * 200;
</Custom Learn JP Cost>
<Custom Cost Display>
\}Passive\{
</Custom Cost Display>
<Hide in Battle>
I need help in order to continue, Thanks in Advance
Here is the code:
<Learn Cost Eval>
// Set the param ID of the stat you wish to adjust.
var id = 8;
// Increase the parameter by this amount.
user._xparamPlus[id] += 0.1;
// Adjust the number of times upgraded by 1.
user._upgradeParam += 1;
// Set the param ID of the stat you wish to adjust.
var id = 7;
// Increase the parameter by this amount.
user._paramPlus[id] += 1;
// Raise the level by + 1
user.changeLevel(user.level + 1)
// Make the user forget the skill.
user.forgetSkill(skill.id);
// Refresh the user.
user.refresh();
</Learn Cost Eval>
<Custom Learn JP Cost>
// Set the param ID of the stat you wish to adjust.
var id = 0;
// Default the user's upgrade parameter times to empty.
user._upgradeParam = user._upgradeParam || 0;
// Adjust the cost of
cost = user._upgradeParam * 200;
</Custom Learn JP Cost>
<Custom Cost Display>
\}Passive\{
</Custom Cost Display>
<Hide in Battle>
I need help in order to continue, Thanks in Advance