Symphony of War: The Nephilim Saga

Symphony of War: The Nephilim Saga

Not enough ratings
Damage Formula and Mechanic Guide
By Blastom
Explains how the accurate damage formula in game is. Provide informations about features that affecting the damage done. Provide informations on some hidden mechanics.
   
Award
Favorite
Favorited
Unfavorite
Disclaimer
This guide was made with information from mainly data mining, play testing and some personal experiences. There could be mistakes as I'm not familiar with RPG maker or Ruby codes.
This guide was all based on Version 1.10.23 LEGENDS, so changes from further updates may not included.
For information not well verified or from personal options, I used italics for clarification.
The formula and logic process introduced in the guide is not exactly matching the codes, as it could be long and hard to understand by explaining purely in programming logic.
Some of the game logic may not work as intended in current version. For those part, I would mention them for clarification, but in general guide I would use the intended behaviors as I thought those're highly possible to be fixed in future versions.

II made this guide, mainly because I've been tempered when I tried to figure out the damage formula. In most of the times, the damage of the units were really off. As non of the information I've found could accurately match the results in my experience, I decided to look into the logic by myself.
Damage Formula
Stats Scaling
I could only be sure that stats scaling is in ludicrous difficulty and new game+ of warlord. As testing this on first playthrough of other difficulty could be time costing. So first playthrough of other difficulties may not have this mechanic.
If Weapon, Armor, Str or Mag is above their SoftCap, they will be scaled by a diminishing returns formula before used in damage calculation. The formula is like below:
ScaledValue = SoftCap + ((SourceValue - SoftCap) * ScaleRate) ^ ScaleExponent
The SoftCap, ScaleRate and ScaleExponent of each is like below. Well, the SourceValue is just the value shown in unit's stats panel for sure. Again, the formula works only when the SourceValue is above the SoftCap, otherwise the SourceValue is directly used.


For quick reference, the SourceValue to ScaledValue would be like:





Basic Formula
Damage = (Attack - Defense) x DamageScale x OtherModifiers.
Attack = BaseAttack x AttackScaler x AttackMod + AttackPlus
Defense = (BaseDefense * DefenseScaler + DefensePlus) x DefenseMod
The formula for attack and defense is different on how the "scaler" is used. For attack the scaler don't affect the plus, while for defense it does.
Most of the time, the scaler and mod should be 1, and the plus should be 0. So only the BaseAttack and BaseDefense matters.
Basic Attack
BaseAttack = AttackCv + AttackStats + Other Bonus
AttackCv
The AttackCv is based on the weapon used by the attacker.
All melee: 25
Bow: 15
Crossbow / Gun / Cannon / Dragon: 10
Crossbow (Ranger): 30
Spell: 50
Heal / Shield: 0
AttackStats
The attack stats generally is Weapon + Str/Mag x 2, with some exceptions.
All melee and bow: Weapon + Str x 2
Crossbow and Gun: Weapon
Crossbow (Ranger): Weapon x 1.5
Cannon: Weapon x 2
Spell: Weapon + Mag x 2 + Level x 2
Dragon: Weapon + Str x 2 + Mag x 2 + CurrentHealth x 0.025
Heal / Shield: Weapon + Mag

Note: Crossbow, gun and cannon uses only Weapon; Spell uses Level x 2 as extra; Dragon use Weapon, both Str and Mag and CurrentHealth; Heal / Shield uses Mag x 1 instead of Mag x 2.
Basic Defense
BaseDefense = DefenseCv + DefenseStats + Other Bonus
DefenseCv
DefenseCv is determined by the attacker's weapon, not by defender's.
For all the attacking weapons, it's 10.
Only Heal/Shield use 0.
DefenseStats
DefenseStats is determined by the defender's stats, but the formula is chosen by the attacker's weapon.
All melee: Armor + Str x 0.5
Bow: Armor x 1.25 + Str x 0.25
Crossbow and Crossbow (Ranger): Armor x 0.75 + Str x 0.19
Gun: Armor x 0.25 + Str x 0.06
Cannon: Armor + Str x 0.25
Spell: Mag x 3.5
Dragon: Armor + Str + Mag
Heal: Mag x -0.5
Shield: MaxHeath x -0.1

Note: Bow suffers more from Armor, but less from Str, so it's generally weaker than melee and more inefficient against heavy units; Spell ignores Armor, but Spell suffers 3.5x from target's Mag.
Heal has negative (-0.5) defense modifier from target's Mag, this means it takes 50% of target's Mag as bonus.
Shield has negative (-0.1) defense modifier from target's MaxHealth, this means 10% of target's MaxHealth as bonus.

Mag provides 3.5x on BaseDefense, while Str only 0.5x or less. So raising on physical damage dealer could improve their magic resist. While raising on magical damage dealer doesn't help much.
DamageScale
Damage scale is based on the attacker's weapon. For most of the units, it's 1.
Some special attack methods has different scale, like the double strikes of Champion or Blademaster is 80%, the lightning bolt of lightning mage is 71%. This is vast from different units, so it will be in a separated section.
OtherModifiers
Most direct one was the hit type - if the hit is a glancing, only 40% damage is done; if the hit is a strong hit, 110% damage is done.
There're many other modifiers outside the basic formula as well, like: terrain defense bonus, artifacts, traits, etc.
Block and Targeting
Block System
The block system mainly affects the targeting system. It generally manipulates how a unit would pick its target in action.
Fully Blocked
One obvious fact about block: if a unit has some allies in front at the same column or no more than 1 column away, the unit is considered fully blocked.
Enemy melee units or other unit without block bypass capability cannot target a fully blocked unit.
For example, in both images below, the Priestess is fully blocked by the Acolyte.


Partially Blocked
This is not so obvious. When an ally in front just one tile away from fully block a unit, the unit would be considered as partially blocked.
When a unit is partially blocked, its targeting value would be halved, which means it's less likely to be targeted by non-block-bypass attacks.
For example, in the image below, the Priestess is partially blocked by the Acolyte.


Generally, only Melee attacks and Gun attacks would be affected by block system.
Wide Guard trait would increase the column range of both fully block and partially block by 1.

Targeting System
The target system in Symphony of War is amazing and worked well in my experience.
But it's very complicated with manipulations on targeting value here and there and the targeting value is not directly used as weight of picking. It could take a lot of time to fully understand the reasons behind the logic and values.
So I wouldn't go too deep in this. I only provide some information about how the targeting value being manipulated.
As said in the Block System, partially blocked unit would have their targeting value halved.
Imposing trait increases the targeting value by 33%.
Unassuming trait decreases the targeting value by 34%.
Heavy Infantry, Heavy Cavalry and Dragons would have their targeting value doubled.
Diana would have her targeting value tripled. With Imposing trait, her targeting value is 4x, which is 2x of other Heavy Infantry. This is makes her very likely to be targeted.
Units would more likely target the enemy at front row and similar column position.
Target Leader Tactics adds a extremely high targeting value (100) on the leader. So the leader will be targeted in most of the time if not blocked or overkilled.
Cover
Row Mod
Hidden system in the game.
When there's any ally in the row in front of a unit, the unit would receive only 80% damage (20% damage reduction).
This could be stacked twice by putting the unit at row 3, one ally at row 2 and another at row 1, in which case, the unit receive 80% x 80% = 64% damage (36% damage reduction).
This system only works against melee attacks. Even guns don't suffer from this, though they could be blocked.

I've used the Reversed T formation like the image below for a while to exploit the 36% damage reduction from row mod. But I just found the unit at front center getting attacked a lot and very likely to be knocked out. The reason was in Block System the two Sentinels at back were partially blocked, so they're less likely to be targeted. So this formation is not recommended!


Cover System
There're 2 types of cover systems in the game:
One works only against straight shots - Archery unit attack in range 1.
The other one works against basically everything else, including Archery units' ranged attacks (2-3 range), Cannon attacks and Dragon attacks.
The only exception was Mage attacks. They just don't suffer from any cover.
Unit with Guile trait would bypass cover, so it wouldn't backfire.

Straight Shots
This one works like in the game codex.
Heavy Infantry, Heavy Cavalry and Dragon would provide Heavy Cover to the allies that blocked by them.
Light Infantry, Light Cavalry, Archery Units and Firearms Units would provide Light Cover to the allies that blocked by them.
Mages and Supports don't provide cover.
The baseline damage modification of Heavy Cover is 65% (35% reduction) and Light Cover is 75% (25% reduction).
If the covered unit is fully blocked, the effect is doubled. 65% from Heavy Cover becomes 65% x 65% = 42.25%, 75% becomes 75% x 75% = 56,25%.
If the covered unit is not in the nearby column, the effect is halved by taking the square root. So 65% becomes sqrt(65%) = 80.62%, 75% becomes sqrt(75%) = 86.60%.
Obviously, if a unit is covered but he covering unit is not on the near row, the value is halved by sqrt, eg. 65% = 65% ^ 0.5 = 80.6%, (65% x 65%) ^ 2 = 65%.
A unit could be covered by multiple allies, in which case the effects multiplied together.
Wide Guard trait will increase the column range of block, so the column range of cover as well.
So multiple heavy units with Wide Guard trait in front of fragile units could provide very good protection against straight shots.
Also, this means empty center formation like below may not be a good idea against enemy archers, as it reduce the protection of backlines against their retaliation. Though it's a good formation against enemies with Area of Effect attacks.


Ranger's crossbow has "Snipe" feature, which makes it taking only halved cover effect (by sqrt). This will be explained in the unit section as long as other features it has.

Other Attacks
In current version, this part is not working as intended. All the attacks other than Mage attacks suffer from 80% damage modification (20% reduction).
From the code, this was caused by the check result of whether a unit covered or not is not used. So every unit was considered as covered.
Guile trait would increase a generic unit's damage output by 25% as it bypass cover.
Archery Units do better damage on frontline enemies than melee units with the same stats and AttackScale in melee range, as they use the straight shot cover rule and don't suffer from the -20%. But when they tried to attack someone behind, the damage drops sharply.

From the source code, the intended behavior should be like below:
Heavy Infantry, Heavy Cavalry and Dragon would provide cover to units fully blocked or partially blocked by them.
Light Infantry, Light Cavalry, Archery Units and Firearms Units would provide cover to units they fully blocked.
If a unit is covered, it receives only 80% damage from attacks affected. This effect is not stackable.
Wide Guard trait would increase the column range of cover by 1 as it increases the range of block.
The Battle Grid
Row and Column
A squad is formed in a grid displayed as 3x3 like below:

Each of the 3 tiles that forming a vertical line is a row.
Each of the 3 tiles horizontally and the 2 horizontal lines between the tiles is a column. So there're 5 columns in the grid in the game logic.
You can see the image below. Each of the units is in a different column.
To describle the formation like above, the following image will be used by marking the tile the units on in green.

Note: the coordinate of the grid for the enemy is mirrored.

Area of Effect Pattern
As said, the area of effect will be displayed with 3 row x 5 column just as how the game logic working. The tile with red text is the position of targeting, which is usually the center of the aoe attack.
Note: Currently the AoE splash may not work as intended. The 3 x 5 grid logic should be perfect already, with properly set aoe patterns.
But as the game did some extra works like below:
  • A unit is considered as 2-columns wide, so both the tile it on and the tile one column above are used to check if a unit is in the area or not.
  • The targeting system could target an empty tile for area of effect attacks.
  • The aoe patterns (the area an attack covers) are trying to cover the tile one column below to fix some edging scenarios.
As those behaviors combined together, in many scenarios, the result becomes asymmetrical.
Example of Asymmetrical Pattern #1
The aoe of a knight is like below.

When he hits the center unit in the archer formation, the archer at right top is affected, while the one at right bottom is not.

This is because the knight is targeting Row 0, Column 1, so the aoe is like in the image below, with different color marking the checked tiles for different units, the red cross marked the targeted tile and the red line around the aoe area. The left column in the image is out of grid, I kept this to show the full area of effect.

Example of Asymmetrical Pattern #2
The aoe of a Lightning Mage is like below and he could only target a tile at Row 0.

Sometimes, he will hit the enemies like this:
You could see that, the Knight on Row 0 is unaffected. On Row 1, two Knights are hit, but one takes double DamageScale from the other (They have different Defense, so not extraly double damage). The Hussar at the bottom of Row 3 takes damage, even he's on the same column as the Knight on Row 0.
In this scenario the aoe pattern is like the image below. I'll use red line to mark the 71% area, orange line to mark the 50% area and green line the 25% area.
DamageScale and AoE List
Explaination
For most of the units, the DamageScale is 100%, only a few of units has special DamageScale value. Also as the Area of Effect damage in the game is scaled with a similiar scaler like DamageScale, I made both of them in the same section and skip all the units with 100% DamageScale and no aoe.
DamageScale and AoE Details
Archery Unit Ranged
When attacking from 2 or more tiles aways, they will use arrow hails instead of straight shots.
It fires 3 arrows (+1 from Advanced Archery Technique tech).Each arrow deals 33% damage.
Arbalest
Straight shot (attacking with 1 tile) has 40% DamageScale and fires 3 arrows (+1 from Advanced Archery Technique tech). So on maximum, he deals 40% x (3 + 1) = 160% total damage of a crossbowman at the same level.
Their bolt hail (2 or more tiles away) fires 9 arrows (+3 from Advanced Archery Technique tech). Each of bolts deals 40% x 33% = 13.2% damage.
ZwaiHandler and Warcat
Attacks all enemies in a row and deals 100% damage to the target and 50% to the others.
Note: the others in the same row of the target doesn't need to be adjacent to the target. You can see how a Behemoth damaged the enemy at bottom (Row 0, Column 4) by targeting the one at top (Row 0, Column 0).

Behemoth
Similar to ZwaiHandler and Warcat, but does 75% to the others in the same row.
Champion and Swordmaster
Attack twice. Each of the attack has a DamageScale of 80%.
Centurion
100% damage to the target and hits the units behind the target by the patten below.

So if a enemy is behind the target and at the same column, 70% damage is dealt. If the enemy is one column away, 50% is dealt.
Knight
Deals 25% damage to the enemies adjacent to the target.

Rogue and Assassin have 150% DamageScale on backstabbing.Their normal attack still uses 100% DamageScale.
Siren
85% AttackScale on single target.
Unlike some other sources stated, she doesn't do aoe damage.
Sorceress
37% AttackScale large cross aoe.

So Sorceress trades damage on single target for much larger aoe. Mostly built for debuffing the enemies.
Apprentice
120% AttackScale on single target.
Fire Mage
60% AttackScale on a full row.
Ice Mage
67% AttackScale small cross aoe.

Lightning Mage
71% AttackScale on row 0 and then pass through the column with 50% for full hit and 25% for partially hit.

Dark Mage
Melee attack is using 35% AttackScale large cross aoe.

Ranged attack is using 10% AttackScale large cross aoe. So it's the same pattern as melee attack, but with only 10% / 35% = 29% the damage of melee one.
All Dragons
75% AttackScale with half damage on nearby enemies.

All Cannon
Cannon does 40% AttackScale full battlefield blast. The images below show how the worst scenario (hiting the corner of the grid) could look like, as it would cover all the scale of tiles.
Before Grapeshot tech unlocked.

After Grapeshot tech unlocked.

So generally the cannon damage is damping from 100% to 0% without Grapeshot tech and to 50% with it.
Element Rates
Element rate works as DamageModifier when the unit receives damage. It's an attribute on unit class. Here's a list of units with special element rate (not 100%).

Cavalier and Knight
They has 75% arrow element rate.So them receives only 75% damage from Archery Unit attacks (25% damage reduction).
Valkyrie doesn't have this.
This is confirmed by play test. As infantry has Guardian trait, the Acolyte received 25% less damge during enemy turn. So receives similar damage from arrows means the has the same 25% damage reduction.



Non Tier 4 Mages and Support
All the them has 75% element rate against Fire, Water, Lightning and Dark. So they take 25% less damage from all magic attacks.
Dark Mage and Necromancer don't have them, even against Dark element.

Dragons
All dragon has element rate against dragon at 200%, so they take 200% damage from dragon attacks. But dragon element is not used by common dragons. The Drakeling, Dragon, Red Dragon, Red Dragon Rider and The Queen of Dragons do Fire damage; Silver Dragon and Silver Dragon Rider do Water damage; Blue Dragon and Blue Dragon Rider do Lightning damage.
The only dragon does dragon-element damage was an unique one. The Hand of Zanatus in dragon form is using dragon-element attack. But he's not meant to fight against. In missions with him under control, the enemies just don't have any dragon. So this is generally inrelavent.
Other than that, Red Dragon and Red Dragon Rider have 75% element rate against Fire.
Blue Dragon and Blue Dragon Rider has 75% element rate gainst Lightning.
Silver Dragon and Silver Dragon Rider has 75% element rate against Water.

Risen
All risen units has 50% element rate against arrows and firmarms; 25% against Dark; 150% against Light, which is only the magic attack of the main character.

Sentinel
Has 50% element rate against firearms.

Paladin
Has 75% element rate against Dark. Valkyrie and Acolyte don't has this.
Hit Chance, Hit Type and Critical Hit
Hit Chance
The generic hit formula was like: HitThreshold = attacker's HitChance - target's Evasion + (attacker's Skl - target's Skl) x 0.5.
If the HitThreshold is less than 2, it is fixed to 2.
Then the game will do 3 dice rolls, the first is from 0 to 100; the second is from 0 to 115; the third is from 0 to 130.
If a dice roll result is less than HitThreshold, the roll is marked as success.
If the 3 rolls are all marked as success, the attack will be a Strong Hit.
If the 2 rolls are marked as success, the attack will be a Normal Hit.
If the 1 rolls are marked as success, the attack will be a Glancing.
If none of the rolls marked as success, the attack will be a Miss.

For HitChance, most of the units are at 100%. Only the Mages are at 95%.
For Evasion, Heavy Infantry and Heavy Cavalry are at -25%; Light Infantry and Light Cavalry are at 5%.
Samurai is at 0%, though being a Heavy Infantry.
Swordfighter is at 15%.
Swordmaster is at 10%. Might not be intended as she has a lower Evasion than Swordfighter.
The others are at 0%.
The heavy units will almost only receive strong hits, as when -25% evasion against an attacker with equal Skl, the HitThreshold would be 125%. This directly makes 2 of 3 dice auto success, and the 3rd one has like 96%+ chance to success.
When the target is a Artillery Unit, the roll result is fixed to 2, so they only receive Normal Hits.
Hit Types
A Normal Hit does normal damage.
A Strong Hit does 110% of normal damage.
A Glancing does 40% of normal damage and cannot do Critical Attack.
A Miss does nothing.
For bows, crossbows and guns, a Glancing will further reduce their Attack by 20% to make their Glancing does even less damage.
Artillery Unit cannot Miss, if a Miss is rolled, the hit automatically becomes Glancing.
Dodge
Dodge (mainly from artifacts) is different from Evasion. Dodge is used in a separated check, if the check is passed, the roll success count is reduced by 2, thus a Strong Hit would become a Glancing and otherwise would become a Miss.
Critical Attack
Most of the units have a baseline 5% chance to deal Critical Attack.
If the attack's Skl is larger than the target's Skl , each point of Skl above provides 0.1% chance to deal critical attack.
If the target's Skl is larger, each point of Skl above reduces the chance by 0.2%.
When dealing Critical Attack, the Attack is increased by 50% by adding a AttackMod, which makes the Attack x 150%.
With Assassin's Heart trait, this bonus increased further by 50%, thus Attack x 200%.
Percision trait set target's Defense to 0 on critical attack.
With Lithe Assault trait, 15% chance is added, if the hit is a Strong Hit.
As Strong Hit is so common in current version, this trait could be considered as a flat +15% critical attack chance, when added on a unit with relatively good Skl.
Cloak of Cunning artifact reduces the chance to receive critical attack by 10%. So only unless the attacker has 51 or more Skl, the defender won't receive Critical Attack.
Generally, Persicion trait is better that Assassin's Heart trait for common physical damage dealers, as they have a relatively lower Attack and against a higher Defense; while Assassin's Heart trait is better for Mages and Guns as they have a relatively high Attack or against a lower Defense.
Misc Information
Currently the Iblis Family Signet artifact and the Field Marshal trait don't work as describled. Both of them currently provide 5% Evasion to both side, due to the check is made on the Player side for both side. They could stack to 10% Evasion for both side. They are still useful as Evasion is more valuable for the Player side.
Evasion tank is still a thing, but requires some investments. By getting 100+ Skl advantage, a Light Cavalry with Hit and Run trait could get 90 Evasion when Iblis Family Signet artifact and Field Marshal trait is active. So most of the attack against him would Miss or Glancing.
Traits, Item and Misc
Most of the traits and items affect only the final damage done. So they're using the same logic.
So here, I only lists some special ones that not using the same logic in game.
There could be something missing for sure as the game mechanics were pretty complicated.
Phalanx
I put this somewhat hidden mechanic in a separate section as it affects both attack and defense and it's not currently working as intended.
The mechanic is like: when a unit does a melee attack, it could receive 35% of highest unscaled Weapon from the nearby allies in the same row as bonus BaseAttack.
when a unit receives a melee attack, 25% of the highest unscaled Armor as bonus BaseDefense.
Before Polearm Mastery tech, only unit with Polearm Unit trait could receive it. After the tech unlocked, all types of unit could receive it.

The thing not works as intended was that currently all types of units could provide the bonus, with Polearm Mastery tech or not.
The intended behavior, from the description of Polearm Mastery tech, should be only the unit with Polearm Unit trait providing this bonus.
So currently, this could lead to some weird plots, like in the image below. I used the Dragoon with very high Weapon to buff the Soldier at the bottom back. So he could do more than double damage of a similar Soldier with the same stats.
Traits and Items
Rally adds 10% of the owner's AttackCv + AttackStats on the BaseAttack of all units in the same column. The unit can provide bonus to itself. For 2-column-wide units, only the head provides the bonus, but both the head and tail could receive it. Could stack from multiple providers.
Barricade adds 10% of the owner's DefenseCv + DefenseStats on the BaseDefense of all units in the same column. The unit can provide bonus to itself. For 2-column-wide units, only the head provides the bonus, but both the head and tail could receive it. Could stack from multiple providers.
So Rally is stronger than it looks, as it increase the attack, before the substraction of target's defense.

Precision trait will set target's defense to 0, when the attacker does a critical hit. Not only Armor is affected.
Steelshatter artifact will reduce the defense by 20%, not only Armor.
So both of them works for Mages as well.

Crossbow users has 25% bonus on attack against Heavy Infantry and Heavy Cavalry, this bonus goes to AttackMod. With Advanced Crossbow tech it becomes +50%.

Spirit Piercing tech will reduce the target's defense by 25%, if attacker is a Mage or Dragon. this bonus goes to DefenseMod.

Magic Armor trait will add 0.5 of the unscaled Armor into BaseDefense. This value will be rounded down, so 91 Armor provides only 45 instead of 45.5. With Sisterhood of Justice tech, another 0.25 will be added and rounded down separately. This means it could be less than 0.75, like: for 91 Armor, it is 45 + 22 = 67, instead of 68.
Damage Modifications
Most of the +x% damage and -x% damage received from traits and items use the same logic.
The +x% will add together first and then be multiplied with other types.
The -x% will be directly multiplied with others.
Note: Bonus from Tactics is directly multiplied on damage. They're not trait or item anyway.
For example, if a unit with Concentration trait, Pacifism trait and attacks a Dragon (with Guardian), the total damage mod is (100% (Base) + 15% + 50% ) x (1 - 25% ) x (1 - 25% ) = 92.8125%.
Hidden Traits and Features
Paladin
Paladin has hidden Smite trait, so she does +50% damage against Mages, Rogue, Assassin and Risens.
Valkyrie and Acolyte don't have this.
Acolyte and Paladin don't have bonus against Heavy Units. Though both in database and hardcode indicates they have 35% attack bonus, they don't do bonus damage in my playtest.

Warcat and Behemoth
Both of them has hidden stalk trait, which provides +15% critical attack chance in night.
Behemoth only
Behemoth has hidden antigun trait, which provides +35% damage against Firearm Units.
When it has high advantage, its attack could bypass wall and has similar effect as Guile trait.
Warcat doesn't have either of them.

Skirmisher and Ranger
Both of them have hidden antigun trait, which provides +35% damage against Firearm Units.
Ranger's Crossbow
Ranger's crossbow has the snipe feature. This makes his crossbow considers less against blocking and targeting value, thus more likely to focus fire fragile units. Also it suffers only halved cover modification (by sqrt). So it's much more likely to strike down a fragile enemy on backline than common crossbow.
Time, Weather and Affinities
Affinity Effect
Based on the current time and weather, Units with different Affinities could receive some AttackMod. Multiple bonus and malus would be added together and then the result is used as a AttackMod.
Earth:
+5% in Dawn or Dusk time;
+5% in Cloudy or Overcast weather.

Water:
+5% in Rain, Snow or Storm weather.
+10% in Blizzard weather.

Lightning:
+5% in Rain weather.
+15% in Storm weather.
-5% in Overcast weather.

Fire:
+5% in FullDay time, while Clear weather.
+10% in Heatwave weather.
-5% in Snow or Blizzard weather.

Light:
+5% in FullDay time.
-5% in FullNight time.

Dark:
+10% in FullNight time.
-5% in FullDay time.
Other Weather Effects
Tundra Warrior trait on leader provides 25% Evasion during Blizzard weather or on snow tile. Not stackable if both conditions met.
Firearm do only 50% in Rainy weather, if Breech Loading Gun tech is not unlocked.
Terrain
High Ground: When the attacker is on high ground and the defender is not, the attack has high ground advantage and vice verse. For ranged attack (2-3 range attack only), if the attacker has the advantage, +10% Attack; if the defenser has, -10% Attack. For Archery units, if the target has the advantage, the target gains 25% Evasion.

Forest: Provide 5% Damage reduction. Provide 35% Evasion if the attacker is an Archery Unit, attacking from 2 tile or more away and doesn't have Bowmanship trait.

Fort: Provide 10% Damage reduction. Also fort is considered as High Ground.
Base/Castle: Provide 10% Damage reduction and extra 40% Damage reduction against attacks from 2 or more tiles away. Bowmanship trait won't bypass this. Also castle is considered as High Ground.

Wall: Provide 25% Damage reduction and 35% Evasion bonus, if the attacker's not on the wall and doesn't has Kesh's Toolkit artifact. Archery unit with Bowmanship trait could bypass this. Also wall is considered as High Ground.

Swamp: Reduce 25% Evasion.

The bonus from terrain is multipled together. For example, the wall is also high ground, so a unit on wall with high ground advantage receives only (1 - 10%) x (1 - 25%) = 67.5% (32.5% reduction) from ranged attack.
Trait Interaction
Guerilla trait provides 25% Hit Chance and Evasion when the unit is on rough terrain.
Hit and Run trait provides 30% Evasion when the unit is on open terrain or performing an attack.
Garrison trait makes the damage reduce part of terrain effect applies twice. So 10% reduction from being in a fort becomes 100% - (100% - 10%) ^ 2 = 19%.
It's currently not a effiective trait as damage reduce from terrain is low other than against Archery ranged attacks.
Morale
Morale Basic
Morale is ranged from -20 to 120, with 50 as the basic value.
In the game, the accurate value is hidden (saving for the morale bar in battle) and only 7 states are displayed.
Fearless: 80 or more.
Excellent: 65 to 79.
Good: 44 to 64.
Fair: 26 to 43.
Fearful: 15 to 25.
Shaken: 6 to 14.
Shattered: 5 or less.
Morale Effect
When the morale is below 50, the damage of squad is reduced. This damage modification is applied on the final damage.
For each point below 50, the squad does 0.8% less damage. So for minimum morale -20, its 0.8% x 70 = 56% less damage.

When the morale is above 50, there's no damage change, but each of units in the squad gain some chance to perform extra action.
For each point above 50, each unit has 1% chance to do extra action. So at maximum, each unit will have 70% chance to do extra action.
Note: extra action chance from different sources is checked separately, so a unit with Desperation trait and Executioner trait could do 3 extra actions in a battle (2 from both traits and 1 from morale).

Skull of Rowdain artifact locks the morale of equipped squad at 25, so 20% damage reduction from Morale.
Haughty trait locks the morale of the squad to 40. This means Beatrix's squad will always has 8% damage reduction from Morale.
Surrender
When the enemy squad's morale is below MoraleThreshold , it is possible to surrender the units in the squad with the Force Surrender tactics.
The MoraleThreshold is 26 by default. If the leader of attacking squad has the Silver Tongued trait, MoraleThreshold increases to 36.
The BaseChance to surrender is (MoraleThreshold - morale) / 100.0. Which is pretty low.
The final chance is multiplied by the PowerMod, which is determined by the difference of threat between the two squads and the faction rank.
PowerMod = (attacker's threat / defender's threat) ^ (faction rank / 8 + 1), capped at 6.
Final surrender chance = PowerMod x BaseChance.
Examples on Damage Formula

Example #1
This is some simple scenario.
Peter the Knight has 22 Weapon and 29 Str. His target Uriel has 15 Armor and 35 Str. As Uriel is a Hussar, he has the Polearm Warrior trait (Phalanx), so he could gain 25% Armor from his mate Milad, who has 6 Armor.



So the BaseAttack is 22 + 29 x 2 + 25 (AttackCv) = 105, as both of his Weapon and Str are under the SoftCap.
Uriel's 35 Str is above the SoftCap, so it's scaled to 30 + ((35 - 30) x 0.8) ^ 0.9 = 33.48.
The DefenseStats is 15 + 33.48 x 0.5 = 31.74.
From Phalanx, he gets 6 x 0.25 = 1.5 as BaseDefense from Milad.
The final BaseDefense is 31.74 + 1.5 + 10 (DefenseCv) = 43.24.
With Target Leader tactics, Peter has a high hit chance and does a strong hit on Uriel, so the result would be modified by 110%.
As mentioned before, the cover system is not working as intended, this attack is covered. So 80% modification from cover is applied.
The final damage is (105 - 43.24) x 1.1 x 0.8 = 54.35.


Example #2
A bit complicated one - a Dark Mage with extremely high Mag attacks a Valkyrie. I show only how the damage on the center target calculated in this case.
Caroline the Dark Mage has 85 Weapon and 156 + 23 = 179 Mag. With Skull of Rowdain artifact, her morale is locked morale at 25.
Her target Theodora has 89 Armor and 52 Mag. Also she has Magic Armor trait, though not yet got Sisterhood of Justice unlocked.
The attack happens in FullDay time and Caroline's affinity is Dark. So 5% reduction on Attack is there.


For the attack side, 179 is scaled to 30 + ((179 - 30) * 0.75) ^ 0.9 = 99.73 . Yes, that's a whole lot of reduction.
So the BaseAttack is 85 + 99.73 x 2 + 50 (Level) x 2 + 50 (AttackCv) = 434.46. Apply the 5% FullDay malus, the final Attack is 434.46 x 0.95 = 412.74.
For the defend side, 52 is scaled to 30 + ((52 - 30) * 0.75) ^ 0.9 = 42.47 .
The DefenseStats should be 42.47 x 3.5 = 148.65.
For the Magic Armor trait, half (rounddown) of the unscaled will be added on BaseDefense. So extra Rounddown(89 x 0.5) = 44 is there.
The BaseDefense is 148.65 + 44 + 10 (DefenseCv) = 202.65.
As this is in late game and I have already unlocked Spirit Piercing tech, the Defense would be reduced by 25%, so it is 202.65 x 0.75 = 151.99.
The AttackScale of Dark Mage melee attack was 35%. This is a strong hit as well, so 110% modification is there. Her morale is 25, which is 25 lower than 50, so 25 x 0.8% = 20% damage is lost for this.
So the final damage is (412.74 - 151.99) x 0.35 x 1.1 x (1 - 0.2) = 80.31
Thanks for Reading
Thanks for reading this guide and feel free to use anything in this guide.
8 Comments
Blastom  [author] 6 Oct @ 9:18pm 
Er… the dragon damage’s interesting.
Enemies have no dragon in both missions with the black dragon.
purplecharmanderz 5 Oct @ 5:38pm 
And if you want to double check yourself - you want the second dark knight class in the database for the chapter 30 one the player gets. The other one is for his other appearances.
purplecharmanderz 5 Oct @ 5:36pm 
I see you made an edit - but will go back to what i said earlier (and apparently accidentally put under 2 layers of spoiler blocks. Didn't even know that was a thing) there is a single unit that does dragon damage.

As you're also referencing the database: action ID 32 - black dragon. This is used by a single unit in the game - albeit exclusive to chapter 30 if we ignore new game+ memory units.

Its not a case of its unused, but i mentioned it here because the way it was phrased easily could have been interpreted as it checked for if a dragon was the one attacking. Which just wasn't the case.
Blastom  [author] 5 Oct @ 7:59am 
abi attack is using Fire element as well; Azure is using Silver Dragon skill (Water element). So no dragon is used.
Blastom  [author] 5 Oct @ 7:41am 
The cover is confirmed buggy by play test and “dumping” the log. When the guns and melee attacked a frontline target, they still suffered from 0.8 cover_mod. I was wondering why the guns did only 150ish damage, while they have nearly 250 weapon and only suffer from less than 30 defense at that time.
Blastom  [author] 5 Oct @ 7:37am 
Oops, you’re right as the element of an attack could only be one, the dragon cannot have 2 elements (dragon and fire). I think this is not intended as well. I will check this later.
purplecharmanderz 5 Oct @ 6:58am 
Had been trying to work on one like this myself for a while. Life having me in a choke hold definitely made that a struggle - but also have to say this is way more end user friendly than anything i could have come up with.

I'd have a minor nitpick on the elements section primarily - covers the defensive side well enough - may be worth mentioning the attack side to go with it. Given while dragons do have the 2x damage from dragon damage attacks, only 1 dragon actually does dragon damage - can be a bit misleading on their effectiveness despite what's being said being true.

Reds and greens doing fire, blues doing lightning, silvers and Azurous doing water... i don't remember what queen of dragons [/spoilers] does but i know its not the same as zelos - which does dragon.
Iguana-on-a-stick 5 Oct @ 1:18am 
Great guide! Confirms some stuff I knew and some stuff I only suspected, like how Risen are so great at resisting gunfire. (No wonder my Risen squads do so well against dragoons, though cannons still tend to flatten the necromancers in the rear.)

And great to finally know what Morale actually does and how big/small the penalties from stuff like Skull of R are.

Very nicely done!