Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
RPG Battle System
Author Message
Aziz

Posted: Sun Aug 06, 2006 2:18 pm   Post subject: RPG Battle System

I'm shooting at an rpg (low-scale, text, to start). But I'm stumpted with the battle enging. For starters, the way to attack. Now, characters (and monsters) will have strength, defense, agility, intelligence (magic def), and wisdom (magic str), as well as an attack and armour value.

So, how should I calculate ATK (attack) value? (str) * (weapon damage value). And ARM (amour)? (def) * (total armour bonus)?

And finally, the damage between an attacker and...attackee? damage = atk * (1 + random_between_0_and_1) - def? I'm reading up some articles and jotting some ideas down but nothing yet. Thanks

Tony

Posted: Sun Aug 06, 2006 2:28 pm   Post subject: (No subject)

just talk to any DM at your local D&D club.. they should have all those formulas memorized.
Tony's programming blog. DWITE - a programming contest.
Aziz

Posted: Sun Aug 06, 2006 2:58 pm   Post subject: (No subject)

Tony wrote:
just talk to any DM at your local D&D club.. they should have all those formulas memorized.

I don't doubt the existance of a local D&D club, but hell if I know where. But I CAN go google it. Thanks . Now, does D&D use a variable damage for weapons, like diablo? Like, Sword, 1-7 damage. I was thinking more along the lines of Sword, DMG: 10. But, then, I suppose I could simply add/subtract a certain amount from that, hey? I'll check into it, thanks.
Tony

Posted: Sun Aug 06, 2006 3:11 pm   Post subject: (No subject)

Aziz wrote:
Thanks wtd.

I don't know what to say about that...
Tony's programming blog. DWITE - a programming contest.
Aziz

Posted: Sun Aug 06, 2006 3:13 pm   Post subject: (No subject)

Tony wrote:
Aziz wrote:
Thanks wtd.

I don't know what to say about that...

why, of course, you edit your message and pretend like it never existed. and don't do drugs. bad.

PS. Thank you, Tony (it was the avatar)
Tony

Posted: Sun Aug 06, 2006 3:26 pm   Post subject: (No subject)

hah no problem
Tony's programming blog. DWITE - a programming contest.
Mazer

Posted: Sun Aug 06, 2006 4:07 pm   Post subject: (No subject)

Tony wrote:
Aziz wrote:
Thanks wtd.

I don't know what to say about that...

One hell of a Freudian slip...

Anywho, I don't know all of the details of D&D's system, but I think there is quite a bit that goes into calculating damage. As for the variable weapon damage, they use dice. A longsword, for example, may do 1d6 damage which means you must roll a single six-sided die to determine how much damage you did (1-6). A greatsword might do 2d12 damage, so you'd roll two twelve-sided dice and can do from 2 to 24 damage. Yowza.
Aziz

Posted: Sun Aug 06, 2006 4:10 pm   Post subject: (No subject)

Yes, something like that, but I haven't been able to find a solid source on the exact mechanics of anything except Armour Class. If anyone has got the rule book, or even an online version, could you post the snippits of how to calculate battles? I'm going to check around still.

Cervantes

Posted: Sun Aug 06, 2006 6:16 pm   Post subject: (No subject)

You can get online versions easily enough. Come into the IRC channel and we'll hook you up.

Here's how the basic battle system works:

You attack your enemy. To do this, you roll 1d20 (which means you roll a single 20-sided die), then add your attack modifiers to that. If that sum is greater than or equal to your enemies armour class, you hit. You would then roll for damage (what dice you roll depends on your weapon -- 1d8 for longswords, 2d6 for greatswords...)

Some more detail: Your attack modifiers are a sum of several things. You have a base attack bonus, which depends on your level and your class. Fighters have a base attack bonus (BAB) equal to their level (with each level, they gain +1 BAB). Other classes, such as rogues, get +1 to BAB every 1 or 2 levels. This information is all contained within tables. So your attack modifier is your BAB plus any other modifiers, which could include enchantments on your weapon, varying sizes (small creatures get a bonus when attacking larger creatures, as I recall), and magical buffs.

Your enemies armour class is equal to 10 + his dexterity modifer + his armour and any other items he is wearing that give an AC bonus + any spells that give an AC bonus + a size bonus (small creatures get a bonus to AC).

If you roll a 20 on your 1d20, you automatically hit, even if your enemies armour class is higher than 20 + your attack bonus. When you roll a 20, you roll again. If this roll would give a hit (with the same attack bonus as the first roll), then you've scored a critical hit, and you do 2 or 3 or 4 (depends on your weapon) times your damage. If this second roll is a miss, you simply hit them, as normal. Similarly, if you roll a 1, that's a critical miss. Some DM's do fun things when you get a critical miss, like 'you shoot yourself in the foot' or 'you shoot your ally in the foot', etc.
Tony

Posted: Sun Aug 06, 2006 6:39 pm   Post subject: (No subject)

I roll a 20!
Tony's programming blog. DWITE - a programming contest.
Martin

Posted: Sun Aug 06, 2006 7:45 pm   Post subject: (No subject)

If you want to use your own system, I think that the only thing that you can do is test it out religiously to balance the system out. Make a system that abstractly makes sense - for example, the chance to hit an enemy with your sword could be a combination of the player's strength, agility, and size weighted against the enemy's size, agility and kind of armour (arrows are very good at going through chain mail, for example). Put all of these together into a formula and then just weight the values appropriately until you get something that feels right.

Remember that it's impossible to balance everything, so your goal instead should be to have a system where the variation in a player's skill outweighs any advantages or disadvantages for the player's character.

If you would like to use the Dungeons & Dragons rules, all of it is on the internet for free off of Wizards of the Coast's website - Google around for it.
Aziz

Posted: Mon Aug 07, 2006 8:53 am   Post subject: (No subject)

Thanks guys . I've come up with this: The hero has STR, DEX, AGL, INT, WIS, and all other things (besides level and xp, of course) are calculated from this:

* MaxHP = 3 x STR + 2 x DEX
* MaxMP = 1.5 x INT + .5 x WIS
* ATK = 2 x STR + weapon damage value + .1 x AGL
* DEF = DEX + total armour value + .2 x AGL
* CST = 1.5 x INT + .2 x WIS
* WRD = WIS + .2 x INT

Untested, of course. BTW CST (cast) and WRD (ward) are magical attack and defense, respectively. I'm not even sure if I want a system like this, I'm looking more at a turn-based RPG (like Final Fantasy, Chrono Trigger, etc) but I've got lotsa time to play around. Thanks.
Aziz

Posted: Tue Aug 08, 2006 7:40 am   Post subject: (No subject)

There's still strength (STR) dexterity (DEX) agility (AGL) cast (CST) and ward (WRD), but the other values are calculated like this:

MaxHP = 5 x STR
MaxMP = 5 x INT

FIRST you roll a die (maybe a d6, d20, or d(AGL/3), who knows yet) and if it's 1, you miss automatically (fumble), and a 6 (or 20, whatever, max roll), is a critical and temporaily doubles STR. Otherwise, attacker's agility + roll must be greater than defender's agility.

Then, (critical is 1 or 2)
Damage inflicted = (critical) x STR x (weapon.AtkMod/100) - monster.defense

(where each weapon has an attack modifier like 200 (weapon doubles strength).

I also want to figure a way in for some character's to hit almost always, some to hit rarely (but strongly, like beserker), and some to have massive chance of criticals. I'm looking through game manuals right now, see if I can find something.
Devin_McElheran

Posted: Fri Jan 25, 2008 2:12 pm   Post subject: RE:RPG Battle System

When you get this game running, I gladly volunteer to test either as source code or *.exe, because I want to try to make an RPG in VB 2005, but I need a lot of art and I'm not sure how I would make different areas work.
Clayton

Posted: Fri Jan 25, 2008 5:21 pm   Post subject: RE:RPG Battle System

Ummm.... old post?
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 15 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: