True randomness in WC3

vilaemail

New Member
Reaction score
1
Hi, my question is pretty simple:

How truly WC3 random function is "random"? How many seeds game can have? Do seeds change every time i call function (based by time or something)?

I ask this because I am making a card map, and I don't want to have same deals over and over again. If game initializes random at map start (using a seed eg. from 1 to 2^16) then every 2^16 game would (in theory) have EXACTLY the same cards dealt. That's not nice, plus if someone would "crack" the random function he/she/it would have complete knowledge of all coming hands.

So, is random function seed affected only on map start (or even game start?), or every time I call that function? And how many seeds random function accepts? I believe this questions are more of game engine questions than World Editor, but heck if you know share it with me :cool:
Only reason I am posting here is because, a lot of people who visit this forum use World Editor a lot, and maybe have some knowledge about this issue.

Thanks for any help.

Sincerely,
Filip.
 

Sjaakje

New Member
Reaction score
9
Every function calls a total random seed.
In test maps, however, this is not the case unless you uncheck "Use Fixed Random Seed" in preferences.
 

Azylaminaz

Vox Populi
Reaction score
91
I believe the first instance of the seed is set at the beginning of the game (probably based on time), and thus goes on from there.

You do realize 2^16 is 65536? Do you honestly think your map will be played that many times? And if it is, do you think someone will create a bot to log every possible instance? And then from there, you must realize even if the same initialized seed is used, the end result will ultimately be factored by the actions in the game... unless the game is 100% not based on how the game is played and such.

In short, your game will not be 'cracked' and no one will try to find every possible setup. It would be easier to break into your map and just add cheats the classic way.
 

vilaemail

New Member
Reaction score
1
I believe the first instance of the seed is set at the beginning of the game (probably based on time), and thus goes on from there.

You do realize 2^16 is 65536? Do you honestly think your map will be played that many times? And if it is, do you think someone will create a bot to log every possible instance? And then from there, you must realize even if the same initialized seed is used, the end result will ultimately be factored by the actions in the game... unless the game is 100% not based on how the game is played and such.

In short, your game will not be 'cracked' and no one will try to find every possible setup. It would be easier to break into your map and just add cheats the classic way.

I understand that, but then my game will have 65536 possibilities, and you must understand that there is 52! possibilities to deal a deck of cards, so that's 8.0658175170943878571660636856404e+67 (a lot of zeros). Just wanted to make more possibilities. Can I seed random function somehow?
 

vilaemail

New Member
Reaction score
1
MORE possibilities? Why? Do you have any idea how big of a number that is?

No, I don't please explain me. Please, of course i know, I am well educated. Because that way I can approach a number of 52!, because it isn't the same game when you are limited to 65k possibilities, in real life there is much more possibilities... But, I don't see you answered my question:

Can I seed random function somehow?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top