Damage Equation: Difference between revisions

From Project Nomads Unofficial Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 14: Line 14:
Let {{#tag:math|fps}} be your game's framerate. Typically it is your monitor's refresh rate.<br>
Let {{#tag:math|fps}} be your game's framerate. Typically it is your monitor's refresh rate.<br>
Let {{#tag:math|\Delta}} be your game's delta frame time, as {{#tag:math|\Delta = \frac 1 {fps} }}.<br>
Let {{#tag:math|\Delta}} be your game's delta frame time, as {{#tag:math|\Delta = \frac 1 {fps} }}.<br>
Unless the guntower is of a missilefire type, then {{#tag:math|\Delta}} always has a value of {{#tag:math|0.5}}


Then, let {{#tag:math|V_{dr} = A_d \times \Delta - V_a * \Delta}} be the victim's dealt damage.
Then, let {{#tag:math|V_{dr} = A_d \times \Delta - V_a \times \Delta}} be the victim's dealt damage.


For example, a level 3 John Guntower shooting one "fire" bullet at a John Navigation Tower with a damage of {{#tag:math|40}}, with a "fire" armor of {{#tag:math|3}}, and a framerate of 60fps:<br>
For example, a level 3 John Guntower shooting one "fire" bullet with a damage of {{#tag:math|40}} at a John Navigation Tower with a "fire" armor of {{#tag:math|3}}, and a framerate of 60fps:<br>
First, {{#tag:math|\Delta = \frac 1 {60} \simeq 0.0166 }}<br>
First, {{#tag:math|\Delta = \frac 1 {60} \simeq 0.0166 }}<br>
Then, {{#tag:math|V_{dr} = 40 \times 0.0166 - 3 \times 0.0166 \simeq 0.6166}}<br>
Then, {{#tag:math|V_{dr} = 40 \times 0.0166 - 3 \times 0.0166 \simeq 0.6166}}<br>
Thus, {{#tag:math|0.6166}} damage will be dealt to the John Navigation Tower.
Thus, {{#tag:math|0.6166}} damage will be dealt to the John Navigation Tower.

Latest revision as of 11:32, 17 December 2022

To know how much damage an attacker (guntower, aircraft, ...) will do to a victim entity, you need to know the attacker's damage and damage type, the victim's armor against this damage type and your framerate[1].

Damage Type[edit | edit source]

Project Nomads uses two damage types:

  • coll: used for collisions
  • fire: catch-all type for any attack, explosion, skrit cloud, etc...

At the current moment, this wiki only lists "fire" type armor/damage for buildings.

Equation[edit | edit source]

Let Ad be the attacker's damage of any type.
Let Va be the victim's armor against the same type of damage.
Let fps be your game's framerate. Typically it is your monitor's refresh rate.
Let Δ be your game's delta frame time, as Δ=1fps.
Unless the guntower is of a missilefire type, then Δ always has a value of 0.5

Then, let Vdr=Ad×ΔVa×Δ be the victim's dealt damage.

For example, a level 3 John Guntower shooting one "fire" bullet with a damage of 40 at a John Navigation Tower with a "fire" armor of 3, and a framerate of 60fps:
First, Δ=1600.0166
Then, Vdr=40×0.01663×0.01660.6166
Thus, 0.6166 damage will be dealt to the John Navigation Tower.

  1. TODO: Check fps' relation in multiplayer