Static Field Bug
#6
Quote:I have heard of this before, but only in the context of TCP/IP games set to 'players 8' and I was told that it occurred for only the Act 4 and 5 Super Bosses and only in Hell mode. The theory presented was that their life was boosted so much in such games that it would 'wrap around the numbers'.

Is that what causes it? And if so, why did it happen in a three player game? And why was it only sporadic in the experience of my companion?

The explanation presented is partially correct. Some of the tests done are of the nature of
If( current_life > max_life*50/100) then allow the Static Field to effect the monster.

In some cases you can get the term max_life*50 to a level such that it flips the sign bit and makes the number negative, before the /100 part of the calculation is applied. Since a positive number is always larger than a negative, you will always be able to apply a Static Field to these monsters.

Small digression here on the internal game data storage. Life (and mana and few others) is stored as a (signed) 4 byte value. The lowest byte is used as a fractional portion of a point of life. This is the level that some fo the continuous damage effects work at like poison. The next upper 23 bits (3 bytes minus the highest bit) are used for the full hit point amount of life. The highest bit is the sign bit or sign flag (0=positive, 1=negative). In hex this max life would be 7f ff ff or 8388607. Go a little above this and you will be setting the sign bit (and having probably a fraction of one hitpoint as the other portion of the variable). The magic point to watch for is when you exceed 8388607 in an intermediate step of a calculation.

Example:
Izual hell HP=98688
3 player game life is boosted by a 300/100 factor.
Izual hell 3-player HP=296064
stepping through the test outlined above
If( current_life > max_life*50/100)
If( current_life > 296064*50/100)
If( current_life > 14803200/100)
We have now exceeded the critical point and the 14803200 is actually being treated as -13754624
If( current_life > -13754624/100)
If( current_life > -137546)
And this will be true for any current_life until Izual is dead.

A similar thing will happen with Valkyrie and Iron Golems life when they are at high skill levels due to the amount of +HP% that is applied to them. The Iron Golems get their +HP% from Golem Mastery and the final amount of +HP% is usually achieved with the effects of Oak Sage and a barbarian Battle Orders yell. But do note that these last two effects are not absolutely required, it is just the easiest way to reach that level with legit items on the realms.
Reply


Messages In This Thread
Static Field Bug - by ShadowHM - 06-13-2003, 04:44 PM
Static Field Bug - by ALnitak - 06-13-2003, 04:57 PM
Static Field Bug - by Kevin - 06-13-2003, 05:34 PM
Static Field Bug - by Nicodemus Phaulkon - 06-13-2003, 06:27 PM
Static Field Bug - by ShadowHM - 06-13-2003, 08:10 PM
Static Field Bug - by Ruvanal - 06-13-2003, 08:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)