This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new bug with supply of infantry upon creating


>If you play with the standard game, the first time an infantry is
>created it starts with 6 fuel and 0 ammo.  You need to hit "t" (take)
>to get it some ammo.  The town that created it has 500 fuel and 200
>ammo.
>
>This is new as of a week or two ago, I suspect. It is possible that I
>only noticed it now because before there weren't enemy towns adjacent
>to mine, but I'm guessing that I would have noticed.

To quote a software company we all know: "This is a feature, not a bug."
>From the ChangeLog:

	Make more intelligent decisions about whether or not to share
	materials with another unit.
	* actions.c (make_unit_complete): Comment out code that fills
	up the new unit. Let the economy code decide instead.
	* run2.c (try_transfer_aux): Don't transfer fuel to units that
	have no plans to move. Always let such units give away fuel.

In the old code, all units would fill up with materials automatically by
taking it from their transport on  creation, even units that could not move
or had no plans to move, i.e. garrisoned units. This was a problem in games
where fuel is scarce.

In the new code, units will fill up when run_economy executes at the start
of each turn. This code is more intelligent and does not fill up stationary
units with fuel.

The problem here is that in the standard game, units are created with their
own full fuel supply, but with no ammo of their own. I have no reason why.
In any case, human-controlled units will always fill up with materials
unless you put them asleep. The new units in the standard game will
therefore fill up with ammo as expected if you wait until next turn. But
this does of course cause a delay, which was not intended.

One possible fix would be to run part of the economy code each time a new
unit is created. However, you would then loose the ability to put the unit
to sleep first, and thus save fuel. Which was the whole idea of the change.

Another fix would be to let the new unit fill up on non-fuel type materials
only on creation. This would fix the problem with the standard game, but
you would still have a problem in any games where units are created without
their own fuel.

A third fix would be to fill up new units with materials, and then take
back any fuel if they have not moved at the start of the next turn. I'll
look into this possibility. It seems like the best solution.

Hans









Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]