Saturday, November 5, 2011

I shoot you with my gun. You take 5 damage, and heal it with an herb you found on the ground.

Today I want to talk briefly about formulas in games.  One of the sticking points in development, at least so far, has been trying to determine exactly how to value everything in the game.  Armor, Weapons, skills, these all require the developer to assign arbitrary values to them and then later balance them around the fact that one skill seems to be dealing ludicrous damage and armor is doing nothing.

Now, I have been trying to avoid these same pitfalls by creating formulas one at a time, and then testing them in excel under a plethora of conditions.  Of course this is in no way sufficient enough and real world testing will end up being the only true way to see if the formulas work, but oh well.

Here's how the current basic attack formula is set up in excel:  ROUND((2*DMG/(DEF/(ATK*.5*DMG))*(1+.01*(Affinity-Resistance));0)

DMG:  Weapon damage rating.  Each weapon will have a damage rating and the formula makes the weapon extremely important.  Hopefully this will cause people to take an interest in the crafting and fusion systems, especially when they notice that upgrading from a 5dmg weapon to a 10 dmg weapon is a big deal.

ATK:  One of the basic stats.  Goes up every level, buffs increase it, and it can be found on equipment.  It's also used in magic damage too.

DEF:  One of the basic stats.  Can be obtained just as easily as attack.

Affinity:  Increases the damage of a given element by X%.  Not too easy to find, but 100 affinity is double damage.

Resistance:  Reduces damage by X%.  100% resistance is immunity.

Affinity and resistance do cancel each other out, but I think the formula is pretty stable, at least for now. 

No comments:

Post a Comment