7 Days to Die Wiki
7 Days to Die Wiki
Apply your gamestage here:

Current game stage: 1

factory_lg_01.tts prefab file version 4. This image was made with a python script, giving random colors to each block.

factory_lg_01.tts prefab file version 8. This image shows the difference between version 4 and 8.

Prefabs are pre-built world objects such as buildings, doors and signs that are scattered around the map. They allow developers and users to make maps more easily because they can be copied, pasted and reused any number of times.

The Prefabs in Navezgane are reflected in the file Data/Worlds/Navezgane/prefabs.xml. This file contains a list of every prefab in Navezgane including their coordinates and rotation.

For information on how Prefabs are placed outside of Navezgane see Random World Generation.

The path to all of the default prefab files is Data/Prefabs/.

See List of Prefabs for a list of every prefab and its properties.


Each Prefab has between four and six files associated with it.

Block Names[]

Files ending in .blocks.nim associate block ids with their in-game names. These ids are referenced in the TTS file. By changing a block name in this file all blocks referenced by that id in the TTS file will be changed. This feature was introduced in Alpha 17.


The purpose of files ending in .ins is unknown. Not every prefab has an INS file. They were introduced in Alpha 17.


Prefabs optionally have .jpg thumbnail images used to preview the prefab in the in-game editor. This was introduced in Alpha 17.


Mesh files were introduced in Alpha 16. They end in .mesh and are not present for every prefab. It is not yet known what their purpose is.


Files ending in .tts contain the voxel block data for each prefab. They are binary files, and the format is explained below for the currently used versions. All numbers are in little endian.

Version 15 Version 13
char[4] tts
uint32 version
uint16 x_dimension
uint16 y_dimension
uint16 z_dimension

The header for a tts prefab file is 14 bytes long.

Same as version 15
Block Data
struct blocks[x_dimension * y_dimension * z_dimension]
    uint32 block_data

After the header, every block is represented in 4 bytes of data, meaning this section is x_dimension * y_dimension * z_dimension * 4 bytes long.

There are two parts to each 4 byte (32 bit) block data:

  • Bits (0 - 14) are for the block id.
  • Bits (15 - 31) are for flags.

The block id found in the lower 15 bits of each block integer corresponds to a block id in the .blocks.nim file associated with that prefab. Block properties can then be looked up by name using the file Data/Config/blocks.xml. Every block id has to be less than 32768 (2^15). At the very end of the blocks.xml file there is a comment that says: Block limit: There can be 32k blocks in the game. 0-255 are reserved for air/terrain blocks..

The first two flag bits (15 - 16) encode the rotation of a block around the vertical axis.

It is unknown what the rest of the flag bits do at this time.

Same as version 15
byte[x_dimension * y_dimension * z_dimension * 3] unknown
uint16 size_of_end_header
byte[size_of_end_header] end_header
byte[?] unknown

After the blocks section, there is some extra data. It is unknown what this data is used for at this time.

Same as version 15


Every prefab has an XML file ending in .xml that stores attributes about the model such as what Biome, Zone and Township they can spawn in.


As the game has been updated, the prefab format has changed slightly. These changes are reflected in the version number found in the header of each prefab file.

Alpha 17 (b240)

File Version Number of Prefabs
13 356
15 94

Video Tutorial[]

Guide how to import a prefab into a new/existing game world.

External links[]