MV Do i need a plugins?: Change Skill Level Script

Hello My question is do i need a plugins because i want a skill level system in my game where if you are level 1 you get say skill double attack Lvl1 then at level 4 ( the actor is level 4 ) you get double attack Lvl2 and this replace double attack Lvl1( you forget double attack Lvl1).

I know there are already scripts for that but they are not working for some reason. so can I just have a parallel event that will check if actor has skill and if so, make him forget the older one.

The problem is that there is 130 skills with 9 level each for a total of 1170 skill. wouldn't this lag or something? even if it's just called once for example.

i also need something for Class Change, because at level 20 all heroes have a class change in my game. so basicly i need another event that will detect when hero is level 20 and then ask him the class change question ( he choose between 2 class) do i need a script for that . can i do it with event.

Last question can a event respawn every time there is a battle. that would help me i think.
You could use one parallel event to check for if the character levels up, and then if so, have it call another (non-parallel) event to "update" the skills. You could do the checking by storing the character's previously-recorded level in a variable (starting at 1), and then check if the character's actual level is equal to that variable. If so, then nothing has changed and nothing happens. But if not, then it means the character has leveled up, since the actual level would be higher than the stored variable. In this branch you would call the separate common event that "updates" all the skills based on what exact level they've just made it to, and then change the stored variable to equal the current level.

I think this should work for both skills and class changes, as you can make anything you want happen based on whatever level they are, in the separate event 🙂

As for the respawning thing, you could use this:
Code:
$gameParty.inBattle()
in a conditional branch in the same parallel event to check if the party is in battle, and if so -> then check if a designated switch is on, and if not -> then turn the switch on. Then create a final event page on the event you want to respawn (after the blank, "despawned" page) with that switch as a condition, and on that page you can do any "resetting" you need to do (e.g. resetting self switches, or anything else), and at the end of it turn that switch off. I'm not 100% sure, but I would assume that this event page wouldn't run until after you're out of battle, when you're on the map where the event is again?

Screenshot examples:

Spoiler
Check if character has leveled up (but JK about the battle check, it doesn't work this way - see my second reply):

picture1.png


Update skills upon leveling up:

picture2.png


An example event to respawn after each battle:

picture3-1.png

picture3-2.png

picture3-3.png
but my questions is would this lag if i use a parallel event that loops and check every 5 second, because that is either what i need or to have the event check after every battle ( i dont know how to do that).

Right now i have the system where if the character has learned the higher level of the skill he will automatically replace it. but i fear for lag. is it possible for it to be without lag even if there is 1170 trigger line?
but my questions is would this lag if i use a parallel event that loops and check every 5 second, because that is either what i need or to have the event check after every battle ( i dont know how to do that).

Right now i have the system where if the character has learned the higher level of the skill he will automatically replace it. but i fear for lag. is it possible for it to be without lag even if there is 1170 trigger line?
I'm under the impression that it's common to have a sort of "Main Loop" parallel common event that checks for little things like this constantly. You'd be avoiding lag by not having it check every single skill every single frame, but rather, simply if the player's level equals the variable or not. The triggered (non-parallel) event would contain all the heavier processing stuff.

I've been using a "Main Loop" sort of common event for a long time and it's never caused lag by simply existing. Lag will depend partly on how many parallel events are running at once, and partly how demanding those parallel processes are.

EDIT: I've added example screenshots to my original reply 🙂 Just tested them.

The battle one doesn't work via parallel event, but you could instead just turn the switch on directly in the battle processing command itself, where it asks what you want to happen if you win, lose, or escape (I had forgotten that was a thing, since I'm not using turn-based battle in my game haha). It does work this way, like so:

Spoiler
picture4.png

And the level-check/skill-change part also works beautifully~
is there a limit to the number of condition that i can use? will it lag if theres 2000 condition in a row. im not sure i'm avoiding lag because it would be if hero is level 1 then if hero is level 2. i have 12 actor to test too. that would make around 1088 condition. which is alot.
lag is not caused by checking every skill evey five seconds.

but if you check every skill sixty times each second, THEN you'll have lag.

Or in other words if your logic of the parallel event works with a decent number of waits this will not be a problem, too many or too few waits will cause problems however.
is there a limit to the number of condition that i can use? will it lag if theres 2000 condition in a row. im not sure i'm avoiding lag because it would be if hero is level 1 then if hero is level 2. i have 12 actor to test too. that would make around 1088 condition. which is alot.
Hah... well, seeing as I'm eventing my own complex crafting system and on-map action battle system (both of which require a lot of conditions) and haven't run into lag yet, I'd say it's probably fine (assuming, as Andar said, you use good eventing logic).

That said, I do try to clean up my events when I can, since I'm also wary of causing lag - I don't know what the limit is, when the piling-up will become too great, but I haven't reached it yet. Before replacing them with variables, I've used exponentially increasing numbers of conditional branches within each other before and still not reached a point of lag. I'm talking, like, checking if a variable is one of 10 values (a number of "slots" or other metric), and within each of those checking if another variable is one of 8 values (the number of actors), and within each of those checking if two separate self-switches for up to 15 different events (map enemies - so potentially more if I encounter the need) are on or off, and then whether each of those events' X and Y are within a certain range, and then for each of those, check if yet another variable is one of potentially many (such as however many total skills, states, items, or recipes I end up with), etc...

So I'd guess that you calling an event once each time a character levels up, that has conditions for each actor/level/skill, probably won't be a big deal 🙂 But try it. That's the only way to know for sure, I guess, since there could be computer/system differences in what it can handle.
it would be a condition if character is level 1 then do x then if character is level then do x. i dont know how to make it a condition when a character levels up.
You would need 2 Variables to figure out if a Char had Leveled Up.

Variable 1 for the current Level.
Variable 2 to store the Value of the previously reached Level.
Pseudo Code Idea:

Eventcommand Label: again
Control Variable1 set to Player Level
If Variable1 is more than Variable2?
do Variable2 add 1 and Show Textbox: Hero Leveled Up! And is now Level \V[2].
If Variable1 is not equal to Variable2?
do Jump to Label again else do nothing

In the example if you level 7 Level at once, the Message will repeat 7 Times.
I hope this goes towards what you are looking for.
it would be a condition if character is level 1 then do x then if character is level then do x. i dont know how to make it a condition when a character levels up.
I added screenshot examples to my first post 🙂 Or you could do it the way Bex described, if you don't want to use scripting, and/or want to display each level-up individually in the case of gaining multiple levels at once.
Okay, thank you for all your response. i will try my own way then if that doesnt work ill try bex and Ratatattat's way. thank you again.

Original thread: https://forums.rpgmakerweb.com/threads/do-i-need-a-plugins-change-skill-level-script.146362/