Specific Stat Leveling?

I've been thinking of ways to spice up combat in my game, and I thought about the way certain modern RPGs or MMO games might do it; specifically leveling up whatever stat is being used.
Say for example, you attack enemies frequently, well that's going to start leveling up your attack stat specifically. Maybe you're taking lots of damage, that might level up your HP and Defense.
I see plenty of plugins where players can allocate stats as they wish, but that's not quite what I'm looking for. I'm looking more for a replacement of the default leveling system itself.

I also have ideas to implement this "use it a bunch to level it up" concept by maybe having characters learn new skills for weapons they frequently use, so that using the same specific weapon can be more useful and you don't need to just keep buying the next sword upgrade you see.
Is there a way to do this in the game itself, or is there perhaps a plugin out there for this?
theoretically it could be done by default methods, but practically I think that is a very bad idea to do without a specific plugin.

the problem is if you do it by events or by non-specific plugins, you'll have to use too many variables to store whatever happens before processing the results.

Best way in my opinion would be a custom plugin specifically written for this, but that needs a lot more info than you gave above - things like the formulae that transfer points into whatever, like how many lost HP give how many MaxHP and so on.
theoretically it could be done by default methods, but practically I think that is a very bad idea to do without a specific plugin.

the problem is if you do it by events or by non-specific plugins, you'll have to use too many variables to store whatever happens before processing the results.

Best way in my opinion would be a custom plugin specifically written for this, but that needs a lot more info than you gave above - things like the formulae that transfer points into whatever, like how many lost HP give how many MaxHP and so on.
I think keeping it simple like "get hit x times = level up HP" or "Damage enemy x times = level up attack" for example.
I don't know if that would hold up well or not in the long run, but it's an idea. Personally I'm a little lost when it starts getting into formulas and larger scale math, so that's my best idea, lol.
The game Final Fantasy 2 (Japan's 2, not 4) uses a system like this. From playing that game, such a system can be interesting if done well, but there's a lot of opportunity to mess it up. In FF2, a common problem was with magic, where spells leveled up for a character if it was used enough, and each spell had a separate level. This meant you had to grind A LOT to keep up on spell levels, and certain spells like Silence or Blind often stayed low unless you actively trained them. In my experience, such a system is very grind-heavy and very easy to do poorly.

The best advice I can give if you're going to try this is to not add too many things to level up. Maybe keep certain things universal, like leveling up magic schools rather than each spell. Give an incentive to level a particular weapon, like advanced sword skills learned at a specific level. Regardless, some kind of plugin will likely be necessary for this to work.
The game Final Fantasy 2 (Japan's 2, not 4) uses a system like this. From playing that game, such a system can be interesting if done well, but there's a lot of opportunity to mess it up. In FF2, a common problem was with magic, where spells leveled up for a character if it was used enough, and each spell had a separate level. This meant you had to grind A LOT to keep up on spell levels, and certain spells like Silence or Blind often stayed low unless you actively trained them. In my experience, such a system is very grind-heavy and very easy to do poorly.

The best advice I can give if you're going to try this is to not add too many things to level up. Maybe keep certain things universal, like leveling up magic schools rather than each spell. Give an incentive to level a particular weapon, like advanced sword skills learned at a specific level. Regardless, some kind of plugin will likely be necessary for this to work.
That is some nice advice! I haven't played many Final Fantasy games so I wasn't aware of this, but that sounds like a really neat system to have, especially back in the day.
And yeah I agree, having more generalized leveling is definitely a better approach.
The game Final Fantasy 2 (Japan's 2, not 4) uses a system like this. From playing that game, such a system can be interesting if done well, but there's a lot of opportunity to mess it up. In FF2, a common problem was with magic, where spells leveled up for a character if it was used enough, and each spell had a separate level. This meant you had to grind A LOT to keep up on spell levels, and certain spells like Silence or Blind often stayed low unless you actively trained them. In my experience, such a system is very grind-heavy and very easy to do poorly.
Final Fantasy 2 is actually a good example of how not to do this sort of system. Or a least, a lesson in what to avoid when making your own. Because the stats leveled up when performing certain actions, you could infinitely game the system by fighting the weakest enemies and attacking your own party members with normal attacks until they were low HP, and then finishing the fight.

Because you were attacking, ATK would go up, because you were being hit, DEF would go up, and because you got low HP, your MaxHp would also go up. Fighting low level enemies that were no threat to you would ensure no one would ever die, and you could spam a cure spell after every fight to level that up as well.

So in addition to the system already being really grindy, specifically for leveling spells, it was also very easy to grow to the point where you unbalanced the game by grinding in a very specific way. Watch out for that sort of thing when you're designing your system.
Final Fantasy 2 is actually a good example of how not to do this sort of system. Or a least, a lesson in what to avoid when making your own. Because the stats leveled up when performing certain actions, you could infinitely game the system by fighting the weakest enemies and attacking your own party members with normal attacks until they were low HP, and then finishing the fight.

Because you were attacking, ATK would go up, because you were being hit, DEF would go up, and because you got low HP, your MaxHp would also go up. Fighting low level enemies that were no threat to you would ensure no one would ever die, and you could spam a cure spell after every fight to level that up as well.

So in addition to the system already being really grindy, specifically for leveling spells, it was also very easy to grow to the point where you unbalanced the game by grinding in a very specific way. Watch out for that sort of thing when you're designing your system.
That's actually a really good point. In this case, I suppose the "hit enemies x times = level up attack" type formula wouldn't really work out much if you can go fight weak enemies and grind it.
Although I'd imagine one-shotting weaker enemies to level it up would still take a long time since you'd need to keep encountering them constantly.
It just means you need to be thoughtful and playtest. If you have code to increase the parameters when a certain thing happens, it's not really harder to add some conditions to it - you just need to know what to ask.

Code:
Attack enemy
- Is the enemy, say, more than 5 levels beneath you?
-- don't do anything
- else, gain experience in STR

Original thread: https://forums.rpgmakerweb.com/threads/specific-stat-leveling.147751/