Hey everyone:bandit:
After spending quite some time investigating Silkroad's damage calculations, I wanted to share my findings and the source code with other developers.
I started with the damage formulas that have been circulating in the community for years. They helped us understand the basics, but several parts were still unclear, especially damage randomization, mastery scaling, level differences, and how Imbue damage is actually added.
Instead of continuing to guess where the missing constants 1.27 1.28 come from
Thanks to @[Only registered and activated users can see links. Click Here To Register...] we went directly into the original ''32-bit SR_GameServer.exe'' and analyzed its assembly code with ghidra.
What we found
I. Damage randomization
The GameServer doesn't use a simple uniform random damage roll. We identified a system involving three random samples, their minimum, and an additional random branch that affects damage distribution.
II. Level damage multiplier
The level difference bonus isn't a universal fixed multiplier like 1.28 or 1.30.
The recovered calculation increases damage by approximately 3% per level difference, capped at 30% for a higher-level attacker.
III. Mastery and damage calculations
We traced how mastery affects attack power and identified the separate physical and magical calculation paths, including balance, defense, absorption, and modifier order.
IV. Skill damage and Imbue
One of the most interesting findings was the secondary damage calculation.
The GameServer stores separate percentages for a skill's main damage and its secondary contribution.
For example, Flame Wave can use 250% for its main magical damage while applying 83% to the secondary Imbue contribution.
This explains why simply adding Physical and Magical damage with the same skill multiplier isn't always correct.
V. Critical damage
Critical hits double the physical damage component, not the magical component.
We also identified where integer truncation and floating-point calculations affect the final result.
In-game validation
I compared our calculations against actual in-game damage using Normal Attacks, Physical Skills, Fire Nukes, Cold Nukes, Lightning Skills, and Imbues.
The results were extremely close, with many comparisons differing by only 1–4 damage points. The secondary Imbue contributions matched within 0–1 damage in our three elemental tests.
Source Code & Technical Documentation
I'm making the research and implementation available so other developers can inspect, reproduce, and improve it.
Recovered Damage Engine (JavaScript):**
[Only registered and activated users can see links. Click Here To Register...]
Original GameServer Analysis (assembly references, offsets, formulas and constants):
[Only registered and activated users can see links. Click Here To Register...]
Hybrid Damage Implementation:
[Only registered and activated users can see links. Click Here To Register...]
Full GitHub Repository:
[Only registered and activated users can see links. Click Here To Register...]
Hopefully, this research will save others some time and help us get closer to a fully understood Silkroad systems to improve.
After spending quite some time investigating Silkroad's damage calculations, I wanted to share my findings and the source code with other developers.
I started with the damage formulas that have been circulating in the community for years. They helped us understand the basics, but several parts were still unclear, especially damage randomization, mastery scaling, level differences, and how Imbue damage is actually added.
Instead of continuing to guess where the missing constants 1.27 1.28 come from
Thanks to @[Only registered and activated users can see links. Click Here To Register...] we went directly into the original ''32-bit SR_GameServer.exe'' and analyzed its assembly code with ghidra.
What we found
I. Damage randomization
The GameServer doesn't use a simple uniform random damage roll. We identified a system involving three random samples, their minimum, and an additional random branch that affects damage distribution.
II. Level damage multiplier
The level difference bonus isn't a universal fixed multiplier like 1.28 or 1.30.
The recovered calculation increases damage by approximately 3% per level difference, capped at 30% for a higher-level attacker.
III. Mastery and damage calculations
We traced how mastery affects attack power and identified the separate physical and magical calculation paths, including balance, defense, absorption, and modifier order.
IV. Skill damage and Imbue
One of the most interesting findings was the secondary damage calculation.
The GameServer stores separate percentages for a skill's main damage and its secondary contribution.
For example, Flame Wave can use 250% for its main magical damage while applying 83% to the secondary Imbue contribution.
This explains why simply adding Physical and Magical damage with the same skill multiplier isn't always correct.
V. Critical damage
Critical hits double the physical damage component, not the magical component.
We also identified where integer truncation and floating-point calculations affect the final result.
In-game validation
I compared our calculations against actual in-game damage using Normal Attacks, Physical Skills, Fire Nukes, Cold Nukes, Lightning Skills, and Imbues.
The results were extremely close, with many comparisons differing by only 1–4 damage points. The secondary Imbue contributions matched within 0–1 damage in our three elemental tests.
Source Code & Technical Documentation
I'm making the research and implementation available so other developers can inspect, reproduce, and improve it.
Recovered Damage Engine (JavaScript):**
[Only registered and activated users can see links. Click Here To Register...]
Original GameServer Analysis (assembly references, offsets, formulas and constants):
[Only registered and activated users can see links. Click Here To Register...]
Hybrid Damage Implementation:
[Only registered and activated users can see links. Click Here To Register...]
Full GitHub Repository:
[Only registered and activated users can see links. Click Here To Register...]
Hopefully, this research will save others some time and help us get closer to a fully understood Silkroad systems to improve.