Staredit Network > Forums > General StarCraft > Topic: Max Dmg a unit can have/deal
Max Dmg a unit can have/deal
May 28 2015, 3:01 am
By: DoomDoomDoom  

May 28 2015, 3:01 am DoomDoomDoom Post #1



Hey guys, I was just wondering what is the max amount of DMG a unit can deal? Like the exact number?
Thanks.



None.

May 28 2015, 3:29 am Dem0n Post #2

ᕕ( ᐛ )ᕗ

It appears to 4095, and then units with two attacks do 8190 (twice the original).




May 28 2015, 3:39 am DoomDoomDoom Post #3



Thanks for your help.



None.

May 28 2015, 3:57 pm rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!

Hmm,

I seem to recall being able to set 9999 as the max damage in the editor?
Max damage is almost certainly 65535. I can personally vouch that the upgrade damage is capped at 65535. As you increase upgrades, if you increase past this level it will cause a buffer overflow or at least loop back around.

So the max damage any attack could do is 131070.

Also damage is not stored in the same way as HP. Damage is an integer. HP has a hidden byte for regeneration and half damage due to armor.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

May 28 2015, 11:01 pm Dem0n Post #5

ᕕ( ᐛ )ᕗ

Well, I put like 999999 in scmdraft and it came out as 4095 in-game, so I don't know. :hurr:

Then again, when I came back to look at it, it was then like -734985, so maybe it overflowed and gave an improper max attack.




May 30 2015, 1:40 pm UndeadStar Post #6



Knowing that damage is capped by MaxHP which is a signed int of 32 bits.
In memory it would be 7FFFFFFF, in decimal 2147483647.
In game you have to divide by 256 to get 7FFFFF, in decimal 8388607.
Logically, it would be that.

Now some types of damages may be limited to signed/unsigned 16 bits values, in which case the max would be 32767/65535.




Jun 1 2015, 5:30 pm rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

can you assign -1 damage?



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jun 2 2015, 3:56 am O)FaRTy1billion[MM] Post #8

👻 👾 👽 💪

I think it's unsigned, but don't quote me on that.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Jun 2 2015, 7:21 am rockz Post #9

ᴄʜᴇᴇsᴇ ɪᴛ!

https://code.google.com/p/gptp/wiki/DataValues#weapons.dat
it's "16", but it doesn't have u beside it? I assume this means it's signed, so max is 15 bits, which would be 32767.

I can guarantee that the max bonus amount is capped at 65535.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
[2026-6-22. : 8:35 pm]
Ultraviolet -- :wob:
[2026-6-21. : 11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
[2026-6-20. : 6:15 pm]
Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
[2026-6-20. : 3:47 pm]
NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
[2026-6-20. : 3:43 pm]
NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
[2026-6-19. : 9:57 am]
Oh_Man -- makes me wonder if SEN knows anything about the topic
Please log in to shout.


Members Online: Vrael, NudeRaider