NoMansSky:Reference Guides/TEXTURES/Ship Coloring

From Step Mods | Change The Game
< NoMansSky:Reference Guides
Revision as of 10:33, October 16, 2020 by Gumsk (talk | contribs) (Created page with "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 g...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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[edit | edit source]

Everywhere you go in NMS 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[edit | edit source]

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[edit | edit source]
...
<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[edit | edit source]
...
<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[edit | edit source]

Using a save editor, you can view and edit the raw JSON of the save file. PlayerStateData/CharacterCustomisationData contains 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".

Save Customization Example[edit | edit source]
...
"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 specifying override colors for the particular palette entries of the item. The only tricks are knowing what folder to edit and what palette entries to override. For recoloring ships, you want folders 3 through 8, 3 being your first ship and 8 being your sixth ship. 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[edit | edit source]

  • 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[edit | edit source]

  • Rock/Primary
  • Stone/Primary
  • Metal/Primary
  • Scale/Primary
  • BioShip_Body/Primary
  • BioShip_Underbelly/Primary
  • BioShip_Cockpit/Primary

Normal Ship Recolor Example[edit | edit source]

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[edit | edit source]

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
	}
}