Colonial Conquest

Talk about everything related to general reverse engineering of computer games!

Moderator: Kroah

Colonial Conquest

Postby Monty » 24 Jun 2007, 23:10

hi kroah,
i see that you're about to give colonial conquest a special treatment. as far as i understand the whole thing you will be able to change internal game settings in the end.

if that's true, for me a lifelong dream would become reality!

some friends and me are playing the game since the 90s and it's still great fun, but we always wanted to have a version where every major country has the same starting situation (exept the unchangable geographical advantages).

that means every major country should have:

- the same offense and defense factor (army and navy)
- the same costs for army and navy (e.g. 300.000$ for army and 500.000$ for navy)
- the same initial amount of troups
- the same financial value of the countries which belong to the major countries at the beginning of the game (problem: their financial value is randomly determined)
- the same amount of supply centres (2 for everyone)

plus:
- actions should take place simultaneously, not following the strictly fixed order (England - Germany - France - USA - Japan - Russia). or maybe the order should be changeable depending on the actual victory points ranking.
- bug removement: while some bugs are likeable and contribute to the charm of the game, there are others that are not that great like the changing of your army into negative numbers when they go above 30 billions or something like that.


i don't know if all that or even some of it is possible to do (i don't even know if that's the aim of your project), but it would be highly appreciated!

greetz,
monty
Monty
CoCoNet Beta Tester
 
Posts: 70
Joined: 24 Jun 2007, 23:03

Postby Kroah » 25 Jun 2007, 10:37

Welcome to the board Monty!

You know, some coincidences happen and i can't explain it. Last week i've just begun working again on Colonial Conquest to do a special revival project (i can't say more for now, but it's very promising). I've almost finished the Alternate Reality section, but i want to have a break to have a better vision on it.

Colonial Conquest is a very controversing game for me. I've played a lot on Atari 800 XL and ST. What i can say, is that the game is different on some points, but i wasn't able to determin what exactly. Most of the time, it was very difficult to take an enemy territory, even with millions men. So i decompiled the Atari ST version, and found numerous bugs. Not only the one concerning overflow, but big ones in AI and especially in combat resolution. I was tracking the last for a year, but without having a reference good code, i can't determin what should be the correct code... and yesterday, i found how to resolve this big bug. Here's the story...

The bug was the following: France attacks with 5.000.000 men a german fortified territory having 30.000 men (5000 against 30). And even with 50.000.000 men, the France couldn't win it and loses up to 1.000.000 men (10.000.000 in the second case). The german having... 12 men killed. Wow, not very realistic...

I checked several times my decompiled code, but it was correct and i understood why it is bugged, the code has some non-senses in it and is illogical at some points. It doesn't use correctly the offensive and defensive value, nor the terrain malus, etc... but what was the correct code? I knew how to correct the bug, but i wanted the exact code the author wanted to have. So i checked the two other versions: the french v1.1 and the english v1.0 during last week. After several nights of decompilation... i saw... nothing different for this bug between the versions. The three have this big bug.

So i remembered playing on Atari 800 XL without having thoses losses of millions men when attacking, nor having big difficulties to take an enemy territory. So i begun decompiling this version two days ago. And... and... i found it! The code is meaningful and logical. The result is correct and a major can't lose a battle of 10.000.000 men against 100.000 with 1.000.000 losses. This version is consequently really bloody as hell! Now England is very powerfull and Russia not always win!

Even if the code is mostly identical between the versions, I think the port on other platforms induces thoses bugs. So i'll check the other bugs i found on Atari ST (in AI) taking the 800XL as reference.

Now your questions:

some friends and me are playing the game since the 90s and it's still great fun, but we always wanted to have a version where every major country has the same starting situation (exept the unchangable geographical advantages).

This was something i wished too several years ago. And yes, it's part of my project. Both types are interesting: one with unique major (with advantage and disadvantage), one with identical majors where everyone begin with same advantage.

- actions should take place simultaneously, not following the strictly fixed order (England - Germany - France - USA - Japan - Russia). or maybe the order should be changeable depending on the actual victory points ranking.

This one is only possible for the second type of game because the balance of the game takes into account England play first as advantage.

If you want more infos on the battle bug or something else, i'll explain it:)

Have a good day,
Pascal
Kroah
Site Admin
 
Posts: 412
Joined: 07 Feb 2006, 01:01
Location: France

Postby Monty » 25 Jun 2007, 17:23

thanks for welcoming me and for posting these interesting news, kroah.

of course i would like to learn everything concerning the internal rules of battle, if you don't mind giving away the secrets you found :wink:

for example it's of interest how big the random factor is in battles and in which form the defensive factor of an attacked country is taken into account.

the battle bug: yes, it has been a mystery for many years and the base for the creation of lovely legends. i remember defending fukien with japan against a friend playing usa. i had only a handful of men left while he attacked it on and on with billions but was inable to capture it. since then fukien has some sort of cult-status for us and is used as another word for impossible things :wink:

another advantage is that you are able to defend a minor country with 40.000 men against cpu-russia attacking it with 2 billions (or at least having 2 billions in the attacking country). if i would move 1 billion men into the attacked country maybe 800.000 would be lost, but with only 40.000 in it i can limit the loss to 35.000 in every round.

so this bug can be helpful, but of course japan would not need it if it has the same initial power as usa.

i don't know if it's the same bug, but i discovered that it's almost impossible to kill a (cpu-played) major country if its last resort is an island. i remember having japan (with its initial island) and russia (only having ireland occupied) left and it was impossible to capture ireland. russia's army on it was constantly rising (10 billions and more) and it has no effect to attack it (only for me losing many ships and army). japan was just the same.
the solution is always to let them conquer one of your countries on the mainland. then they seem to ship all their troups to that country (how many ships do they have??) and the island can be taken. then, with enough army, it's no problem to capture their mainland-country.

it would be interesting to know how the cpu's ressource management is implemented. i'm sure the cpu is cheating. not only that it can build troups in every season in every country (not only the supply centres), it also seems to have a constantly flowing amount of money, even if it only has one country left (or is it saving money in the "good times"?). plus, as described above, the cpu seems to have as much navy as wanted.
can you confirm that?

Kroah wrote:
some friends and me are playing the game since the 90s and it's still great fun, but we always wanted to have a version where every major country has the same starting situation (exept the unchangable geographical advantages).

This was something i wished too several years ago. And yes, it's part of my project. Both types are interesting: one with unique major (with advantage and disadvantage), one with identical majors where everyone begin with same advantage.

this is fantastic news!

cheers,
monty
Monty
CoCoNet Beta Tester
 
Posts: 70
Joined: 24 Jun 2007, 23:03

Postby Monty » 05 Sep 2007, 04:04

wow, time's passing quickly these days. more than 2 months gone since the last post :shock:
so, are there any progresses concerning colonial conquest, kroah, or have you switched to another game meanwhile?
i'm just curious.

peace,
monty
Monty
CoCoNet Beta Tester
 
Posts: 70
Joined: 24 Jun 2007, 23:03

Postby Kroah » 11 Sep 2007, 00:32

Hi Monty, glad to read you! Nice to see someone interested for news :)

Monty wrote:wow, time's passing quickly these days. more than 2 months gone since the last post :shock:

I'm currently in vacation and spending my time in Ireland. It has been a long time since i took a brake. I've just discovered a sport i've never seen before: the Hurling. It's enjoying, especially when girls are playing ;)
Dublin, Galway, Cliff of moher, Gap of Dunloe, Connemara... all these places are worth discovering, while drinking a pinte of Guiness, it's good for you! :)

So, are there any progresses concerning colonial conquest, kroah, or have you switched to another game meanwhile?
i'm just curious.

Before travelling in Irland, i was working on Colonial Conquest. I don't think being able to give something playable soon, i want to finish AR and mule section first. But to give you an idea, i've done a demo where players can connect as spectators (via TCP/IP) and watch AI playing. The next step will be to add the interface to let human players give orders.

Have a nice day
Kroah
Site Admin
 
Posts: 412
Joined: 07 Feb 2006, 01:01
Location: France

Postby Monty » 11 Sep 2007, 15:25

Kroah wrote:But to give you an idea, i've done a demo where players can connect as spectators (via TCP/IP) and watch AI playing. The next step will be to add the interface to let human players give orders.

haha, internet colonial conquest, cool! 8)
but: isn't it possible then for everyone to watch the moves of each other? this should be prevented.
we used to install a bottomless cardboard-box in front of the monitor while making our moves. so nobody of the non-active players was able to take a quick glance at the screen "by accident"...:D
Kroah wrote:I don't think being able to give something playable soon, i want to finish AR and mule section first.

well, no problem. one thing after the other. after 20 years of waiting (without hope) for the dream-version, time is not a big factor...
it's still a miracle for me that someone cares about this game at all...

so, enjoy your hollyday, kroah, and come back full of power (and guinness)...

cheers,
monty
Monty
CoCoNet Beta Tester
 
Posts: 70
Joined: 24 Jun 2007, 23:03

Postby Kroah » 12 Sep 2007, 17:34

Monty wrote:haha, internet colonial conquest, cool! 8)
but: isn't it possible then for everyone to watch the moves of each other? this should be prevented.

It's like the original game with some additions to help taking orders (visual hints, ...). So players don't see moves, armies, navies of others players. Only the spectators see all the informations of the board.

Because of the bugs in the AI and rules of the Atari ST version, i've took the core of the Atari 800 XL. The battles are much more bloody than the ST (and is like it should be on ST).
For now, i've done an improved AI by keeping the existing behavior and enhancing some key elements. It looks pretty good, the AI plays smooth and is consistent (from my point of view ;)). But i still have some lag problems over internet during battles (works great on LAN).

As you seem really interesested by CoCo (the alias i used when playing with my brother some years ago) and knows well the game, i'll contact you to do some beta tests if you want (in some months... :P).

See you soon,
Pascal
Kroah
Site Admin
 
Posts: 412
Joined: 07 Feb 2006, 01:01
Location: France

Postby Monty » 13 Sep 2007, 17:41

Kroah wrote:...i'll contact you to do some beta tests if you want...

sure. if i can help i would love to do that :D

cya,
monty
Monty
CoCoNet Beta Tester
 
Posts: 70
Joined: 24 Jun 2007, 23:03

Postby Kroah » 15 Sep 2007, 00:05

Monty,

I've just seen i haven't answered you two months ago. So here it is (better late than never ;)):

Monty wrote:for example it's of interest how big the random factor is in battles and in which form the defensive factor of an attacked country is taken into account.

For now, i prefer keeping this mystery. It would spoil too much. But i can give the following hints:
- the defensive factor has no effect for the attacker
- the attacking factor has no effect for the defender
- a random number [0;3] is added to the corresponding factor of each fighting side
- the terrain value is added to the attacking factor
- a fortification decreases by one the defending factor
- the higher a factor, the weaker the side (and the lower, the stronger).
- a strong army has less deads and retreat less easily, a weak one has more deads and retreat more easily.
- when attacking by navy, the navy combat is first resolved until the defending navy is eliminated or retreated, then the army combat begins. If attacking a different zone and the combat is not won, all the remaining army are lost. When losing navy, the army in excess is lost.
- owning a zone gives up to $11.900.000

it would be interesting to know how the cpu's ressource management is implemented. i'm sure the cpu is cheating. not only that it can build troups in every season in every country (not only the supply centres), it also seems to have a constantly flowing amount of money, even if it only has one country left (or is it saving money in the "good times"?). plus, as described above, the cpu seems to have as much navy as wanted.
can you confirm that?

Firstly, yes, the computer cheats:
- each level gives $15.000.000 bonus at the beginning of the game
- each level gives $2.000.000 bonus each year (but the first year)
- the computer can build the first year
- each fortification costs $500.000
- each army bought gives 150.000 men instead of 100.000
- each navy bought gives 8.000 boats instead of 5.000

The computer doesn't cheat for this:
- He can't build elsewhere than in his capital
- He can't build at non-building turn
- His army isn't stronger

So we can say the computer only cheats for $$. The game becomes really hard beyond level 7.

One remark concerning combat when 2 majors attack the same area: if one of the 2 majors conquers the area, the second major attack order isn't cancelled and the fight takes place against the newly conquered major (even if graphically, the new area owner isn't visible). So both majors are in war. If one of the major is a computer, he considers this like an attack to one of his area. I think this is the sole bad rule of the game... so by helping a computer, if you attack the same enemy area, you will be in war with your 'friend' most of the case if the area is conquered (but never if the area isn't conquered of course).

Kroah
Last edited by Kroah on 19 Sep 2007, 13:22, edited 1 time in total.
Kroah
Site Admin
 
Posts: 412
Joined: 07 Feb 2006, 01:01
Location: France

Postby Monty » 18 Sep 2007, 10:00

Haha! Thanks, Kroah, this is very interesting! :D
Kroah wrote:- a fortification decreases by one the defending factor

So the power of a fortified country isn't exactly doubled like it's being told? (or, if lower is better, the defending factor should be halved, not decreased by one, shouldn't it?)

And generally about what you wrote: Is this Atari ST-reality, or is this just theory, like it SHOULD BE (and IS on Atari XL), but ISN'T on Atari ST, due to bugs?

Kroah wrote:Firstly, yes, the computer cheats:
- each level gives $15.000.000 bonus at the beginning of the game
- each level gives $2.000.000 bonus each year (but the first year)
- the computer can build the first year
- each fortification costs $500.000
- each army bought gives 150.000 men instead of 100.000
- each navy bought gives 8.000 boats instead of 5.000
:shock: :twisted:
Kroah wrote:The computer doesn't cheat for this:
- He can't build elsewhere than in his capital
- He can't build at non-building turn

But this seems to be massively masked by bugs.
Well, what the spies are telling me isn't totally precise, but if I attack a 1000-men-country with 1 billion and do not beat it, then the only explanantion (apart from the mechanism being buggy) is that new army has been build there (if no other country is left for the cpu to ship army from).

Also, the constant rise of army on "last-resort-islands" led me to the assumption that the cpu could build army in non-factory countries, but this also seems to be based on a bug.

Do you know if the cpu is always investing all it's money or does it store some bucks for the bad times?

Cheers & keep on your great work,
Monty
Monty
CoCoNet Beta Tester
 
Posts: 70
Joined: 24 Jun 2007, 23:03

Postby Kroah » 19 Sep 2007, 13:21

Monty wrote:Haha! Thanks, Kroah, this is very interesting! :D
Kroah wrote:- a fortification decreases by one the defending factor

So the power of a fortified country isn't exactly doubled like it's being told? (or, if lower is better, the defending factor should be halved, not decreased by one, shouldn't it?)

"- the higher a factor, the weaker the side (and the lower, the stronger)."
I've not detailed here how the factor is used, but you're right: the factor determins the effective power of the army like this:
power = army / 2^factor
Don't ask me how the power is used, i want to keep some mysteries ;)

Monty wrote:And generally about what you wrote: Is this Atari ST-reality, or is this just theory, like it SHOULD BE (and IS on Atari XL), but ISN'T on Atari ST, due to bugs?

Beside the big bug described below, the whole game remains the same. So everything in my previous post concerns both versions (including the current bugged atari ST one).

Monty wrote:
Kroah wrote:The computer doesn't cheat for this:
- He can't build elsewhere than in his capital
- He can't build at non-building turn

But this seems to be massively masked by bugs.

Yes, it does.

Monty wrote:Well, what the spies are telling me isn't totally precise, but if I attack a 1000-men-country with 1 billion and do not beat it, then the only explanantion (apart from the mechanism being buggy) is that new army has been build there (if no other country is left for the cpu to ship army from).

It's the bug. I've a saved game somewhere showing this, i'll try to find it.

Monty wrote:Also, the constant rise of army on "last-resort-islands" led me to the assumption that the cpu could build army in non-factory countries, but this also seems to be based on a bug.

Actually, i haven't find something (or a bug) in the code letting the AI builds everywhere (or something similar). I may miss something of course. If someone send me a saved game showing this, i'll have a look.

Monty wrote:Do you know if the cpu is always investing all it's money or does it store some bucks for the bad times?

The AI spends all his money, but since he earns lot more according to his level, even without a lot of countries, he can always build a nice army.

A little explanation about the bug in the core battle code:
Everyone whom has played on Atari ST has seen that sometimes it's incredibly difficult to take an enemy country. In addition, the attacker loses a lot of men.

A really simplified *good* algorithm doing 1 round of battle is the following:
Code: Select all
A has X men remaining
B has Y men remaining
nbMenPlayedForA = 0
nbMenPlayedForB = 0
nbMenForA = X
nbMenForB = Y
roundDoneForA = false
roundDoneForB = false

// loop on each man for each side
- do

  // while all men haven't played for A
  if nbMenPlayedForA <= nbMenForA
    nbMenPlayedForA ++
    According to its factor, kill a man of B (Y --) (*)
  else // all the men of A have played
    roundDoneForA = true
  end-if

  // while all men haven't played for B
  if nbMenPlayedForB <= nbMenForB
    nbMenPlayedForB ++
    According to its factor, kill a man of A (X --) (*)
  else // all the men of B have played
    roundDoneForB = true
  end-if

// until all men of both sides have played
- until roundDoneForA = true AND roundDoneForB = true

BUT in the real Atari ST version (i've checked 3 distinct versions, french one included), they've swapped the line (*) and (**). In this case, each side kills its own men... Since the factors are swapped too, the result *may* give the good result (if both sides have the same number of men).

For the same number of men with FactorA = 3 (strong), FactorB = 6 (weak):
Good: A does lot of damage to B (strong factor), B does few damage to of A (weak factor) -> B is dead
With bad algo, it gives:
Bad: A does few damage to A (weak factor), B does lot of damage to B (strong factor) -> B is dead

As you can see, the result *could* give the same result.

BUT, if one side has lot more men than the other, the result differs (number of men are not swapped):
Let A having 10000 men and B 100:
Good: A does lot of damage to B (strong factor) * 10000, B does few damage to A (weak factor) * 100 -> B is crushed, A near no damage
Bad: A does few damage to A (weak factor) * 10000, B does lot of damage to B (strong factor) * 100 -> A receives lot more damage, B receives a lot less damage -> country not conquered

That's why when attacking 10000 armies versus 100, the attacker takes 2000 kills and the defender ~30 AND the country isn't conquered.
Some others elements, like the retreat factor, change the outcome and let the game playable. But the Atari 800 (and maybe the C64) is still the reference witouht bug.

Pascal
Kroah
Site Admin
 
Posts: 412
Joined: 07 Feb 2006, 01:01
Location: France

Postby Monty » 19 Sep 2007, 15:05

Ah, thanks for your detailed explanation, Pascal, it's highly appreciated!
Now even I was able to understand the bug (I think).

I wonder why they (obviously) use another (correct) battle system if a major fights against a minor country, as the bug seems not to happen there?

Kroah wrote:
Monty wrote:Also, the constant rise of army on "last-resort-islands" led me to the assumption that the cpu could build army in non-factory countries, but this also seems to be based on a bug.

Actually, i haven't find something (or a bug) in the code letting the AI builds everywhere (or something similar). I may miss something of course. If someone send me a saved game showing this, i'll have a look.

Well, this someone has to be me I guess :wink:
I will look if I have such a save-game or otherwise I will try to make one (may take a while).

So, please inform me when you return from AR and MULE to CoCo-development, then I will ask more questions :wink:

All the best,
Monty
Monty
CoCoNet Beta Tester
 
Posts: 70
Joined: 24 Jun 2007, 23:03

Postby Kroah » 19 Sep 2007, 17:02

Monty wrote:I wonder why they (obviously) use another (correct) battle system if a major fights against a minor country, as the bug seems not to happen there?

It seems not to happen there. But it does. Most of the neutral countries haven't enough armies and they retreat before the end of battle. But neutral ones with >100 armies (only a few at standard scenario) are partially concerned by the bug (most haven't an enough high factor).

Monty wrote:
Kroah wrote:
Monty wrote:Also, the constant rise of army on "last-resort-islands" led me to the assumption that the cpu could build army in non-factory countries, but this also seems to be based on a bug.
Actually, i haven't find something (or a bug) in the code letting the AI builds everywhere (or something similar). I may miss something of course. If someone send me a saved game showing this, i'll have a look.
Well, this someone has to be me I guess :wink:
I will look if I have such a save-game or otherwise I will try to make one (may take a while).

I think it will be hard to reproduce easily. It will be easier to play a game 4-5 years and manually remove countries of 1 major, leaving only few non-capitals.

Monty wrote:So, please inform me when you return from AR and MULE to CoCo-development, then I will ask more questions :wink:

I'm always more or less on Coco, depending of the time i have the evening. And for now, i haven't enough time to work on AR (need at least 2h a day).

Cheers,
Pascal
Kroah
Site Admin
 
Posts: 412
Joined: 07 Feb 2006, 01:01
Location: France

Postby Monty » 10 Dec 2007, 02:48

I'm still there! (just to make that clear :D)
Didn't make any progresses concerning that savegame, maybe during the christmas holidays...
Cheers,
Monty
Monty
CoCoNet Beta Tester
 
Posts: 70
Joined: 24 Jun 2007, 23:03

Postby Kroah » 10 Dec 2007, 22:30

Hi Monty!

I'm still there too ;)
Even if i don't give any news, i'm currently working on the savegame feature and the AI. If you (or the others readers) are looking for a good challenge, without an cheating AI (too much), stay ready! I really enjoy playing against it.

Because i'm glad to see you here, here's 2 big screenshots of my WIP (I've no idea when it will be finished).

Cheers,
Pascal
Attachments
Preview 2 - Spectator.png
Spectators can see all majors moves.
Preview 2 - Spectator.png (88.95 KiB) Viewed 5630 times
Preview 1 - InGame.png
Me (USA) conquering the world !
Preview 1 - InGame.png (72.9 KiB) Viewed 5630 times
Kroah
Site Admin
 
Posts: 412
Joined: 07 Feb 2006, 01:01
Location: France

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests