Adding or replacing images

From Cosmoteer Wiki
Jump to navigation Jump to search

Adding images

You can add images to your own mod by simply putting their files in your mod's folder.
You will then need to reference those images via the correct path so the game can find them. If you use folders, which is good practice, they must be included in that path.

Example

Here you can see the EditorIcon node for a part in that part's .rules file. It reference the icon's image file.
"Icon" means the image you would click on in Build Mode.

EditorIcon
	{
		Texture
		{
			File = "icon.png"
			SampleMode = Linear
		}
		Size = [32, 32]
	}

The lack of path prefixes implies that this file sits next to the .rules file, which is in fact the case.

Replacing images

This is done with Replace or Overrides actions in your mod.rules file.

CalloutIconWarning.png
Warning
Any image Cosmoteer is looking for but can't find will crash the game.

Format

The game uses PNG images.


See also

Making Cosmoteer-style visuals