Skill Upgrade
This was a request from Rukaroa, based on Yanfly’s former VX project Generation Overzeal. It allows you to upgrade and downgrade skills using either JP (with YF JP Manager), Gold, or a game variable. Additionally, it’s also possible for skills to transform into other ones after a certain level.
Instructions
Before everything, you should put this script below the JP Manager if you intend to use JP for upgrade.
To call the scene use this in a call script event command:
SceneManager.call(Scene_Upgrade)
Default configuration
The script has a configuration section, where you set up the default behavior (common for all skills). It’s commented, but there’s one particularly important one:
# Default upgrade formula.
UPGRADE_FORMULA = "cost * level"
This formula calculates the JP cost for the next level. It’ll be evaluated, so please enter valid Ruby syntax. Note that “cost” refers to the base JP cost and “level” to the next skill level.
Tagging skills
You can tag each skill to make it behave differently from the default. You can put the following tags in the skill’s notebox:
<upgrade_cost: x>
This is the base cost of the skill.
<upgrade_formula: string>
The formula to calculate the JP/Gold/Variable cost. Overrides the default formula and needs to be valid Ruby syntax.
<max_level: x>
The maximum level a skill can attain.
<upgrade_damage: x>
Every level, the skill’s damage will raise by x%.
<upgrade_mp: x>
Every level, the skill’s MP cost will raise by x%.
<upgrade_tp: x>
Every level, the skill’s TP cost will raise by x%.
<level_morph: x, y>
At level X, skill will become skill Y. This is a one-way process and downgrade won’t be available after a morphing.
Compatibility
Works with Ace Menu Engine. Should works well with Yanfly’s scripts, since the design is inspired from one of his games.
Jesus, I forgot the download link like an idiot. Fixed =__=
any way to change the skill name in left side window to contain the (+4) too. :D.
it will be perfect if like that :D.
There seem to be a little problem with window switching between actors when upgrading skills. Also, when downgrading, and then switching to upgrading, the right sided window wont update properly.
What do you mean exactly? Seems to work fine when I test.
It only happens if you level up a skill of an actor and then switch to another actor, you get the skill not upgrading properly. Actually, you don’t see the skill getting +1, +2 and so on.
Nope, it still works fine when I do that…
Weird i even tried on a blank project with only yanflys menu installed and still, the only skills that you can see updated are the ones of the first actor. All the other skills are upgraded but you can’t see the window updating they’re status.
Oooooh, so that’s what you meant! Sorry, I misunderstood completely. In any case, you’re completely right. It should be fixed now, you can download again.
Skill morphing doesn’t seem to work either. The old skill won’t get replaced by the newest one.
My bad, didn’t notice that if you set a skill’s max level to 4, then put skill morphing at level 4, it won’t upgrade. So there must be a level 5 after so that the skill upgrades.
Could you possibly add an option to lock certain skills from being upgraded? Like for example buff skills which don’t actually do any damage.
Just put <max_level: 1>
If i put the skill will keep lvling up beyond the level i set.
Download again, I think it should fix it (it was an undocumented bug fix).
Yes it’s fixed now, thanks.
Possible bug.
Using default script configuration, I’m getting a lot of JP back when downgrading than I spent.
Ex.
Starting off with 10,000 JP.
When skill is maxed out to lv 10, remaining JP is 5,500.
Upon downgrading 1 level, current JP becomes 68,500.
Upon downgrading down to min level, current JP becomes 320,500.
Fixed.
Also another note, should probably have an option to disable downgrades.
Per skill, or script-wide?
Script-wide.
Done.
Nice!! This will definately be in my ZXE project. Thanks.
How do you access the upgrade system?
If you don’t want to integrate it to Yanfly’s Menu Engine, use a call script event command with SceneManager.call(Scene_Upgrade)
What’s the command to integrate it with Yanfly’s Menu? :skillupgrade?
Refer to the menu’s instructions for this. They’re quite detailed.
Found it. Thanks!
What is the code needed to place this in the ‘Ace Skill Menu’ script?
I’m getting a script error whenever a battle starts.
‘Skill Upgrade’ line 283: NoMethodError occured.
undefined method for “*” for nil:NilClass
It seemed to go away when I changed party members. Maybe it’s the class/actor?
It’s more likely the damage inflation parameter wasn’t found. The only possible cause of this would be using a skill with an erroneous damage notetag.
I’ve tested the same battle both ways, one with the actor and one without the actor.
The battle always goes fine when the actor isn’t there, but as soon as I add him to the party I start getting that error again.
I just tried a third way because I suspected it was the auto battle flag, and once I removed that from the actor the battle went fine. Is there a way to look into that?
To be honest, I’m not sure what is causing this. Just to make sure: are you loading an old save game? One made before the installation of this script?
It’s a new game, made after the installation.
I can’t reproduce the error at all. Could you upload a test demo with the problem?
Uploaded: https://www.dropbox.com/s/i2fu4feas6qndhc/The%20Twelve%20Stones.exe
The actor that joins is actor 011. At first I thought it was because the name is ???? but when I renamed it the problem didn’t go away, only when I took off the auto-battle flag did it go away.
He joins right at the beginning of the game, just go to the pub then go out and down the well.
The problem was apparently with non numerical damage values. ???? is so tough every damage becomes “NULL” (with Ace Battle Engine) and I forgot to take this into consideration.
In any case, it’s fixed now, you can download the script again.
Thanks!
Bug: when selecting an empty slot in the menu for an actor without any skill.
skill upgrade line 299: no method error
undefined method ‘id’ for ‘nil:Nilclass’.
Fixed.
Graphic related: Using default screen resolution, the ‘gold’ value overlaps with the actor’s ‘mp’
It’s not really a resolution problem, but more that there isn’t much place to display without Ace Menu Engine. I put the amount on the top of the window to avoid overlap, for now.
Do you think someday you might be interested in adding different skill up perks?
Like, for spells/skills that don’t have a damage component, maybe reducing their tp/mp cost instead?
Eventually yeah. It’s very easy to do, just need to allow negative values in the upgrade mp notetag. I’ll do it later today or tomorrow.
It’s done. You can now put a negative value for both TP and MP inflation.
Awesome, thanks!
I’m curious. Does the damage upgrade affect the base damage before damage modifiers (buffs, debuffs, etc) or the final damage after defense reduction?
Final damage, mostly for greater compatibility.
Quick question. How do you grab the skill level in Game_Battler and Scene_Battle?
For Game_Battler it only works in it’s an actor. It’s skill_level(skill) but note that it’s the actual skill object, not the skill id. It’s like skill_level($data_skills[id]).
Scene_Battle grabs it for BattleManager.actor by the way.
Gotcha. Gonna have to test this out some time.
where i should add SceneManager.call(Scene_Upgrade),,
and can i change it to upgrade it by using gold only ? and how to do it .?
It’s all in the instructions. Read a little more carefully.
i put the script and done everything but,
do i need Customizable Item Menu ?
because i am using one before add the script,
do i need item menu for this script??
No, you don’t need it.
Is there some way to use this script to amplify other effects?
IE: upgrade a passive skill to increase ATK increase from 10% >> 20%, or make a skill gain new attributes like adding a AGI increase into said previous skill with additional levels?
Have been looking for a skill growth system that was this simple 🙂
That’s why the skill morph feature exists. Just rename them the same but with +1, +2 and that’s it. You can disable downgrades if you go that route.
Haha, I knew it was just a lack of creativity on my behalf XD
I’m still getting this error:
‘Skill Upgrade’ line 283: NoMethodError occured.
undefined method for “*” for nil:NilClass
It happens if you have skills with damage type set to none (like buffs and such) and you select auto battle with yangly’s battle engine.
Line 283 should be this:
value = @result.mp_damage if item.damage.to_mp?
Your error message is strange.
This is the line with the error, is under the Game_Battler
value += (value * base * lv / 100.00).round
As I was saying, the error is happening when I have skills with type damage set to none and select auto-battle. (My lines are different cause I added couple of lines in comments, to know who I’m crediting, where I got the script, etc)
Should work now. Try to download the new version.
It does! Thank you so much!
Est-ce qu’il y a un moyen d’acceder depuis le menu ?
J’ai oublié de préciser que j’utilise le menu de Yanfly, mais je ne sais pas comment ajouter un nouveau sous menu.
Dans Yanfly Menu Engine, ajoute ceci dans le hash CUSTOM_COMMANDS:
:upgrade => [ “Upgrade”, 0, 0, :command_skill_upgrade],
La méthode command_skill_upgrade est déjà contenue dans mon script pout faciliter les choses. Bien sûr, remplace “Upgrade” par ce que tu veux et ajoute les conditions switch et variables si nécessaire.
Merci Kraed, ça marche. Par contre, je peux placer ta commande seulement à la fin de la liste par défaut de Yanfly (ex:en dessous de save). Car sinon, ça crash.
Je peux pas tester là, maintenant (iPad) mais est-ce que tu es certain d’avoir utilisé le hash CUSTOM_COMMANDS et non pas COMMANDS?
Voici ma config : http://uppix.net/c/d/4/761ceeb0906b9ee6955b7ee3e626e.html
Efface le :upgrade que tu as mis dans COMMANDS, il ne sert à rien.
J’ai retiré, mais maintenant, ton sous menu n’apparait plus dans le menu.
Ok, je suis un gros idiot lol.
Remets le :upgrade dans COMMANDS, tu avais juste oublié la virgule après.
Bien vu! Thanks Kraed. 🙂
oppps…don’t know why, but the part doesn’t work…no matter what I set instead of x, no tp change when upgrade…..could you help?
What is in your notebox? (Use [ and ] when you write it, because WordPress will remove the normal signs unless you use < ; and > ; )
the tp and mp inflation part ,and I found the problem, thanks anyway~although don’t know whyXD
eeee…seems there’s a script conflict…..and I found it PUT THIS SCRIPT AFTER Grathnode Install!!!
Grathnode Install is another sort of skill upgrade system, it’s not so great an idea to use both at the same time. And yes, you should put it below, as indicated in the ordered script list: https://grimoirecastle.wordpress.com/rgss3-scripts/
J’ai une suggestion à faire. Est-ce que ce serait possible d’inclure une option de débloquer un nouveau sans remplacer l’ancien ?
Tu veux dire en apprendre une autre tout en améliorant la compétence existante?
Oui, ça à l’air bête comme ça mais j’y ai pensé pendant que je testais ton script parce qu’il y a des gens (pas moi) qui aiment choisir des niveaux différents de la même magie (pour économiser les MP). Après ce n’est qu’une idée.
Je suis pas sûr, honnêtement. Le but est ici d’éviter justement d’avoir tout un tas de compétences différentes. Je suis même pas certain comment ajouter la fonction facilement (en particulier en ce qui concerne l’interface visuelle).
Pas besoin d’interface, le créateur ajoute un tag et c’est fini. Mais c’est pas grave, c’est juste une idée. J’aime ton script actuel. 😉