MotaEngine

Asset packs

An asset pack is a folder of ready-made content (models, textures, materials, sounds, prefabs, Lua scripts, effects, motion libraries) that you add to a project. MotaLaunch's Assets tab lists the free packs and adds them to your projects; you can also add one by hand (see below).

A pack added to a project lives in <project>/Packs/<Id>/ and becomes part of the project: edit its files, place its prefabs, and it ships with your game like the rest of the project folder.

Layout

packs/
  CrystalProps/            <- the folder name is the pack id
    pack.json              <- the manifest (below)
    Models/crystal.gltf
    Models/crystal.bin
    Materials/crystal.motamat
    Prefabs/crystal.prefab
    Scripts/pulse.lua
    Audio/hum.wav
    Previews/cover.png     <- at least one preview; the first is the cover
    README.md              <- optional notes for people (not checked)

Author a pack inside an engine checkout's packs/ folder (or any folder named packs), and name every file by packs/<Id>/..., the way samples name their files projects/<Name>/...:

"MeshAsset": "packs/CrystalProps/Models/crystal.gltf",
"Material":  "packs/CrystalProps/Materials/crystal.motamat",
"Script":    {"path": "packs/CrystalProps/Scripts/pulse.lua"}
mota.spawn("packs/CrystalProps/Prefabs/crystal.prefab", x, y, z)

Paths that a format resolves relative to its own file stay relative: a glTF's uris, a motion library's model and sidecar.

pack.json

{
  "format": 1,
  "id": "CrystalProps",
  "title": "Crystal Props",
  "version": "1.0.0",
  "kind": "art",
  "category": "Props",
  "summary": "Glowing crystals in three sizes, with a pulse script and a hum.",
  "description": "Longer text for the pack's page.",
  "license": "motaengine-content-1.0",
  "minEngineVersion": "1.3.0",
  "tags": ["fantasy", "props"],
  "previews": ["Previews/cover.png", "Previews/close-up.png"],
  "depends": [],
  "credits": [
    {"files": "*", "author": "Motaware", "source": "Made for Ember Run"}
  ]
}
FieldRules
format1
idA letter, then letters and digits, 2-48 characters. The folder's name.
versionx.y.z
kindart, audio, animation, kit (prefabs + scripts) or effects
licensemotaengine-content-1.0, cc0-1.0 or cc-by-4.0
minEngineVersionOptional x.y.z; projects made with an older editor are refused.
previewsPNG or JPEG files in the pack; the cover 1280x720 or larger.
dependsIds of packs whose packs/<Id>/ paths this pack's files use. They must be in the project first.
creditsWho made which files (files is a folder like Models/ or *) and where they came from (source). license per credit when it differs from the pack's; cc-by-4.0 parts must be credited.

Check a pack

MotaEngine --validate-pack=packs/CrystalProps

No window opens. It reports every problem and exits 0 when there are none:

  • pack.json: every field above.
  • Files: no programs or scripts other than Lua (.exe, .dll, .py, .sh, ...); no .pack-installed.json.
  • Paths: every quoted string in a text file (scenes, prefabs, materials, Lua, ...) that starts with packs/<Id>/ names a file or folder in the pack; other packs' paths are in depends; nothing names projects/... or an absolute path. A path longer than 100 characters after packs/<Id>/ gets a warning (see Path length).
  • Loading: each asset goes through the engine's own loader: models (glTF, GLB, FBX, OBJ), images, sounds (WAV, FLAC, MP3), Lua (compiled, not run), materials, motion libraries; every other engine format must be valid JSON.

Add a pack to a project

MotaLaunch: Assets, open the pack, Add to project. By hand:

MotaEngine --add-pack=packs/CrystalProps --project=MyProjects/MyGame/MyGame.motaproj

The pack is copied to <project>/Packs/<Id>/. In every text file except documentation (.md, .txt, .py, .html), packs/<Id>/ (and each dependency's packs/<Dep>/) becomes the form the project uses for its own files: what its startupScene starts with, e.g. C:/Users/you/Documents/MotaEngine/MyProjects/MyGame/Packs/CrystalProps/. .pack-installed.json records the version and a SHA-256 per file as written, so an update can tell the files you changed. It is not packaged. MotaLaunch also writes motalaunchAppId and motalaunchBuildId there (which pack and build it came from); the engine ignores them.

In MotaLaunch, Update brings a project's copy to the newest build. If you changed any of its files it stops and lists them; Replace my changes then updates anyway and puts your old copy in the Recycle Bin. Remove moves Packs/<Id>/ to the Recycle Bin.

Refused: a pack already in the project, a project older than minEngineVersion, a missing dependency, or a project folder so deep that a path would pass the limit below. Nothing is left behind.

In the editor

The Content Browser's Get more assets opens MotaLaunch on MotaEngine > Assets (MotaLaunch --show-assets[=<category>]; without MotaLaunch, its site). Pack folders read <Id> (pack: <Title>) in the folder tree, and inside one a strip shows the pack's title, version, licence and author, its Credits, and More like this, which opens the Assets page at the pack's category. editor.browse <folder> shows a project folder from the console or --exec.

Leave out what the game does not use

A pack brings whole folders; a game often uses a few models of one. Build Settings > Leave out asset-pack files the game does not use (or --package --package-unused-packs=skip) follows every path the project's scenes, prefabs, scripts and project file name into Packs/, then the paths those pack files name (glTF uris, materials, motion libraries), and keeps a used file's companions (x.gltf.meshsettings, x.bin, x.clips.json). A path a script completes (".../Prefabs/" .. name) keeps that whole folder. Anything it cannot rule out stays; pack.json, README.md and previews go. The packager prints how many files and MB it left out. A file a game loads by a name it builds at run time from parts outside any quoted path is the one case to check: run the packaged game before shipping.

Credits in a packaged game

--package adds an Asset packs section to the game's THIRD_PARTY_NOTICES.md with every pack in Packs/: its title, version, licence and each credits entry. A CC BY part must be credited, so keep the section when you edit the file. (Editors up to 1.3.1 do not add it: copy the credits from each pack's README.md yourself.)

Colours and glows

A pack's models carry their own base texture. Where a model needs a colour or a glow its file cannot hold, the pack ships a material and a <model>.gltf.meshsettings naming it, so every placement looks the same without per-entity settings. Change the material to restyle every placement.

A placed model is drawn as one mesh with one material, so a model whose parts use different textures (a character's skin, clothes and shoes) has them packed into one atlas when it loads, each part's UVs moved into its own tile (editors from 1.4; before that every part showed the first texture). A part that tiles its texture (UVs past 0..1) cannot share an atlas: such a model keeps one texture, so give tiling parts their own model file.

Motaware's packs

tools/packs/packs.json lists Motaware's free packs and where their files come from; python tools/packs/make_packs.py builds them into dist/packs/<Id>/ (files, materials, previews rendered by the engine, pack.json, README.md, then --validate-pack), and python tools/packs/check_packs.py adds them all to one project, checks every path and packages it. Every file comes from a script in its source project (Art/, tools/mocap); the motion capture in Mocap Locomotion is from The 100STYLE Dataset (CC BY 4.0) and the CMU Graphics Lab Motion Capture Database (see THIRD_PARTY_NOTICES.md).

Path length

Components keep asset paths in fixed fields of 191 characters (192 with the terminator). An added pack's paths start with the project's folder, so keep a pack's own part short, and projects in short folders.

The same rule everywhere

Making a project from a sample (the editor's New Project from a template, MotaLaunch's Create project) and adding a pack rewrite paths the same way: every text file except documentation. Until 2026-11-10 only .json, .lua and .motaproj were rewritten, so a Spire Siege project kept its prefabs pointing at the sample's scripts.