ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Cameo Sorting: Difference between revisions

From ModEnc
Jump to navigation Jump to search
m Replacing Template:TTL with Template:F.
TAK02 (talk | contribs)
Naval vehicles and aircraft never appeared on top of the ground tanks
 
Line 16: Line 16:
: If one cameo's side is the same as the player house's Side, and the other one's isn't, whichever has the same side gets priority. Otherwise...
: If one cameo's side is the same as the player house's Side, and the other one's isn't, whichever has the same side gets priority. Otherwise...
; If both objects are UnitTypes or AircraftTypes
; If both objects are UnitTypes or AircraftTypes
: Objects with {{f|Naval|yes|link}} get priority over objects without it.
: Objects without {{f|Naval|yes|link}} get priority over objects with it.
: Objects with {{f|ConsideredAircraft|yes|link}} get priority over objects without it. If they're still equal...
: Objects without {{f|ConsideredAircraft|yes|link}} get priority over objects with it. If they're still equal...
; Compare their {{f|TechLevel|link}}
; Compare their {{f|TechLevel|link}}
: Lower TechLevel wins.
: Lower TechLevel wins.

Latest revision as of 06:06, 5 November 2015

Cameos on the sidebar are sorted according to several factors. Whenever a cameo is added to the tab, the game iterates over all the existing cameos comparing each of them with the new cameo in turn.

In the examples below, OldCameo stands for the cameo that was already there, NewCameo is the cameo the game is trying to insert.

Superweapon Cameos

If both OldCameo and NewCameo are Superweapons (the actual superweapons, not buildings with a SuperWeapon attached):

Compare RechargeTime
The on which recharges faster gets priority. If they're equal...
Compare their UIName strings
If, comparing alphabetically (lexicographically), OldCameo comes first, it gets priority, otherwise NewCameo does.

If one of them is a SuperWeapon and the other one isn't, the SuperWeapon one gets priority.

TechnoType Cameos

Compare AIBasePlanningSide
If one cameo's side is the same as the player house's Side, and the other one's isn't, whichever has the same side gets priority. Otherwise...
If both objects are UnitTypes or AircraftTypes
Objects without Naval=yes get priority over objects with it.
Objects without ConsideredAircraft=yes get priority over objects with it. If they're still equal...
Compare their TechLevel
Lower TechLevel wins.
Compare their Cost for player's house, taking into account all applicable cost multipliers
Lower Cost wins.
Compare their UIName strings
If OldCameo alphabetically sorts first, it wins.