This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
New Feature: Automatic Upgrading of Unit Types
- From: Eric McDonald <mcdonald at phy dot cmich dot edu>
- To: xconq7 at sources dot redhat dot com
- Date: Sun, 1 Feb 2004 23:36:33 -0500 (EST)
- Subject: New Feature: Automatic Upgrading of Unit Types
Hello fellow Xconquerors,
I have added the ability to have units of certain types
automatically upgraded to new types. These upgrades can take place
at the beginning of each turn. The Bellum Aeternum game now uses
this feature: after Towns reach size 60, they become Cities, and
after Cities reach size 180, they should become Metropoles.
Game Developer Notes:
(1) Manual change-type actions are now actuated through
'can-change-type-to'. This is to handle acp-independent units, but
applies to both acp-independent and -dependent ones. Setting the
'acp-to-change-type' to 0 will still work to prevent a change-type
in acp-dependent games. <IMPORTANT> But, to allow a change-type to
happen, 'can-change-type-to' MUST be set to true, AND
'acp-to-change-type' must be set greater than 0 in acp-dependent
games. </IMPORTANT>
(2) Automatic upgrades ignore both 'can-change-type-to' and
'acp-to-change-type', since ACP's are not spent at the turn start.
Instead, use the 'auto-upgrade-to' unit type property (this is not
a table!) to specify ONE unit type that should be considered a
"promotion" from the existing one.
(3) Both manual change-types and automatic upgrades respect the
following tables: advance-to-change-type, material-to-change-type,
occupants-to-change-type, size-to-change-type,
turn-to-change-type, and cxp-to-change-type.
(4) The above tables should be fairly self-explanatory. I have
updated the Texi docs, but have not updated the HTML on the Xconq
Web site yet. Note that occupants-to-change-type is not just a
boolean table, it actually takes full numbers. So, for example,
you could require that a Village have 4 Walls as occupants before
it can become a Fortified City, rather than simply requiring that
it have a Wall.
Please let me know about any bugs with the new code. Thanks.
Enjoy,
Eric