The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: Ghero on September 17, 2008, 09:38:50 PM

Title: [Resolved] Damage calculation?
Post by: Ghero on September 17, 2008, 09:38:50 PM
Started messing around with attack and defense values, but just can't figure out the formula for it. It seems like even 1 attack or defense is a big difference, which would make a level 5 character a billion times better than a level 1. I want to be able to have the character fight enemies for more than one level x.x  :mex:
Title: Re: Damage calculation?
Post by: tSwitch on September 18, 2008, 01:53:44 PM
try looking in the help files, you might be able to find the damage algorithms there.
Title: Re: Damage calculation?
Post by: Ghero on September 18, 2008, 09:34:29 PM
Normal Attacks
Damage = A's attack × 4 - B's defense × 2
If the results of the calculations would be a negative number, it will be made 0.
Skills/Items
If the base damage is a positive number
Damage = Base Damage
+ (A's attack × 4 × Attack F ÷ 100)
+ (A's spirit × 2 × Spirit F ÷ 100)
- (B's defense × 2 × Attack F ÷ 100)
- (B's spirit × 1 × Spirit F ÷ 100)

If the results of the calculations would be a negative number, it will be made 0.
If the base damage is a negative number
Damage = Base Damage
- (A's attack × 4 × Attack F ÷ 100)
- (A's spirit × 2 × Spirit F ÷ 100)

Of the attributes that accompany this action, the largest of B's attribute effectiveness values is used to modify the result.
A:200%, B:150%, C:100%, D:50%, E:0%, F:-100%
However, if B's armor or state has the [Halve Attributes] effect, these values will be halved.
If there are multiple such effects, they will all be taken into account.
If the normal attack damage would be 0 after attribute effects have been taken into account, there is a 50% chance that the attack will still cause 1 damage.
A critical hit multiplies the damage caused by 3.
If B is defending himself, the damage will be cut in half. If he has a strong defense, the damage will be 1/4 the normal amount.
Damage amounts are random to some extent, as determined by the dispersion settings.



Found it there!
Title: Re: [Resolved] Damage calculation?
Post by: tSwitch on September 18, 2008, 10:01:02 PM
:) glad it worked out for you