@shazbot14/create-warhammer3-mod
v0.1.2
Published
Create a TypeScriptToLua project for Total War: WARHAMMER III mods.
Readme
@shazbot14/create-warhammer3-mod
Create a cross-platform TypeScriptToLua project for Total War: WARHAMMER III mods.
Node.js 20.19.0 or newer is required by the generated ESLint 10 setup.
The generator creates a minimal project with:
- TypeScriptToLua configured for Lua 5.1.
- WARHAMMER III declarations from
@shazbot14/warhammer3-types. - Lua standard-library declarations from
lua-types. - ESLint rules for common TypeScriptToLua incompatibilities.
- A campaign entry point at
campaign/mod/<project-name>.ts.
The entry-point filename uses the normalized project name, so a project named
My Mod gets campaign/mod/my-mod.ts.
It does not copy game files into a Steam installation or include custom Lua runtime helpers.
Usage
Create a project in a new directory:
npx @shazbot14/create-warhammer3-mod@latest my-modThe generator installs dependencies by default. To create the files without installing dependencies immediately:
npx @shazbot14/create-warhammer3-mod@latest my-mod --skip-installYou can also initialize a git repository:
npx @shazbot14/create-warhammer3-mod@latest my-mod --gitThe npm initializer form is also supported:
npm create @shazbot14/warhammer3-mod -- my-modThe target directory must not already contain files. This prevents the generator from overwriting an existing project.
Generated project
From the generated project directory:
npm run buildThis runs ESLint and then tstl. Generated Lua is written to script/, while
preserving the source layout:
campaign/mod/<project-name>.ts -> script/campaign/mod/<project-name>.luaPublishing
Preview the files that will be published:
npm pack --dry-runPublish a new version publicly:
npm version patch
npm publish --access publicScoped package versions cannot be reused once published. npm requires either 2FA for publishing or a granular access token configured to bypass 2FA.
