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: Rebuilding Units That Turn


On Wed, 2003-11-19 at 15:13, Elijah Meeks wrote:
> Well, change-type definitely won't work, because then
> the player would have to manually input it into the
> interface (At least, that's how it was when I tried to
> implement it in Specula for Dragons), so I was
> thinking of simply using Build and then hp-to-build (I
> think that's the table name) to kill off the unit that
> builds it, leaving you with just one unit.  How's
> upgrade work and is it easy to implement/use?

The table is hp-to-garrison.  When used in this manner, it destroys the
old unit (by reducing it to 0 hitpoints) as soon as the new unit is
completed.  The code in your game would probably look like:

(table hp-to-garrision
  (heavily-damaged-corps damaged-corps 999)
  (damaged-corps corps 999)
)

This has a few serious problems problems, almost all of which I found
while working on bolodd.g (although some came up in space-civ.g):

1. No material transfer from the old unit to the new one.  If you have a
huge stockpile of fuel or ammo in a unit that was upgraded in this
manner, it disappears once the upgrade is completed.

2. Any tooling the old unit had is lost.  The consequences of this vary
depending on how your game is set up, but it can be quite frustrating.

3. If used with advanced units, the newly-completed advanced unit MUST
be given enough material automatically to sustain it for one turn, or
else it will starve before it has a chance to collect anything from the
environment.


I use the time.g-like upgrade mechanism in bolodd.g to allow the various
types of bases to upgrade (level 1 base to level 2, level 2 base to
level 3, etc.).  However, because of the issues I mention above, it
works, but it doesn't work well.  I plan to change it to use "Change
type" as soon as "Change type" is implemented in the interface(s).


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