An artist's depiction of an Extended Unit Death
I'm going to answer this from a technical level, but if you need me to explain in more detail, let me know.
SC upgrades researched:
http://farty1billion.dyndns.org/euddb/?pg=entry&addr=0x0058D298&ver=1.15.2&plat=winYour upgrade is 0x0D away, since upgrades are 1 byte apiece; this means you're +3 players from the base Player ID (3027).
Memory at Death Table + 3030 is exactly A + (B*256) + (C*65536) + (D*16777216)
A = Zerg Flyer Attacks
B = Protoss Ground Weapons
C = Protoss Air Weapons
D = Protoss Plasma Shields
You'll need to know the values of all of these except Zerg Flyer Attacks, which you can negate by checking between A = 0 and A = 255. That is:
Memory at Death Table + 3030 is at least 0 + (B*256) + (C*65536) + (D*16777216)
Memory at Death Table + 3030 is at most 255 + (B*256) + (C*65536) + (D*16777216)
EDIT: This is only for Player 1. Player 2's upgrades are located immediately after Player 1's, and this pattern continues for all players. If you need more help for the other players, let me know.
EDIT2: If you're not interested in explanations, try this:
Upgrades for each player
Here are the EP values for each player:
Player 1 3030
Player 2 3041
Player 3 3053
Player 4 3064
Player 5 3076
Player 6 3087
Player 7 3099
Player 8 3110
For odd-numbered players, use this:
Memory at Death Table + ________ is at least (B*256) + (C*65536) + (D*16777216)
Memory at Death Table + ________ is at most 255 + (B*256) + (C*65536) + (D*16777216)
B = Protoss Ground Weapons
C = Protoss Air Weapons
D = Protoss Plasma Shields
For even-numbered players, use this:
Memory at Death Table + ________ is at least (A*16777216)
Memory at Death Table + ________ is at most 16777215 + (A*16777216)
A = Protoss Ground Weapons
Weapon damage amount:
http://farty1billion.dyndns.org/euddb/?pg=entry&addr=0x00656EB0&ver=1.16.1&plat=winYour weapon is 0x1A away, since damage amounts are 2 bytes apiece; this means you're +6 players from the base Player ID (209619).
Memory at Death Table + 209625 is exactly A + (B*65536)
A = Zerg Flyer Attacks
B = Protoss Ground Weapons
This is actually in your favor, as you can completely ignore the value of Zerg Flyer Attacks:
Memory at Death Table + 209625 is at least 0 + (B*65536)
Memory at Death Table + 209625 is at most 65535 + (B*65536)
As for checking the damage of a unit at a specific index, that's not directly (and pragmatically) possible, as the unit's damage is not stored in the unit struct; you'd have to look up its weapon's damage.
Post has been edited 8 time(s), last time on Aug 26 2012, 11:36 am by Roy.