Skip to content

Format

Open Markdown

A resource pack contains assets and no code. pack.properties describes it. It can have four kinds of asset.

  • Directorymedia/viewpoint/resourcepacks/example.pack/
    • pack.properties
    • icon.png
    • Directorymodels/
      • manifest.txt
      • crate.obj
      • crate.mtl
      • crate.png
      • chair.obj
      • chair.mtl
      • chair.png
    • Directorytiles/
      • …
    • Directorysounds/
      • …
    • Directorydata/
      • …
pack.properties
format=1
id=example.pack
name=Example pack
version=1.0.0
author=Example
game.min=42.21
models=models/manifest.txt
tiles=tiles
sounds=sounds
data=data

models is the path of the manifest file. tiles, sounds and data are folders. Each path is relative to the folder of the pack, and must be in the folder of the pack’s version or in common/ (the folder that holds its media folder). The Descriptor page gives the common keys.

The manifest is a text file of key=value lines. Put format=2 in it: this is version 2, the version for all new packs. If Viewpoint cannot read a line, it ignores that line, and names its line number in the log. It uses the other lines.

models/manifest.txt
format=2
id=example.pack
name=Example pack
model.crate=crate.obj
model.chair=chair.obj
bind.furniture_storage_01_5=crate,90,0,0,0,1.0
group.furniture_seating_indoor_02/Wooden Chair=chair,0,0,0.1,0,1
LineMeaning
format=2The version of the manifest.
id, nameThe id and name of the manifest, for messages.
model.<id>=<path>A model: an OBJ file, relative to the folder of the manifest. Viewpoint finds its MTL and PNG files from the OBJ file.
group.<tileset>/<name>=<model>,<degrees>,<x>,<y>,<z>,<scale>One line for all the facings of an object. See Group binds.
bind.<sprite>=<model>,<degrees>,<x>,<y>,<z>,<scale>The sprite whose square shows this model, the model id, its rotation in degrees, its offset and its scale. A bind is stronger than a group in the same pack.

The model stands on its square:

  • The origin is the centre of the square.
  • The axes are x east, y south, z up. One storey is the side of a square multiplied by √6.
  • The model turns about the vertical axis by its degrees, from east towards south. Then it moves by its offset.

The model replaces the art of the sprite: the projected art, the game’s own sprite model, or the card of a plant. Viewpoint loads a model the first time that the game shows its sprite. When two packs put a model on the same sprite, the pack nearer the top of the Active column wins.

A model can change its parts when its object is lit. See Model states.

Each material of the MTL uses the PNG of its map_Kd line. When the materials of a model use more than one PNG, Viewpoint puts these PNGs together on one texture as it loads the model. Together, they must fit in 2056 × 2056 pixels. If they are larger, Viewpoint makes each of them half as large (again, if necessary) and writes a line in the log. Keep the UVs of a model in the range 0 to 1: a model does not repeat its texture.

A manifest without format=2 is version 1. Viewpoint continues to read it. Version 1 has only bind. lines: one line for each sprite. Viewpoint ignores its group. lines, and the log names them. To change a pack to version 2, see Migrate to version 2.

This is not the legacy flag on a card. That flag shows a pack that its Lua registers, with no descriptor. See Legacy model packs.

Tile textures have their own format. See Tiles.

ogg and wav files. The Performance line of the card includes them. In this version, Viewpoint does not play the sounds of a resource pack, and they do not replace the sounds of the game. To play a sound, put it in an addon. See Assets.

Read-only files. Viewpoint does not use them itself. An addon reads only the data of its own package. See Assets. The Lua of the mod can read them with the file functions of the game.

LimitValue
One data file16 MiB
All assetsThey count in their pool. If the pool is full, Viewpoint refuses the asset, and the card tells you.
PathsIn the folder of the pack’s version or in common/, the one that holds its media folder. Viewpoint refuses an absolute path, a \, and a link or a junction that goes out of it. A .. is allowed when the file stays in that folder.

If Viewpoint cannot read a file, the card names the file. See Labels.