Diablo 2 (single player) Combat log

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
peddroelm
Cheater
Cheater
Posts: 40
Joined: Fri Apr 05, 2019 9:15 am
Reputation: 17

Diablo 2 (single player) Combat log

Post by peddroelm »

to better understand various (mostly damage calculating) game mechanics, combat dice rolls, measuring various attack speeds , etc ..

sadly I'm struggling with making progress with this one (it might be to its multiplayer nature there is trickery in play) ..

I can 'find' various relevant stats variable address (not persistent pointers) like a particular's monster's health .. Helps a ton that the values are published on various d2 related sites ..

Usually my next step would be find out what writes, trace .. find the function, find what parameters it uses, inject log the changes ..

But in this case find what writes is NOT triggered and the variable still CHANGES .. (find what access gives some instructions but they use aligned offsets and the variables I care about are at un-aligned address, mess) ...

Also tried this :

more primitive approach (set write breakpoint on the variable - not code injection somewhere along the code that handles damage application which would then have all actors's address as parameter - no more need to manually search)

Code: Select all

addressbp1=0x03AD1405
timevar = 0
tempHP = 74547 // NM meph players 1 starting HP

function debugger_onBreakpointBP1()
local HP = readInteger(addressbp1)
print(string.format("Timediff: %9.3f  DiffHP: %5d  HP_left : %5d ", os.clock()-timevar, tempHP - HP , HP ))
  tempHP = HP
  timevar =  os.clock()
  debug_continueFromBreakpoint(co_run)
return 1
end

debug_setBreakpoint(addressbp1, 4, bptWrite , debugger_onBreakpointBP1)
and to my surprise it worked :

Code: Select all

Timediff:     0.122  DiffHP:   248  HP_left : 66731  
Timediff:     0.473  DiffHP:   394  HP_left : 66337  
Timediff:     0.118  DiffHP:  8292  HP_left : 58045    // 8292 / 66337 = 0.1249  yay 12.5% melee Crushing blow !!
Timediff:     0.001  DiffHP:   338  HP_left : 57707  
Timediff:     0.534  DiffHP:   368  HP_left : 57339  
Timediff:     0.103  DiffHP:   234  HP_left : 57105  
Timediff:     0.474  DiffHP:   262  HP_left : 56843  
Timediff:     0.118  DiffHP:   655  HP_left : 56188  
Timediff:     1.195  DiffHP:   709  HP_left : 55479
  
ATM I don't think I'll be able to resolve monster name strings// skill strings // damage types // dice rolls for this one .. But who knows, maybe somebody can help ..

Code: Select all

Timediff:  2352.556  DiffHP:   169  HP_left : 52807  
Timediff:     1.198  DiffHP:   163  HP_left : 52644  
Timediff:     0.722  DiffHP:   103  HP_left : 52541  
Timediff:     0.480  DiffHP:    57  HP_left : 52484  
merc jab .. So the variable I'm watching is not updated for every damage application ? (gets some aggregation of the attack :( worse if it includes elemental damage types ... ) Jab is supposed to be 3 strikes ?
and each rolls to hit (and crit ?) individually ?

Post Reply

Who is online

Users browsing this forum: No registered users