[comp.sources.games.bugs] conquer v4.5

reader@gec-mi-at.co.uk (Glenn Reader) (09/07/89)

I have found one bug and what looks like another, but I have not been able to
isolate this second one (not enough time).

The first causes conqrun to core dump on an arathmetic exception.
Easy to find.

In npc.c line 917 reads:-

Avg_soldiers[nation] = ntn[nation].tmil / total_sectors;

Total sectors is the number of sectors that the nation has armies in.
If the nation has been so reduced that it no longer has armies this is 0.
Result core dump.

I changed this to:-

if (total_sectors == 0) 
        Avg_soldiers[nation] = 0; 
else
        Avg_soldiers[nation] = ntn[nation].tmil / total_sectors;

I do not know the mail address of the authors so I cannot send them this
information. Could someone that knows please ensure it gets to them.

The second problem looks a lot more complex, and after a brief look i can
see why.
It manifests itself in the following way.

I attack a lot of an npc's sectors and take them.
If I then quit and then reenter the game I see a lot of error meesages.
These error messages also appear at the update.
For example.

ERROR: <edland> told to put 2188 civilians in sector 14,43 not owned - placed in capitol

On inspection 14,43 is a tokus city with about 2188 people in it.
The sector I took at 15,43 had about 50 edland people.
Result after the update instead of reducing edlands population
it went from about 55000 to over 70000.
THIS IS NOT FAIR.

Can anyone shed light on this? Are other games experiancing the same
problem.

Our game is on turn 58. It is so popular we have now run out of nations.
Hence no more revolts. I assume the number of nations is determined by
the database and I cannot just increase the number of nations and recompile.
It seems to be done with arrays. Can anyone answer this please?

I am going on Holiday tomorrow and will miss numourous updates.
I am not certain I still want to go.

I hope this is usfull and look forward to receiving any information.

Glenn

kus3@tank.uchicago.edu (Bob Kusumoto) (09/09/89)

From article <1989Sep7.090059.10743@gec-mi-at.co.uk>, by reader@gec-mi-at.co.uk (Glenn Reader):
> ERROR: <edland> told to put 2188 civilians in sector 14,43 not owned - placed in capitol
> 
> On inspection 14,43 is a tokus city with about 2188 people in it.
> The sector I took at 15,43 had about 50 edland people.
> Result after the update instead of reducing edlands population
> it went from about 55000 to over 70000.
> THIS IS NOT FAIR.

When I was playtesting the v4.0, this happened when I surrounded a sector
owned by an NPC and they tried to move people out to a different sector I
occupied.  The problem is how to make the computer move the people.  Since you
get to make all your moves before the update, and the computer only moves
during the update, you certainly have a slight advantage.  The computer just
says, error: moved those people to the capitol now that our orignal move
was void.  So how would you resolve this to make it fair to both the players
and the NPC.  Since the NPCs aren't as advanced as I certainly like them to
be, throwing them to the capitol isn't a bad idea.

There is a definate problem with the population increasing THAT much during
an update.  That's roughly a 30% increase.  Unless they demobolized a lot
of troops (unlikely unless they just got out of a war, or claimed another
elven country, or a different country with SLAVER powers), this should 
never have happened (should be at a population level around 60000 after
the update).  No answers to this one.

Then again, I haven't tested the code since it was put in comp.sources.games
so I'm not the best source of information either.

Hope this helps.

Bob
-- 
	Bob Kusumoto                     |   Turned enough to see his gun,
Internet: kus3@tank.uchicago.edu         |             I said,
BITNET:   kus3@tank.uchicago.bitnet      | "Let's go out and have some fun."
UUCP:    {gargoyle,oddjob}!tank!kus3     |   --- New Order, "Perfect Kiss"

kebera@alzabo.uucp (Krishna E. Bera) (09/13/89)

kus3@tank.uchicago.edu (Bob Kusumoto) writes:

>From article <1989Sep7.090059.10743@gec-mi-at.co.uk>, by reader@gec-mi-at.co.uk (Glenn Reader):
>> ERROR: <edland> told to put 2188 civilians in sector 14,43 not owned - placed in capitol
>> ...
>> Result after the update instead of reducing edlands population
>> it went from about 55000 to over 70000.
>> THIS IS NOT FAIR.

>When I was playtesting the v4.0, this happened when I surrounded a sector
>owned by an NPC and they tried to move people out to a different sector I
>occupied.  The problem is how to make the computer move the people.  Since you
>...
>Bob

I posted a fix for this problem to the conquer-news mailing list.
If Adam or Ed approve, it will be included in the next patch (#6?).

Cheers,
Krishna E. Bera
Apprentice Conqueror
-- 
Programmer on the loose
kebera@alzabo.UUCP
uunet!mnetor!dciem!nrcaer!cognos!alzabo!kebera