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.
[07:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
Please log in to shout.


Members Online: Roy, DiearAnother