NoMansSky:Reference Guides/TEXTURES/Ship Coloring
This is an explanation of how coloring works in the game and how to use that knowledge to customize the color of your ships.
From .SCENE to .MATERIAL
Everywhere you go in NMS, the game has a lot of stuff going on: characters, props, backgrounds, colors, and more, much like a play. NMS handles this stuff with it's own script, like a scene in a play, with a .SCENE file. First, the .SCENE file says what objects are present and where they are. Next, it gives the game the shapes of the objects using .GEOMETRY files. At this point, you would have something like a 1980s videogame, just meshes everywhere, but we will get more: the .SCENE file tells the game what material things are made of, like saying "hey game! That floor tile is made of wood, FYI." The game then responds, "oh, thank you very much, Scene. Ummm, I have no clue what wood is." The game needs some education, so it goes and asks a .MATERIAL file. That file knows exactly what wood is, everything about it. The graphics engine needs to know what this wood stuff looks like, so the .MATERIAL file passes over a .TEXTURE file.
.TEXTURE and Palettes
The .TEXTURE file has our patterns and colors, with only a little bit more external referencing. Take a moment and look at the various parts of the computer in front of you, probably a screen, keyboard, and mouse, among others. Do you notice how the screen is transparent and smooth and other parts are a hard plastic? The .TEXTURE file describes all of these different parts and how each material looks. To do so, it calls on one last thing, a general palette. That file is just a list of many palettes, which are themselves lists of colors. To describe the appearance of your screen, the .TEXTURE file tells the game an image file for the pattern on the glass and, for the color, to go to the palette file, lookup the 'Glass' palette, and use the main color there, 'Primary'. Every section in a .TEXTURE file contains a reference to a 'Palette' and to a 'ColourAlt' palette. A palette is a group of colors, like when you see a painter holding a board with paints, that thing is called a palette. In NMS, a palette is just a list of RGBA values (Red-Green-Blue-Alpha), each with a name. Below are an excerpt from the Alien ship texture file and an excerpt from the general palette file.
BioShip Texture
... <Property value="TkProceduralTextureLayer.xml"> <Property name="Name" value="SKIN" /> <Property name="Probability" value="1" /> <Property name="Group" value="" /> <Property name="SelectToMatchBase" value="False" /> <Property name="Textures"> <Property value="TkProceduralTexture.xml"> <Property name="Name" value="1" /> <Property name="Palette" value="TkPaletteTexture.xml"> <Property name="Palette" value="BioShip_Underbelly" /> <Property name="ColourAlt" value="Primary" /> ...
Palette File
... <Property name="BioShip_Underbelly" value="GcPaletteData.xml"> <Property name="NumColours" value="_16" /> <Property name="Colours"> <Property value="Colour.xml"> <Property name="R" value="0.893" /> <Property name="G" value="0.279" /> <Property name="B" value="0.267" /> <Property name="A" value="1" /> </Property> ...
Save Files
Using a save editor, you can view and edit the raw JSON of the save file.
Browse content to PlayerStateData/CharacterCustomisationData, containing values for everything about the appearance of your character and their property.
Glance through this section, paying particular attention to 'Palette', 'ColourAlt', and the values below "Colour".
CharacterCustomisationData is an array of 20 objects and its length is fixed. Do NOT delete all the text from an object or That will shorten the array and disrupt the fixed order.
Here's the list:
- 0 = Character
- 1 = Roamer
- 2 = Multitool (Doesn't work since Synthesis update)
- 3 to 8 = starships 1 to 6
- 9 = Nomad
- 10 = Colossus
- 11 = Pilgrim
- 12 = (unused)
- 13 = Nautilon
- 14 = Minotaur
- 15 = Freighter
- 16 = (unused)
- 17 to 19 = starships 7 to 9 (added in Outlaws update)
Be sure to leave the character and exocrafts alone (or don't.. up to you.. just don't complain later)
A few points:
- The customization overrides original colors (obviously), but it 'blanks' all 5 parts, so your replacement must contain all 5 custom palettes. If you have an existing color you want to keep, you need to come up with its RGB equivalent and re-input it.
- Remove a ship's color customization by deleting all the palette items so you end with "Colours":[] , or just copy-paste the text from an unused ship slot.
- The sheet metal textures stay metallic - you'll get tinted metal
- Black isn't really black... go blame HG
- Trading your ship for another deletes its customization (you might want to keep a backup in a text file)
Save Customization Example
... "SelectedPreset":"^", "CustomData":{ "DescriptorGroups":[ "^ASTRONAUT_BASE", "^ASTRO_HEAD_5", "^TORSO_GEK", "^ARMOUR_FOURTH", "^LEGS_VYK", "^BOOTS_VANILLA", "^GLOVES_VYK" ], "Colours":[ { "Palette":{ "Palette":"Custom_Head", "ColourAlt":"Primary" }, "Colour":[ 0.296999990940094, 0.296999990940094, 0.296999990940094, 1.0 ...
When you use the Appearance Modifier in the game, those values get stored in this section just like the code above.
Using this section, we can recolor our items manually by adding Palette and Colour sections to override current ship colors.
The palette reference depends on what type of ship it is.
Particular ship models won't use all of these references, in which case those overrides won't do anything. Royal exotics use very few colors, primarily Rock/None. Squid exotics use primarily Rock/None and Paint/Primary.
Normal Ship Palette References
- Rock/Primary
- Rock/Alternative1
- Stone/Primary
- Metal/Primary
- Metal/Alternative1
- Paint/Primary
- Paint/Alternative1
- Paint/Alternative2
- Paint/Alternative3
- Paint/Alternative4
- Undercoat/Primary
- Undercoat/Alternative1
Living Ship Palette References
- Rock/Primary
- Stone/Primary
- Metal/Primary
- Scale/Primary
- BioShip_Body/Primary
- BioShip_Underbelly/Primary
- BioShip_Cockpit/Primary
RGB color examples
- "Colour": [1, 1, 1, 1] = white
- "Colour": [0, 0, 0, 1] = black
- "Colour": [1, 0, 0, 1] = red
- "Colour": [0, 1, 0, 1] = green
- "Colour": [0, 0, 1, 1] = Blue
- "Colour": [1, 1, 0, 1] = Yellow
- "Colour": [0.25, 0, 0.3, 1] = dark purple
Normal Ship Recolor Example
Here is a full example of recoloring a normal ship to all white.
{ "SelectedPreset":"^", "CustomData":{ "DescriptorGroups":[], "Colours":[ { "Palette":{ "Palette":"Rock", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Rock", "ColourAlt":"Alternative1" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Stone", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Metal", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Metal", "ColourAlt":"Alternative1" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Paint", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Paint", "ColourAlt":"Alternative1" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Paint", "ColourAlt":"Alternative2" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Paint", "ColourAlt":"Alternative3" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Paint", "ColourAlt":"Alternative4" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Undercoat", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Undercoat", "ColourAlt":"Alternative1" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] } ], "TextureOptions":[], "BoneScales":[], "Scale":1.0 } }
Living Ship Recolor Example
Here is a full example of recoloring a living ship to all white.
{ "SelectedPreset":"^", "CustomData":{ "DescriptorGroups":[], "Colours":[ { "Palette":{ "Palette":"Rock", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Stone", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Metal", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"Scale", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"BioShip_Body", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"BioShip_Underbelly", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] }, { "Palette":{ "Palette":"BioShip_Cockpit", "ColourAlt":"Primary" }, "Colour":[ 1.0, 1.0, 1.0, 1.0 ] } ], "TextureOptions":[], "BoneScales":[], "Scale":1.0 } }