09-15-2003, 06:25 AM
Quote:I do know that monster hps are stored in 4 bytes. So, I speculate: If the game cannot store HP values in excess of this, the maximum would be FF FF FF FF (4,294,967,295).
While the value may be stored as an unsigned long int, this does not mean that every bit is used to hold relevent information.
Many routines in Diablo only use the 'x'-most insignificant bits of variables in routines. I know for certain that this is the case with monster hit points, as if you set this to a rediculously high value, monsters stll die very easily.
Though interestingly enough, if you use the hack to allow you to see monster hit points, the value you set will be displayed (though iirc, values over 0xf0ffffff display as 1).
Here's a .dat file that can be used to test this: (the new HP values are the block of f's, the first 8 being minimum hp, the second 8 being maximum. the order of least to most significant bits in an unsigned long int is as such - 10 32 54 76. Note - this only changes the monsters that always appear on Dlvl 1 )
Code:
start 1.09 Change Dlvl 1 Monster HP
497e60 0400000007000000 ffffffffffffffff
498060 0100000004000000 ffffffffffffffff
498260 0200000004000000 ffffffffffffffff
498460 0200000005000000 ffffffffffffffff
498660 0300000006000000 ffffffffffffffff
498a60 0300000006000000 ffffffffffffffff
end
start v1.09 View Monster HP and Resist
439FC4 68 00
43A030 0F8CF9000000 909090909090
end
start v1.09 Play v1.09 Off HD
1501867A 74 eb
end
"What contemptible scoundrel stole the cork from my lunch?"
-W.C. Fields
-W.C. Fields