Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Common ways of calculating damage  (Read 1329 times)
0 Members and 1 Guest are viewing this topic.
Offline Death33284

Junior Member





« Posted 2006-12-10 23:15:50 »

What are the most common ways in which damage reduction due to some defence number is done in RPGs?

Lets say Unit X has 50 attack, is it best to have a percent reduction due to Unit Y's 50 defence... or what common systems are there?

If my question is unclear please tell me
Offline DarkMortar

Junior Member




Java Padawan


« Reply #1 - Posted 2006-12-11 02:12:08 »

I understand what you mean. back then, i used to use a stupid system, where i divided ints by defenses and armor rating, which is horrilbe because division with ints leads to rounding up, inaccuracy, and bad values.

My new plan is percentage based. and my armor rating will be like 20-120+ ect type of number, but those values have nothing to do with percent.

i would say, defense ect and the actual percentage ratings are based on comparisson,

like the opponents accuracy, and focus values would compare against your defenses,

and armor is a standard value, but there may be different peices like chest, bicep, leggings, head, ect. and each peice may differ for each character, and
accoding to the attack rolls, an attack will hit that armor peice and the damage done will be calculated.

but this part is true, in a lot of game, the higest chance of a peice to get hit is the chestplate, like 66% chance that the chest plate will be hit, which is why its so important and usually made the strongest with the higest armor ratings.

there may be different attack types, like blast,cold,heat,kinetic,ect, along with the BASE VALUE which is used for all attack reductions along with the damage type value added.

also things like dodge,block, and pure missing can be calaculated for defense.

overall id say DEFENSE values SLIGHLY reduce damage, AND they increase the chance of a sucessful dodge/block. or scrape attack.

Heres some blueprints so far of what im doing, ATTRIBUTES and SKILLS:

Quote
Constitution: Constitution(CON) improves the vitality regen rate over time.
Strength: Strength(STR) improves your ability to deal more damage with melee weapons.
               It also adds +1% armor peircing with melee weapons for every point.
               It also imporves the amount of vitality saved by a sucessful block.
               It also decreases the negative effects of wearing armor.
               It also decreases the rate at which heavy equipment can slow you down in weight.
               It also increases the amount of equipment you can carry.
               It also improved melee throwing distance and damage (spearman throw).
               It also improves swimming speed and length.
Dexterity: Dexterity(DEX) improves the chances of a sucessful dodge move.
                 It also improves some ranged specials.
                 It also improves the throw speed and accuracy of gernades.
                 It also improves jumping distance.
Focus: Focus(FOC) improves accuracy with all weapon types.
           It also improves the chances of dealing a damage number closer to the maximum value.
           It also improves the damage bonus to the "ideal range" on all ranged weapons.
           It also improves the awareness skill checks.
Agility: Agility(AGI) improves movement speed on foot, which decreases chance of being hit
                             while moving.
            It also improves attack speed.
            It also improves non-powers special attack timer speeds.
Stamina: Stamina(STA) improves the action regen rate over time.
              It also improves the efficiency of all actions.
Intellect: Intellect(INT) improves the execution of all skills that use intellect(i.e. healing).
               It also improves crafting results.
               It also governs stealth, computer use, and the effectiveness of cloaking devices.
Insight: Insight(INS) improves the psyche regen rate over time.
            It also improves the efficiency of all abilities that use the psyche pool.
Wisdom: Wisdom(WIS) improves powers usage and defense against opposing powers.
              It also improves powers special regen rates.
Charisma: Charisma(CHA) improves ability to socialize with others, or persuade.
                It also improves intimidate/taunt ability.

Quote
Types of hits/miss:
Miss:
Dodge:

Counterattack:

Block:

Scrape:
Normal:
Critical:

Resist(powers failure, or ability(ex: intimidate) only):


Quote
Melee Defense: Reduces max damage done to you by melee weapons, less chance of critical
                       attacks done to you, and higher chance of scrape instead, improves dodge/
                       block/miss chances against melee attacks.
Ranged Defense: Reduces max damage done to you by ranged weapons, less chance of critical
                         attacks done to you, and higher chance of scrape instead, improves dodge/
                         block/miss chances against ranged attacks.
Dodge: Evades attack completly resulting in no damage.
Block: Prevents (25+STR)% of damage, can happen twice more than dodge.
Counterattack: Chance that when an enemy attacks you, you will attack back with your default
                       attack for each time there is a sucessful counterattack. You will counterattack
                       even if your enemy misses you or hits you for damage. Happens as often as dodge.
Resistance vs Bleed: healer classes have "bleed recovery" as a healing ability.
Resistance vs Blind: Reduces length and chance of becomming blind in combat.
Resistance vs Stun: Reduces amount of defenses lowered and chance.
Resistance vs Intimidate: Reduces amount of offenses lowered and chance.
Resistance vs Dizzy: Reduces length and chance of being Dizzy.
Resistance vs KD: (knock down) Reduces chance of being knocked down.
Resistance vs Posion: Reduces harmful effects of posion to your system.
Resistance vs Disease: Reduces chance of getting disease from creatures.
Stealth:
Acuity: Increases chance of spotting hidden mines, individuals concealed by stealth, and
            the reflex response under sniper fire, which increases your defense while unaware.
Computers:
Medical Use:
Medical Speed:
Medical Efficency:
Medical Assembly:
Dark Powers:
Light Powers:
Fire Powers:
Water Powers:
Air Powers:
Earth Powers:
Powers Speed:
Powers Accuracy:
Powers Efficiency:
Dark Powers Speed:
Dark Powers Accuracy:
Dark Powers Efficiency:
Light Powers Speed:
Light Powers Accuracy:
Light Powers Efficiency:
Fire Powers Speed:
Fire Powers Accuracy:
Fire Powers Efficiency:
Water Powers Speed:
Water Powers Accuracy:
Water Powers Efficiency:
Air Powers Speed:
Air Powers Accuracy:
Air Powers Efficiency:
Earth Powers Speed:
Earth Powers Accuracy:
Earth Powers Efficiency:
//note: certain weapons (ie: heavy 2-h sword take the average of BOTH (Two-Hand Weapons
            + Heavy Weapons) / 2 for the average between the two for the combination.
Accuracy While Moving: (ranged only)
Melee Speed:
Melee Accuracy:
Melee Efficiency:
Ranged Speed:
Ranged Accuracy:
Ranged Efficiency:


cont...

Offline DarkMortar

Junior Member




Java Padawan


« Reply #2 - Posted 2006-12-11 02:12:21 »

...

Example special abilties(usuallu have timers:

Quote
Self Heal: Basic healing that "anyone" can use, based off Intellect attribute.
Basic Attack: You deal base weapon damage.
Improved Attack: You deal base weapon damage +10%.
Advanced Attack: You deal base weapon damage +20%.
Basic Valor: Sentinel special, adds +75 defense for 15 sec.
Major Valor: Sentinel special, adds +150 defense for 30 sec.
Superior Valor: Sentinel special, adds +300 defense for 45 sec.
Counterattack: Sentinel special, a strong attack that lowers enemy offense by 5% for 15 seconds.
Improved Counterattack: Sentinel special, a strong attack that lowers enemy offense by 10% for
                                     30 seconds.
Grand Will: Sentinel special, allows chance for sentinel to get back into combat from an
                  incapitated state back on his feet with 50% or 100% efficency if 1 ability pt spent,
                  but the player's action will be depleted, works every 5 minutes.   
Fortify: Sentinel special, increases dodge and block skills by 30% while active, for 30 seconds.
Disarm Attack: Sentinel special, possibility that this shot will delay opponent for seconds.
Basic Fear Stasis: Champion special, freezes opponent in place for 2 seconds, decreases his
                          offenses and defenses by 10% for 30 seconds.
Major Fear Stasis: Champion special, freezes opponent in place for 4 seconds, decreases his
                          offenses and defenses by 20% for 45 seconds.
Superior Fear Stasis: Champion special, freezes opponent in place for 8 seconds, decreases his
                               offenses and defenses by 30% for 60 seconds.
Basic Power Attack: Champion special, adds +5 damage to current weapon used for the attack.
Improved Power Attack: Champion special, adds +15 damage to current weapon used for the
                                     attack.
Advanced Power Attack: Champion special, adds +45 damage to current weapon used for the
                                     attack.
Armor Harden: Champion special, adds +50 armor while active for 30 seconds.
Strength and Honor: Champion special, display your courage, an may intimidate AND stun your
                              opponent for 30 seconds, while you gain +4 STRENGTH and +40*(lvl/2)
                               Vitality.
Basic Berserk: Enforcer special, increases attack output by +30%, but you suffer -50% armor,
                     -100% defense, and -50% accuracy for 15 seconds.
Major Berserk: Enforcer special, increases attack output by +50%, but you suffer -30% armor,
                      -80% defense, and -30% accuracy for 30 seconds.
Superior Berserk: Enforcer special, increases attack output by +70%, but you suffer -10% armor,
                         -60% defense, and -10% accuracy for 45 seconds. 
Basic Flurry: Increases attack speed by +60%, but accuracy is decreased by 50% for 15 sec.
Major Flurry: Increases attack speed by +80%, but accuracy is decreased by 30% for 30 sec.
Superior Flurry: Increases attack speed by +100%, but accuracy is decreased by 10% for 45 sec.
Basic Dire Attack: Enforcer special, adds +10 damage to current weapon used for the attack,
                          and also may add +1% bleed per attack (it stacks!).
Major Dire Attack: Enforcer special, adds +55 damage to current weapon used for the attack,
                           and also may add +2% bleed per attack (it stacks!).
Superior Dire Attack: Enforcer special, adds +80 damage to current weapon used for the attack,
                               and also may add +4% bleed per attack (it stacks!).
Mirror Damage: Enforcer special, absorbs 50% of damage done to the enforcer, and then inflicts
                        the other 50% of the damage back to the attacker for 30 seconds.
Maximized Attack: Enforcer special, a fast warm-up timer attack that attacks at the maximum
                            damage output for any weapon.
Corrupt Armor: Enforcer special, decreases opponents armor by 30% for 30 seconds.
Peircing Attack: Enforcer special, powerful attack, that penetraits 50% of enemy armor.
Basic Cross-eye: Rogue special, creates a double image of your character, resulting in a confused
                        opponent that will only hit you 1/2 as much for 15 seconds.
Major Cross-eye: Rogue special, creates a triple image of your character, resulting in a confused
                         opponent that will only hit you 1/3 as much for 30 seconds.
Superior Cross-eye: Rogue special, creates a quadruple image of your character, resulting in a
                             confused opponent that will only hit you 1/4 as much for 45 seconds.
Basic Fan Attack: Rogue special, you attack twice at the same time, at rapid speed.
Improved Fan Attack: Rogue special, you attack three times at the same time, at rapid speed.
Advanced Fan Attack: Rogue special, you attack four times at the same time, at rapid speed.
Sneak: Rogue special, you begin to walk slowly in order to sneak behind your opponents, or
           in order to get away, relies on your Stealth skill.
Conceal Self: Rogue special, you conceal yourself and you are camoflauged in your surroundings
                    but if you move, you will loose your camo, ideal for sniping or hiding.
Cloak: Rogue special, you are able to utilize specialized cloaking devices for Master Rogues,
          that allow you to move while being nearly invisible "based on your stealth skill" but
          if you attack you leave your cloak.
Double Run: Rogue special, allows rogues to run faster than the normal sprint to get away faster,
                  can be stacked with Sprint!
Uncanny Dodge: Rogue special, adds +60% dodge for 30 seconds.

id say also, that usually the blue prints for how the class trees line up should be done first, like im doing, and im far from done. i was mainly just getting a bunch of ideas linned up. hope this help, fellow 'loper Tongue

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Kova

Senior Member





« Reply #3 - Posted 2006-12-11 12:53:40 »

DarkMortar, that is way to much info for a simple question... you've gone from damage reduction to everything RPG related.

What are the most common ways in which damage reduction due to some defence number is done in RPGs?

Lets say Unit X has 50 attack, is it best to have a percent reduction due to Unit Y's 50 defence... or what common systems are there?

If my question is unclear please tell me

I don't know if there is some common way to do it, as I can see most RPG systems are not similar. I like the one from AD&D (or better to say I'm used to it) where you actually don't have damage reduction for armor. There are 3 ways: attacker misses, attacker hits your armor but doesn't damage you, and attacker hits you through the armor and you take damage. This way good defense and armor don't actually reduce damage taken (when you do take it) but only increase the chance you (your flesh) don't get hit.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #4 - Posted 2006-12-11 14:19:03 »

The point about AD&D is to be a gross simplification that nevertheless can encompass any kind of defensive capability. As such, its a good fit for small games.

It's also FREE to use the actual rulesets! (look up the D20 system) So, you have a ready-made working system which has been playtested and improved for tens of years. And there's tonnes of free content that people have written that you could use.

malloc will be first against the wall when the revolution comes...
Offline fletchergames

Senior Member





« Reply #5 - Posted 2006-12-11 21:56:07 »

Here's the most comprehensive attack/defense calculation I can think of:

1. The attack rolls against his accuracy percentages (possibly reduced by the defender's dodge score or armor class).
2. If the attacker hits, the defender rolls against one or more active defense percentages (e.g. a parrying percentage or possibly a dodge percentage if that wasn't included in step 1) to try to stop the attack.
3. Damage is computed.
4. The attacker rolls against his critical hit percentage to see if he scored a critical hit.  If he did, the damage is increased or some other effect will occur (depending upon the game).
5. If the defender failed to stop the attack, the damage is reduced in 1 of 2 ways (or potentially both, which is done in Fallout):
  a) Reduced by a percentage.
  b) Reduced by subtracted a number.  (Note that the defender should never be allowed take NEGATIVE damage!)
6. The defender's hit points are reduced by the specified amount unless some kind of spell effect redirects the damage to magic points or to another character.
7. The defender might have a chance to counterrattack (perhaps just a percentage chance or 1 counterattack per turn), which would involve going through the previous steps with the attacker and defender reversed.  The Attacker shouldn't be able to counterattack against the defender.

Most of those steps are included in GURPS (the Generic Universal Roleplaying System).  I only thought of step 7 because Dark Mortar included it in his giant list.

I think the original question  was really about step 5.  Either reduce the damage by a percentage or subtract a number.  Or do both.  Percentage-wise reduction is much more effective against powerful foes, but subtracting a number can make weaker foes completely unable to damage a character.

The Accuracy/Dodge statistics are also a possibility.

In the RPG I'm designing right now, I might use all 7 steps, but I will only use the percentage version of damage reduction (i.e. step 5a but not step 5b).  The percentage version will allow me to have characters who are immune to a certain kind of damage have a damage resistance of 100%.  It also works for things that either affect you or not, such as Sleep, Confusion, etc.

In a previous RPG, I had a system where each status effect had a numerical value for how much it affected your character.  This value decreased over time to provide a duration.  It was rather screwed up.  Now, I'm just going to make spells have a duration, and they're either affecting you're character or not.  Your character resists the spell with his resistance percentage.  Damaging spells will be reduced by the resistance percentage.

5b can work, but I don't think it's for me.  Fallout and its successors used both 5a and 5b.  Fallout was a great game, but that doesn't mean that using both is good for every game.
Offline Death33284

Junior Member





« Reply #6 - Posted 2006-12-13 21:38:41 »

Thanks for all the help guys, just have to figure out what kind of scale I want to use for all the stat numbers

I'm planning on implementing this in a game like Final Fantasy Tactics/ Tactics Ogre that I've been working on
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (74 views)
2014-09-10 06:39:09

Tekkerue (38 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (28 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!