Does anybody know how WC3 determines random numbers?
I'm kinda looking for the formula.
Also if you use the test map in worldeditor you'll have a fixed random number (unless you disable it)
Apparently the 'fixed seed' is 712 for random numbers between 1-1000.
Warcraft 3 Random Number Generator
Moderator: Cheaters
-
- Grammar King
- Posts: 2116
- Joined: June 22nd, 2008, 10:11 pm
- Title: Worst human for 4eva
- Location: Mostly USEast
Re: Warcraft 3 Random Number Generator
Are you talking about the function
GetRandomInt(x,y)? From what I can tell, it's random, but then, I've never really payed too much attention to it.
If you wanna test it, I have a map with a -roll function (and it's pretty fun, too!) that I can easily edit to roll between 1-1000 instead of 100.
GetRandomInt(x,y)? From what I can tell, it's random, but then, I've never really payed too much attention to it.
If you wanna test it, I have a map with a -roll function (and it's pretty fun, too!) that I can easily edit to roll between 1-1000 instead of 100.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.
Learn how to extract and read RAW Codes here!(23:44:12) Bartimaeus: I was in pubic school until middle school...
Need help? Click here and ask your question!
-
- Member
- Posts: 70
- Joined: April 14th, 2008, 1:01 am
Re: Warcraft 3 Random Number Generator
No, i don't mean a function (or atleast not your example).
I'm wondering how wc3 determines a random number.
Computers cannot give a random number, theres no physical way.
So to generate a random numbers a computer may take the milliseconds of the current time and preform several mathematical equations on it OR take the 7th decimial pt of the current CPU temperature and do some mathematical equations.
I am curious how WC3 comes up with its random numbers because i've seen similarities between games that have random stuff where the random things are similar when i play the games close in time.
I'm wondering how wc3 determines a random number.
Computers cannot give a random number, theres no physical way.
So to generate a random numbers a computer may take the milliseconds of the current time and preform several mathematical equations on it OR take the 7th decimial pt of the current CPU temperature and do some mathematical equations.
I am curious how WC3 comes up with its random numbers because i've seen similarities between games that have random stuff where the random things are similar when i play the games close in time.