Skip to content

Making a prop for RasterPropMonitor

Eugene Medvedev edited this page Nov 13, 2013 · 19 revisions

Creating a display model for RasterPropMonitor

  1. You need a font bitmap. The plugin treats fonts as if they were fixed width, so it's best to take a fixed width font to start with. CBFG works, and Fixedsys Excelsior is a nice font, but there are other programs to do the same thing and probably fonts more suitable to your taste.

    Every letter is assumed to occupy a block of fontLetterWidth by fontLetterHeight pixels on the bitmap. Font texture size must be evenly divisible by fontLetterWidth/fontLetterHeight respectively. For Unity reasons, the font bitmap has to have sizes that are a power of 2, but it doesn't have to be square. Characters are read from the font left to right, top to bottom, with the bottom left character being character number 32 (space). Characters 128-159 are skipped due to peculiarities of how KSP treats strings.

  2. You need a model for your screen. If it's to have buttons, they need to be named colliders and isTrigger on them enabled. The screen must be a named transform, arranged in such a way that the texture's 0,1 coordinates are the top left corner of the screen. It must already have a texture in the layer ("_MainTex", "_Emissive", etc) that the plugin will replace. To save memory, that placeholder texture should be the minimum size possible, which for KSP appears to be 32x32 pixels.

Clone this wiki locally