Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Altering Unit Colors With EUDs Causes Desynchronization
Altering Unit Colors With EUDs Causes Desynchronization
Dec 1 2019, 6:52 am
By: TheSophomancer  

Dec 1 2019, 6:52 am TheSophomancer Post #1



Hey everyone,

I'm working on a defense map where a player's unit color changes depending on the main hero they select at the beginning of the game. Players choose heroes by mind-controlling the unit they wish to have, and then all of their units subsequently change color once mind control is cast. For example, if a player mind controls a dragoon hero, all of their units become blue. Also, just to clarify, I only want the player's unit color in-game to change, not the player's mini-map color (the map is team-based, so I want team 1's minimap color to always be red and team 2's minimap color always being blue, with the player's own units obviously showing up as green). The triggers for changing unit color that I'm currently using are simple and look like this:


Change Player Color to Blue
Players

  • Player 1
  • Conditions

  • Current player brings at least 1 (Dragoon hero) to anywhere
  • Actions

  • Modify memory at death table (string of important numbers that correlates with unit color that I looked up on Farty1billion's sweet database)



  • In single player (or when playing by myself online) these triggers work perfectly. Unfortunately, when I go online with other players desynchronization occurs and everyone gets dropped from the game. I've read up about EUDs (including Roy's extremely helpful topic here: http://www.staredit.net/topic/14226/#6) and understand that this has to do with local vs global addresses and actions, so I'm pretty sure that I'm being a n00b by using an unviable combination of local addresses and global actions. However, I'm pretty sure that what I'm trying to do is possible. Is there a way that I can configure my triggers to prevent desynchronization from occurring while achieving my desired effects? For example, if I make the trigger apply for all players instead of individual players, would that solve the issue?

    By the way, I'm aware that the EPD editor exists which can (theoretically) change player colors within the game. However, when I tried to do this with the EPD editor, I got an "invalid scenario file" error in Starcraft. Additionally, I would prefer to solve this issue using SCMDraft 2's regular trigger editor and the use of manual EUDs/memory modification, as I want more experience as to how global/local addresses/actions work and manual triggering in general.

    Thanks for checking out this topic, and any suggestions or advice regarding this issue would be most appreciated! ^-^



    Check out my maps! :)

    -:- Sorcerers II: http://www.staredit.net/sc1db/file/4512/
    -:- Siege Defense: http://www.staredit.net/sc1db/file/4380/

    Dec 1 2019, 8:18 am Zoan Post #2

    Math + Physics + StarCraft = Zoan

    Changing player color will not cause desyncronisation, as it is a local not a global address. global not a local address. (my bad on getting the terms backwards)

    What address are you changing and how are you changing it?

    Post has been edited 1 time(s), last time on Dec 2 2019, 1:22 am by Zoan.



    \:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

    Dec 1 2019, 9:30 pm TheSophomancer Post #3



    Quote from Zoan
    Changing player color will not cause desyncronisation, as it is a local not a global address.

    What address are you changing and how are you changing it?


    For my triggers, I'm using the unit color table addresses starting at 00581D76 (-8572). So for example, to change player 1's color to orange, I'm using this trigger:

    Change Player 1's Color to Orange
    Players

  • Player 1
  • Conditions

  • Player 1 brings at least 1 (Dark Archon) to anywhere
  • Actions

  • Modify memory at death table + -8572 (==0x00581D74): Set to 10223616




  • Check out my maps! :)

    -:- Sorcerers II: http://www.staredit.net/sc1db/file/4512/
    -:- Siege Defense: http://www.staredit.net/sc1db/file/4380/

    Dec 2 2019, 1:23 am Zoan Post #4

    Math + Physics + StarCraft = Zoan

    That should work and not cause any desyncs (that is actually exactly what I use too). Are there any other EUD triggers in your map?

    Edit: I have not tried this on the current patch though. Maybe the new patch screwed everything up, idk.



    \:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

    Dec 2 2019, 10:47 pm TheSophomancer Post #5



    Quote from Zoan
    That should work and not cause any desyncs (that is actually exactly what I use too). Are there any other EUD triggers in your map?

    Edit: I have not tried this on the current patch though. Maybe the new patch screwed everything up, idk.


    Aside from my color-changing triggers, the only EUDs currently in my map are basic graphical/button changes through EUD Editor 2, which shouldn't cause any issues (and didn't seem to cause any desync problems before I added in the color triggers.) As you mentioned, I'm wondering if a recent patch made color altering triggers not work anymore... do you happen to know of or have any maps containing color-changing triggers (that used to work previously) that I can try online to test this theory?



    Check out my maps! :)

    -:- Sorcerers II: http://www.staredit.net/sc1db/file/4512/
    -:- Siege Defense: http://www.staredit.net/sc1db/file/4380/

    Dec 3 2019, 3:08 am Zoan Post #6

    Math + Physics + StarCraft = Zoan

    Here, this worked before.

    Attachments:
    The Thing EUD Version 0.08.scx
    Hits: 2 Size: 1644.74kb



    \:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [09:02 pm]
    Corbo -- lmao
    [11:12 am]
    Roy -- I'm pretty sure the FTP protocol support broke at some point, so it's secure™.
    [2019-12-06. : 10:54 pm]
    NudeRaider -- better nudge him on discord
    [2019-12-06. : 10:35 pm]
    MTiger156 -- Devlin was last active in February, so its not like hes 100% dead. Hopefully my PM won't get buried by other peeps trying to contact him.
    [2019-12-06. : 9:04 pm]
    RIVE -- Big facts
    [2019-12-06. : 8:23 pm]
    Vrael -- just don't use the search box
    [2019-12-06. : 8:23 pm]
    Vrael -- SEN is as watertight as a frog's butt
    [2019-12-06. : 7:45 pm]
    Suicidal Insanity -- SEN? Secure? lawl never thought I'd see that
    [2019-12-06. : 6:32 pm]
    MTiger156 -- Been playing around with the API's i was able to dig up in the javascript. Seems there's more to it than just forcing parameter values. Security pretty tight up in here.
    [2019-12-06. : 5:57 pm]
    NudeRaider -- tbh thats the most likely way people got told it
    Please log in to shout.


    Members Online: Roy, Boedinges70, paolatmarquez