Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Local player EUD's without desync?
Local player EUD's without desync?
Aug 12 2018, 6:48 pm
By: MTiger156  

Aug 12 2018, 6:48 pm MTiger156 Post #1

Veteran Mapper

After scrolling though some Korean SC:R gameplay videos, I found that one of the maps had a jaw-dropping discovery.
https://www.youtube.com/watch?v=iemLoSWXxyA
It seems they have made a tetris map that is controlled entirely by EUD key-presses. This is strange because experiments done by me and Cool-Knight confirmed that such a thing is impossible in multiplayer (Local player EUD conditions cannot successfully trigger global actions).
I have managed to find and download the map that was shown, and will make it available here. If y'all got any ideas on how they pulled this off, I really want to know.
(Translated map name: "Little Tetris b51")

Attachments:
Little Tetris b51.scx
Hits: 6 Size: 373.52kb




Aug 13 2018, 12:44 am iDoodler Post #2



Quote from MTiger156
After scrolling though some Korean SC:R gameplay videos, I found that one of the maps had a jaw-dropping discovery.
https://www.youtube.com/watch?v=iemLoSWXxyA
It seems they have made a tetris map that is controlled entirely by EUD key-presses. This is strange because experiments done by me and Cool-Knight confirmed that such a thing is impossible in multiplayer (Local player EUD conditions cannot successfully trigger global actions).
I have managed to find and download the map that was shown, and will make it available here. If y'all got any ideas on how they pulled this off, I really want to know.
(Translated map name: "Little Tetris b51")

Set Death/Set Score/Set Switch are actually local actions. In conjunction with another trigger, these values can be used to apply a global action. However, you will have to do some testing as to not cause desyncs. I haven't personally used this, but I know its possible.[/quote][/quote][/quote]



Noob Map Maker

Aug 13 2018, 12:57 am Roy Post #3

An artist's depiction of an Extended Unit Death

Quote from iDoodler
Set Death/Set Score/Set Switch are actually local actions. In conjunction with another trigger, these values can be used to apply a global action. However, you will have to do some testing as to not cause desyncs. I haven't personally used this, but I know its possible.
This is only partially correct. Setting a death on a local state is just fine, but you can't use it in conjunction with another trigger to perform a global action, because the condition(s) would only be met for the player that locally set the death, which would cause the desynchronization.

So even with that level of indirection, key press detection would normally cause a desync on a global action.

From the Shoutbox:
Quote from jjf28
first couple triggers are setting up the location table then changing the string section pointer - likely launching (emulated) executable code
Quote from jjf28
you'll notice that you get APM for every key press - the map is either setting it up so that your keypresses are mapped to some action (e.g. invis buttons) or emulating a unit order
These sound like plausible scenarios. Either the author found a way to execute arbitrary code (which is what Blizzard has been trying to prevent), or they discovered a different way to detect key presses (possibly a detection method that was introduced when Blizzard implemented APM features; is APM broadcasted to other clients, and with key values? That doesn't seem likely, but you never know).

Someone would have to take a deeper dive into the map and examine exactly what EUDs are being used.




Aug 13 2018, 5:47 am Cool-Knight Post #4



Well I did manage to open the map. (I also managed to get info, this is all made by: EUD Editor v2.)
Here is all of the map Triggers.

http://cool-knight.eu.org/MapTriggers.txt

Good luck decoding this. lol.



I make StarCraft BroodWar Maps! Servers I'm On: USEast/USWest!

You can also find me at. My Website! My Akas: SHANE-009

Follows and obey SEN Rules: The Rules.

Aug 13 2018, 4:23 pm rockz Post #5

ᴄʜᴇᴇsᴇ ɪᴛ!

There are 2 conditions present:
Memory 13
Memory 15388

http://farty1billion.dyndns.org/EUDdb/?pg=entry&id=408

It appears it's pointing to the string section. Clearly the map is done almost entirely in EUD and EUD actions, as there are no create triggers, not that you could make perfect squares like that with create anyway. I believe there are zerglings that are being modified to look like cubes.



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

Aug 18 2018, 7:46 pm MTiger156 Post #6

Veteran Mapper

The pylon, photon cannon, and zerg eggs that appear beside each board must be playing a role in the EUDs. While browsing around the Korean "EUD Editor 2" I found a list of functions in the "TriggerEditor" page. Some noteworthy names include: COrderUnit, AddStatusFlags, RemoveStatusFlags, MorphLarva, TrainUnit, BuildDrone, BuildProbe, BuildSCV.
The functions used in the map are possibly morphing/training. These require a "UnitPTR" followed by a "unit to create". Perhaps by knowing the index of the pylon/cannon/eggs, a keypress could send a train/morph order to these units, thus fires off some other trigger with the desired actions.
The "Unit Order Emulation" theory is more plausible with this evidence.

Edit: There are also some EUD/EPD actions of note in the editor.
-ChangeStarText: Change any string in the game data
-ChatWrite: EUD "display text message" with an additional "line #" parameter [cannot get it to work yet]
-ChatAnnouncement: Unknown Displays white text at center screen (where notifications about minerals/gas/supply are put)
-Display/Make CText: Unknkown, may have similarities with ChatWrite, also has a "keep chatting" paramenter (Unknown)

I will eventually experiment with ChatWrite. This may be how the maker kept the game-controls text permanently at the top line.

Post has been edited 3 time(s), last time on Aug 18 2018, 8:49 pm by MTiger156.




Aug 18 2018, 11:10 pm LoveLess Post #7

Let me show you how to hump without making love.

Like I could see detecting orders or selection being used here. You can fully detect right clicks, which is as close to key detection as we will get outside editing the command cards. Like rightclicking on the eggs to determine rotation, direction, then fall/speed up.

Though as the mouse doesnt move, I suspect it's just command card editing of some kind... Which it cant be, because no units are selected...



None.

Aug 21 2018, 5:54 am Arta(M) Post #8

wut's tis

The map is made by 우마 (EDAC).
epScript Source code: https://github.com/b10li/starcraft_USM_Tetris/tree/master/src

Related BWAPI resource: https://github.com/bwapi/bwapi/blob/master/bwapi/BWAPI/Source/BWAPI/GameCommands.cpp

You can make anything desync to sync via QueueGameCommand.
(Discovered by trgk, first tool NQC by PPS, I'm maintainer of MurakamiShiinaQC, euddraft plugin featuring desync to sync and working in SC:R)
MurakamiShiinaQC is included in EUD Editor 2, plugins menu, so anyone can use it easily without understanding how it works.

Simple explanation

Initialization
Create (invisible air) unit(s) to each players and save *CUnit address alphaID.

Send process
①Save previous selection to memory.
②Select (invisible air) unit.
③Send RightClick to wanted coordinates. (Say if you press Q, add 2**0 to X, if you press W, add 2**1, ...)
④Select previous selection.

Receive process
①Read (invisible air) unit's move waypoint. If it isn't initial value, subtract coordinate and add player's deaths(sync).
②Set unit's waypoint to init value.

Post has been edited 3 time(s), last time on Aug 21 2018, 6:16 am by Arta(M).



maintaining euddraft and eudplib.
Armo#6637 at Discord :teehee:

Aug 21 2018, 11:40 pm iDoodler Post #9



Quote from MTiger156
Edit: There are also some EUD/EPD actions of note in the editor.
-ChangeStarText: Change any string in the game data
-ChatWrite: EUD "display text message" with an additional "line #" parameter [cannot get it to work yet]
-ChatAnnouncement: Unknown Displays white text at center screen (where notifications about minerals/gas/supply are put)
-Display/Make CText: Unknkown, may have similarities with ChatWrite, also has a "keep chatting" paramenter (Unknown)

Keep chatting iirc will use the text lines starting at the top that won't get 'pushed up' due to normal chat messages, unlike display text.



Noob Map Maker

Jan 31 2019, 5:17 pm Oh_Man Post #10

Find Me On Discord (Brood War UMS Community & Staredit Network)

Quote from MTiger156
Edit: There are also some EUD/EPD actions of note in the editor.
-ChangeStarText: Change any string in the game data
-ChatWrite: EUD "display text message" with an additional "line #" parameter [cannot get it to work yet]
-ChatAnnouncement: Unknown Displays white text at center screen (where notifications about minerals/gas/supply are put)
-Display/Make CText: Unknkown, may have similarities with ChatWrite, also has a "keep chatting" paramenter (Unknown)

I will eventually experiment with ChatWrite. This may be how the maker kept the game-controls text permanently at the top line.

Check out my tutorial here: http://www.staredit.net/topic/17735/




Feb 3 2019, 10:13 pm Roy Post #11

An artist's depiction of an Extended Unit Death

It's likely that the key press detection was using the MurakamiShiinaQC plugin for EUD Editor 2. I was recently informed about this and was asked to post a guide on how to replicate it here: [EUD] Multiplayer Key Press Detection.

As for how it works: black magic. It seems to somehow be pushing the DC data in sync with the game's turn rate, so the death counter is syncing across clients, making it stable for changing game state.

Post has been edited 1 time(s), last time on Feb 3 2019, 10:19 pm by Roy.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:18 pm]
Voyager7456 -- u
[04:42 am]
RdeRenato -- aaaaaa
[03:37 am]
KrayZee -- Sort of
[01:51 am]
KrayZee -- Finally Twitter is enforcing their policies...
[2020-5-26. : 8:08 pm]
NudeRaider -- entitlement
[2020-5-26. : 6:20 pm]
Zoan -- bah I visit again after like 3 months and all I get is a 0 box? screw this, see you all next year
[2020-5-25. : 4:12 pm]
lil-Inferno -- ya
[2020-5-25. : 5:32 am]
Ultraviolet -- :teach: *
[2020-5-25. : 5:32 am]
Ultraviolet -- lil-Inferno
lil-Inferno shouted: ya, if the person I found is actually him lmao
creep :prof:
[2020-5-24. : 10:31 pm]
lil-Inferno -- ya, if the person I found is actually him lmao
Please log in to shout.


Members Online: Roy, MidNighTime, Excalibur, RdeRenato