Building simple battle system

Started by
4 comments, last by tapmonkey 12 years, 5 months ago
Hello All!

I am currently working on a dungeon crawler style RPG, and would like some advice from people on how to best construct the mechanics of the battle system, when it actually comes to the formulas.

Right now, users have 4 stats, ATK, DEF, INT, and HP. Each level the user gets two points to put into either ATK, DEF or INT. HP auto levels. Monsters currently only have ATK and DEF, but they can be given INT too.

I am trying to think of a simple yet fun way for these variables to work against one another.

One suggestion was to have damage equal, player ATK minus monster DEF. but if the player has 100 ATK and the monster 99 DEF the user is only doing one hit of damage each time. There was another suggestion to have damage equal ATK minus DEF/2. This seems to work better, though is a little strange because the at even player ATK and monster DEF lets say 100/100 the player ends up doing a lot of damage.

I want to include INT to be for accuracy, not sure if this means i now need INT for monsters as well, or how to create an actual equation to describe the way INT will affect ATK.

Any help in the regard is DEEPLY appreciated.

THANKSS!!
Advertisement
My approach generally looks like this:

  • Write down the stats
  • Throw some arbitrary numbers into a chart that feel good
  • Graph the numbers to see what the curve looks like
  • Find an equation that closely mimics the graph
  • Try it out in game
  • Repeat from step 1 until the results are fun

Try a program like Graphmatica or an online graphing system; you can throw different equations at it until you get a curve that looks like what you want.


Good luck - this is where things turn into much more of an art than a science :-)

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

What ApochPiQ said, except I'll add AnyDice as a possible helpful link, in case you are one of us old-timer RPG'ers who think in terms of dice (and combinations of various dice). A spreadsheet can also be invaluable when trying to get a feeling for how the numbers work out.

In the end, it takes a lot of meddling and tweaking before a game is balanced and fun. The battle system is just the start - how well it works will depend on many other factors, such as tactics available to the player, actual gameplay, what bonuses items give, strength of enemies, etc. Throw in spells or special skills, and everything can change. Whatever you do, make it easily adjustable (put the logic in a single place, don't use "magic numbers", etc.).

For my current project, I have something similar: an Attack and Defense score which determines the range of damage for each hit. Damage is basically calculated as follows:
Max(1, Random(1->ATT) - Random(1-DEF)),
except instead of a straight 1->n distribution I am experimenting with adding a curve in the randomness. A "bell curve" can be simulated by adding multiple random results together and dividing or subtracting to get everything in the correct range.

Of course, I am one who tends to over complicate these type of things, so I'll probably end up changing the system several times during the course of the project :rolleyes:
Here is a reply I made in another thread:


When I made games with RPG Maker, a front-end for Ruby, the generic advice for non-boss monsters was that you should kill all appropriate monsters in about five hits and all appropriate monsters you fight should kill you in about five hits. That means if you're fighting a "weak" monster, it won't take as many hits to kill it, but if you're fighting a "strong" monster -- i.e., one on a "higher level" than your character is ready to face -- it will take more hits to kill and chances are, it'll kill your character in fewer hits too.

Another generic piece of advice was to have a 20% range above and below base-damage and chance-to-hit stats. So, if your base damage is 100, that means the attack will do between 80 and 120 points of damage, if my math is correct. :wink:

One last piece of generic, standard advice was to have weapons raise the character's base damage by half. So, if his Strength stat (or whatever you use to determine base damage) is 100, a magic sword of normal power level would add 50 to that stat, making his base damage 150.

That's all assuming you're going to have a character that "levels up," or becomes categorically more powerful as your game progresses as classical, console-style RPGs do.


Have you never played Dungeons and Dragons, though? Pretty well all of D&D's stuff is OGL and can be accessed here: http://www.d20srd.org/

That's basically a complete character generation system, combat engine and compendium of monsters with which almost all sword-and-sorcery players are already familiar.

If you haven't, I doubt you'll want to learn an entire pencil-and-paper RPG system just to make a game, but...
A 30-year-old interested in learning to program by making an old-school, simple, text-only or 2D dungeon fantasy video game.

  • As of 9/28/2011, currently attempting to learn the basics of Python 2.7.
  • As of 10/14/11, Dabbling in C#.
  • As of 10/24/11, decisively surpassed my small knowledge of Python in C#.
I ended up going with something that closely mimics what was used in World of Warcraft because I liked the higher number values.

Damage = ATK, divide attack by whatever to get your base damage done by the player I divide by 14 because I have much higher ATK values.

Then determine your damage reduction based on defense (or armor)
DR = (Defense +1) / (Defense +16635 ) *100;
if(DR > 75) //cap our DR to 75% reduction
DR = 75;
ReducedDamage = Damage * (DR*0.01);

So that you can reduce damage by up to 75% using your defense/armor value but still do some damage no matter what.

Just something to think about.

You get outputs like this:


Armor: 599
DR: 3.48149 %

Armor: 3385
DR: 16.9131 %

Armor: 8014
DR: 32.5165 %

Armor: 15469
DR: 48.1871 %
Thanks for the advice.

I am not much good at understanding all this, am not sure how i am supposed to interpret from the graph if its working or not :) . or how to create an equation that factors in the multiple variables, as i am not sure how they should interact


My approach generally looks like this:

  • Write down the stats
  • Throw some arbitrary numbers into a chart that feel good
  • Graph the numbers to see what the curve looks like
  • Find an equation that closely mimics the graph
  • Try it out in game
  • Repeat from step 1 until the results are fun

Try a program like Graphmatica or an online graphing system; you can throw different equations at it until you get a curve that looks like what you want.


Good luck - this is where things turn into much more of an art than a science :-)

This topic is closed to new replies.

Advertisement