NoMansSky:Reference Guides/TEXTURES/Ship Coloring: Difference between revisions

From Step Mods | Change The Game
Line 44: Line 44:
Browse content to PlayerStateData/CharacterCustomisationData, containing values for everything about the appearance of your character and their property.<br>
Browse content to PlayerStateData/CharacterCustomisationData, containing values for everything about the appearance of your character and their property.<br>
Glance through this section, paying particular attention to 'Palette', 'ColourAlt', and the values below "Colour".
Glance through this section, paying particular attention to 'Palette', 'ColourAlt', and the values below "Colour".
4. CharacterCustomisationData is an array of 20 objects. 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)
* Leave the character and exocrafts alone (or don't.. up to you.. just don't complain later)
WARNING :: The array's length is FIXED! Do NOT delete all the text from an object! That will shorten the array and disrupt the fixed order.
5. Copy the the code (at the end of this post) and paste it into the specific place-holder for the ship you want to customize.
6. Edit the color palette properties: The color property values are in RGB percentage where 0=nothing and 1=full intensity (The 4th value is transparency - leave it as 1)... As you see, this isn't user friendly; You have to experiment with RGB colors and match palettes to different ship parts. Have fun :)
7. Close the JSON editor and save.
8. Profit!


===== Save Customization Example =====
===== Save Customization Example =====

Revision as of 15:07, April 23, 2022

Nomanssky flare.png

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".

4. CharacterCustomisationData is an array of 20 objects. 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)

  • Leave the character and exocrafts alone (or don't.. up to you.. just don't complain later)

WARNING :: The array's length is FIXED! Do NOT delete all the text from an object! That will shorten the array and disrupt the fixed order.

5. Copy the the code (at the end of this post) and paste it into the specific place-holder for the ship you want to customize.

6. Edit the color palette properties: The color property values are in RGB percentage where 0=nothing and 1=full intensity (The 4th value is transparency - leave it as 1)... As you see, this isn't user friendly; You have to experiment with RGB colors and match palettes to different ship parts. Have fun :)

7. Close the JSON editor and save.

8. Profit!


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

  • 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

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