Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Randomization... always fun. :)
Randomization... always fun. :)
Jan 27 2008, 11:48 am
By: Pyro682  

Jan 27 2008, 11:48 am Pyro682 Post #1



Whats the best way to randomize what player gets a unit without using switches?



None.

Jan 27 2008, 3:35 pm NudeRaider Post #2

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

The easiest way is to fixate what every player gets: P1 -> Rine, P2 -> Goon, etc. and then randomize the start locations. Ofc that is, when you don't need it dynamically in the game.

Then make a temporary location (vision to, or not, you decide) where every trigger loop you first remove, then spawn a (or more) unit(s) depending on your switch combination.
The formula for how many outcomes the switches have is x = nē [n = # of switches], so make sure you have enough.

Then move the unit(s) to where you need them.




Jan 27 2008, 4:00 pm Falkoner Post #3



With hyper triggers, having a constant death count looping to the amount of outcomes, depending on how you need the randomization, will let you get a different outcome for each death, and even if the player is 1/12 of a second different from another player, they will get a different outcome.



None.

Jan 27 2008, 4:33 pm lil-Inferno Post #4

Just here for the pie

Quote from Falkoner
With hyper triggers, having a constant death count looping to the amount of outcomes, depending on how you need the randomization, will let you get a different outcome for each death, and even if the player is 1/12 of a second different from another player, they will get a different outcome.
Thats probably the most useful way, because with Random Start Locations, it isn't really effective if it is a PvE map. With the death counter system, 1/12 seconds of a difference isn't much.




Jan 27 2008, 5:09 pm 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

I also thought about this, but unless you have very few outcomes its partially predictable.




Jan 27 2008, 5:44 pm Falkoner Post #6



Yeah, but if you're only going to check for it about once every few minutes or so it works just fine, it only doesn't work if the player is doing it within seconds of the last one.

Oh, and my two tutorials on Death Counts and on Switches give good methods of randomization:

http://Falkoner.CoW.GooglePages.com/Tutorials.html



None.

Jan 27 2008, 8:18 pm y10k Post #7



He says without switches.

All Players :
Always
Add 1 death for DC

All players have at least 9 DC
Set DC to 1 for All

Player'x' : (x = 1 - 8)
All players have exactly 'x' DC
give unit to Current Player



None.

Jan 27 2008, 9:12 pm NudeRaider Post #8

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

Quote from y10k
He says without switches.
D'oh... I read the opposite... O.o

Quote from y10k
All Players :
Always
Add 1 death for DC

All players have at least 9 DC
Set DC to 1 for All

Player'x' : (x = 1 - 8)
All players have exactly 'x' DC
give unit to Current Player
What are you trying to do here? For whom is the DC incremented? All players or Current Player?

To make the DC counting method Falk suggested more random you could count 2 DCs.
For example DC1 from 0-4 and DC2 from 0-6.
And then create units for every possible combination:
DC1 = 0 & DC2 = 0 -> create Rine
DC1 = 0 & DC2 = 1 -> create Ling
... etc.

Another approach would be to use junkyard dog. I haven't thought this through to the end, but I can imagine the following:
Have all units that could be given junkyard dog in an isolated area.
Put a few small locations in there from where you teleport units that enter the small location to temporary locations (if they are free). This is your "random pool".
When you need a random unit check the first of the temorary location, if no unit is there, teleport from the 2nd location, etc.




Jan 27 2008, 9:24 pm y10k Post #9



I count a DC there and depending on the DC, the appropriate Player will get a unit.
Like DC is 1: Player 1 will get it, if it is 5: player 5 will get.
I use all players because it will make it player-independent, if it were like P3 if P3 leaves triggers wont work anymore. If there is a computer player just use it instead, it will never leave :)



None.

Jan 27 2008, 10:47 pm NudeRaider Post #10

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

oh shit... lol I think I have never misunderstood a topic that completely like this one... :-(

I thought he wanted to know how to give a random unit to a specific player. :><:
next time i should try to sleep more than 2 hours... :blush:




Jan 29 2008, 2:20 am Moose Post #11

meme

Place some critters in a box and have a location for each outcome that the critter can move to. You can also use a unit running the Junkyard Dog AI in place of a critter.




Jan 29 2008, 3:20 am Falkoner Post #12



Only problem with that is that it takes time, but if it's a predetermined outcome, time doesn't really matter.



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: l)ark_ssj9kevin