Preserve Random Seed?

MacAllen

Chieftain
Joined
Dec 9, 2001
Messages
22
I tried this in the tech support forum, but being that it's not broken it likely belongs here...

Is there a way to stop it from preserving the random seed on each load? Got this nice map, hut right near my city, save the game, hit the hut, and it's barbarians and they wipe me out. Oh, but I saved! Load, hut...barbarians. 10 out of 10.

My mechanized infantry comes up against a set of pikemen, no way it can lose...bad luck, mechs are wiped out. Reload...wiped out again, blow for blow identically. Obviously the seed is preserved. In the older versions, that was a setting I could turn off, but I can't find it anywhere.

Checked the .ini, all the .xml's, and the registry...can't find it anywhere. Anyone seen it or know where it is?

Thanks,
Mac
 
Preserving the random seed is good for you. It's called cheating otherwise and what fun is that?
 
I always turned off the 'Preserve Random Seed' in Civ3... but since the 'Spearman beats Tank' chance is so much less in Civ4, I don't miss the option.. I guess Firaxis decided we don't need the option any more, and I guess they're right!
 
Hopefully, you could wait for the SDK and implement it yourself.

Personally I don't care about the random seeding, I agree that it removes cheating, and while the mech's shoudl defeat the pikemen easily, !@#$ happens, but hopefully not too often.

At any rate, I'm very curious to see what kind of power we'll have with the scripting, SDK, and modding in general. If all goes well, we can change AI and presumably the random seed.
 
cursif said:
Preserving the random seed is good for you. It's called cheating otherwise and what fun is that?
When you are very first learning the game, it's an opportunity to try out various ways of handling a situation. If you can't just try out 3 or 4 options, you'll never know what could have been a better choice.

After learning a bit about Civ3, I used preserve random seed, but I found it a helpful learning tool at first to try different things.
 
Why take out the seed to "stop cheating", but include cheat codes?
 
MacAllen said:
Why take out the seed to "stop cheating", but include cheat codes?

Good question. Maybe they took it out based on feedback.
 
MacAllen said:
I tried this in the tech support forum, but being that it's not broken it likely belongs here...

Is there a way to stop it from preserving the random seed on each load? Got this nice map, hut right near my city, save the game, hit the hut, and it's barbarians and they wipe me out. Oh, but I saved! Load, hut...barbarians. 10 out of 10.

My mechanized infantry comes up against a set of pikemen, no way it can lose...bad luck, mechs are wiped out. Reload...wiped out again, blow for blow identically. Obviously the seed is preserved. In the older versions, that was a setting I could turn off, but I can't find it anywhere.

Checked the .ini, all the .xml's, and the registry...can't find it anywhere. Anyone seen it or know where it is?

Thanks,
Mac

All players share the same seed so if you wait a turn or two someone else might use up that sucky roll in combat or on a goody hut and you get a new and better one instead.
 
I agree with the "learning what's possible" argument but don't buy the cheating argument. Cheating or "creative difficulty adjustment" is easier than ever. Just pop into world builder, do what you want, and back to the game. Loose a battle you don't want, reload and remove the unit; bad goody hut; reload, remove goody hut, add a new one close by.
 
Uh, if you don't do the same moves everytime the huts change prizes...

Just walk into the hut at another turn, another angle...
 
One way to get around preserved seeds is to do things in a different order. So you mech infantry wipes, if you reload kill something else first then try mech inf again. Not sure if this works, but it used to.

I will be happy if it doesnt because sometimes it is too tempting to play perfect games.
 
ytsejam02 said:
Good question. Maybe they took it out based on feedback.


They took out the seed to prevent cheating... left in the "cheat" option because once its used your saved game is marked as such. No sweat if you dont care and are just "learning" as we all have.
 
What's the beef with random seed and multiplayer maps? I played 2 games on tiny continents, both time the maps where IDENTICAL! What the hell is that crap? Mind you the hosts were different for each game :/ One of the civs was different the other was the same and the civ that was the same started in the same spot.
 
Would someone explain this concept to me? I can understand what its means I just need clarification. I had switched it back and forth when I played Civ 3 and never noticed anything(I didn't really know what i was supposed to be looking for).
Thanks.
 
:scan: *cheating alert* :scan:

You can also load the auto saved game from several turns back and build a few units instead of that wonder/city improvement :p


My understanding of Preserve random seed is that random number generator generate a random number base on a seed number. If the seed number is the same every time then the random number generator would always generate the same number. So if you preserve that random seed, then the outcome will always be the same. Random number generators aren't truely random, it really just mimics randomness with some mathematical formula. At least that's what i think it is.
 
I may be wrong, but I seem to remember seeing a random seed value somewhere in the ini file. Perhaps if you changed that prior to loading the game (insert some number there), you would get a different result. However, even if you can change the seed doesn't mean that you'll necessarily get a different result. You'd just have a CHANCE for a different result.
 
The random numbers generated are sequential, so if you reload and do other things that require using a random roll you can change the outcome. For example you walk onto a hut, reload before you walk onto the hut you attack with a different unit somewhere else. The random number that was going to be used to roll for the hut reward is used instead on the combat. This is just an example, Im not sure when the hut rewards are rolled, they could be rolled at beging of the game or can be modified by something else.

On a side note if you walk into a hut with a scout you shouldnt get any barbarians.
 
mrlaze said:
Would someone explain this concept to me? I can understand what its means I just need clarification. I had switched it back and forth when I played Civ 3 and never noticed anything(I didn't really know what i was supposed to be looking for).
Thanks.

Deterministic computers are incapable of generating truly random numbers - instead they use an algorithm that generates a very long sequence of numbers that looks random enough for most purposes (pseudo-random). The current random number is somehow related to the last (and maybe more). The first value fed into this algorithm is called the 'seed' and the sequence will be identical if this seed is reused. Therefore most programs reseed the random number generator with a value at startup, often taken from a clock source, to start with a new sequence however for testing/bug-finding it can be handy to use the same sequence of 'random' numbers each time.

When a game is saved, the 'seed' or more likely the last random number used is saved with it. When the game is reloaded, the value is restored and the sequence is continued. Therefore the same event will result in the same outcome. The way to avoid this is to do something else before the event you are concerned about - such as trigger a battle somewhere else. It depends on how the sequences are implemented. If there is a distinct sequence for every unit on the map, then it will be harder to advance the sequence before the conflict. Usually there's just one sequence shared by all 'random' processes but if the developers are directly targeting this sort of 'cheat' then there are ways to make it harder to subvert.

If you knew where and how the value was stored in the savegame, you could probably change it. I'm sure this would be a direct violation of the DMCA but who cares?
 
Back
Top Bottom