Mod Textures

From RimWorld Wiki
Jump to navigation Jump to search


Modding Tutorials

?
Under Review
This tutorial or guide is currently undergoing review and should not be considered ready to use.

(Work in progress) This is a guide for creating and adding textures to RimWorld mods.

Creating Mod Textures[edit]

As a Unity application, RimWorld is capable of loading textures using a variety of formats. Most textures used in mods are PNG files, but RimWorld is also capable of loading JPG, PSD, and even DDS with the appropriate mods installed.

  1. While RimWorld's vanilla textures are drawn in a vector style, most vanilla textures are not actually vector graphics. Use whichever technique is easier for you!
  2. RimWorld texture resolutions are independent of their draw size in-game. Most vanilla textures use a resolution of 64 pixels per tile, but most mod artists use a resolution of 128 or 256 PPT. Using a higher resolution is possible, but RimWorld texture compression and default zoom levels will render such high resolutions excessive. Textures that are too large will also take up a lot more VRAM, and RimWorld will simply crash if the GPU's VRAM is filled.
  3. It is strongly recommended that you reference vanilla textures when creating mod textures. Ludeon publishes an RimWorld Art Source that contains almost all vanilla and DLC textures for modders to reference for this purpose.
  4. Textures should be placed in the Textures folder of the mod folder structure. Note that all textures from all mods are loaded into the same content loader, thus it is strongly recommended that you either prefix your texture names or place them in a uniquely named folder to minimize the chance of colliding with another mod.
  5. Texture resolution begins in the Textures folder. Thus if you have a texture that is placed in Textures/MyMod/MyTexture.png, then the path you need to use to reference it would be MyMod/MyTexture.

Texture Masking[edit]

(Placeholder)

Building Textures[edit]

It is recommended that you create building textures against a tile grid appropriate for the size of building you're trying to make, as it is easier to define draw size this way. Centering the texture against the canvas also ensures that you do not have to mess with draw offsets to make it align properly.

The following is a sample texture for a 2x2 table against a 3x3 canvas.

SampleBuilding2x2.png

Apparel Textures[edit]

By default, headwear and body apparel textures are overlaid 1:1 onto heads and bodies, respectively. Thus, it is strongly recommended that you start with a vanilla body or apparel texture as a template. (Please see above for the official art source.)

Headwear requires a minimum of 3 textures, one each for south, north, and east facings. A west facing is optional; RimWorld will mirror your east texture if none is provided, so you only need to provide one for asymmetric apparel or if you want the west texture to be different from the east texture. An additional texture can be used to represent the apparel on the ground, thus a total of 3+1 textures is recommended for headwear, 6+2 if you use texture masks.

Body apparel has the same texture usage, but for each of the 5 vanilla body types (male, female, thin, hulk, and fat) for a total of 15+1 textures or 30+2 with texture masks.

Utility packs such as tox gas canisters can be set to render using a single texture but with offsets based on body type. This only works for utility-slot items and has the same texture requirements as headwear (3+1, or 6+2 with masks).