Battle Basics

From ROIdle Wiki
Revision as of 18:33, 17 September 2024 by Mangusto (talk | contribs) (→‎Damage Calculation Formulas)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

High-level summary[edit]

  1. When you first start playing the game, you will be able to create up to 3 characters for your party. They can be individually selected for a Hunt/Dungeon/PvP battle, but only one battle can be active at a time.
  2. Assign your status points and equip your weapon and armor before you start fighting. A free dagger and body armor is provided when you create your character. Description for each stats will be displayed when you click on the stats icon or refer to the Attributes page in this wiki.
  3. If you have the Runic Battle Codex, create and set battle scripts that control each character's behavior by clicking on the sword and gear icon in the menu. There you can pick and choose which skills and behaviors your characters will take using filters and triggers, as well as choosing which position in the battlefield that character will take for that script. Remember to only set the skills available to your class in the script or your character will idle in that step. There is a default script available for each initial class, and if you don't have the Battle Codex yet the game will have a default behavior set for each class.
  4. Some mobs drops consumables such as meat scraps. If your party just got wiped out and you don't want to spend time/zeny resting in the inn, you can try eating some food to bring you up to a decent shape and start battling in Capital 1 for your healer to heal up the entire party.

Damage Calculation[edit]

Reasoning for the chosen system[edit]

To defeat your foes, as is traditional in RPGs, you will need to reduce their HP value to 0. To do this, you will need to damage them in some way.
The damage a normal attack or skill deals to a target depends on both the attacker's offensive power as well as the defender's toughness.

To calculate the final damage, we use the characters attributes called P.Atk & P.Def (P. stands for Physical), and M.Atk & M.Def (M. stands for Magical). On rare occasions, skills use both Physical and Magical attributes, but in general, normal attacks and physical weapons like swords and bows use Physical Atk & Def, and magical skills like Elemental Bolt or Magic Darts use Magical Atk & Def to calculate the final output.

However, unlike certain games, the calculation we use is definitely not a simple subtraction of one's Def from the other's Atk. As RPGs normally tend to scale not linearly, such formulas are not well suited for games that have long term progression and an indefinite amount of expansions, as a simple subtraction means Defense would have to keep scaling forever, as well as Attack, the stronger the characters and their foes get.

So a decoupled approach works best, where increasing Defense means having a percentage of the attacker's Attack power mitigated, without the numbers being directly subtracted. But how to turn Defense into % damage reduction? Simply using the number directly brings us another problem: 100% reduction is a hard ceiling, and it would mean achieving 100 Defense has to either be impossible, otherwise that character is impervious to damage, or we cap reduction at a certain arbitrary value and increasing DEF after that point does nothing.

That leaves us with a type of formula that many MOBAs use, as well as some MMOs, an inverse multiplicative of the DEF. Something in the likes of A + B/(C + DEF). A very famous one is just 100/(100 + DEF), where damage is x1.0 when DEF is 0, x0.5 when DEF is 100, x0.3333... when DEF is 200, and so on.

Having our old system in mind, where 50 DEF was already a respectable amount, and wanting to retain 50 as the defense value that mitigated exactly 50% of the damage, we tinkered with the formula a bit to find curves that suited our needs. We needed 2 different ones, one from 0 to 100, and another one that is used for extreme cases where def is higher than 100.

Defense Formulas[edit]

So the formulas for the curves are the following:


Defense between 0 and 100[edit]

damagePercentage = -0.5 + (150 / (100 + defenderDef))
This yields the following curve:
0~100 Reduction curve

The characteristics of this curve are very nice for several reasons:

  1. The first points in DEF have a stronger effect on the reduction with decreasing effectiveness, with 5 DEF reducing 8% damage, 10 DEF reducing 14% damage, 20 DEF reducing 25%, up to 50 DEF reducing 50%, and here the scales tip.
    This is very nice for classes that do not stack a lot of VIT or defensive armor, they at least get a nice boost even with a couple DEF points.
  2. Then, from 50 up to 100, the effectiveness of each individual DEF point gets lower up to 100, where the reduction reaches 75%.
    This avoids monsters and classes that hoard DEF to reach 100 and be invulnerable, while still giving them a very nice damage reduction. It also allows us to not have to artificially cap reduction at some arbitrary value.
  3. Since this curve tends to an asymptote value lower then 0, we decided to use another one for DEF values above 100 (which are very hard to reach in the game right now)


Defense higher than 100[edit]

damagePercentage = 0.05 + 10 / (defenderDef - 50)
This yields the following curve:
100+ Reduction curve

This curve lets the game have infinite DEF stacking, without ever allowing the reduction to go below 95% (the curve asymptote).
For higher values the increase is very small, but still there: 100 DEF reduces 75% damage (touching the other curve), 150 DEF reduces 85% damage, 200 DEF reduces 88.4% damage, etc. And so the gains are minimal at this point, but no DEF or reduction cap is ever needed due to the nature of these curves.


And here is how both curves connect:

Defense curves overlapped

Damage Calculation Formulas[edit]

So, with the defense formulas in our hands, we can now actually calculate the damage dealt by an attack or skill. Some more steps go into it:

Add low level Flat reduction[edit]

Another mechanism we use to help defense be more meaningful in the early game is a flat reduction linearly proportional to the defender's defense. Every 2 Def reduces 1 damage, up to 15 damage at 30 Def. This makes it so that even 6 or 8 Def can decently help even for a 20 damage hit, where about 8% would not be a lot of reduction.
This is calculated after the % reduction, so it is not affected by the % reduction. The formula is as follows:

damage = Floor((attackerAtk * damagePercentage) - flatReduction

Add True Damage calculation[edit]

Next, this damage is passed on to the True Damage reduction, in case the attacker has any. This takes a percentage of the attacker's attack power, before any reduction. Then the same percentage is reduced from the reduced damage, and the True Damage portion is added back into it.
The formula is as follows:

undefendedDamage = Floor(attackerAtk * (trueDamage / 100))
damage = Floor(damage * ((100 - trueDamage) / 100)) + undefendedDamage

Add Elemental multiplier[edit]

Lastly, the damage is multiplied by the elemental multiplier, which is 1 for neutral, 0.5 for weak, and 2 for strong. This is the final damage dealt by the attack or skill.
The formula is as follows:

damage = Floor(damage * elementalMultiplier)