Skip to content
S3ctor’s S3cret St4sh

Tool Morrowind active

Cod3x

OpenMW Lua tooling, context-aware annotations, and the OpenMW-Lua engineering field manual.

Stable
not released
Development
1.1-dev.8
Package
Single directory

Overview

Cod3x

Cod3x is the OpenMW-Lua development companion: Lua Language Server annotations, context-aware diagnostics, and an engineering field manual built from years of production OpenMW Lua, profiler work, repository history, and runtime archaeology.

Cod3x: Code, Context, Consequence.

The annotations answer what exists.

The Cod3x Field Manual answers how to engineer with it, why the rules exist, where the engine costs live, and which mistakes have already been Paid For With Blood.

Field Manual

Start with Why Cod3x Exists, then use the manual by problem:

Cod3x is also the map legend for the rest of the site. Follow a rule into an H3 pattern library, a S3maphore production system, or the historical evidence index.

LuaLS setup

Add the Cod3x folder to workspace.library, select LuaJIT, and load the Cod3x context plugin with runtime.plugin:

{
  "workspace.library": ["/absolute/path/to/Cod3x"],
  "runtime.version": "LuaJIT",
  "runtime.plugin": "/absolute/path/to/Cod3x/omw_context_plugin.lua"
}

Cod3x ships an example config at examples/openmw-mod/.luarc.json.

Declare script context

Add a context annotation near the top of every OpenMW-facing script:

---@omw-context player

Available contexts are global, local, player, menu, and load, plus Cod3x's shared-code sets runtime, all, and none.

For shared code, combine contexts with |:

---@omw-context global | player

Use scoped context assertions when only a narrow block has a stronger runtime guarantee:

---@omw-context global | player
local core = require 'openmw.core'

---@omw-context-next player
local camera = require 'openmw.camera'

See Script Contexts for the model and exact semantics.

Type your own interfaces

Keep interface metadata in your workspace; OpenMW does not load it:

---@meta

---@class openmw.interfaces
---@field MyMod? openmw.interfaces.MyMod

---@class openmw.interfaces.MyMod
---@field version string
---@field doThing fun(target: unknown): boolean

Editor formatting

Cod3x's context plugin uses virtual LuaLS transforms. They improve context-aware diagnostics but must not become the source text for on-type formatting edits.

If VS Code/VSCodium inserts or indents text incorrectly, disable LuaLS on-type formatting for the workspace. The example .luarc.json carries the recommended settings.

Credits

  • All code in this repository was generated by Dave Corley under the GPL3 License.
  • Please enjoy my content, hack away as you please, and respect the freedoms of your fellow creators in the meantime.

Install

Single directory · 1.1-dev.8

DreamWeave clientsCHIMERA and other tools that read the manifest

Give the tool this page's address, or the manifest directly. It finds the release for its channel, checks compatibility and dependencies, downloads from any listed source and refuses bytes whose SHA-256 does not match.

Project id
77a5e247-6e75-4507-a97a-7d849744446d
Manifest
https://dreamweave-mp.github.io/S3ctors-S3cret-St4sh/dreamweave/projects/77a5e247-6e75-4507-a97a-7d849744446d.json

What is in the archive

  • cod3x.zip
    • the mod's filesone data directory
    • cod3x-Documentation/this page and its docs, readable offline
    • cod3x-dwmod.tomlthe project's mod.toml
    • dreamweave.release.jsonwhat this archive is, for tools
  1. 1.0 stable unverified 2026-09-15

  2. 0.4 stable unverified 2026-09-04

  3. 0.3 stable unreleased 2026-05-29

Discussion

GitHub Discussions · sign in with GitHub to join in