Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: EUD/EPD Question.
EUD/EPD Question.
Jul 11 2011, 11:40 am
By: Alerek  

Jul 11 2011, 11:40 am Alerek Post #1



Okay, sorry that most likely this has been asked several times before, I've tried searching around, but it didn't really come up with anything useful.

Now I've been very interested in the whole UED/EPD conditions, but I just cant seem to understand them. Now I know you can't do EUD actions, without using external aid. But I don't get how to set up a EUD condition.

I have EUDTrig, And the EUD DB, but I honestly can't seem to understand it. Like for example, if I wanted to see the active player count, and do a basic trigger for the current active player count how would I do that?

So the offset for that would be 0x0057F1E1
but how do I actually put in a variable for the condition? Like how would I detect 3 players/2players etc?
This is the only thing I can't seem to understand, is where do I fill in that value for what I want? As it seems all the EUD conditions that I find useful have some value tied to them that I don't know how to pick.



None.

Jul 11 2011, 12:18 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

EUDTrig will give you the values that are needed for the address.

EUDTrig gives you "-11361" as the extended player.
Since I don't know if negative numbers are possible, I don't know if that value can be read.

In general you get an adress with TrigEdit. But you still need an idea what the value is in that adress.
You need to get a memory reading program like Cheatengine and look up entry at the adress.
There will be always read multiple bytes at once, so the value you want might be in the middle.


Btw, why do you want the active player count?
You can do that yourself with normal trigger usage:
1. Every player sets his own death count to 1 at map start.
2. If a player leaves, his death count will be reset to 0. (if I remember correctly.)
3. Set a DC (death count) to the max player count and subtract 1 for every missing player (player's DC is exactly 0).
4. That DC stores the number of currently active players.




Jul 11 2011, 12:31 pm Alerek Post #3



Quote from Ahli
EUDTrig will give you the values that are needed for the address.

EUDTrig gives you "-11361" as the extended player.
Since I don't know if negative numbers are possible, I don't know if that value can be read.

In general you get an adress with TrigEdit. But you still need an idea what the value is in that adress.
You need to get a memory reading program like Cheatengine and look up entry at the adress.
There will be always read multiple bytes at once, so the value you want might be in the middle.


Btw, why do you want the active player count?
You can do that yourself with normal trigger usage:
1. Every player sets his own death count to 1 at map start.
2. If a player leaves, his death count will be reset to 0. (if I remember correctly.)
3. Set a DC (death count) to the max player count and subtract 1 for every missing player (player's DC is exactly 0).
4. That DC stores the number of currently active players.

I was just using active player count as an easy example of trying to find the value to find with the EUD condition :}.
Although thanks for that example.
Editing ;
Here I'll try another example :
Say I wanted to detect someones player name, to see if a certain player has joined the game.
The offset would be 0x0057EE9C
the player ID would be -11570
But I don't get how I would actually put in a players name to detect, like say I wanted to detect "Alerek" how would I get the information/make the trigger condition to do so?

Post has been edited 3 time(s), last time on Jul 11 2011, 12:56 pm by Alerek.



None.

Jul 11 2011, 12:56 pm rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!

memory(-11570,exactly,<Alar in decimal>)
memory(-11569,exactly,<ek in decimal>)
you can either manually calculate it, which I don't remember off the top of my head exactly how to do, or you can play a game, open up a memory viewer, and view what it actually is, then detect that.

What an EUD does is search an address (the player number) for a value (the other number). The easiest way to see what to detect is actually viewing what you need to detect while playing SC, then copying that hex into decimal and using that in the trigger.



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

Jul 11 2011, 1:02 pm Alerek Post #5



Quote from rockz
memory(-11570,exactly,<Alar in decimal>)
memory(-11569,exactly,<ek in decimal>)
you can either manually calculate it, which I don't remember off the top of my head exactly how to do, or you can play a game, open up a memory viewer, and view what it actually is, then detect that.

What an EUD does is search an address (the player number) for a value (the other number). The easiest way to see what to detect is actually viewing what you need to detect while playing SC, then copying that hex into decimal and using that in the trigger.
Ok, so how would I get the decimal exactly? Could you explain how I would do it manually? I mean I can find my name in Cheat engine, but I don't see what I can do from there, as all i really get from that is just the same thing in the DB 0x0057EE9C

Edit: ok, So I convert the hex into decimal, but how would I put that in as the second number, do I actually need to add a decimal somewhere, or just throw all the numbers as is.

Well, when converting to decimal, I put this in a test map and joined with this trigger in place
Quote
Trigger("Player 1"){
Conditions:
Memory(4294955727, Exactly, 1097621874);

Actions:
Display Text Message(Always Display, "woot?");
Preserve Trigger();
}
-note -11570 turns into 4294955727 in trigedit apparently.
-note This was also tested in single player with an account named Alar.
-note Im completely expecting someone to come in here telling me I got it all wrong ><!

Post has been edited 6 time(s), last time on Jul 11 2011, 2:51 pm by Alerek.



None.

Jul 11 2011, 2:52 pm jjf28 Post #6

Cartography Artisan

Latest SCMDraft

The following shows how to use EUD's once you have your hex value, and the value you want it to measure

In this example I used the energy value of a unit







SCMDraft will convert large numbers to negative values, but don't worry about that, it's normal.

Hope this helps :)

Edit: My value in Artmoney/Cheat engine was 250, substitute whatever the value of your name or w/e shows up as in Cheat Engine/Artmoney for 250

Post has been edited 1 time(s), last time on Jul 11 2011, 2:57 pm by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jul 11 2011, 9:01 pm O)FaRTy1billion[MM] Post #7

👻 👾 👽 💪

(4294955726 and -11570 are the same number, as are 4194304000 and -100663296 :})

I don't know if this is still relevant, but I just added this tool to the References page in the EUDDB.
And a few notes about what is shown:
'ID' is what you add to the player ID to get to that chunk, as seen in rockz's post (the difference in player ID: the second is 1 greater than the first). You can also do this with EUDTrig's "Object ID/Len." fields, but I believe it is simple enough to just add 1 for each chunk.
Each pair in the hex representation appears to be in reverse order (or little-endian; see this for more info), that is because the least significant (having the smallest overall value) byte is placed first. (example: 'abcd' appears as 61 62 63 64 in your memory viewer, but the actual value is read as 0x64636261)
Reading strings is extremely case-sensitive. Every string ends with a null byte (0x00), and any data after that may not necessarily be 0 (hence the '??'s in the calculator), especially when reading things like chat text lines. You can either ignore the last chunk or assume the ??s are zero and see if it works.

Also sorry if you don't understand something I said ... ;o I'm really bad at explaining things.

Post has been edited 8 time(s), last time on Jul 11 2011, 9:20 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!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Jul 11 2011, 10:01 pm Alerek Post #8



Thank you everyone for your help, now I have gotten a trigger to work when I am in the map with my name, but how would I add more triggers for different names? Like would I just keep going down with the -11570,-11569,-11568,-11567,-11566
for every 4 letters of names I want to add?

And I realise that anykind of action with a players name condition causes a desync. as far as I know.

Post has been edited 2 time(s), last time on Jul 11 2011, 10:14 pm by Alerek.



None.

Jul 11 2011, 10:12 pm CecilSunkure Post #9



Quote from Alerek
Thank you everyone for your help, now I have gotten a trigger to work when I am in the map with my name, but how would I add more triggers for different names? Like would I just keep going down with the -11570,-11569,-11568,-11567,-11566
for every 4 letters of names I want to add?
It's my understanding that you can read 4 characters (4 bytes) with an EUD condition. So, yes.

Quote from Alerek
And I realise that anykind of action with a players name condition causes a desync.
This isn't true. The game will desynchronize if two players receive packets that conflict with what their clients think is going on. Any data that is not shared between the players can be acted upon with a condition that reads SC in memory.



None.

Jul 11 2011, 10:23 pm Alerek Post #10



Quote from CecilSunkure
Quote from Alerek
Thank you everyone for your help, now I have gotten a trigger to work when I am in the map with my name, but how would I add more triggers for different names? Like would I just keep going down with the -11570,-11569,-11568,-11567,-11566
for every 4 letters of names I want to add?
It's my understanding that you can read 4 characters (4 bytes) with an EUD condition. So, yes.

Quote from Alerek
And I realise that anykind of action with a players name condition causes a desync.
This isn't true. The game will desynchronize if two players receive packets that conflict with what their clients think is going on. Any data that is not shared between the players can be acted upon with a condition that reads SC in memory.
Okay, so say I wanted to use something like this, I heard people talking about desyncing people from your maps with a text, so would this only apply to players who the triggers are actually running for, say there is players 1-4, and player 3 gets something that sets off a condition that would cause a desync, would that make player 3 drop from the game? And everyone else would be fine?



None.

Jul 11 2011, 10:28 pm CecilSunkure Post #11



Quote from Alerek
Quote from CecilSunkure
Quote from Alerek
Thank you everyone for your help, now I have gotten a trigger to work when I am in the map with my name, but how would I add more triggers for different names? Like would I just keep going down with the -11570,-11569,-11568,-11567,-11566
for every 4 letters of names I want to add?
It's my understanding that you can read 4 characters (4 bytes) with an EUD condition. So, yes.

Quote from Alerek
And I realise that anykind of action with a players name condition causes a desync.
This isn't true. The game will desynchronize if two players receive packets that conflict with what their clients think is going on. Any data that is not shared between the players can be acted upon with a condition that reads SC in memory.
Okay, so say I wanted to use something like this, I heard people talking about desyncing people from your maps with a text, so would this only apply to players who the triggers are actually running for, say there is players 1-4, and player 3 gets something that sets off a condition that would cause a desync, would that make player 3 drop from the game? And everyone else would be fine?
Text display is not shared information. If player 3 fires a trigger with an EUD condition and one or more trigger actions are not shared, then player 3 will desync. I created a map-drop trigger to kick players if you are interested. Basically in a few of my maps, if the host shoots your egg you drop from the game instantly.



None.

Jul 11 2011, 10:41 pm Alerek Post #12



Quote from CecilSunkure
Quote from Alerek
Quote from CecilSunkure
Quote from Alerek
Thank you everyone for your help, now I have gotten a trigger to work when I am in the map with my name, but how would I add more triggers for different names? Like would I just keep going down with the -11570,-11569,-11568,-11567,-11566
for every 4 letters of names I want to add?
It's my understanding that you can read 4 characters (4 bytes) with an EUD condition. So, yes.

Quote from Alerek
And I realise that anykind of action with a players name condition causes a desync.
This isn't true. The game will desynchronize if two players receive packets that conflict with what their clients think is going on. Any data that is not shared between the players can be acted upon with a condition that reads SC in memory.
Okay, so say I wanted to use something like this, I heard people talking about desyncing people from your maps with a text, so would this only apply to players who the triggers are actually running for, say there is players 1-4, and player 3 gets something that sets off a condition that would cause a desync, would that make player 3 drop from the game? And everyone else would be fine?
Text display is not shared information. If player 3 fires a trigger with an EUD condition and one or more trigger actions are not shared, then player 3 will desync. I created a map-drop trigger to kick players if you are interested. Basically in a few of my maps, if the host shoots your egg you drop from the game instantly.
Sure i'd like to take a look, is there a list of things that are shared and not shared somewhere?



None.

Jul 11 2011, 11:20 pm CecilSunkure Post #13



Quote from Alerek
Quote from CecilSunkure
Quote from Alerek
Quote from CecilSunkure
Quote from Alerek
Thank you everyone for your help, now I have gotten a trigger to work when I am in the map with my name, but how would I add more triggers for different names? Like would I just keep going down with the -11570,-11569,-11568,-11567,-11566
for every 4 letters of names I want to add?
It's my understanding that you can read 4 characters (4 bytes) with an EUD condition. So, yes.

Quote from Alerek
And I realise that anykind of action with a players name condition causes a desync.
This isn't true. The game will desynchronize if two players receive packets that conflict with what their clients think is going on. Any data that is not shared between the players can be acted upon with a condition that reads SC in memory.
Okay, so say I wanted to use something like this, I heard people talking about desyncing people from your maps with a text, so would this only apply to players who the triggers are actually running for, say there is players 1-4, and player 3 gets something that sets off a condition that would cause a desync, would that make player 3 drop from the game? And everyone else would be fine?
Text display is not shared information. If player 3 fires a trigger with an EUD condition and one or more trigger actions are not shared, then player 3 will desync. I created a map-drop trigger to kick players if you are interested. Basically in a few of my maps, if the host shoots your egg you drop from the game instantly.
Sure i'd like to take a look, is there a list of things that are shared and not shared somewhere?
Don't have file access till I get home, but I was using an idea I got from farty to use screen position to cause a desynchronization.



None.

Jul 11 2011, 11:28 pm O)FaRTy1billion[MM] Post #14

👻 👾 👽 💪

You can usually tell just by looking if a value will desync or not based on what it does:
Things that are direct game elements (timers, unit data, image data, etc.) will not cause desyncs if acted upon.
Things that seem to only have 1 value (meaning they are not an array of values for each player) and are not direct game elements (game timers), or are referred to by 'player' or 'current player' in their names (such as current player selection, player minerals, player name, etc.) will generally cause desyncs if acted upon.

There is no list (that I'm aware of) directly saying if they are client-only or shared, but I'm sure if you have any specific ones in mind somebody would be able to tell you. Also this might be of some use.


If you don't want it to desync or want to read another player's name, you can read from this table.
More Info




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!

Jul 12 2011, 12:09 am Alerek Post #15



Thanks so much Farty, I got a trigger to work perfectly that would create an endless amount of units, over bnet with a friend of mine, if it was my name and I went to a location on a test map to see if it would desync.
I have also successfully detected multiple player names, but I do have a question.
Do you know how I could detect just part of a players name? Like a clan tag?
Say I wanted my trigger to do something when someone with the "WA-" tag is in the game.

-Also maybe you should add that player list to that tables description?

Post has been edited 3 time(s), last time on Jul 12 2011, 12:36 am by Alerek.



None.

Jul 12 2011, 12:48 am Roy Post #16

An artist's depiction of an Extended Unit Death

Characters are read in groups of 4 characters (in reverse order; I'm assuming you read the tutorial on calculating the values of strings). If you wanted anyone with a WA- tag to be able to trigger the event, you would want to use a range between the lowest value and highest value of strings starting with WA-.

This would safely be between 556613975 (WA-!) and 2116895063 (WA-~). So you would have two conditions, one with "at least 556613975," and one with "at most 2116895063."

I chose the exclamation point and tilde because they have a very low character map value and very high character map value respectively. This should work for any name that starts with WA- and has at least 4 characters (Actually, if someone just had the name "WA-" it would work, too, because "WA-:" is in the range specified).




Jul 12 2011, 1:22 am Alerek Post #17



Okay, thanks for the help Roy, but I can't seem to get it to work, this is the trigger I have atm ;

Quote
//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Bring("Current Player", "Terran Marine", "Test", At least, 1);
// The beginning part of the name (first 3 bytes +W
Memory(4294955745, Exactly, 1462644270);
// since i think it had to be always 4 characters I made it A-!!
Memory(4294955746, At least, 555822401);
// since i think it had to be always 4 characters I made it A-~~
Memory(4294955746, At most, 2122198337);

Actions:
Display Text Message(Always Display, "Game Over.");
Defeat();
Preserve Trigger();
}

//-----------------------------------------------------------------//
But it doesn't seem to work? :/



None.

Jul 12 2011, 1:55 am O)FaRTy1billion[MM] Post #18

👻 👾 👽 💪

That's because the way he specified works the other way around ... you can use it to ignore the lower bytes, not higher ones (why in my previous example you have to know the exact values of the bytes and can't just ignore them with at least/at most).

You could go for every reasonable combination of 'WA-??', otherwise I'm not sure.



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!

Jul 12 2011, 1:58 am Alerek Post #19



I see, thanks for the correction there Farty, I guess I'll just have to manually put those kind of names for specific people then, thanks.

Now I have one other question that might be easy or hard I don't really know, I'm trying to detect the selection of certain pre-placed units from a certain player.

Say I wanted to detect when player 1 selects a specific "Flag" unit and then do a trigger for it.

Post has been edited 4 time(s), last time on Jul 12 2011, 2:16 am by Alerek.



None.

Jul 12 2011, 2:12 am O)FaRTy1billion[MM] Post #20

👻 👾 👽 💪

There are a bunch of these for each player here.
You'll have to find the address of the unit for the value of the condition ... I believe it can be calculated, but I usually just play the map and select the unit and look up the value of the selection.



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!

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:18 pm]
Vrael -- who says I'm not a total madman?
[02:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Please log in to shout.


Members Online: Vrael, Oh_Man