Forewarning: The tutorial you are oh so close to reading is... *whispers* disorganized
. *Thunder Strikes* *Somebody screams "AHH THE POWER OF A THOUSAND BURNING SUNS IS EATING AWAY AT MY SOUL!"
* I'll fix it later, I'm a little close cut for time now.
IntroductionWhen making a game, the designer tries to attain a fun difficulty. For most games, this means that monsters have to be set with a system that leaves the player almost dead after accomplishing his/her goals. For some it means keeping the game going, while creating battles and making death possible. But in order to do any of that, we must first understand how battling works. I'm going to create an overview of everything involved in fighting while using (Deep announcer voice) THE DEFAULT BATTLE SYSTEM.
And so, without further ado, here is my tutorial.
TutorialPerhaps the most important part of the system is it's parameters. These are shown in the following database tabs: Actors, Skills, Weapons, Armors, Enemies, and States. The parameters are used in the battle formulas for everything, as they are the stats of players, enemies, weapons, armors, etc.
Parameters
MAXHP The maximum hitpoints of a player or enemy. Maximum damage to be taken.
MAXSP The maximum skill points of a player or enemy. Maximum points to be used in skills.
INT(Intellegence) A power modifier for magic based skills.
STR(Strength) A power modifier for normal attacks, a power modifier for strength based skills.
AGI(Agility) Controls who attacks first, Prevents enemy from hitting critically, Controls whether or not
player can escape, a power modifier for agility based skills.
DEX(Dexterity) Allows player to hit critically, Increases player chance of hitting enemy, a power modifier
for dexterity based skills.
EVA(Evasion)(Enemies and armors only) Prevents player from hitting enemy
ATK(Attack Power)(Enemies and weapons only) Directly sets damage dealt by weapon or enemy.
PDEF(Physical Defense)(Enemies, weapons, and armors only) Defense against physical based attacks.
MDEF(Magical Defense)(Enemies, weapons, and armors only) Defense against magical based attacks.
FormulasNext on the important list is the battle formulas. These calculate effects and damage amounts, along with numerous other factors of battle.
Terminology:
A- User
B- Target
Power- Base Damage
Rate- Parameter based damage increase
Force- Effect Power
Variance- Maximum Random Amount More or Less of the Base Value
Parameters(STR, INT, Etc.) Face Value
Here is a basic overview of each formula (WIP)
Damage Calculation:Normal attacks:
Power = A's attack power - (B's physical defense ÷ 2)
This means, "Final Attack Power is equal to Player's Attack power minus 1 half enemies defense power."
It can be simplified down to be "ATK is Players attack minus 1 half enemies defense."
Example: Players ATK is 100. Enemies PDEF is 50. ATK (75) = A's ATK (100) - PDEF/2 (25)
Rate = 20 + A's strength
Rate is a confusing system. I'm not sure if this is correct, but from the code I think it devises the actual damage from the formula atk*(20+Strength)/20. So for example: If the final value from the previous formula is 75, we multiply by (20+Strength(50))/20. (20+50)/20 or 70/20 which is 3.5. 3.5*75 is 262.2. That is the damage dealt without variance
Here is the line of code by the way. "Self.damage = atk * (20 + attacker.str) / 20"
Variance = 15
This is the amount of change possible either above or below the damage calculation.
Minimum force: 0
This simply means that you can not heal your opponent with an attack.
Skills:
Skill's force is positive:
The skill hurts the opponent.
Force = Skill's force
+ (A's attack power × skill's attack power F ÷ 100) Example: (140*100)/100=140
- (B's physical defense × skill's physical defense F ÷ 200)
- (B's magic defense × skill's magic defense F ÷ 200)
Alright, this is a confusing one. The damage that the skill does is the skill's power plus the attack power of the user's weapon (or if an enemy, just the user) multiplied by the skill's attack power and divided by 100. Example: The skill "Leg Sweep" has an ATK-F(or attack power F) of 100. A character equipped with an iron sword has the ATK(attack power) of 140. (140*100)Divided by 100 is 140. You then add that to the skills power, 20.
Minimum force: 0
Skill's force is negative:
Force = Skill's force
Rate = 20
+ (A's strength × skill's strength F ÷ 100)
+ (A's dexterity × skill's dexterity F ÷ 100)
+ (A's agility × skill's agility F ÷ 100)
+ (A's intelligence × skill's intelligence F ÷ 100)
Variance = Skill's variance
TBC