Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Damage Algorithms, For an ABS
Titanhex
post Aug 12 2011, 07:25 PM
Post #1


Guru of Water
Group Icon

Group: Revolutionary
Posts: 1,096
Type: None
RM Skill: Masterful
Rev Points: 5




So I've added an ABS into my game and am realizing the default RMVX algorithm isn't well suited for it.
(I'm using Vampyr SBABS 12.1 atm)

So, I was wondering if anyone knew of some good algorithms that use the RMVX stats to determine damage. Preferably ones good for an ABS where the enemy may get 1 or 2 good hits before the player can react. Thanks much!

If a calculator for the damage can be included that'd also be awesome.

I'm using low values, 50 hp
+4 HP growth per level.
Max level 25.

Also if anyone can tell me where I make the edits to get the algorithms to work, it'd save me some time for finding them.

This post has been edited by Titanhex: Aug 12 2011, 07:35 PM


__________________________
Go to the top of the page
 
+Quote Post
   
lohenien
post Aug 13 2011, 02:27 PM
Post #2


Level 3
Group Icon

Group: Member
Posts: 40
Type: Writer
RM Skill: Beginner




Are you just using basic stats in VX or have you added extra? Either way, you want to determine at low levels and at high levels, how many attacks on average will defeat a foe or player. Lets say you want 3 attacks per foe at the low end and foes have 50 hp. That means you need to deal 17 damage per attack. Which ever formula you come up with should result in 10-22 damage using the general stat values you intend to have at that level.

To design an algorithm, you want to determine how you want things to matter in combat. You'll want to decide on how evasion works and then how the defender resists the damage.

For a simple example lets say you want to use a range on a d20 to determine if a hit lands or misses. 1-3 is your basic range for a miss, while 18-20 is a critical. Then you'll "roll" 2 d20 (one per actor) and factor in agility as a percentage of max agility for the level range to modify the basic roll. Finally you'll compare to determine if a hit occurs.

Numerically this might look like : (A = attacker, D = defender )
Roll for Attacker = 7, Roll for defender = 4. Assume attack has 65% of max agility for level, while defender has 50%.
A = 7 * 1.65, D = 4 * 1.5 thus A = 11.55 D = 6.
Chance to hit = A - D, CtH = 11.55 - 6 = 5.55

A 5.55 is above the miss mark, so the attack hits. You can then use the chance to hit as a percentage modifier for the final damage amount to represent how solid of a hit was landed.

Next step is deciding on damage. For that you'll want to likely use some combination of strength and agility for the attacker and defense plus agility for the defender.

Using agility as a modifier allows you to have players make brute force characters vs fast weaker characters by balancing attributes.

Go to the top of the page
 
+Quote Post
   
Titanhex
post Aug 13 2011, 11:23 PM
Post #3


Guru of Water
Group Icon

Group: Revolutionary
Posts: 1,096
Type: None
RM Skill: Masterful
Rev Points: 5




Well, all evasion is done by a flat %, with no modifiers effecting it.

I won't be using a D20 system. Or really a Dice system at all.

Damage is based solely off the weapon wielded. Strength will only play a factor in what equipment you can wear. Agility won't have much of a part at all either, as Hit % is a flat chance based on weapon. Rather I'm using agility for a different part of the game.

It's actually going to be a very simple battle system. I'm just wondering if the default algorithm is appropriate for a simple ABS engine with a 25 level limit. And if it's not what algorithm would work.

This post has been edited by Titanhex: Aug 13 2011, 11:24 PM


__________________________
Go to the top of the page
 
+Quote Post
   
lohenien
post Aug 14 2011, 03:09 PM
Post #4


Level 3
Group Icon

Group: Member
Posts: 40
Type: Writer
RM Skill: Beginner




The dice concept was just one example of randomly choosing a number with some decisions based on the result, and not intended to be used verbatim.

From what I know so far of the basic damage calculation, you have the base damage modified by the attacker's attack power multiplied by 4 and then subtract the defender's defense multiplied by 2. Finally you adjust the value by the variance level, which is a percentage (default of 20%). It's fairly straightforward to understand how the range will play out with given stats. For base damage we can assume 1 for now.

total damage = 1 + (attack x 4) - (defense x 2)

then for variance of 20%
TD = +/- (TD *0.2)

if stats are even between actors and foes :

TD = 1 + (5x4) - (5x2) = 11, which is ultimately (n*2) + 1

if HP values are at n*10 (50 hp with 5 attack and 5 defense) then death occurs in 4-6 hits. If that speed is good enough for you then the default algorithm should be fine.
Go to the top of the page
 
+Quote Post
   
nohmaan
post Aug 16 2011, 12:08 PM
Post #5


Level 5
Group Icon

Group: Member
Posts: 68
Type: Developer
RM Skill: Skilled




I've actually spent a lot of time trying to develop a good damage algorithm for my game so I can share what I have with you and see if it works. It's based on an exponential growth curve (not a big one). For my game, the max stat is 255, so my defense is (255/510). Each hit also has a chance to do + or - 10% damage as well. (for variance)

If you use this formula, and the HP values I picked, enemies of the same level with 0 defense will be able to take about 3 hits. Defense is calculated as a % of total damage absorbed, so if you want them to be able to take 6 hits, give them the max defense amount (the highest defense stat will stop 50% of damage)

This formula is set up so that at level 1 your hero has 10 STR and at level 25 he has 50.

Damage = attackp * (1 - defensep)
AttackP = ((strength^2)/20)+strength
DefenseP = defense/(max defense*2)

So here's how it would look with some different configs (assuming enemy defense = 0) Also we'll assume enemy HP levels follow a progression as this:

Level 1 HP 50
Level 5 HP 100
Level10 HP 200
Level15 HP 300
Level20 HP 500
Level25 HP 700

SCENARIO 1
Hero Strength = 10 (starting stat)
Damage = 15 per swing

Enemy Level 1
HP 50 #of attacks to kill 4
Enemy Level 5
HP 100 # of attacks to kill 7
Enemy Level 25
HP 700 # of attacks to kill 47

SCENARIO 2
Hero Strength = 20
Damage = 40 per swing

Enemy Level 1
HP 50 #of attacks to kill 2
Enemy Level 5
HP 100 # of attacks to kill 3
Enemy Level 25
HP 700 # of attacks to kill 18

SCENARIO 3
Hero Strength = 50 (Highest Stat)
Damage = 175 per swing

Enemy Level 1
HP 50 #of attacks to kill 1
Enemy Level 5
HP 100 # of attacks to kill 1
Enemy Level 25
HP 700 # of attacks to kill 4



As far as enemy stats go, if you want to use HP as low as 50-100, you probably will want to give all your bad guys an attack stat of 3-12 depending on the defense stat of your character at the time.

Also, if you want the enemies to have low HP values too, just divide it by 10.

This post has been edited by nohmaan: Aug 16 2011, 12:12 PM


__________________________
Go to the top of the page
 
+Quote Post
   
amerk
post Aug 16 2011, 07:21 PM
Post #6


Level 56
Group Icon

Group: Global Mod
Posts: 1,795
Type: None
RM Skill: Undisclosed
Rev Points: 15




Thanks for providing this method, as I may look into it myself.

While I can generally decide what type of EXP curve to use, or make one up on my own, determing the stats is another issue, and then trying to balance it out enough with enemies is a doozie.

Lately, I've been trying to find actual rpg games (from the SNES and PS) that show the level chart, what the stats were for characters, and what the enemies were for various levels, and using that calculation in my game, but it's not going as well as I had hoped.

This method gives some idea on balancing it, though.


__________________________
Go to the top of the page
 
+Quote Post
   
nohmaan
post Aug 16 2011, 10:23 PM
Post #7


Level 5
Group Icon

Group: Member
Posts: 68
Type: Developer
RM Skill: Skilled




I should note then that these stats are set for a more standard style RPG. So the highest HP of my characters at top level is 9200 (without the gear that boosts it to 9999). I geared it so that the max stat is 255 of any (str, dex, agi, res, def, spr) will not exceed reasonable damage output. Also, I was frustrated with algorithms where it's possible to do 0 damage, especially for mages-- which is why I decided that defense stats would be better suited for a % reduction. As a result, most armor doesn't change the core defense much, but offers bonuses to the other stats.

This also makes it much easier to stat enemy defenses. Basically most enemies are 112 res and 112 def (and I stat their HP appropriately for estimated levels). But it's easy to do something like a slime, with high physical def and low magic defense by setting the def to 255 and res to 75.


Anyways, here is the formula I've been using for magic damage also:
SPR = Magic attack stat
RES = Magic defense stat

MAtk = ((spr^2)/20)*modifier)+(spr*2.5)
MDef = (res/510)
MDamage = MAtk * (1 - MDef)

I like the FF style of level 1-3 spells and a 4th level "ancient spell" so the modifier is as follows:
Level 1 - 0.60
Level 2 - 0.80
Level 3 - 1.00
Level 4 - 1.25

This system is still all a work in progress though!


QUOTE (amerk @ Aug 16 2011, 07:21 PM) *
Thanks for providing this method, as I may look into it myself.

While I can generally decide what type of EXP curve to use, or make one up on my own, determing the stats is another issue, and then trying to balance it out enough with enemies is a doozie.

Lately, I've been trying to find actual rpg games (from the SNES and PS) that show the level chart, what the stats were for characters, and what the enemies were for various levels, and using that calculation in my game, but it's not going as well as I had hoped.

This method gives some idea on balancing it, though.



__________________________
Go to the top of the page
 
+Quote Post
   
nohmaan
post Aug 16 2011, 10:31 PM
Post #8


Level 5
Group Icon

Group: Member
Posts: 68
Type: Developer
RM Skill: Skilled




Oh! If you'd like, I use OpenOffice (it's a free competitor to Microsoft Office) so if you download that and send me an email address, I'd be more than happy to email you a spreadsheet file with the formulas so you can play with it!


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 20th June 2013 - 01:30 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker