Soldiers +36 (*)
(following string contains a number, for example: +40) (**)
Braves +6 (***)
How do you think, what numbers mean? Listen the
(*) is attack value for random generator.
> Soldiers 2
Soldiers' strength is 2.
2 * K = 2 * 8 = 16
> Attack bonus +50%
16 * bonus1 = 16 * 1.5 = 24
> Spain bonus +50%
24 * bonus2 = 24 * 1.5 = 36
Attack = Strength * K * bonus1 * bonus2 *...
where K = 8
Attack = 2 * 8 * 1.5 * 1.5 = 36
As consequence, two bonuses +50% better than one +100%
(***) is defence value for random generator. Algorithm is the same.
> Braves 1
Braves' strength is 1.
1 * K = 1 * 8 = 8
> Village +50%
8 * bonus1 = 8 * 1.5 = 12
Attention! There's hidden *bonus* -50% if unit's strength is one and it
hasn't got rifles and its opponent has.
If you attack indian braves or foreign colonists
with your scout then braves or colonists won't get rifle_bonus -50%
Artillery vs. unarmed unit will cause appearance of rifle_bonus to unarmed
(****) is sum of (*) and (***)
Sum = Attack + Defence = 36 + 6 = 42
Next, number (**) is random value from 1 to Sum. Let's call it Result.
If 1 <= Result <= Attack then attack is successful
If Attack < Result <= Defence then attack isn't succesfull
So, if Result = +40 then our militia demote to colonists status. If Result =
+15 then our militia win the battle.
This combat system works for ships as well.
If you choose another level, governor or easer, you'll get some bonuses to
Governor: +1 to your final attack/defence
Conquistador: +2 to your final attack/defence
Easer levels will get you even bigger K while your opponents won't.
I run my DOS colonization version under winXP and I
have such a bug:
Result (**) in battles has to be RANDOM VALUE. Instead, this value is
increasing consecutive from battle to battle and resets when it reaches Sum.
For example, my militia attack braves and Result is +5. Result in next battle
of this turn will be +5, +6 or +7. Next - +6, +7, +8 or +9. And so on. So,
there'll be line of WONS and then line of LOSES. And this is explanation of
>Jun 18, 2004,
>I recently hauled out my DOS version of Colonization (version 3.0) and
>installed it on WinXP. Using compatibility mode
the game works pretty well...
>the sound doesn't work, but the game is very stable, so I can't complain.
>have run into a couple of bugs though, and I wondered if anyone else has
>1) Combat 'streak' bug - I still haven't figured out the specifics on
>I'm positive it exists. What happens is, during a given turn, you will
>every single battle (at least those that you initiate...I'm not sure
>battles the AI starts) *or* you will lose every single battle. I think
>on to the next turn 'resets' the streak, but a new win or loss streak
>start right up on the next turn. This bug is a gamebreaker
because after the
>first battle of any turn, you can predict the outcome of all other
>with 100% accuracy.
>I was curious if anybody else had noticed these bugs and/or if they know
>a way around them. Especially the combat streak bug. It makes the game
So, what do you think about it? Have you noticed this bug, or it depends on
I did it! Really, it was very interesting experience!
So, I know how to get rid of Random Generator Bug.
1. Open viceroy.exe in your hex-editor.
2. Find such bytes: A3 EE 28 C7 06
3. Replace A3 with 5D, and EE with CB, so you get 5D CB 28 C7 06
4. Bug was removed!
In some days I'll make more comfortable patch in order not to work with hex
editors but just run patch.exe
PS The problem of Random Generator Bug was caused by too frequent calling
randomize () that is syncronization of random seed
with current time counter (0040:006C). If calling of randomize function is
more frequent than time counter changes then random function returns almost
the same value.
1. I've attached patch to post.
2. Patch works for DOS and Win98 only.
3. To run patch under winXP launch "cmd"
process in directory where colonization is placed and then type
"start.bat". But sometimes the game freezes under winXP, so it's better to play under dos.
Can I ask how you figured this out? How did you know that
those hex values related to the random number function?
First, I knew how battles work using cheat mode. Then I found out that
results of battles depends on time, so 2 battles, fulfilled close to each
other, had the same result ("random" value). But if you wait some
seconds between battles last result will increase slightly. What does it
mean? The game often synchronize its random seed with timer (by function
randomize ()). But this's real bug because game
must call randomize just once. So, the task was to take syncronization
out from program code.
It's common known that DOS timer located at 40:6c
(long word). SoftICE allows to trace reading from given address (bpm 40:6c r)
and it wasn't problem to find out which instructions read timer. There was
something like that:
Random function (generate_random_value) returns "random" value
depending on random seed, and for 2 equal random seeds "random"
values will be equal as well. Let's skip this instructions!
A3 EE 28 C7 06 - these are bytes of original instructions.
5D CB 28 C7 06 - these are our overpatching.
Don't think I know this instruction's code by heart, I just used softICE's possibility to assemble code in assembler
language and then I wrote down obtained bytes.
But it wasn't end. Without randomize () the game worked better, but random
generator was bad anyway. So I decided to replace game's random generator by
There's one good program, ArtMoney, it allows to find
addresses in memory. I found address where battles result is written. Then I
wanted to determine which code instructions write to this address. Unpleasant
surprise - the address is part of program stack and too many different
instructions write to this address. To solve this problem I defined
breakpoint with such condition: writing to found address when ax is equal to
80h. 80h - attack value of attacking frigate. Then I attacked enemy frigate
with my frigate. Bingo! Breakpoint executed and I found battle procedure. I
checked it and found such instructions:
This's calling of function which takes two
arguments: 1 and ax. ax keeps (attack+defence)
value, so this function returns random value from 1 to ax.
Write own random generator's program and make it resident. Change instruction
to call your own random function. Go to drink beer
There was many indescribable problems and devastating situations, but aim was
Besides, I used cracked version of SoftICE. I know you don't like illegal
programs but I can't buy such kind of stuff every time I want to have fun.