Obsolescence of Models and Structures (VGN and later)

From AGEWiki

Jump to: navigation, search

Models and structures should have a generation entry defined in their DB (.xls) file. The entry is a string, like INF1 for a model or IRON2 for a structure. It is a tag which is defining the generation of the object.

The actual model into which the current model upgrade is given by the TechUpg entry (UID).

The actual structure into which the current structure upgrade is given by UpgradeTo1 and UpgradeTo2 entries (UID).

If a model generation is declared has obsolete, and under certain conditions, it will upgrade automatically to its TechUpg (Ships must be in passive posture in harbor e.g). The TechUpgCost entry indicate how much health will remain in the element (element = model on map), e.g a TechUpgCost of 75% means the element lose 75% of its health. As elements use up replacements to recover health, it is thus indirectly a cost (and a repair time).

Players control their upgrade by playing with postures and by buying or not replacements of the desired types.

For structures, upgrade is not automated and is a player (or AI) decision. There are 2 potential upgrades paths, which translate into up to 2 buttons on the structure, when in Economic/commerce mode. Clicking on a button will trigger upgrade during hosting. A cost will be paid based on the cost of the new structure to be converted into (no delay can be done though).

Declaring obsolescence

This is done with scripting commands, and thus can be done with a trigger when a new Tech is reached.

ObsoleteModelGen declares a model generation obsolete. The param0 column have the list of generations (separated by |) to obsolete. e.g: ObsoleteModelGen = INF1|ART1

ObsoleteStrucGen does the same for structures.

IsObsoleteModelGen = GenerationTag [;NOT]

Is used to test if a generation is obsolete or not obsolete.

IsObsoleteStrucGen does the same for structures.

Forums