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



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.
[01:45 pm]
Pr0nogo -- hi
[01:41 pm]
neomirav -- Helloo...
[2019-7-21. : 11:21 am]
UEDCommander -- That worker hardcode shit is annoying
[2019-7-21. : 11:15 am]
UEDCommander -- I would like to point out that "successfully modded" and "done everything i want" are two big differences
[2019-7-21. : 5:46 am]
O)FaRTy1billion[MM] -- 🥝
[2019-7-21. : 4:47 am]
Pr0nogo -- kiwi
[2019-7-21. : 4:46 am]
A_of-s_t -- I think Corbo made it a mango at one point
[2019-7-21. : 4:46 am]
jjf28 -- what was it.. like... a peach originally?
[2019-7-21. : 4:46 am]
A_of-s_t -- lol :aofst: forgot about that one
[2019-7-21. : 4:45 am]
jjf28 -- :aofst:
Please log in to shout.


Members Online: Roy, C(a)HeK, jjf28, jun3hong, Suicidal Insanity, orexi