(solved)Basic RPG battle system

Started by
10 comments, last by Programmer16 18 years, 9 months ago
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]
-Matt S.
Advertisement
Well, do you need code or are you just looking for the logic of the battle system? I've got some algorithms that I made up a while ago if its just the logic.
I'd be interested in seeing the logic side of it.
I'm looking at the logic behind it cause I want to do the coding myself.
-Matt S.
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.))
Well, I've come up with a really basic battle system.

Attacker stats are prefixed with ADefender stats are prfixed with DA_Chance = D_Defense - (A_Attack * Random_Percent)if Chance is less than 1    Player missedDamage = (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.)
http://www.gamedev.net/community/forums/topic.asp?topic_id=317594&whichpage=1�
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]
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".
-----http://alopex.liLet's Program: http://youtube.com/user/icefox192
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.

This topic is closed to new replies.

Advertisement