Hi everyone! I’m currently working on a turn based RPG and while it’s still in its early days, I’m weary about how I would balance it. After setting up the core combat I’m still sort of winging the numbers of everything.

In my head I’d like for progression to feel exponential, like going from dealing 10 damage on level 1 to 1500 on level 15, but I’m struggling to make good functions.

Has anyone here ever made an RPG? How do you go about balancing it at the start? Here’s some gameplay if you’re interested.

  • o11c@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Let’s introduce terms here: primarily, we’re plotting “combat power” as a function of “progress level”. Both of these are explained below.

    I assume we’re speaking about a level system that scales indefinitely. If there is a very small level cap it’s not important that all this math actually be done in full (though it doesn’t); balancing of the constants is more important in that case.

    The main choice to be made is whether this function is polynomial or exponential; the second choice is the exponent or base, respectively (in either case, call it N). Note that subexponential (but superpolynomial) functions exist, but are hard to directly reason about; one purpose of the “progress level” abstraction is to make that easier.

    Often there are some irregularities at level 1, but if we ignore those:

    • in a polynomial system, if N level-1 characters can fight equally to 1 level-2 character, then N level-10 characters can fight equally to 1 level-20 character.
    • in an exponential system, if N level-1 characters can fight equally to 1 level-2 character, then N level-19 characters can fight equally to 1 level-20 character.

    The third choice is whether to use absolute scale or relative scale. The former satisfies the human need for “number go up”, but if your system is exponential it implies a low level cap and/or a low base, unless you give up all sanity and touch floats (please don’t). The latter involves saying things like “attacks on somebody one level higher are only half as effective; on someone one level lower it’s twice as effective”, just be sure to saturate on overflow (or always work at the larger level’s scale, or declare auto-fail or auto-pass with a sufficient level difference, or …).

    Note that relative scale is often similar to how XP works even if everything else uses absolute scale, but mostly I’m not talking about XP here (though it is relevant for “is it expected for people actually to hit the hard level cap, or are you relying on a soft cap?”).


    Progress level is purely a utility abstraction. If you have exponential tiers (e.g. if you make a big deal about displayed levels 10, 100, 1000 or 4, 16, 64, 256) you might choose to set it to the log of the displayed level (this often matches human intuition, which is bad at math), though not necessarily since it might unnecessarily complicate the math with the cancelling you might do.

    If you want xianxia-style “punching up is harder the higher you go” (and you’re actually), it might be some superlinear function of character level (quadratic? exponential?).

    Otherwise it is just the displayed character level (in some contexts it is useful to consider this as a decimal, including the fraction of XP you’ve got to the next level. Or maybe not a fraction directly if you want to consider the increasing XP requirements, though for planning math it usually isn’t that important).


    Combat power is usually a product of up to 6 components, in rough order of importance:

    • effective health (including shields and damage resistance, if applicable - the latter is often hyperbolic!)
    • attack damage (including math for crits - though if they’re a constant max multiple you can ignore them)
    • attack chance (as modified by enemy dodge). Often this is bounded (e.g. min 5%, max 95%) so you get weirdos trying to use peasants to kill a
    • number of targets that can (practically) be hit with a single attack. Usually this involves compromises so might be ignored.
    • distance at which the attack can be performed. Usually this involves compromises so might be ignored.
    • how long you can keep fighting effectively without a rest (regeneration is relevant for this, whether innate, from items, or from spells). This is only relevant for certain kinds of games.

    So the net result is usually somewhere between a quadratic and a cubic system relative to the scaling of the individual components. If the individual scaling is exponential it’s common to just ignore the polynomial here though.

    Things like “stats” and “skills” are only relevant insomuch as they apply to the individual components. One other thing to think about is “how effective is a buff applied by a high-level character to a low-level character, and vice versa”, which is similar to the motivation of level requirements for gear.

    • popcar2@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Thanks for such an in-depth writeup! It’s eye-opening thinking about all the different techniques available. My game will have a hard level cap so I don’t really need to overcomplicate things with infinite relative scaling or anything. I’d personally rather games end than drag on forever.

      unless you give up all sanity and touch floats (please don’t)

      Thankfully everything is an integer, I had a feeling floats would be a disaster.

  • rubikcuber@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I’d probably do the the balancing in a spreadsheet with the basic formulas or macros to approximate expected progression.

  • UntouchedWagons@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 year ago

    I don’t have any concrete ideas but if certain items become the meta, buff other stuff, not nerf what’s popular.

    Also it’s “wary”. :)