Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Replay Functions
Replay Functions
Apr 18 2011, 7:53 pm
By: jjf28  

Apr 18 2011, 7:53 pm jjf28 Post #1

Cartography Artisan

So i read some replay desync articles and got replays working properly for my map (yay) however everyones used to fastforwarding not working and I was wondering if their was a way to have messages that olny appear in the replay



(from my post futher down)




Sweet it works :D

So I found a EUD value that is consitant across many different maps, map types, amount of players in game, etc.

It was narrowed down to 3 values but what made me choose this one was that it was also true during highscores

Hex = 0115443B
4 Bytes

Value (Game) = 0
Value (Replay) = 1

For Memory triggers, Player # = 3090485
Value (Game) = exactly 0
Value (Replay) = exactly 16777216

Trigger
Players
  • All Players
  • Conditions
  • Memory at Death Table + 3090485 is exactly 16777216
  • Actions
  • Set 'Switch ReplayMode'.


  • Trigger
    Players
  • All Players
  • Conditions
  • 'Switch ReplayMode' is Set.
  • Actions
  • Display for current player: <0F><13>Welcome to the Replay!



  • Also gave me an intersting idea... what about a Replay Game?
    Would have to be EUD based and you have too run the map for a while without acctually performing actions to prep it each time (or edit the elapsed time memory value?), still, interesting with the ability to fastforward and everything :ermm:

    Post has been edited 2 time(s), last time on Apr 19 2011, 9:50 pm by jjf28.



    TheNitesWhoSay - Clan Aura - github

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

    Apr 19 2011, 12:18 am Roy Post #2

    An artist's depiction of an Extended Unit Death

    This is probably possible with EUDs, if possible at all. Have display text message triggers with an EUD condition detecting whether or not the map is a replay.

    If you don't know how to use EUDs, you can find a lot of resources here: http://www.staredit.net/topic/7993/




    Apr 19 2011, 12:57 am Dem0n Post #3

    ᕕ( ᐛ )ᕗ

    Quote from Roy
    This is probably possible with EUDs, if possible at all. Have display text message triggers with an EUD condition detecting whether or not the map is a replay.

    If you don't know how to use EUDs, you can find a lot of resources here: http://www.staredit.net/topic/7993/
    But the map's not actually being played, so it would'n't truly run the triggers when it's a replay. It would just use whatever happened when the game was played, right? So it wouldn't detect it being a replay, so when do you watch it, nothing would happen.




    Apr 19 2011, 1:43 am rockz Post #4

    ᴄʜᴇᴇsᴇ ɪᴛ!

    Quote from name:Dem0nS1ayer
    But the map's not actually being played, so it would'n't truly run the triggers when it's a replay. It would just use whatever happened when the game was played, right? So it wouldn't detect it being a replay, so when do you watch it, nothing would happen.
    That's not how starcraft and replays work. Replays are replicas of the game, complete with orders and such. Triggers are still run in the same way. If a condition is met, the trigger runs. The only difference is that in replays, client side only triggers will run and not desync, so you can make a mouse defense game multiplayer (though the other players won't see how well you do, since they won't run the triggers).



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

    Apr 19 2011, 9:34 am NudeRaider Post #5

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    There might be a way without EUDs using the bugs regarding desynching of replays. This hasn't been done before afaik, so I'm only theorizing.

    IIRC the 2 things that can get replays out of sync are randomized switches and waits (excluding hypers?). The latter looks more useful for a desynch detection.

    I don't know how exactly the mechanics for desynching with waits are but I'm gonna assume the wait durations are not halfed when you double the replay speed. So you could set up a trigger measuring the duration of a wait. When it deviates from the duration (8 trigger loops / death counters) that is to be expected at fastest speed (the speed that everyone uses on bnet) you know you're on a replay (or a dumb bnet player). :P

    Possible improvements:
    - Run the detection as a loop so you can even determine current replay speed. Can be used to adjust text display duration, if desired.
    - IIRC it always starts with lower-than-fastest speed and so you should be able to detect it in the first few trigger loops. But if NOT you could make an info text telling the replay watcher to change speed to activate annotations or something to that effect.

    Post has been edited 2 time(s), last time on Apr 19 2011, 9:39 am by NudeRaider.




    Apr 19 2011, 9:44 pm jjf28 Post #6

    Cartography Artisan

    Sweet it works :D

    So I found a EUD value that is consitant across many different maps, map types, amount of players in game, etc.

    It was narrowed down to 3 values but what made me choose this one was that it was also true during highscores

    Hex = 0115443B
    4 Bytes

    Value (Game) = 0
    Value (Replay) = 1

    For Memory triggers, Player # = 3090485
    Value (Game) = exactly 0
    Value (Replay) = exactly 16777216

    Trigger
    Players
  • All Players
  • Conditions
  • Memory at Death Table + 3090485 is exactly 16777216
  • Actions
  • Set 'Switch ReplayMode'.


  • Trigger
    Players
  • All Players
  • Conditions
  • 'Switch ReplayMode' is Set.
  • Actions
  • Display for current player: <0F><13>Welcome to the Replay!



  • Also gave me an intersting idea... what about a Replay Game?
    Would have to be EUD based and you have too run the map for a while without acctually performing actions to prep it each time (or edit the elapsed time memory value?), still, interesting with the ability to fastforward and everything :ermm:



    TheNitesWhoSay - Clan Aura - github

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

    Apr 19 2011, 11:24 pm Pr0nogo Post #7



    When fighting against the computer, I always tend to lose in the replays even if I won in the real game. This is in UMS matches, though.




    Apr 19 2011, 11:32 pm rockz Post #8

    ᴄʜᴇᴇsᴇ ɪᴛ!

    Quote from jjf28
    Also gave me an intersting idea... what about a Replay Game?
    Would have to be EUD based and you have too run the map for a while without acctually performing actions to prep it each time (or edit the elapsed time memory value?), still, interesting with the ability to fastforward and everything :ermm:
    You'll find that doing stuff is difficult, as you can only select stuff, you can't build anything, and you can't order anything around. As I said earlier, there is a mouse defense map which uses your mouse to locate units and when you touch them they blow up (or that's what I assume it does).



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

    Apr 19 2011, 11:37 pm jjf28 Post #9

    Cartography Artisan

    mm, certainly a difficult task... by the by, what's the memory location for key presses?



    TheNitesWhoSay - Clan Aura - github

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

    Apr 20 2011, 12:18 am Roy Post #10

    An artist's depiction of an Extended Unit Death

    http://www.staredit.net/topic/6416/




    Apr 20 2011, 9:04 am NudeRaider Post #11

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Ah yeah I remember that topic. I wonder why it wasn't included in our EUD link list in the pinned map making resources thread.
    Anyways, I added it now.




    Apr 20 2011, 8:54 pm FoxWolf1 Post #12



    Sounds like you are thinking of something like this map...it's playable in replays at any speed in single-player form (i.e. 1.0, not M), and can thus be made to go very, very fast...



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [2026-7-18. : 2:27 am]
    Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
    [2026-7-17. : 2:58 pm]
    Ultraviolet -- Symmetry
    Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
    fr fr
    [2026-7-17. : 2:39 am]
    Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
    [2026-7-16. : 6:28 am]
    NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
    [2026-7-16. : 6:26 am]
    NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
    [2026-7-16. : 6:25 am]
    NudeRaider -- Symmetry
    Symmetry shouted: Ohhh imagine a SC map that could delete itself
    not the map, the editor
    [2026-7-16. : 2:28 am]
    Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
    [2026-7-16. : 2:28 am]
    Symmetry -- Ohhh imagine a SC map that could delete itself
    [2026-7-15. : 8:51 pm]
    NudeRaider -- Symmetry
    Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
    yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
    [2026-7-15. : 4:10 am]
    Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
    Please log in to shout.


    Members Online: MarineElite