krisives / d2s-format

Diablo II Save File Format (.d2s format)
121 stars 19 forks source link

XP offset for 1.12 d2s #6

Open sdwvit opened 5 years ago

sdwvit commented 5 years ago

Xp is stored at offset 802 as 4 byte little endian unsigned int multiplied by 2.

Eg, if your in-game xp is 79 689 129, then at offset 802 you'll see: 79 689 129 * 2 = 159 378 258 => hex => 52 EB 7F 09

So if you set xp bytes to zeros 00 00 00 00, you have to update char level (offset:43, 1 byte) with 01 and so on.

Can show nodejs code how to reset char level to 1.