ESO – Skill Affinity (Damage Type) Hex Values
Affinity values
| Value | Hex byte | Affinity |
|---|---|---|
| 1 | 01 |
Ferus |
| 2 | 02 |
Flora |
| 3 | 03 |
Aquan |
| 4 | 04 |
Pyros |
| 5 | 05 |
Terra |
On the server, a skill's affinity is set by passing one of these numbers to Skill::SetDamagetype(int) in libskill.so.
How it appears in the code
The value sits in the instruction just before the call to Skill::SetDamagetype. Most skills push it directly:
| Bytes | Meaning | Affinity |
|---|---|---|
6A 01 |
push 1 | Ferus |
6A 02 |
push 2 | Flora |
6A 03 |
push 3 | Aquan |
6A 04 |
push 4 | Pyros |
6A 05 |
push 5 | Terra |
Sometimes the value is loaded into a register first and then pushed, for example:
BA 02 00 00 00= set EDX to 2 (Flora)B8 04 00 00 00= set EAX to 4 (Pyros)
In each case, the byte right after the opcode (6A, BA or B8) is the affinity.
Finding a skill's affinity
- Open
libskill.soin a disassembler (IDA, Ghidra or similar). The file keeps its function names, so skills are easy to find by name. - Go to the skill's damage function and find the call to
Skill::SetDamagetype. - Look at the instruction just before that call. The number it pushes or loads is the skill's affinity (see the tables above).
Changing a skill's affinity
- Stop the server.
- Back up
libskill.so. - Open
libskill.soin a hex editor and go to the file offset of that value byte. - Replace the byte with
01–05from the affinity table. - Save, upload the file to the server, and start it.
Change only that single byte, so the instruction keeps its length.
Some skills share their damage code with other skills. Changing the byte in shared code changes the affinity of every skill that uses it. Check that the function belongs to only the skill you want to change.