• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

"Seed numbers"

kingbob

Chieftain
Joined
Mar 16, 2002
Messages
2
Location
Indiana
I've seen lot's of people mention these, but I'm not quite sure what these numbers do. I'm sure you've answered this before, but I searched this board andcouldn't find it. Could somebody please give me the lowdown on what these "Seed number" things do?

Thanks
King Bob
 
I'm sure some of this is wrong, but should give you a general idea.

Inside the program (you can't see it, to know what's going on), the computer randomly generates numbers (a number from 1 to 1032, or something) each turn. This number called a "seed" is used to determine battle outcomes and any other random events.

So if one of your units is attacking an enemy, the computer will figure out what your chances of victory is (based on unit's strengths, terrain, etc.) and assign a number to it. If the seed or "die roll" is higher than the number that was picked for victory, your unit wins. If lower your unit loses, for example. Or the other way around, where the lower numbers are better, I'm not sure.

In current versions of the game, this 'seed' is selected BEFORE the save. So if you reloaded the game, and moved the exact same units, in the exact same sequence, the results would be the same. But it sounds like in 1.21f, you could reload and get a different seed, so the results may be different.
 
Good try Bamspeedy, but not exactly correct.

A seed is used to generate a random number. Unlike us humans when we want a random number and are playing a board game or the like and roll a dice, the computer can't do this. Instead it uses a mathematical formula to calculate a "random" number. However in order to get a number out the other end you have to give it something to work with. This is where the seed number comes in. The seed is inputted into the function and a new number is then spit out the other end. This random number is then used for whatever the code calls for, but it is also used as the next seed for the random number generator.

Now on setting that first seed, you have to use some semi-random method. Most programs the system clock to provide that initial seed for the random number generator when the program is first loaded. Normally the generator will not be reseeded again while the program is run.

Now Civ3, at least till this next patch, worked a bit different than normal. What it did was every time you saved your game, the value of the current seed was also saved with your game. Hence when you reloaded the game the same sequence of random numbers would always be generated, since the same start value was used for the functions. What this patch does is that it allows the game to not reseed the generator with the saved seed, but to instead continue on with the current sequence when a saved game is loaded.

The actual mechanics of the algorithms used in the random number generators are far beyound me. However, I hope this answers your question.
 
Back
Top Bottom