Game Content (Exor)
Language support for Exor game data files: .ent, .material, .gui, .td, .ag, .att,
.logic, .pu and more.
- Completion, hover, go-to-definition, find-references, rename and diagnostics.
- All of them come from the engine's TypeRegistry export, so they follow the real reflection
data, not a hand-written schema.
- Hover a
.dds path or a material name to see the texture.
Setup
Open the game's builds directory as the workspace root, or the folder that holds it (for
example a checkout with builds and .codex side by side). In the second case the game root is
the subfolder that carries a .vscode and the data. The extension finds the data roots and mods
by itself. The Lua settings go to the opened folder's .vscode/settings.json and point into
builds/.vscode/exor-lua.
Development
npm test runs the suites inside a real VS Code, against the fixture workspace in
src/test/fixtures/workspace. It uses the installed VS Code and sumneko.lua, so it downloads
nothing and does not touch your profile.
npm test
To run one suite against a real game build, set the workspace and a suite filter.
test:workspace skips the type-check.
GAMECONTENT_TEST_WORKSPACE=path/to/builds GAMECONTENT_TEST_GREP="lua probe" npm run test:workspace
Only run read-only suites, such as lua probe, against a real build. Suites that write
scratch files belong on the fixture.
test:parent runs the same suites with the workspace opened one folder above the game root
(src/test/fixtures), the layout of a checkout with builds and .codex side by side. The Lua
settings it writes to src/test/fixtures/.vscode are removed before and after the run.
npm run test:parent
Writing tests
- Wait for a real answer. While sumneko indexes, its hover is
Workspace loading: n / m.
- Check the result, not the name. A hover that repeats the symbol name passes even when nothing
loaded. Check that go-to-definition lands in the generated definitions.
- Give each case its own scratch file. VS Code reuses the cached document of a URI it already
opened, so the server answers for the old text.