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: Implementing cxp-on-completion?


Hi Lincoln, others,

On Sat, 13 Mar 2004, Lincoln Peters wrote:

> Has there been any thought to making it possible for a unit to have a
> certain number of cXP when it is built?

I had thought about having an initial-size or size-on-change-type 
unit property (I might have mentioned the latter on the list 
before, perhaps as a reset-size-on-change-type property).

>  I'm trying to write a game
> module that uses cXP and change-type quite extensively, but the
> inability to make newly-created units have a certain number of cXP has
> been a bit of a nuisance.

I quickly ran into the same nuisance in Bellum after implementing 
change-type. The problem there is that Cities at the beginning of 
the game start out as size 1, but newly upgraded ones are size 
60+.

There are two solutions that I see to the problem:
(1) Reset the size to 1 after a change-type.
(2) Start all new Cities at size 60.

I think the way to proceed is an 'initial-size' (or 'initial-cxp') 
property, because this could be checked/applied during initial 
unit replacement, unit creation, unit change type, arrival of 
reinforcments, etc..., whereas a 'size-on-change-type' (or 
'cxp-on-change-type') is semantically limited to one action. 

There is still the question of inherited values as opposed to 
reset values. One would be tempted to use -1 on the proposed new 
properties for this, but in the case of size, the value of 0 has 
no legitimate meaning. So perhaps a separate property, say 
'inherit-size-on-change-type', is needed. For cXP, I think that -1 
could be used and still leave the property with a contiguous set 
of legitimate values....

Depending on what we decide, I will probably implement the 
'initial-size' property in conjunction with my ongoing Bellum 
improvement efforts; it should be trivial to implement an 
equivalent for cXP (and others?) alongside this when I do so.

Thoughts anyone?

Eric


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