Feel free to reply with more information, I'll update it accordingly.
TODO: Player upgrades
NOTE: Verified on Windows-based unmodded (loading hacks is considered modding) clients as of patch 1.16.1. This uses the EPD format (Memory condition in SCMDraft 2). All addresses are local unless otherwise stated. Variables are 0-based unless otherwise stated. Constants prefixed with "0x" are hexadecimal numerals.
VARIABLES:
a: Generic
c: Cooldown
e: Unit entry
f: First unit index address
h: Hotkey
k: Virtual key code
o: Clockwise offset
p: Player ID
u: Unit index
x: X coordinate
y: Y coordinate
[ADDR BASE] [EP FORMULA] [DESC]: [CONDITION/ACTION FORMULA]
0x51C000 -112857 DATA SEGMENT START
0x57FE60 -10561+216*p+12*h+e HOTKEYED UNIT (SHARED): (Unit alpha ID)
0x58A364 0 DEATH TABLE START
0x58CE24 2736 DEATH TABLE END
0x5968AC 12626 LEFT CLICK: AtLeast 1
0x596A18 12717+k/4 SINGLE KEYPRESS: Exactly 256^(k%4)
***FIRST UNIT INDEX START (SHARED)***
0x59CCA8 19025
0x59CCAC 19026
0x59CCB0 19027 HEALTH POINTS: AtLeast 256*a, AtMost 256*a + 255
0x59CCB4 19028
0x59CCB8 19029
0x59CCBC 19030
0x59CCC0 19031
0x59CCC4 19032
0x59CCC8 19033
0x59CCCC 19034
0x59CCD0 19035 CURRENT COORDINATE: Exactly x + 65536*y
0x59CCD4 19036 CURRENT X COORDINATE: Exactly 256*x
0x59CCD8 19037 CURRENT Y COORDINATE: Exactly 256*y
0x59CCDC 19038
0x59CCE0 19039
0x59CCE4 19040
0x59CCE8 19041
0x59CCEC 19042
0x59CCF0 19043 DIRECTION: AtLeast 16777216*o, AtMost 16777216*o + 16777215
0x59CCF4 19044 PLAYER ID: (Only when unit is still) Exactly 768 + p
0x59CCF8 19045
0x59CCFC 19046 ATTACK COOLDOWN: AtLeast 65536*c
0x59CD00 19047 ORDER COORDINATE: Exactly x + 65536*y
0x59CD04 19048 TARGET ID: (Unit index pointer)
0x59CD08 19049 SHIELD POINTS: AtLeast 256*a, AtMost 256*a + 255
0x59CD0C 19050
0x59CD10 19051
0x59CD14 19052
0x59CD18 19053
0x59CD1C 19054
0x59CD20 19055
0x59CD24 19056
0x59CD28 19057
0x59CD2C 19058
0x59CD30 19059
0x59CD34 19060 KILL COUNT: AtLeast 16777216*a, AtMost 16777216*a + 16777215
0x59CD38 19061
0x59CD3C 19062
0x59CD40 19063
0x59CD44 19064
0x59CD48 19065 ENERGY POINTS: AtLeast 16777216*a, AtMost 16777216*a + 16777215
0x59CD4C 19066
0x59CD50 19067
0x59CD54 19068
0x59CD58 19069
0x59CD5C 19070
0x59CD60 19071
0x59CD64 19072
0x59CD68 19073
0x59CD6C 19074
0x59CD70 19075
0x59CD74 19076
0x59CD78 19077
0x59CD7C 19078
0x59CD80 19079
0x59CD84 19080
0x59CD88 19081
0x59CD8C 19082
0x59CD90 19083
0x59CD94 19084
0x59CD98 19085
0x59CD9C 19086
0x59CDA0 19087 RALLY COORDINATE: Exactly x + 65536*y
0x59CDA4 19088
0x59CDA8 19089
0x59CDAC 19090
0x59CDB0 19091
0x59CDB4 19092
0x59CDB8 19093 MATRIX DAMAGE ABSORPTION Exactly a*16777216
0x59CDBC 19094 MATRIX/STIM/ENSNARE/LOCKDOWN TIMER: Exactly a; Exactly 256*a; Exactly 65536*a; Exactly 16777216*a; (Detection) AtLeast 1; AtLeast 256; AtLeast 65536; AtLeast 16777216
0x59CDC0 19095
0x59CDC4 19096
0x59CDC8 19097 BLIND STATE: AtLeast 16777216
0x59CDCC 19098 MAELSTROM TIMER: Exactly a; (Detection) AtLeast 1
0x59CDD0 19099
0x59CDD4 19100
0x59CDD8 19101
0x59CDDC 19102
0x59CDE0 19103
0x59CDE4 19104
0x59CDE8 19105
0x59CDEC 19106
0x59CDF0 19107
0x59CDF4 19108
***FIRST UNIT INDEX END (SHARED)***
0x628438 161845 NEXT UNIT INDEX POINTER: (Unit index pointer)
0x628448 161849 SCREEN X COORDINATE: (Locked on an 8px grid) Exactly x
0x628470 161859 SCREEN Y COORDINATE: (Locked on an 8px grid) Exactly y
0x6284E8 161889+12*p+e SELECTED UNIT (SHARED): (Unit index pointer)
0x6CDDC4 331416 MOUSE X COORDINATE: (Relative to screen) Exactly x
0x6CDDC8 331417 MOUSE Y COORDINATE: (Relative to screen) Exactly y
0x6DE000 347943 DATA SEGMENT END
Converting to other unit indices:
u > 0: f + 142716 - 84*(u-1)
Unit index pointer:
u = 0: 5885096
u > 0: 6455960 - 336*(u-1)
Unit alpha ID:
u = 0: 2049
u > 0: 3748 - (u-1)
Post has been edited 19 time(s), last time on Oct 6 2011, 5:54 pm by yoonkwun.
None.
Are order and rally point detection shared?
None.
Farty got a whole database dedicated to this, no?
None.
Farty got a whole database dedicated to this, no?
Yeah, but his database only has the address and description, not the extended player, if it's shared or not, how to get the value, etc. This just helps the process a bit more.
Are order and rally point detection shared?
Yes. Everything between these two lines is shared:
***FIRST UNIT INDEX START; SHARED VALUES (see below)***
***FIRST UNIT INDEX END; SHARED VALUES (see below)***
None.
Everything from the unitnode table is shared, and has already been detailed. Most of the time it's obvious whether or not the data is shared or not. The address is more useful, IMO. I find this method confusing, but IDK if EUD noobs will find it easier. If you can't understand little endian and artmoney, you probably shouldn't be doing EUDs.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Everything from the unitnode table is shared, and has already been detailed. Most of the time it's obvious whether or not the data is shared or not. The address is more useful, IMO. I find this method confusing, but IDK if EUD noobs will find it easier.
To each their own then. Personally, when creating EUD triggers, I find it easier to copy and paste easily from a list with the extended players, not having to do the math every time. The various formulas are probably the most valuable pieces of information.
If you can't understand little endian and artmoney, you probably shouldn't be doing EUDs.
This was also meant to allow those who can't understand the concept of EUDs use them anyway, because they have a lot of potential.
None.
So if I'm understanding the unit selection part right, I can use Memory(161889, Exactly, 5885096) to detect if player 1 is selecting the first Unit ID? And for each subsequent selection, I just add 1 to the 161889, until I hit my max?
SWEET. Just realized how much work this will be.
The latest version of SCMDraft 2 has the unit index in the unit properties dialog, which would help a lot with preplaced units.
None.
Sticky this please. I find this rather useful. I just noticed that you can not only view the local id in scmdraft, you can change it too via move up or down. So awesome.
None.
If you want to be useful, make it a user friendly excel sheet. That way you can easily change the numbers and such.
from my excel sheet
length Offset Player Number 58a364
4 59CCA8 19025 Previous
4 59CCAC 19026 Next
4 59CCB0 19027 dwHP
4 59CCB4 19028 Sprite
2 59CCB8 19029 wMoveToXPos
2 59CCBA 19029.5 wMoveToYPos
4 59CCBC 19030 target_1
2 59CCC0 19031 wCurrentXPos
2 59CCC2 19031.5 wCurrentYPos
2 59CCC4 19032 wX_?
2 59CCC6 19032.5 wY_?
2 59CCC8 19033 bMovementFlags
1 59CCCA 19033.5 bFlingyTurnRadius
1 59CCCB 19033.75 Current Direction
3 59CCCC 19034 wFlingyID
1 59CCCF 19034.75 bFlingyMovementType
2 59CCD0 19035 wCurrentXPos
2 59CCD2 19035.5 wCurrentYPos
4 59CCD4 19036 dwX_Halt
4 59CCD8 19037 dwY_Halt
4 59CCDC 19038 dwFlingySpeed
4 59CCE0 19039 dwOtherspeed
12 59CCE4 19040 dwOtherspeed
4 59CCF0 19043 wFlingyAcceleration
1 59CCF4 19044 bPlayerID
1 59CCF5 19044.25 bMainOrderID
1 59CCF6 19044.5 bMainOrderState
5 59CCF7 19044.75 bOrderSignal
1 59CCFC 19046 bMainOrderTimer
1 59CCFD 19046.25 bGroundWeaponCooldown
1 59CCFE 19046.5 bAirWeaponCooldown
1 59CCFF 19046.75 bSpellCooldown
2 59CD00 19047 wOrderTargetX
2 59CD02 19047.5 wOrderTargetY
4 59CD04 19048 Target_Order
4 59CD08 19049 dwShield
4 59CD0C 19050 wUnitID
4 59CD10 19051 PlayerPrevious
4 59CD14 19052 PlayerNext
4 59CD18 19053 Subunit
4 59CD1C 19054 OrderQueueHead
8 59CD20 19055 OrderQueueTail
4 59CD28 19057 ConnectedUnit
1 59CD2C 19058 bNumOfQueuOrders
3 59CD2D 19058.25 bUnknowntimer
6 59CD30 19059 wDisplayedUnitID
1 59CD36 19060.5 bRankIncrease
4 59CD37 19060.75 bKillCount
1 59CD3B 19061.75 bUnknown
4 59CD3C 19062 bCurrentButtonSet
2 59CD40 19063 wQueue1
2 59CD42 19063.5 wQueue2
2 59CD44 19064 wQueue3
2 59CD46 19064.5 wQueue4
2 59CD48 19065 wQueue5
2 59CD4A 19065.5 wEnergy
2 59CD4C 19066 bQueueSlot
2 59CD4E 19066.5 bSecondaryOrderID
4 59CD50 19067 bHPGainDuringBuild/Repair
20 59CD54 19068 wRemainingBuildTime
1 59CD68 19073 bSpidermineCount
1 59CD69 19073.25 bunusedc1
1 59CD6A 19073.5 bunusedc2
1 59CD6B 19073.75 bunusedc3
2 59CD6C 19074 wAddonBuildID
2 59CD6E 19074.5 wUpgradeResearchTime
1 59CD70 19075 bscarabCount
1 59CD71 19075.25 bInterceptorCount
1 59CD72 19075.5 bLarvaSpawnTimer
1 59CD73 19075.75 bIsLanding
1 59CD74 19076 other link
1 59CD75 19076.25 bUpgradeLevel
1 59CD76 19076.5 bIsCarrying/going to harvest
1 59CD77 19076.75 bResourceAmount
1 59CD78 19077 wPowerupDropTargetX
1 59CD79 19077.25 wPowerupDropTargetY
1 59CD7A 19077.5 bResourceIscript
9 59CD7B 19077.75 bResourceCount
4 59CD84 19080 dwStatus
1 59CD88 19081 bResourceType
1 59CD89 19081.25 bWireframeRandomizer
1 59CD8A 19081.5 bSecondaryOrderState
9 59CD8B 19081.75 bUnknown_E3_Counterdown
12 59CD94 19084 CurrentBuildUnit
2 59CDA0 19087 wRallyX
2 59CDA2 19087.5 wRallyY
-4 59CDA4 19088 RallyUnit
4 59CDA0 19087 PreviousPsiProvider
4 59CDA4 19088 NextPsiProvider
6 59CDA8 19089 dwPath_Unknown
1 59CDAE 19090.5 bUnused_106
1 59CDAF 19090.75 bIsBeingHealed
2 59CDB0 19091 wX_Contours_1_Unknown
2 59CDB2 19091.5 wY_Contours_1_Unknown
2 59CDB4 19092 wX_Contours_2_Unknown
2 59CDB6 19092.5 wY_Contours_2_Unknown
2 59CDB8 19093 wRemoveTimer (hallu, dswarm, dweb, brood)
2 59CDBA 19093.5 wDMatrixDamage
1 59CDBC 19094 bDMatrixTimer
1 59CDBD 19094.25 bStimTimer
1 59CDBE 19094.5 bEnsnareTimer
1 59CDBF 19094.75 bLockdownTimer
1 59CDC0 19095 bIrradiateTimer
2 59CDC1 19095.25 bStatisTimer
-1 59CDC3 19095.75 bPlagueTimer
2 59CDC2 19095.5 bIsUnderStorm
4 59CDC4 19096 IrradiatedBy
1 59CDC8 19097 bIrradiatePlayerID
1 59CDC9 19097.25 bParasiteFlags
1 59CDCA 19097.5 bCycleCounter
1 59CDCB 19097.75 bIsBlind
1 59CDCC 19098 bMaelstromCounter
1 59CDCD 19098.25 bUnknown_Unreferenced
1 59CDCE 19098.5 bAcidSporeCount
1 59CDCF 19098.75 bAcidSpore1
1 59CDD0 19099 bAcidSpore2
1 59CDD1 19099.25 bAcidSpore3
1 59CDD2 19099.5 bAcidSpore4
1 59CDD3 19099.75 bAcidSpore5
1 59CDD4 19100 bAcidSpore6
1 59CDD5 19100.25 bAcidSpore7
1 59CDD6 19100.5 bAcidSpore8
1 59CDD7 19100.75 bAcidSpore9
2 59CDD8 19101 w3by3OffsetIndex
2 59CDDA 19101.5 wUnused_1325a
4 59CDDC 19102 dwUnknown_134_CUNIT_AI
2 59CDE0 19103 wAirStrength
2 59CDE2 19103.5 wGroundStrength
4 59CDE4 19104 dwTableID_Unknown_1
4 59CDE8 19105 dwTableID_Unknown_2
4 59CDEC 19106 dwTableID_Unknown_3
4 59CDF0 19107 dwTableID_Unknown_4
1 59CDF4 19108 bRepulse_Unknown_1
1 59CDF5 19108.25 bRepulse_Unknown_2
1 59CDF6 19108.5 bDriftPosX(mapsizex/1.5 max)
59CDF7 19108.75 bDriftPosY(mapsizey/1.5 max)
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Yeah, but his database only has the address and description,
Address, version, platform, name, data size, length, and description ... You don't need any more.
It takes negligible time to find that. If I did add it, though, I'd have to manually add the death table for every version for it to calculate with.
... If someone had ever requested such a thing, it would take a very minute amount of time to add.
if it's shared or not, how to get the value, etc.
Hence the description field. It's a big textarea for a reason. Add any other/misc. information you feel necessary or useful.
;o
Though the EUDDB does have a disadvantage since nobody seems to update it. ... the 1.16.1 addresses are very lacking and there is a lot of random things.
Post has been edited 3 time(s), last time on Apr 3 2010, 8:25 pm by FaRTy1billion.
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!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!
I'm still looking for a way to detect when the players have given an order:
My objective is to manually substitute in new voices for specific units. An 'is talking' byte wouldn't have surprised me, simply because of the 'show portrait talking' and 'transmission' actions; in any case, it was simply a mean to that end. Right click detection and selection detection combined could achieve the desired effect, however, as far as I know right click hasn't been found (if it can be). If anyone has any bright ideas for another method, I'd love to hear it.
Now I'm looking for it for a different reason. In Io, when a player selects a target for his spell (depending on the spell type) the Hero will attempt to close the distance between himself and the target area until he is within casting range of it. The problem, of course, is that I need to know if the hero is given a new order before reaching proximity so that I cancel the order to cast. Obviously, this stipulates using a shared value.
Less important things that I could use: Whether or not a unit is maelstromed, locked-down, or defense-matrixed.
I'm also curious, rockz, what addresses/detections you would utilize to create a vHP system that could track every hit exchanged between a set number of units (IE 30).
None.
I thought lethal was asking these questions...
As I told him:
+0x5C - CUNIT* Target_Order will display the target, and you can detect cooldown, so you know who attacked whom.
Maelstrom, lockdown, and dmatrix are easy.
Burrowed units is pretty much the standard for VHP, but looks ugly imo and has slowdown problems. Since you know the set number of units, however, EUD HP isn't hard at all. If you're going to use EUDs, you may as well do it right, and detect changes in HP. You'd need a trigger for each HP value you want to detect (a 100 HP unit would probably have 200 states max), then a binary countoff set to detect changes (no more than 20 triggers in total).
As for casting the spell, You select the unit to cast, right? then the unit is ordered towards the selected unit. Once it is in range, it casts the spell. It won't cast the spell until that time, so think of casting the spell as a concentration based spell. You can't move your unit unless you reselect it, which will cancel the spell. You set a DC to know which unit you have selected, another DC to know which unit you had selected last trigger, and if you've selected yourself after selecting another unit while a spell was in progress, cancel any order.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
... If someone had ever requested such a thing, it would take a very minute amount of time to add.
Do it.
In the address listing or in the info page?
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!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!
+0x5C - CUNIT* Target_Order will display the target, and you can detect cooldown, so you know who attacked whom.
I was wondering if you knew of any other good way. The greatest problem here are units that shoot projectiles. Technically you could just add in an average wait time or even find the distance between target and attacker. Either way, it isn't a big problem; I don't need dragoons, vultures or any air units.
Burrowed units is pretty much the standard for VHP, but looks ugly imo and has slowdown problems. Since you know the set number of units, however, EUD HP isn't hard at all. If you're going to use EUDs, you may as well do it right, and detect changes in HP. You'd need a trigger for each HP value you want to detect (a 100 HP unit would probably have 200 states max), then a binary countoff set to detect changes (no more than 20 triggers in total).
Originally we had different damage bits for each attacker (with reserved bits for 50% and 25% damage from concussive damage) and did a binary countoff on the health value to find each attacker for each attackable unit. It worked extremely well, but the trigger count was a concern and health couldn't be displayed on the unit (unless we wanted the maximum health value to be significantly larger than the maximum damage value, which of course, would've taken a ridiculous amount of triggers per attackable unit. This is why we switched to Cooldown+Current Target
As for casting the spell, You select the unit to cast, right? then the unit is ordered towards the selected unit. Once it is in range, it casts the spell. It won't cast the spell until that time, so think of casting the spell as a concentration based spell. You can't move your unit unless you reselect it, which will cancel the spell. You set a DC to know which unit you have selected, another DC to know which unit you had selected last trigger, and if you've selected yourself after selecting another unit while a spell was in progress, cancel any order.
That's one method, but not the one I was referring to. We're using order destination coordinate detection and the target for the spell could be a patch of ground. Technically you'd use a scourge to cast so selecting the Hero to cancel could work, however, it seems unintuitive and would make it so you couldn't see the health of your Hero as it walks into a heated zone to cast a spell.
This does make me think of a new option, however. Instead of ordering the Hero to the target area, I could order him to one of a set of specific order points that would put him on a collision course with the target area and then detect if the Hero's order coordinates are not one of these preset coordinates.
None.
Less important things that I could use: Whether or not a unit is maelstromed, locked-down, or defense-matrixed
Updated OP.
Now I'm looking for it for a different reason. In Io, when a player selects a target for his spell (depending on the spell type) the Hero will attempt to close the distance between himself and the target area until he is within casting range of it. The problem, of course, is that I need to know if the hero is given a new order before reaching proximity so that I cancel the order to cast. Obviously, this stipulates using a shared value.
I don't know if I'm understanding this correctly but why couldn't you use my Order map in the other thread? It will detect when the unit recently made an order, which you could use to cancel the spell.
None.
I don't know if I'm understanding this correctly but why couldn't you use my Order map in the other thread? It will detect when the unit recently made an order, which you could use to cancel the spell.
An order would be made when the unit is ordered to the target area; it takes a few loops for the order detection to return false, and if the player makes a new order within that time it wouldn't register it. Hmm, actually, I noticed an effect where if the unit was ordered to the exact same place twice it would immediately stop returning true. I wonder if I can use this to my advantage.
None.
I don't know if I'm understanding this correctly but why couldn't you use my Order map in the other thread? It will detect when the unit recently made an order, which you could use to cancel the spell.
An order would be made when the unit is ordered to the target area; it takes a few loops for the order detection to return false, and if the player makes a new order within that time it wouldn't register it. Hmm, actually, I noticed an effect where if the unit was ordered to the exact same place twice it would immediately stop returning true. I wonder if I can use this to my advantage.
I just tested it and it will work beautifully. Originally my problem was that the order detection would return true too long, so that orders made soon after would go unnoticed. If you order a unit to the exact same position twice in a row, however, it stops returning true. I can just order it to the location again on the second loop after ordering and it will return true only once. Any order between then and casting is then a new player-given order and thus interrupts. Unfortunately this doesn't solve my voice-over woes.
Less important things that I could use: Whether or not a unit is maelstromed, locked-down, or defense-matrixed
Updated OP.
Danke.
None.
The byte is a decrementing counter, so if you increase the value in the condition, you can in effect shorten the time it returns true. I made it the smallest value in the test map because I was too lazy to brute test what was the best highest value. Now I did and found it's 234881024 (16777216 * 14). It works pretty well too, it always runs at most once per order, and it's pretty hard to unintentionally click twice fast enough for it to return true only once.
Post has been edited 1 time(s), last time on Apr 4 2010, 8:53 pm by yoonkwun.
None.