I WANT MY LEADER BACK! ...now what?

menelaus

Chieftain
Joined
Nov 20, 2001
Messages
19
I was playing Civ3 into the wee hours of the morning and, lo and behold! My elite unit created a leader! But, before I could save, a few unit moves later my computer bombed with a GPF with DirectSound. My leader was lost.... or was it?

I restarted from the beginning of the last turn and replayed my battle unit per unit resigned to my loss. Then I noticed that the sixth unit to attack got a promotion, about the same place in order that I moved my elite troop to get my leader. So, I loaded the turn back to the beginning, and made sure the sixth troop to attack was my elite unit. It won and I got back my leader!

Then I saved!!!

Later I noticed that in another battle, the second troop to attack in a turn got promoted. Out of curiosity, I reloaded the turn and made sure the second unit was an elite troop. BOOM! Leader. So, I guess counting promotions like this could also be a way for someone to cheat and get leaders... or to regain them after a GPF.

-Menelaus
"Knowing prevents Learning"
 
Ahhh. Finally, a way to truly exploit the 'random' number generator.
 
You're right about the facts of what happened, but your conclusion is wrong, i think. Counting promotions won't get you to predict when leaders will be created. I think that's still random.

But it does appear that each battle is somehow predetermined just before it happens. I don't know enough of how computer programs operate, but this 'quirk' does have a great benefit:

No more save/reload cheats!
 
Originally posted by goodbye_mr_bond

But it does appear that each battle is somehow predetermined just before it happens. I don't know enough of how computer programs operate, but this 'quirk' does have a great benefit:

No more save/reload cheats!

What you're saying would make sense. Essentially after each battle the computer does the dice roll for the next battle, in advance, and saves that factor. Only when the two units actually contact is that factor combined with the unit and terrain stats to actually determine the outcome.

This is speculation, and not fact.
 
"Random"???

A leader was created in a battle. Same turn that tile got attacked and the leader destroyed.

Another game a leader was created, but the game froze or crashed.

Both times I went back to AutoSave the turn before and recreated my moves and attacked. Although this time I protected the units attacking better (more musketmen) to preserve the leader.

What was interesting is that in boith recreated battles (from the AutoSave), the leaders WERE created again!!

Therefore, it CANNOT be merely a randomly generated luck factor at each battle that creates leaders.

WHAT'S UP WITH THAT?
 
All computer games (and even statistics programs) use pseudo-random number generator algorithms. This is how they roll the dice. Basically, what this means is that the algorthm generates a sequence of numbers which, over a certain period, appear random. Usually, the longer the period, the "better" the algorithm.

However, all of these algorithms use a seed to set the starting point. From that starting point, the algorithm is deterministic, generating the same sequence each time the same seed is used. Usually, the initial seed is set by some external random variable, such as the time of day. So, the only truly random part of the whole technique is the starting point. You never get the same game twice, because you can never start at exactly the same time.

What does this mean to you?

Apparently, in Civ2, a new seed was used each time the games was restarted. This gave the Save/restart exploit its usefulness: Restarting the game changed the results of the battles by using a different sequence of wins/losses.

In Civ3, if I have read correctly, the seed is saved with the game. If you restart a game, the sequence is restarted where you left off. If you do the same thing you did before, you will get the same results.

On the other hand, if you change your inputs (which units attack where, in what order), you can change the outcome. The random numbers will come in the same sequence, but you are using them for different calculations.

Example: In one of my first games, I was planting cities just within my border and culture rushing to expand my territory. Suddenly, my peaceful neighbor declares war and sends a crushing army my way. After several turns of getting destroyed, because I was completely unprepared, I noticed that the last city I had planted took over his only source of horses, or some other resource.

Since I was still learning and the game was going well before the war, I reloaded the autosave before that last city and put the city elsewhere. And, you guessed it, no war.

You cannot save/reload to retry the same tactic hoping for a different result. But you can use it to change your tactics.

The good news, as you pointed out, is you can recreate a part of the game after a crash. The bad news is you have to remember EXACTLY what you did from the last save up to the crash.

Sorry that was so long, I hop it helps.
 
Good post, mSage. I suspect the game generates a series of numbers ahead of the events that use them, and stores them in a buffer which is saved with the saved game. New numbers are generated periodically to replace those that are used. With this method the sequence of numbers is always the same (for a period of time).

You can take advantage of this using the save/reload method, but later in the game the reloads take too long and it's not much fun then.
 
It's interesting that not only combat is predetermined but leader generation.

BTW, this system isn't new. The game Colonization had the same way of picking "random" numbers.

For those who haven't figured it out, this system opens the door for a tedious exploit.

For example, that you have a stack of armies ready to take a city, say, 3 cavalry and 2 riflemen. You attack as normal, with all units. The cavalry all die without scratching the defender, but the first rifleman gets lucky and kills him while the second rifleman dies against the secondary defender. You could reload from before the battle, and this time attack first with the lucky rifleman, then attack with the cavalry. Say that the first cav dies without damaging the defender, the second takes him down to 2 hitpoints and retreats, and the third kills him. You reload again, attacking in this order: first rifleman, second cavalry, third cavalry.

It works, but isn't worth the hassle.
 
I see the point.

Once took over a barabarian village. I didn't like the crummy map I got.

So, I went to AutoSave (the AI cheats all the time so why not me too?) a few turns back and recreated the same moves. Same result.

But then, I went back and made different moves and waited an extra turn before occupying the village. DIFFERENT RESULT!
 
I suspect the game generates a series of numbers ahead of the events that use them, and stores them in a buffer which is saved with the saved game.

Allemand,

It isn't even that complex. The alogorithm "stores" the sequence, all you need to keep is the "seed" or last answer the algorithm produced. The point is the algorithm is not random. It only seems random.

The real kicker is that the mathematics behind a good algorithm are very complex, but the arithmetic can be rather simple. It may only take a few lines of code to "store" the series.

Of course, this brings up the next question: How good is the random number generator that Firaxis used?
 
I don't really see how the goodness of the random number generator would effect the game. All that using a good random number generator does effectivly means that you can't predict the next number it will produce (in any feasiable length of time). This is very important stastically, and is useful in random computaions, e.g. testing whether a number is prime. However even if the generator was a bad one it would be unlikely to have any noticable effect on the game.

Further for this to work the seed itself should be random, and a generator just produces a longer string. Now it might seem that taking the time of the day is random, however this is not so, and indeed it is still debated whether there is any truely random event in nature (although any that is not feasiably predictable would do for our purpose).

Finally, i would say that the game probably uses a bad generator, due to the complexity of the good generators.
 
Back
Top Bottom