Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Using EUDs to change a tech setting for a player
Using EUDs to change a tech setting for a player
Nov 21 2015, 8:11 am
By: Zoko-TkZ  

Nov 21 2015, 8:11 am Zoko-TkZ Post #1

I'm trying to figure this one out on my own but I've never used euds before, so it might take me a while, and if anyone feels generous enough to explain it to me it would be much appreciated. What I want to do is disable the stimpack tech for a player which is enabled by default, based on a certain condition which may or may not come up. Yeah thats pretty much it.


Nov 21 2015, 8:31 am Lanthanide Post #2

This will require writing to memory, which is only possible with older versions of SC, or using the EUD Enabler (all players must use this when playing the game, so not good for random pub games). There are some newer methods of writing to memory that still work with the latest versions of SC, but I understand them to be fairly limited in scope, so I wouldn't be surprised if there is no way to write to this area of memory; I'm sure someone with more knowledge in this area will be along soon to confirm.

In the meantime, one approach that might work for you, is to swap out the players units. You can make Stim Pack 'enabled' but not 'researched' by default. Then, the Jim Raynor marine will have stim pack, and regular marines will not. You could therefore start the player with a Jim Raynor marine, and when your conditions are met, replace it with a regular Marine. Obviously the nature of your map will dictate whether this is a feasible solution or not, but it should be considered (since it's a lot more straightforward than EUDs in any form).


Nov 21 2015, 2:25 pm jjf28 Post #3

Cartography Artisan

I think un-researching stim problem requires dEUPs (you may be able to find a simple unit with EUP calc, but I don't brute those anymore).

Attached is a map un-researching stim, I do NOT recommend dEUPs unless the changes you make are very important or central to the map as they have a number of trade offs (crashes macs, requires you keep track of unit indexes when editing the map, +map size).

This is one of 11 ways you could write the trigger to disable stim (after setting up dEUPs), you can also give to player 3-12 to adjust what the side effects are.

Trigger("Player 1"){
    Elapsed Time(At least, 5); // Replace with your condition(s)

    Set Deaths("Player 4", "Terran Marine", Set To, 6552836);
    Set Deaths("Player 2", "Terran Vulture", Set To, 918);
    Set Deaths("Player 8", "Terran Ghost", Set To, 0);
    Give Units to Player("Player 1", "Player 2", "Terran Command Center", All, "Anywhere");

Stim Unresearch.scx
Hits: 1 Size: 504.93kb

TheNitesWhoSay - Clan Aura - github

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

Nov 21 2015, 9:55 pm Zoko-TkZ Post #4

Thank you very much for the quick and detailed responses! It doesn't seem like it would have been possible to implement the EUP the way I was hoping to, but it was definitely interesting to look into it.

@Lanthanide, definitely a reasonable idea but in my case it wouldn't have worked since the marine is used for another unit. The regular marine, depending on the player's selection may or may not need to use stims. The hero marine for game purposes has different stats from the regular marine and should never have stims. My workaround comes down to splitting up the players that use the hero marine and the ones that use the regular one w/ stims. I was hoping to avoid limiting player options but it seems to be the best compromise.

@jjf28, very cool of you to provide the example! It wouldn't be compatible with my map since there is only 1 computer player and player 1 is not always present, not to mention the instability that comes with setting up the EUP. Could I ask you though, what exactly is being done with the give action for the command center, at the end of the trigger?


Nov 21 2015, 10:04 pm jjf28 Post #5

Cartography Artisan

When a command center is given the addon it points to is also given, using alotta stuff I adjusted the pointer to the addon so StarCraft thinks it's in the death table ('the setup for dEUPs'). StarCraft looks up the UnitId (Terran Vulture) and the Owner (Terran Ghost) of the addon and adjusts the counters for the appropriate unit, since the UnitId is higher than StarCraft expects this overflows and adjusts stim packs research state.

Le Math:

Post has been edited 1 time(s), last time on Nov 21 2015, 10:58 pm by jjf28.

TheNitesWhoSay - Clan Aura - github

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

Nov 23 2015, 3:21 pm staxx Post #6

Why not do it in reverse. The hero marine automatically has stim and range researched where as the regular marine doesnt.
You can adjust the stats for damage and health in the map editor to whatever you want it to be.

*Edit- added map to show

rine test.scm
Hits: 0 Size: 51.47kb

Post has been edited 1 time(s), last time on Nov 23 2015, 3:39 pm by staxx.


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:37 pm]
GGmano -- maybe its not about the size i guess since its now above 6000 and was saved
[09:05 pm]
GGmano -- just seems like 6000kb is an obstacle not sure
[09:05 pm]
GGmano -- idk it could also be about the map size its like above 6k kb map wont be saved,, 6000kb of triggers no sounds im aware sounds can go beyond that size
[08:51 pm]
GGmano -- heres link for the new release
[08:51 pm]
GGmano -- i now released it after deleting triggers 3 times sadly
[08:50 pm]
GGmano -- 100k i think
[03:39 pm]
Oh_Man -- how many trigs u got?
[2022-7-02. : 9:34 am]
GGmano -- there must be a limit for one player on triggers but also a max trigger in total i think
[2022-7-02. : 9:33 am]
GGmano -- after deleting alot og triggers i now have to reduce it even more
[2022-7-02. : 9:33 am]
GGmano -- damn my file still too big but it doesnt crash only gives message that it cant save to disk,, freaking sad that i wanted to do more stuff but im limited here
Please log in to shout.

Members Online: jun3hong