EUDs
Aug 30 2010, 7:33 pm
By: StarBlue  

Aug 30 2010, 7:33 pm StarBlue Post #1



I've noticed poeple talking about EUDs in map making, but I never knew what they were talking about. I just want to know what they are, and what you can do with them... oh, and HOW YOU USE THEM. thank you ^^



None.

Aug 30 2010, 7:40 pm Aristocrat Post #2



EUD stands for "Extended Unit Deaths", but more often than not we actually use "Extended Players".

An "Extended Unit" is a unit whose ID corresponds to an invalid unit. An Extended Player is a player whose ID is above 12.

Because StarCraft does not segfault when we write/read memory using invalid units or players, mapmakers can use EUD conditions to read four-byte portions of StarCraft's memory, with conditions like these:

Deaths("Player 19094", "Terran Marine", At Least, 256);


Reading the game's memory directly lets us detect things not ordinarily accessible via conditions, such as unit HP, whether or not a unit was selected, the units queued in a building, the number of upgrades a player has, etc. Check these two stickied threads:

http://www.staredit.net/topic/10471/
http://www.staredit.net/topic/2492/

If you need more help with specifics, I'm sure someone will be happy to provide an example.



None.

Aug 30 2010, 7:41 pm DevliN Post #3

OVERWATCH STATUS GO

http://www.staredit.net/starcraft/Death_counters#EUDs
http://www.staredit.net/starcraft/Units#Extended_Units

Also, a search on SEN for "EUD" gets you various topics where you can see examples of how they're used.



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Aug 30 2010, 7:42 pm Apos Post #4

I order you to forgive yourself!

Check out the EUD link in the http://www.staredit.net/topic/7993/ You will start the get a basic idea of how it works and how to make them.

Just to get you started, all data is stored inside memory. (In order to retrieve that data, you will need to find the memory address.)
Let's say you have 1 stored at the address 0. When you go to the address 0, you will see 1. Now that you have 1, you can base an action on that condition.

If memory at the address 0 == 1
Do something...

Someone correct me if I made a mistake in my explanation.

Edit: Obviously, when you do EUDs, it will be a little bit more complicated but that's the general idea.




Aug 30 2010, 7:49 pm StarBlue Post #5



yeah... too many numbers... could someone please give me the 'simple' version of this explaination?



None.

Aug 30 2010, 7:53 pm DevliN Post #6

OVERWATCH STATUS GO

Quote from Aristocrat
EUD stands for "Extended Unit Deaths", but more often than not we actually use "Extended Players".

An "Extended Unit" is a unit whose ID corresponds to an invalid unit. An Extended Player is a player whose ID is above 12.

Because StarCraft does not segfault when we write/read memory using invalid units or players, mapmakers can use EUD conditions to read four-byte portions of StarCraft's memory, with conditions like these:

Deaths("Player 19094", "Terran Marine", At Least, 256);


Reading the game's memory directly lets us detect things not ordinarily accessible via conditions, such as unit HP, whether or not a unit was selected, the units queued in a building, the number of upgrades a player has, etc. Check these two stickied threads:

http://www.staredit.net/topic/10471/
http://www.staredit.net/topic/2492/

If you need more help with specifics, I'm sure someone will be happy to provide an example.
...this is the simple version. EUDs are death triggers (like the ones used for death counters) except they're for units that don't exist. When using them, you get effects that you wouldn't normally be able to change with triggers, like unit health, and so on.



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Aug 30 2010, 7:55 pm StarBlue Post #7



so you kill a unit that doesn't exist to detect a player's sprite file/direction thingy? you can also use them to detect unit health too... are EUDs used in Tmple Siege?



None.

Aug 30 2010, 7:57 pm Aristocrat Post #8



Quote from StarBlue
so you kill a unit that doesn't exist to detect a player's sprite file/direction thingy?
No, you do not actually have to kill the unit. "Deaths" reads numbers from your computer's memory, and death counts are just values, not necessarily actual unit deaths.

Quote from StarBlue
you can also use them to detect unit health too...
Yes, but you just need to write the condition. You do not actually need to kill any units.

Quote from StarBlue
are EUDs used in Tmple Siege?
Not as far as I am aware. Then again, I may be wrong, considering that these people "protect" their maps :rolleyes:.



None.

Aug 30 2010, 7:59 pm StarBlue Post #9



By kill units, I meant you make a unit kill trigger to a unit that doesn't exist.



None.

Aug 30 2010, 8:15 pm Aristocrat Post #10



Quote from StarBlue
By kill units, I meant you make a unit kill trigger to a unit that doesn't exist.

No, you don't need to do that.

When StarCraft runs, it will write values to different parts of its memory.

For our purposes, memory is sectioned off into "bytes". Each byte is a string of eight [i]bits[/b], better known to you as the 0s and 1s in the computer's memory.

Basically, StarCraft stores the "Deaths" variable for a specific unit in 4-byte groups in memory. If you use a deaths condition, StarCraft computes the location in its memory where it stores the information, based on two things: the player number, and the unit ID. When reading deaths, it reads a group of four bytes at once, like this:

...
2312 01001010 01101001 01100010 01110101 01101110 00100000 01110111 01101111
2313 00100000 00100000 00100000 00100000 01110011 01100101 01101011 01100001
2314 01101001 00100000 01110011 01100001 01100101 00100000 01101101 01101111
2315 00100000 00100000 00100000 00100000 01101011 01100001 01100101 01110100
2316 01100101 00100000 01110011 01101000 01101001 01101101 01100001 01100101
2317 01110011 01101111 01110101 00100000 01101110 01100001 00001101 00001010
2318 01010011 01101000 01110101 01101110 01101011 01100001 01101110 00100000
2319 01101000 01100001 00100000 00100000 00100000 00100000 01101001 01110100
2320 01110011 01110101 01101101 01101111 00100000 01110011 01110101 01100111
2321 01110101 00100000 01110011 01101111 01100010 01100001 00100000 01101110
...


However, by making the player number or unit ID very large, you access locations in memory that do NOT correspond to deaths. By figuring out where in memory these things are stored, you compute the player number required to reach such a location, and use that in a "Deaths" condition. Because all things in memory are made of 0s and 1s regardless of what they actually represent, you can read the data with the "At Least", "At Most", and "Exactly" conditions to interpret them.



None.

Aug 30 2010, 8:19 pm StarBlue Post #11



so you have to know binary...



None.

Aug 30 2010, 8:22 pm Aristocrat Post #12



Quote from StarBlue
so you have to know binary...

:facepalm:

No. That was an ILLUSTRATION. Of what reading memory physically does. You do not need to "know binary" at all.



None.

Aug 30 2010, 8:24 pm StarBlue Post #13



so... could you give me an example in trigger formation?



None.

Aug 30 2010, 8:56 pm fat_flying_pigs Post #14



Temple siege 7 does use eud's. There is key press detection for the esc key that displays you'r hero's spells and abilities in detail.



None.

Aug 30 2010, 8:57 pm StarBlue Post #15



I am really looking for a way to detect unit sprite direction like in fireball.



None.

Aug 30 2010, 9:08 pm Aristocrat Post #16



Quote from StarBlue
I am really looking for a way to detect unit sprite direction like in fireball.

http://www.staredit.net/topic/10362/
http://www.staredit.net/topic/10836/



None.

Aug 30 2010, 9:56 pm StarBlue Post #17



Yeah... I have absolutely no idea what any of that means... Can't you just post how something like this is exicuted? (trigger form, etc.)



None.

Aug 30 2010, 10:05 pm DevliN Post #18

OVERWATCH STATUS GO

Why don't you open Fireball and look for yourself?



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Aug 30 2010, 11:36 pm Roy Post #19

An artist's depiction of an Extended Unit Death

I think I can explain the map, since I'm the one who made it.

Basically, I have several triggers that check a memory address that stores a unit's facing direction. If the unit is facing directly up, for example, the value at the address is 0. So, in a trigger, I say "If the value at this address is 0, then set a variable saying the unit is facing up." (I use a death count for a variable, where 1 = up, 2 = up-right, etc. So I would be setting the variable to 1 in this case).

Now, the values for facing up are actually a large range, and for any number between 0 and 225929599, the unit is still facing up. Therefore, my conditions would have to say "If the value at this address is between 0 and 225929599, then set a variable saying the unit is facing up."

Now, the address itself you can't actually get by normal means. There is no "Unit is facing direction" condition. However, you can think of EUDs as a way of accessing information that you wouldn't normally have access to. Using a memory reader on StarCraft while making a unit face various directions, I found the address to be 59CCF0 for the unit of interest (you can also figure this out if you know the unit placement order for your map; in this case, it was the first unit to be placed on the map).

Now, this hex number 59CCF0 doesn't do us very good, does it? However, we can convert this address either manually or using a useful program by Farty called EUDTrig. In EUDTrig, you can simply input the address 0x59CCF0 (we put 0x in front because it's a hexadecimal number, meaning it includes the letters A-F in the number). Checking the "Use Extended Player Deaths" box and hitting the arrow pointing down, the program converts the address to a number we can use (19043). In this case, it is the player number we put into the editor to access this address.

So, basically, the number 19043 represents the spot in memory that basically says "This is the direction the unit is facing." Using SCMDraft's memory condition, we can put in the number 19043. As for the second number to input, we put the value of the address, or the number that represents which way the unit is facing. As I mentioned above, facing up is the values between 0 and 225929599.

A trigger that displays when the unit is facing up would look like this:
Trigger
Players
  • Player 1
  • Conditions
  • Memory at 19043 is at least 0
  • Memory at 19043 is at most 225929599
  • Actions
  • Display Text: "Your unit is facing up!"
  • Preserve Trigger

  • * I think it should be noted that all units' default facing value is 0, so this will always run at the beginning of the game.

    You can do this for all directions you want to detect. A great page for getting rough numbers for each direction is the one Aristocrat already linked you to, http://www.staredit.net/topic/10362/

    Direction is just one of many EUD triggers. With EUD detection, you can detect things otherwise unimaginable for StarCraft's limited editor capabilities. Typed text, player names, mouse position, and many more detections are possible with EUDs, if you're determined enough to understand them.

    Post has been edited 1 time(s), last time on Aug 30 2010, 11:42 pm by Roy.




    Aug 31 2010, 12:51 am StarBlue Post #20



    My head nearly exploded........ anyways, thanks! I'll give this a shot.
    EDIT: ok I lied, I have no idea what's going on... actually, the only thing I don't get is where units deaths come in. do we like make the trigger kill a non-existing unit? I'm just so confused.
    EDIT 2: Yeah, I'm going to look at the fireball map and see for myself...
    EDIT 3: ok, I can't open the map :(

    Post has been edited 3 time(s), last time on Aug 31 2010, 1:07 am by StarBlue.



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [01:39 am]
    Ultraviolet -- no u elky skeleton guy, I'll use em better
    [10:50 pm]
    Vrael -- Ultraviolet
    Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    hey cut it out I'm getting all the minerals
    [10:11 pm]
    Ultraviolet -- :P
    [10:11 pm]
    Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    [2024-4-17. : 11:50 pm]
    O)FaRTy1billion[MM] -- nice, now i have more than enough
    [2024-4-17. : 11:49 pm]
    O)FaRTy1billion[MM] -- if i don't gamble them away first
    [2024-4-17. : 11:49 pm]
    O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
    [2024-4-17. : 3:26 am]
    O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
    [2024-4-17. : 1:53 am]
    Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
    [2024-4-17. : 1:52 am]
    Vrael -- hah do you think I was born yesterday?
    Please log in to shout.


    Members Online: eksxo, Zoan, Roy