Skip to content

Adding icons for custom crew types defined by your mod

cake-pie edited this page May 15, 2019 · 3 revisions

Icon settings for Community Trait Icons are stored in a simple config file format and are located at GameData/CommunityTraitIcons/CommunityTraitIcons.cfg

To add support for custom crew specialization types defined by your mod to Community Trait Icons, you will need an icon and color for each specialization.

Icons should be square dimensions in order to avoid distortion, and in grayscale with transparency, so that they can be tinted depending on the color setting. Image size can vary, but keep in mind that using a high resolution is pointless since the detail will be lost at the sizes that the icons are used. It is suggested that you refer to the icons already bundled in Community Trait Icons as an example.

Any texture file format supported by KSP can be used.
Note that if you use DDS format, you must save the image without mipmaps, or else the icon will end up blurry if the texture quality settings in KSP graphics settings are anything less than "Full Res". (Technical details here.)

Colors are in Unity's RGBA format where each number is between 0 and 1.

You have two options for adding your icon settings to Community Trait Icons:

1. Include a Module Manager patch in your mod that patches Community Trait Icons to add your icons.

For example:

@CommunityTraitIcons:NEEDS[CommunityTraitIcons] {   // find and modify the CTI settings node if CTI is installed
    %Trait[Clown] {                                 // edit-or-create a setting for your crew specialization type
		name = Clown
		color = 1.0,0.375,0.8125,1
		icon = ClownMod/Icons/clownIcon
    }
}

2. Contribute your icons for inclusion in Community Trait Icons

If you have custom crew specialization types in a stable, release-quality mod, you may consider contributing your icons for inclusion in Community Trait Icons itself.

You can’t perform that action at this time.