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

We live in a society.

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.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: NudeRaider