Seeking Formula - Skills get stronger the more they're used

● ARCHIVED · READ-ONLY
Started by Frogboy 16 posts View original ↗
  1. I've played a couple games where a new spell would start out weak but if you used it a lot, it would become stronger over time. I'm looking for an ideal formula for such a mechanic. Assume that the number of times each skill is used adds +1 to what we'll call its XP. We'll call DMG the base damage that the skill inflicts or heals without any modification. You can also add in any other information that needs tracked, like say a cap on how much XP a skill can gain, or any other variables that need added to the formula. Lastly, it would be helpful if you briefly explained why your formula works well or maybe even how it works if it uses some complex math.

    As a very simple example, this formula would linearly increase a skill's strength 2% each use until it reaches 3x it's original strength.

    Code:
    x = DMG * (1 + XP * 2 / 100)
    
    Max XP = 100

    You don't have to assume that the base damage [DMG] is the starting point either. It could also be the ending or mid point if you feel that it would work better that way from a design standpoint. It needs to be the damage produced before applying your formula, though.

    Thanks in advance for any input you provide! Let me know if you need any more detail than what I provided.
  2. Depends upon whether or not you intend to have your player characters have overlap in their skill sets or not, & how close to the skill cap of 2,000 in the database you intend to get.

    If you don't intend for your characters to have overlapping skill sets. Then attach a common event that alters variables when used, & then insert the variable into the damage formula. How complex you want it to be is up to you. You could simply have each use count as an extra point, & then just add the variable total to the damage formula. Or you could have it work as damage multiplier, in which case you should make your variable control two tiered, an action use variable, & a power level variable. You can set up different requirements via conditional branches, so that subsequent level gains require greater skill usage.

    If you do intend to have skill set overlap, you'll need a variant for each respective player character, which is why you'll need to the database skill cap in mind. & of course obviously you can't have the skills with the common event attached, used by enemies.
  3. @XIIIthHarbinger
    Thanks but don't worry about the "how to set this up in RPG Maker" part. My plugin will track each actor's skill, how many times it's been used and any other values needed like what the skill's XP caps at. I'd just like to examine what formulas would work well for such a mechanic. That way, I can simply pick the one I think would work best and integrate it into my plugin so that it's simple to set up for the dev if they want to use this feature. Or better yet, I'll parameterize the formula so that you can either choose one from a nice default list or enter your own. Either way, I want to take the work out of doing the kind of setup work that you're describing so a dev can just enable an option and it'll just work.
  4. TBH I think its better to just give people a way to call forth the XP value so that they have freedom on how to integrate it to their formulas so that they can be as creative as possible. From my experiencee a lot of newer users tend to stick to the given formulas if you give those to them.
    A few example could be helpful for the less experienced users though.

    So for me a mix of your second idea of adding some "default" formulas to use + access to the XP value itself.
  5. To be honest, I prefer the way it's done not by continuous increment. They way you wrote, the output gonna be like this (not an actual output, just an example)
    1st use = 100 damage
    2nd use = 101 damage
    50th use = 150 damage

    But instead, by level up after certain times it had been used. Like
    1st use = 100 damage
    2nd use = 100 damage
    10th use = Level up! now it deals 110 damage for next 9 casts

    So when I get to the point of my skill improved, I feel rewarded.
  6. I agree with @TheoAllen

    You could set a couple of variables, or even an array, to "skill up" too. Even without an exiting plugin...for example:

    A skill called "Strike Blade," that has an XP variable and a Skill Level variable. With that set up, you would be capable of putting in both "tough levels to achieve" and a curved return. This would likely create a need to have a common event associated with the attack as well to make number adjustments. So...

    1. Player uses "Strike Blade", does [ X = DMG * Multiplier ] (any code for defensive adjustments)
    2. Skill applies Damage, and launches Common event.
    a. StrikeBladeXP + Y ( Where Y is either 1 or a value determined by enemy, so an XP variable. )
    b. if StrikeBladeXP > Z ( where Z is the amount for the next level ) then SB_LVL + 1, reset StrikeBladeXP
    c. If you really wanted to push it, you could calculate a bell curve, linear curve or some other xp value for the next level.

    Now for the combat, Multiplier can be set based on the level of "Strike Blade", and other game elements can adjust with it. You could generate an array with crazy values. You could make a level of "Strike Blade" a requirement to learn "Shining Strike Blade" or other such mechanics too. You wouldn't even have to reward the character with a new skill, you could do a weapon reward or some other reward for breaking some level or another.
  7. @Engr. Adiktuzmiko
    I do have a way to call upon this value with a script call so your suggestion will be possible if you really want to bake it into each individual formula.

    @TheoAllen @Mrs_Allykat
    I like your idea but not for this plugin (or at least, not yet). If this particular functionality was the main focus, like say a "Skills with Levels" plugin, I'd definitely go this route. I could go all in on giving you ways to add additional effects and damage types and buffs and states that would make the level 1 version barely recognizable from the level 10 version. That's actually a really great idea for a plugin that I'm surprised no one has made yet (unless someone has made it ... probably Yanfly). It'd be a nice core mechanic to build a game around.

    For this plugin, however, this is just one small feature that I'm throwing in before I release it to give devs that one extra thing to play around with. It's probably more suitable to play a minor role here unless I get a lot of requests to improve it so I'm taking a simpler approach that just strengthens the skill the more it's used. I may also add in parameters for some of the other values like increasing the success chance or things like this. I don't have time to get side-tracked on something too complex like making Fire do fire damage at level 1 and then adding a Burn State at level 2 and so on.

    We can still discuss these things as it is an interesting topic and who knows, I just may add such things to future versions or develop a different plugin that's really focused on skills with levels. But I also still want to get ideas for different formulas that I can offer to devs for this more simplified damage scaling. I plan to release this plugin by the end of the week so I can't go too crazy on this particular feature just yet.
  8. Hey Frogboy you should check out some of Yanfly's skill tutorials I'm pretty sure he has something similar to what you are looking for
  9. @Frogboy The plugin you're working on reminds me of the cursed weapons from the "Tales of" series. They would show up 3/4's into the game, were tough to get, and started with the lowest stats of any weapons. As the player used those weapons, a counter would go up. When upon finding them on the second playthrough, the damage the weapons would do were based directly on the number of enemies slain with it.
  10. I'd start off by saying that I've never really been a fan of Skills having XP levels of their own, because it tends to encourage the player to spam those skills in situations where it's not necessary or even useful. I've played around with points that can be invested to level up your skill, but the points are given to the character (e.g. when that character defeats an enemy using any means) that they can invest into any skill they choose, rather than being directly given to the skill itself. I don't think that Skill XP is universally bad design, but I think that most of the time it doesn't lead to fun nor purposeful gameplay.

    As far as formulas go, for this kind of thing (where you want the player to feel the scaling, but you don't want anything to scale so far that it eclipses any challenge), I really like Diminishing Returns mechanics. Once you get beyond a certain point, each additional point of input provides less and less output (but never quite reaches zero).

    I recently had to figure out how to create formulas for Diminishing Returns, and while the formula is fairly complex, it is easily scalable to any numbers, the curve is perfectly smooth, and the results are also easy for a player to see and understand (even if the underlying formula is confusing).

    Diminishing Returns Beyond (X) to a theoretical max of (Y) can be handled by:
    N < X: f(N) = N
    N > X: f(N) = X + ((Y - X) * (N - X) / ((N - X) + (Y - X)))
    Example: Fireball deals 1% extra damage for each time you've used it. If the raw percentage increase (N) would be greater than 30 (X), then the percentage increase will continue to get higher, but slower and slower until it approaches but never quite hits 40 (Y). Meanwhile, if N is less than 30, the percentage increase will simply be N (the number of times you used the skill).

    Final % increase (N < 30) = N
    Final % increase (N > 30) = 30 + (10 * (N - 30) / ((N - 30) + 10))
    If N is 1, damage will increase by 1%
    If N is 10, damage will increase by 10%
    If N is 20, damage will increase by 20%
    If N is 30, damage will increase by 30%
    If N is 31, damage will increase by 30.9%
    If N is 35, damage will increase by 33.3%
    If N is 40, damage will increase by 35.0%
    If N is 130, damage will increase by 39.1%

    To add this to a normal formula; you can calculate f(N) as above using an If-Else-End statement (call the result "c"), then use (1.00 + (c * 0.01)) * (standard formula) where the standard formula is a.atk * 4 - b.def * 2 or whatever.
  11. For simplicity, I'd like a set up where you can input the "xp variable" into the skill equation however you want, and the plugin will just keep track of each skill individually (and per character, if possible and as a choice). To save ram use (maybe?), the variable can be not created until the skill in question is used, so variable are only made for skills that use them.

    I've used variables in skills before, and different ways of increasing them (such as the simple "use the skill" method, but also things like "use a different skill", "run", "die"). Ideas I've used and/or like (caps work in most);
    The boost is large, but resets when battle is over. This one is my favorite and is a callback to Pokemon's Fury Cutter and Rollout (Whitney! :kaocry:)
    The boost is small, but the skill is used often (say, a specific character's normal attack)
    The boost is built so it can stay relevant through the game if you just like it (for instance, a thief with an attack that gives you money, both the money and damage scale based on use, but it's just there to be a better way to gain money than stealing items only for cash)
    The boost is bad; A skill that's supposed to be used sparingly that gets worse with use (or gets a bigger backlash). I did this with a game that had "limit breaks" but one character could use a skill that's as good as a limit break but each use would cause damage to him (30% of max HP, +5% per use, yes it's great if you're at low life and willing to die).
    The boost is inconsequential and only for people who want to grind; An attack that does whatever damage normally but with enough work (hundreds or thousands of uses) could be the best damage in the game. It's a silly thing I like from other games and is literally unnecessary. I've only ever done it for skills that are optional, easy to get, and you just ask "why?" (like maybe the beginning store has five skill books, with four balanced offense spells and the fifth is this with a description that makes it a joke item).
  12. I'm not really a fan of skills having their own growth modifiers that increase per use over the course of the entire game, as often, the growth is so small that it requires a pretty large number of uses for a skill to stay "caught up" with the increasing enemy strength. While your favorite skills may stay caught up, a skill you may have neglected (but turns out to be important later on) can end up being useless until you "catch it up" so to speak. And that's grinding.

    That said, I do like the idea of shorter, more dramatic growth modifiers that reset after battle (or other means, such as dying) and I'll probably be using such a thing in my current project. What I mean is something like this:

    Basic Fireball: Deals fire damage (4x modifier) to one enemy.

    Growing Fireball: Deals fire damage (2x modifier) with consecutive increase per use (1x, 8x max).

    So, while Basic Fireball does its expected amount every time, each time you use Growing Fireball, it grows by a noticeable amount, up to a total modifier of 8x, but that all goes away if the character gets KO'd or the battle ends.
  13. Aesica said:
    I'm not really a fan of skills having their own growth modifiers that increase per use over the course of the entire game.

    To be perfectly honest, I'm not either. I remember playing the Secret of Evermore and spending an exorbitant amount of time just collecting spell components and then unloading them all on trash mobs so that I could level them up. I didn't find it fun and don't plan on using it in any of my personal projects. The most I'd consider doing is making it a subtle effect that raises the damage maybe 15% or so. Not enough to make it worth your while to try to max out all of your spells (and certainly not debilitating if you don't) but enough to make you're favorites just a little more potent.

    But such is life when making plugins for others to use. I try to throw in as many features as I can think of and this happens to be one I've encountered and isn't that difficult to toss in. It's very basic for now but if I happen to get a lot of requests to expand it then I'll know it's in demand. If not then it'll stay basic.

    I'll try to get a reset xp script call in there so that you can do that "grows fast but resets" mechanic you talked about.
  14. Frogboy said:
    To be perfectly honest, I'm not either. I remember playing the Secret of Evermore and spending an exorbitant amount of time just collecting spell components and then unloading them all on trash mobs so that I could level them up. I didn't find it fun and don't plan on using it in any of my personal projects. The most I'd consider doing is making it a subtle effect that raises the damage maybe 15% or so. Not enough to make it worth your while to try to max out all of your spells (and certainly not debilitating if you don't) but enough to make you're favorites just a little more potent.

    But such is life when making plugins for others to use. I try to throw in as many features as I can think of and this happens to be one I've encountered and isn't that difficult to toss in. It's very basic for now but if I happen to get a lot of requests to expand it then I'll know it's in demand. If not then it'll stay basic.

    I'll try to get a reset xp script call in there so that you can do that "grows fast but resets" mechanic you talked about.
    Oh god, the flashbacks. I remember doing that in SoE too, right down to the details of the spell I ended up going with eventually (Crush, a big stone fist-like attack) because its reagents were easy to get and it was fairly potent. I never did pay much attention to any of the other spells because of that mechanic.

    I did the same thing with spells in Secret of Mana, but at least there you could leave an inn, target an enemy, then quick-spam the entire MP wad before returning to the inn. Good times.

    That said, I might have to keep an eye out for the finished product to save myself some time. ;)
  15. I will be releasing it tomorrow. It's done, but it's late where I'm at and I still need to write up a post, get a few images into my docs and shrink down the small demo project. It won't be exactly what you think, though. Like I said, this is just a small piece of my plugin.
  16. Frogboy said:
    I will be releasing it tomorrow. It's done, but it's late where I'm at and I still need to write up a post, get a few images into my docs and shrink down the small demo project. It won't be exactly what you think, though. Like I said, this is just a small piece of my plugin.
    Still, I might as well take a look at it. I tend to have oh-that-looks-cool-so-lets-add-it-itis, so maybe its other functions will give me inspiration or something.