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

Difference between revisions of "Cameo Sorting"

From ModEnc
Jump to: navigation, search
(Rewriting from sourcecode)
m (Replacing Template:TTL with Template:F.)
Line 5: Line 5:
 
== Superweapon Cameos ==
 
== Superweapon Cameos ==
 
If both OldCameo and NewCameo are Superweapons (the actual superweapons, not buildings with a SuperWeapon attached):
 
If both OldCameo and NewCameo are Superweapons (the actual superweapons, not buildings with a SuperWeapon attached):
; Compare {{TTL|RechargeTime}}
+
; Compare {{f|RechargeTime|link}}
 
: The on which recharges faster gets priority. If they're equal...
 
: The on which recharges faster gets priority. If they're equal...
; Compare their {{TTL|UIName}} strings
+
; Compare their {{f|UIName|link}} strings
 
: If, comparing alphabetically (lexicographically), OldCameo comes first, it gets priority, otherwise NewCameo does.
 
: If, comparing alphabetically (lexicographically), OldCameo comes first, it gets priority, otherwise NewCameo does.
  
Line 13: Line 13:
  
 
== TechnoType Cameos ==
 
== TechnoType Cameos ==
; Compare {{TTL|AIBasePlanningSide}}
+
; Compare {{f|AIBasePlanningSide|link}}
 
: 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 {{TTL|Naval|yes}} get priority over objects without it.
+
: Objects with {{f|Naval|yes|link}} get priority over objects without it.
: Objects with {{TTL|ConsideredAircraft|yes}} get priority over objects without it. If they're still equal...
+
: Objects with {{f|ConsideredAircraft|yes|link}} get priority over objects without it. If they're still equal...
; Compare their {{TTL|TechLevel}}
+
; Compare their {{f|TechLevel|link}}
 
: Lower TechLevel wins.
 
: Lower TechLevel wins.
; Compare their {{TTL|Cost}} for player's house, taking into account all applicable cost multipliers
+
; Compare their {{f|Cost|link}} for player's house, taking into account all applicable cost multipliers
 
: Lower Cost wins.
 
: Lower Cost wins.
; Compare their {{TTL|UIName}} strings
+
; Compare their {{f|UIName|link}} strings
 
: If OldCameo alphabetically sorts first, it wins.  
 
: If OldCameo alphabetically sorts first, it wins.  
  
 
[[Category:General_Editing_Information]]
 
[[Category:General_Editing_Information]]

Revision as of 09:44, 27 November 2009

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 with Naval=yes get priority over objects without it.
Objects with ConsideredAircraft=yes get priority over objects without 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.