Sign in to follow this  
ender_341

(solved)Basic RPG battle system

Recommended Posts

ender_341    136
does anyone know a site that has a description of a really basic battle system? by basic i mean only having STR, DEF, and posibly magic. Thanks for any help you can provide. [Edited by - ender_341 on July 4, 2005 4:16:13 AM]

Share this post


Link to post
Share on other sites
Programmer16    2321
The algorithm is about 4 years old now, so it might not work the greatest (or even be close to useful):

Ok, I just figured out that my algorithm is total s***. And evidentally when I made it, I knew absolutely no math. I'll rework it and post ADAP (probably in about 6 or 7 hours, I have to get SOME sleep (its 5:30 right now.))

Share this post


Link to post
Share on other sites
Programmer16    2321
Well, I've come up with a really basic battle system.


Attacker stats are prefixed with A
Defender stats are prfixed with D

A_Chance = D_Defense - (A_Attack * Random_Percent)
if Chance is less than 1
Player missed
Damage = (D_Defense + D_ArmorBonus) - (A_Attack + A_SwordBonus)
D_HP = D_HP - Damage


If this isn't what you're looking for, I'll be back in a few hours (after some shuteye.)

Share this post


Link to post
Share on other sites
Programmer16    2321
Alright, I've been working on this since 10am and I just can't seem to come up with a basic RPG battle system. Sorry :(

RPGMaker 2000 uses a fairly easy battle system, but I can't help you there (its pirated software, so its not installed), but you might be able to find the help docs online somewhere.

Here's a tutorial for RPGMaker 2003, but the info is still good:
GamingW.net

[Edited by - Programmer16 on July 2, 2005 1:55:56 PM]

Share this post


Link to post
Share on other sites
Icefox    238
You might want to look up the Fire Emblem battle system. It's pretty straightforward, and goes something like this:

Damage = AttackerStrength + AttackerWeapon - DefenderArmor
%ChanceToHit = 70 + (AttackerSkill * 5) - (DefenderSpeed * 5) + TerrainBonus


So, it's pretty dead simple, but is well balanced. Stats tend to be capped at 30. When you add in a lot of various edge-cases such as critical hits, some weapons being strong vs other weapons, short and long range weapons, etc, it can be pretty sophisticated, and a lot of fun to play.
Note however that this is for a turn-based tactics game, and there's not much middle ground between "Ha ha, that hardly hurt at all!" and "oh man, if this guy hits me one more time I'm dead".

Share this post


Link to post
Share on other sites
ToohrVyk    1595
What I use right now for my 4E4 entry looks more or less like this (after removing special stuff) :

To Hit: C(Attacker Dex, Defender Dex * (3/4) )

Damage inflicted:
i = 0
damage = 1
until C(Attacker Force,Defender Armor + i) fails do
damage += Random( .75, 1.25 ) * Weapon Damage
i += 10

Where basically C() is an ubiquitous "check" of one number against another. Basically, C(x,y) has an (x - y + 50) % probability of success.

So if I have 100 dex:

I have 75% chance to hit anyone with 100 dex.
I have 100% chance to hit anyone with less than 66 dex.
I have 0% chance to hit anyone with 200 dex or more.

The damage computation is a little bit more complicated. Basically, you deal a base of "1" damage, and then perform increasingly difficult checks to see if you deal more damage. Besides, in this case, to compensate for an additional 10 dexterity on the side of the defender, the attacker only needs to increase his dexterity by 8.

Assuming I have a force of 100, and the enemy has an armor of 50, I will first check C(100,50), which always succeeds: I inflict an additional average of (Weapon Damage).

Now, the next check will be C(100,60), because I has increased by 10. I only have 90% chance of inflicting Weapon Damage again.

This means that 10 AC is equivalent to receiving (Weapon Damage) less damage in a fight, and 10 Force means inflicting (Weapon Damage) more damage in a fight.

Share this post


Link to post
Share on other sites
ender_341    136
Thanks all

I think I am going to use Programmer16's meethod just for the simplicity, I would have responded sooner but for some reason whenever I tried to log in it wouldn't load.

Share this post


Link to post
Share on other sites
Programmer16    2321
They were working on the site (I love how they just go ahead and do it, but they never EVER say anything before hand. I signed in, changed a link clicked make modifications. That all went through fine, and all of a sudden it wasn't working.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this