Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: I have troubles with eud triggers
I have troubles with eud triggers
May 28 2011, 8:13 pm
By: iCCup.xboi209  

May 28 2011, 8:13 pm iCCup.xboi209 Post #1



Ok I am sooo new to eud triggers right now and went through some topics about eud triggers and I got my address but what do I do in EUDTrig?
What do I put for the unit id? Object ID? What's a memory offset?



None.

May 28 2011, 8:26 pm Roy Post #2

An artist's depiction of an Extended Unit Death

The memory offset is the address. Be sure to put 0x in front of it (assuming your address is in hexadecimal), i.e. If your address is 62F02D, enter "0x62F02D". You can leave the Object ID/Len blank. Then hit the down arrow and it will generate the value you need.

If you're using extended player deaths, use the Player Number for the memory trigger. i.e. if it gives you 22040, the condition would read:
Memory at +22040 is exactly x
Where x is the value of the address you want to read.

If you're not using EPDs, you will have a player number and a unit ID. Use the deaths condition to put in the correct player and "ID:XXXX" for the unit ID, where XXXX is the value of the unit ID. If the player is Player 10 and the unitID is 18623, the condition would read:
Player 10 has suffered exactly x deaths of UnitID:18623
Where x is the value of the address you want to read.

Note that you do not enter "UnitID:18623" but rather "ID:18623" in SCMDraft 2. After you enter the value, it will show it as "UnitID:18623"

Post has been edited 2 time(s), last time on May 28 2011, 8:31 pm by Roy.




May 28 2011, 8:34 pm iCCup.xboi209 Post #3



I got a player number of 0x1C835DDC

Post has been edited 1 time(s), last time on May 28 2011, 8:41 pm by xboi209.



None.

May 28 2011, 8:44 pm Roy Post #4

An artist's depiction of an Extended Unit Death

Go to options and uncheck "Output in Hex" to get a decimal value.




May 28 2011, 8:45 pm iCCup.xboi209 Post #5



ok thanks alot!



None.

May 28 2011, 8:57 pm Roy Post #6

An artist's depiction of an Extended Unit Death

Also, this may come up:

Depending on what character your memory address ends with, you'll have to multiply the value of the address in the condition to properly read it. Use this chart:

Code
0 1 2 3
4 5 6 7
8 9 A B
C D E F

If your address ends with a character from the first column (0, 4, 8, C), you do not need to multiply the value. (i.e. If you're looking for the value 10, you just enter 10)
If your address ends with a character from the second column (1, 5, 9, D), you need to check the range between X*256 and ((X+1)*256)-1. (i.e. If you're looking for the value 10, you should check between 10*256=2560 and ((10+1)*256)-1=2815)
If your address ends with a character from the third column (2, 6, A, E), you need to check the range between X*65536 and ((X+1)*65536)-1. (i.e. If you're looking for the value 10, you should check between 10*65536=655360 and ((10+1)*256)-1=720895)
If your address ends with a character from the fourth column (3, 7, B, F), you need to check the range between X*16777216 and ((X+1)*16777216)-1. (i.e. If you're looking for the value 10, you should check between 10*16777216=167772160 and ((10+1)*16777216)-1=184549375)

So say your memory address ends in a D (second column). You would have two conditions to check if the value of the address is 10:
Memory at +XXXXXXX is at least 2560
Memory at +XXXXXXX is at most 2815





May 28 2011, 9:06 pm iCCup.xboi209 Post #7



How do I get this mac compatible?



None.

May 28 2011, 10:54 pm Roy Post #8

An artist's depiction of an Extended Unit Death

Read this related discussion: http://www.staredit.net/topic/13834/

Basically, you need to have a mac computer to get the corresponding address, and then perform a check for which operating system is being used at the beginning of the game (i.e. Read a constant address and if the value represents what would be on a Mac, set a switch). Then you need to make one EUD trigger for a PC and one EUD for a Mac, adding a condition to each that verifies their operating system (i.e. If you set a switch for Mac players, you would want the PC EUD to have "Switch is Cleared" and the Mac EUD to have "Switch is Set").




May 28 2011, 11:22 pm iCCup.xboi209 Post #9



Can having an eud condition itself crash you no matter what you put for actions?



None.

May 28 2011, 11:52 pm Roy Post #10

An artist's depiction of an Extended Unit Death

I wish there was a post with an elaborate explanation on EUD synchronization, because this question (among several others) is asked frequently.
  • EUD conditions do not crash players; they can desynchronize the games, causing players to drop. The exception to this is EUD conditions that try to read an address that they can't read for whatever reason, which will crash all players as soon as the trigger is read (often at the very beginning of the map).
  • EUDs reading global memory (such as Unit HP) will not cause the game to lose synchronization regardless of the actions. The exception to this is PC and Mac users, as StarCraft's memory is allocated differently between the two operating systems.
  • EUDs reading local memory (such as Screen Position) and using local actions (such as Display Text) will not cause the game to lose synchronization, so no players will drop.
  • EUDs reading local memory (such as Screen Position) and using global actions (such as Create Unit) will cause the game to lose synchronization, so all players that the EUD ran for will desync from all players that the EUD did not execute for, essentially branching it into two separate games.

The solution to the Mac/PC exception is to create a coexisting EUD system that has the triggers written for both operating systems, and a conditional to check which operating system is being used by the current player.

What happens in Mac/PC games normally is the actions will only run for PC users, causing a desynchronization between the Mac players and the PC players. The PC players will split into one game, and the Mac Users will split into another game.

It would look like this for PC users:
MacUser1 has dropped from the game.
MacUser2 has dropped from the game.
PCUser1: what happened?
PCUser2: drophax?
PCUser3: No, obviously they used Macs, so the EUD didn't fire for them and they dropped.
PCUser2: lol macs suck

It would look like this for Mac users:
PCUser1 has dropped from the game.
PCUser2 has dropped from the game.
PCUser3 has dropped from the game.
MacUser1: Why did everyone drop?
MacUser2: omg stupid eud actions
MacUser2: u use a mac too?
MacUser1: Yeah
MacUser1: So EUDs caused them all to drop?
MacUser2: no, its more liek we droped from them cause their using pcs and the euds were made 4 them
MacUser1: Oh... so we need a PC to play this game?
MacUser2: wtf pc stupid pieces of crap dont get 1


I hope that makes sense.

The way to fix this issue is what I described two posts above this.




May 29 2011, 12:33 am iCCup.xboi209 Post #11



I thought majority wins so wouldn't that drop mac users and get them all seperated while pc users still connected? I did get a crash by using an eud condition because when I removed the eud trigger, the crash stopped



None.

May 29 2011, 3:31 am Roy Post #12

An artist's depiction of an Extended Unit Death

Quote from name:xboi209
I thought majority wins so wouldn't that drop mac users and get them all seperated while pc users still connected?
No, if you look at the example, all the Mac users drop from the PC users, but they are still in the game together. They drop because their game is different than the PC players' game, but they stay with each other because the Mac players' game is the same. It splits into two games.

I think you're thinking of this scenario:
EUDs reading local memory (such as Screen Position) and using global actions (such as Create Unit) will cause the game to lose synchronization, so all players that the EUD ran for will desync from all players that the EUD did not execute for, essentially branching it into two separate games.

What happens is one player will have the screen position, and the trigger will fire for him and create a unit. Since the trigger didn't run for the other players, this one player's game is different from all the others, so it splits into two games and drops the player from the other players.

If two players had the screen position in the right spot at the exact same time, then when they drop, they would be in the same game together because their games are still identical. The other players will see the two players drop, and the two players will see everyone except each other drop. They can still interact with each other and continue the game.

Also:
Quote from name:xboi209
I did get a crash by using an eud condition because when I removed the eud trigger, the crash stopped
Quote from Roy
EUD conditions do not crash players; they can desynchronize the games, causing players to drop. The exception to this is EUD conditions that try to read an address that they can't read for whatever reason, which will crash all players as soon as the trigger is read (often at the very beginning of the map).





May 29 2011, 3:17 pm iCCup.xboi209 Post #13



I'm actually trying to detect if drophack protection is injected into sc and enabled or not. I was testing it and 50% of the time it crashes me or it crashes the other person so is it possible that the game won't crash if both people has drophack protection loaded?



None.

May 29 2011, 6:51 pm Roy Post #14

An artist's depiction of an Extended Unit Death

No, I don't think that's currently possible. If an EUD is crashing the game, everyone will crash because the trigger is trying to read an invalid address. I doubt hacks have a check for SC crashing in this way, but hackers could probably implement it if need be. Your best shot would be to just desync/drop them from the non-hackers' game. If the game is crashing from the EUD, you have to find another address.




May 29 2011, 7:49 pm iCCup.xboi209 Post #15



Would it be possible for a hack to be loaded but every game, the address of the hack changes?



None.

May 29 2011, 7:56 pm Roy Post #16

An artist's depiction of an Extended Unit Death

Not dynamically; the hack would have to be re-injected with a random algo... it's easier to just say no, it's not possible.

I don't think you can read injected memory with EUDs without having SC crash. You'll have to find the addresses that are native to SC which are also affected by the hacks, and then you'll have to read those for any anti-hack measures. This is increasingly difficult as hack creators have been aware of this and are trying to prevent it from being possible.




May 29 2011, 9:00 pm iCCup.xboi209 Post #17



Thing is, it's drophack protection which isn't a negative hack so I don't see why the creator would try to prevent eud triggers to detect it. I simply want the game to say yes or no if it's on.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-5-31. : 2:36 pm]
Wing Zero -- Bop em
[2024-5-31. : 2:36 pm]
Wing Zero -- Mods
[2024-5-29. : 9:40 pm]
Ultraviolet -- :wob:
[2024-5-28. : 8:43 am]
TheHappy115 -- Yea, thats the issue. Thanks. It would also explain why my deleted map couldn't get updated. Updated version reduced collision on units (only thing added) since was dodging game (players collide with each other)
[2024-5-28. : 5:26 am]
Ultraviolet -- If so, I'd just focus on getting them on scmscx.com and then you can link to that in the showcase thread for your maps
[2024-5-28. : 5:25 am]
Ultraviolet -- I can't upload my EUD maps, I think the DLDB has some issue with handling them. Are you trying to upload EUD maps?
[2024-5-28. : 2:06 am]
TheHappy115 -- Its been awhile but ever since I requested one of the Maps I posted to be deleted since I couldn't delete it myself (or update it), I haven't been able to upload any more maps. Any reason for that?
[2024-5-26. : 7:14 pm]
Kyradax -- Hi
[2024-5-26. : 5:05 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-5-25. : 9:22 am]
Zycorax -- :wob:
Please log in to shout.


Members Online: jun3hong, Roy