Damage

//------------------------------------
// Constants that affect the formulas
//------------------------------------

// Attribute Bonus (AB). First takes into account the subclass, and if no subclass is present, uses the class.
attribute_bonus =

Barbarian: (STR - 20) * 2.0
Warrior: (STR - 20) * 1.5
Marksman: (DXT - 20) * 1.5
Archer: (DXT) - 20) * 1
Warlock: (INT - 20) * 1.75
Mage: (INT - 20) * 1.3

//---------------------------
// STEP 1. Get Weapon Damage
//---------------------------

// a. Get the minimum and maximum damage from the weapon nominal damage (seen in the weapon tooltip). Here is also added the damage from "[type] Damage +X" modifiers (such as Accurate Swings, for example).
total_damage_min = sum(weapon_damage[type].min)
total_damage_max = sum(weapon_damage[type].max)

// b. Apply Weapon Damage per Type % found in items or spells as " Damage +%".
weapon_damage[type].min += weapon_damage[type].min / 100 * weapon_percent_bonus[type]
weapon_damage[type].max += weapon_damage[type].max / 100 * weapon_percent_bonus[type]

//----------------------
// STEP 2. Bonus Factor
//----------------------

// a. Get extra damage. This is comprised of the Attribute Bonus (AB) and the Quality-Material-Kind Bonus (QMKB, which is shown in the tooltip as (+X)).
extra_damage_per_type[type] = attribute_bonus + QMKB

// b. The extra damage needs to be calculated in relation to each individual type of damage, so the extra damage is proportionally distributed.
extra_damage_per_type[type] = extra_damage_per_type[type] * (weapon_damage[type].max / total_damage_max)

//------------------------------
// STEP 3. Get the Final Damage
//------------------------------

// a. Iterate through all kinds of damage (Slashing, Piercing, Blunt, Fire, Ice, Lightning), randomizing the difference between the minimum and the maximum.
resulting_damage[type] = weapon_damage[type].min + random(weapon_damage[type].max - weapon_damage[type].min)

// b. Apply the Weapon Damage % modifier, found mostly in spells as "Weapon Damage +%" and applies to all damage types.
resulting_damage[type] += resulting_damage[type] / 100 * weapon_damage_percent

// c. Add the extra damage per damage type
resulting_damage[type] += extra_damage_per_type[type]

// d. Add the Damage Bonus modifiers, both non-percentual and percentual. This is what can be found in spells as "Damage Bonus +X" or "Damage Bonus +%".
resulting_damage[type] = (resulting_damage[type] + damage_bonus) * (1 + (damage_bonus_percent / 100))

// e. Sum all the damage types and add all the "[type] Damage Bonus +X" (which is mostly used by magical gems embedded to items). This is considered as "special damage" and will be absorbed only by the armor and then added to the damage almost at the end of the reduction of damage.
resulting_damage[type] = sum(resulting_damage[type]) + sum(special_damage[type])

// f. Round up the resulting damage
resulting_damage[type] = floor(resulting_damage[type])

//------------------------------
// Get the Character Sheet info
//------------------------------

To get the weapon damage potential as shown in the Character Sheet, just replace the initial resulting damage in 3.a directly as the minimum, keep on calculating until you get the minimum resulting damage, and then repeat from step 3.a again with the maximum resulting damage.

//---------------------
// Damage: Case of Use
//---------------------

Two Handed Ancestral Sword of Magnanite (Arcane)

1.a)
total_damage_min = 323
total_damage_max = 351

1.b)
weapon_damage[slashing].min = 323
weapon_damage[slashing].max = 351

Add Athletic Passive +10% Slashing Damage:

weapon_damage[slashing].min += 323 / 100 * 10 = 355.3
weapon_damage[slashing].max += 351 / 100 * 10 = 386.1

2.a)
// Character stats without equipping the weapon
89 DXT + Warmaster's Might +15% = 102.35 DXT

attribute_bonus = (102.35 - 20) * 2 = 164.7

extra_damage_per_type[slashing] = (164.7 + 69) = 233.7

2.b)
extra_damage_per_type[slashing] = 233.7 * (386.1 / 351) = 257.07

3.a)
resulting_damage[slashing].min = 355.3
resulting_damage[slashing].max = 386.1

3.b)
resulting_damage[slashing].min += 355.3 / 100 * 0 = 355.3
resulting_damage[slashing].max += 386.1 / 100 * 0 = 386.1

3.c)
resulting_damage[slashing].min += 257.07 = 612.37
resulting_damage[slashing].max += 257.07 = 643.17

3.d)
Add Fulminating Active
resulting_damage[slashing].min = 612.37 * (1 + (50/100)) = 918.555
resulting_damage[slashing].max = 643.17 * (1 + (50/100)) = 964.755

3.e)
resulting_damage[slashing].min = 918.555 + 0 = 918.555
resulting_damage[slashing].max = 964.755 + 0 = 964.755

3.f)
resulting_damage[slashing].min = floor(918.555) = 918
resulting_damage[slashing].max = floor(964.755) = 964


Armor and Resistances

Armour is the first reduction of damage, taken as "protection". That ends up in a "protected damage", then the player receives the damage to its body and "resistance" reduces the "protected damage".

//------------------------------------
// Constants that affect the formulas
//------------------------------------

[Armor Class]

// These are not so different due to the subclasses being more differentiated spell-wise than equipment-wise. But this exception will come to an end, so Armor Class (AC) will be officialised in the game and taken into account for balance.

Warrior: 1.40
Archer: 1.30
Mage: 1.20

Barbarian: 1.40
Knight: 1.40
Hunter: 1.30
Marksman: 1.35
Conjurer: 1.20
Warlock: 1.20

Default: 1.30
Monsters: 0.26

[Item Distribution]

// Each part contributes a different percentage of the Armor Base Points (ABP) to the Armor Points (AP).

Torso: 28%
Head: 24%
Legs: 20%
Arms: 16%
Gauntlets: 12%
Shield: 25%
Right hand: 20%

Breastplate: Torso
Tunic: Torso, Arms, Legs
Helmet/Hat: Head
Leggings: Legs
Pauldrons: Arms
Gauntlets: Gauntlets
Shield: Shield
Bracelet: Right hand

[Protection Quality Factors]

Very Bad: 0.2
Bad: 0.35
Normal: 0.5
Good: 0.65
Very Good: 0.8

//---------------------------
// STEP 1. Obtain Protection
//---------------------------

// a. Protection per damage type (type). Calculated from the ABP ("Armor: X", as shown in the tooltip) fractioned by the percentage that armor part contributes to the armor (Item Distribution) and affected by the Protection Factor (PF) (Very Bad, Bad, Normal, Good, Very Good).
protection[type] = ceil(armor_base_points * (item_distribution / 100) * protection_factor)

// b. Add the Quality-Material-Kind Bonus (QMKB) to all the damage types. This value is the one found after the ABP shown as "(+X)"
protection[type] += QMKB

// c. Add the percentual bonus that is specific to the type. This is rare or not used currently as a modifier.
protection[type] += protection[type] * {Protection Type Armor Bonus %} / 100

// d. Add the percentual bonus that is related to all damages. This is the modifier you see as "Protection: X%" in the tooltip.
protection[type] += protection[type] * {Armor Bonus %} / 100

// e. Multiply by the AC
protection[type] *= armor_class

//--------------------------------------
// STEP 2. Obtain Resistances to Damage
//--------------------------------------

// a. Resistance to Damage per general type. These ones are always percentual and the types can be Magical and Physical.
general_resistance[general_type] = {Resistance to Physical/Magical Damage %}

// b. Resistance to Damage per type. These are the individual damage types.
resistance[type] = {Resistance to Damage Type %}

//--------------------------
// STEP 3. Damage Reduction
//--------------------------

// a. In case of multiple damages, calculate the influence of each in the total damage to reduce the correct amount. Also, get the minimum damage, which ranges between 4% and 8%. This applies to every individual damage.
protection_influence[type] = (100 / total_damage) * damage[type]
minimum_damage_percent = 4 + random(0,4)
minimum_damage[type] = damage[type] / 100 * minimum_damage_percent

// b. Reduce the damage by protection.
damage[type] -= protection[type] * (protection_influence / 100)

// c. Reduce the damage by general type of resistance percentage.
damage[type] -= damage[type] * general_resistance[general_type] / 100

// d. Reduce the damage by individual type of resistance percentage.
damage[type] -= damage[type] * resistance[type] / 100

// e. Make sure that at this step the damage per type is not lower than the minimum damage.
if damage[type] < minimum_damage[type] then damage[type] = minimum_damage[type]

// f. Reduce the special damage that comes from the "[Type] Damage Bonus +X" usually found in gems. This damage is only reduced by the armor depending on the Protection Factor and then added to the normal damage.
special_damage[type] = ceil(special_damage[type] - (special_damage[type] * PF[type]))

// g. Obtain the total damage summing all the types of damage and then add the special damage as well.
total_damage = sum(damage[type]) + sum(special_damage[type])

// h. Reduce damage by barrier points. Usually, magical barriers are for all damages. Also, reduce the total that we obtained in the previous step.
damage[type] -= barrier_points[type]
total_barrier_points = sum(barrier_points[type])
total_damage -= total_barrier_points

// i. Apply the reduction by "Ranged Received Damage %" o "Melee Received Damage %", if they are present. (Ranged is determined from 3 meters or more).
reduced_damage = total_damage - (total_damage * (ranged_damage || melee_damage) / 100))

// j. Round up the total reduced damage.
reduced_damage = ceil(reduced_damage)

//-------------------------------------
// Protection, Resistance: Case of Use
//-------------------------------------

Warmaster Barbarian Armor of Alloy Steel (Artisan) - Kind: Common - Receiving Damage: 410 Piercing and 15 Fire Damage Bonus from a gem in the weapon.

ABP: 235
PF[slashing]: Good
PF[fire]: Very Bad
QMKB: 11

1.a,b,c,d,e)
Helmet: (ceil(235 * (0.24) * 0.65) + 11) * 1.4 = 67.2
Torso: (ceil(235 * (0.28) * 0.65) + 11) * 1.4 = 75.6
Pauldron: (ceil(235 * (0.16) * 0.65) + 11) * 1.4 = 50.4
Gauntlets: (ceil(235 * (0.12) * 0.65) + 11) * 1.4 = 42
Leggings: (ceil(235 * (0.20) * 0.65) + 11) * 1.4 = 58.8

protection[piercing] = 294

2.a,b)
general_resistance[general_type] = 0

Add Passive Steel Temper 10% Resistance to Piercing Damage
resistance[piercing] = 10

3.a)
protection_influence[piercing] = 100 / 410 * 410 = 1
minimum_damage_percent = 4 + 0
minimum_damage[punzante] = 410 / 100 * 4 = 16.4

3.b)
damage[piercing] = 410
damage[piercing] -= 294 * (100/100) = 116

3.c)
damage[piercing] -= 116 * 0 / 100 = 116

3.d)
damage[piercing] -= 116 * 10 / 100 = 104.4

3.e)
116.4 > 16.4

3.f)
special_damage[fire] = special_damage[fire] - (special_damage[fire] * PF[fire]) = 15 - (15 * 0.2) = 12
damage[fire] = 12

3.g)
total_damage = 104.4 + 12 = 116.4

3.h)
damage[type] -= 0
total_barrier_points = 0
total_damage -= 0

3.i)
reduced_damage = 116.4 - (116.4 * 0 / 100) = 116.4

3.j)
reduced_damage = ceil(116.4) = 117


Rating Elo - Battlezones

The Elo rating system was originally created for chess to rank players in a simple and effective way. Since it was designed for one-on-one games, we have adapted it for Regnum and its Battlezones.

This score is a number obtained by taking into account all the Battlezones games won or lost by a player. Each player's initial score is 1000, i.e. the value they start with when they have not yet played any games.

As the player plays games, this initial value of 1000 points increases or decreases. Since Battlezones are not a confrontation between one player and another, but rather between three teams of four players, the following logic is used:

- Each team has an Elo rating, which consists of the average Elo ratings of each player on the team. In addition, each player has played a number of games, which are also averaged. We will use an example team that we will call Team A.
	(Team A is composed of: Player 1 has 1040.30 and played 14 games, Player 2 has 1150.23 and played 20 games, Player 3 has 1300.11 and played 9 games, Player 4 has 1442.67 and played 22 games. On average, Team A has an Elo rating of 1233.33 and has played 16 games).

- As there are three teams in total in a Battlezone, one team will be competing against two teams at the same time, so after the game is over, its score will be affected twice. These other two teams will be Team B and Team C.
	(Team B has an Elo rating of 1145.32 and has played 30 games, and Team C has an Elo rating of 1003.56 and has played 10 games).

- At the end of the match, the results are processed.

- To obtain the result that modifies the Elo rating of each player on Team A, Team A vs Team B and Team A vs Team C must be calculated, and so on for each team.

- That result will be added to the current Elo rating of each player on the team.

The steps and formulas to determine the result are as follows:

- First, the probability of each team winning is obtained. If you want to know the probability of Team A winning against Team B, it is calculated using the following formula:
	PWA = 1.0 / (1 + math.pow(10, (ELO_B - ELO_A) / 400.0))
	PWA = 1.0 / (1 + math.pow(10, (1145.32 - 1233.33) / 400.0))
	PWA = 1.0 / (1 + math.pow(10, -88.01 / 400.0))
	PWA = 1.0 / (1 + math.pow(10, -0.220025))
	PWA = 1.0 / 1.6025249009547
	PWA = 0.6240152645392

- Next, the K-factor is used, which is a number that helps establish how significant the change to Elo will be. For newer players, it is higher in order to reach an Elo that represents them more quickly, and for more established players, it will be lower to avoid fluctuations that may not represent them correctly.
	
	For players who have played fewer than 20 games, the K-factor is 40
	
	For players who have played at least 20 games and have an Elo rating below 1100, the K-factor will be 20
	
	For players who have played at least 20 games and have an Elo rating equal to or greater than 1100, the K-factor will be 10.

- As we do not calculate for individual players but for teams, it will be the same as if they were individual players but using the average values for each team mentioned above.

- Now we calculate according to the result of the game. In the current example, Team A has won the game. Team C has come in second place and Team B in third place. If we want to calculate how the Elo of each player on Team A will be affected, we will proceed to calculate twice, once with each opposing team:
	
	The result is represented by 1 if the game was won and 0 if it was lost. In this case, we use 1 because the game was won.
	
	Since Team A has an Elo rating of 1233.33 and played an average of 16 games, the K-factor is 40.
	
	The formula for the Elo change will be:
		changeA = factorkA * (1 - PWA)
		changeA = 40 * (1 - 0.6240152645392)
		changeA = 15.04
	
	Then, each player on Team A will increase their Elo by 15.04. But they also beat Team C, so we have to do the same with Team C, which would give a result of 8.42.
	
	In total, each player will increase their Elo by 23.46. So, for example, player 1 will go from 1040.00 to 1063.76.

These formulas ensure that when playing against a lower Elo team, winning provides fewer points, as it represents less difficulty given the probability.

And what will happen to Team C, which lost to both teams? Against Team A, the change is -8.42, and against Team B, it is -12.26. Losing a total of 20.68.

So, when you lose to a team that has a much higher Elo rating than you, you also lose fewer points because there is greater difficulty and a lower probability of winning.
Nimm Kontakt auf | Privacy Policy | Verhaltensregeln | Copyright © 2002-2026 Nimble Giant Entertainment (NGD Studios AB). All rights reserved.