Color Palettes - XCOM:EU 2012

From Nexus Mods Wiki
Revision as of 00:15, 21 December 2013 by Peasly Wellbott (talk | contribs) (Page created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

The Color Palettes used in the Customization options in the Barracks are populated by XComGame.XComContentManager. The native functions in this class are directed by entries in DefaultContant.ini

 ColorPaletteInfo=(Palette=ePalette_HairColor,ArchetypeName="UnitPalettes.HairColor")

Each of these links a Palette type to an ArchetypeName string, which the native function GetArchetypeFromCache uses to locate the desired object in the upk files.

The various color palettes are contained in the UnitPalettes object, located in Startup.upk. Here the arrays can be directly edited.

UnitPalette.PalleteType

Each palette object consists of a header and footer sandwiching all the individual color options.

 {Object Header}
 01 00 00 00 28 02 00 00 00 00 00 00 22 00 00 00 00 00 00 00 
    04 0D {Object size-64, reverse order,} 
 00 00 00 00 00 00 
    20 {# of Entries} 
 00 00 00

Each color in the palette has an entry in the body of the object.

 {Entry}
 DE 03 00 00 00 00 00 00 02 0B 00 00 00 00 00 00 10 00 00 00 00 00 00 00 40 03 00 00 00 00 00 00 
 {Primary Color}
    3B FF 9C 3E {R - 4 bytes, reverse order}
    48 63 11 3E {G - 4 bytes, reverse order}
    36 AB 17 3D {B - 4 bytes, reverse order}
    00 00 80 3F {Unknown - 4 bytes}
 92 04 00 00 00 00 00 00 02 0B 00 00 00 00 00 00 10 00 00 00 00 00 00 00 40 03 00 00 00 00 00 00 
 {Secondary Color}
    27 9C 5F 3D {R - 4 bytes, reverse order}
    D1 7C 36 3D {G - 4 bytes, reverse order}
    C1 EF B4 3B {B - 4 bytes, reverse order}
    00 00 80 3F {Unknown - 4 bytes}
 92 03 00 00 00 00 00 00 

Only the ArmorTint palette uses the Secondary Colors. In other palettes, all four 4-Byte chunks in the Secondary Color field are replaced with CC CC CC CC.

 {Object Ending}
 55 00 00 00 00 00 00 00 0E 03 00 00 00 00 00 00 04 00 00 00 00 00 00 00 
    20 {# of Entries} 
 00 00 00 92 03 00 00 00 00 00 00