Skip to content

Package a shard

Players never copy DLLs by hand. A unit travels inside a CrystalWorkshop Shard (.cws), next to any data, text and scripts your mod changes. PulseDepot installs the shard; Crux loads the unit when the game starts.

The flow: project → native code unit (and attachments) → export → install with PulseDepot.

Terminal window
cargo build --release --target i686-pc-windows-gnu

Check its exports first (see Testing): exactly init and shutdown.

  1. Open CrystalWorkshop with the game your unit targets (see First run).
  2. Open the Project page (Ctrl+K › Project).
  3. Under Native code, type a unit id: 1 to 64 printable characters, no spaces, unique in your mod. Keep it the same in every release.
  4. Tick Late (first field idle) if your unit should start at the first field idle instead of while the mod image loads (see Units and exports).
  5. Choose Add DLL… and pick your DLL. The row shows the unit’s phase, size, SHA-256 and exports, and other installed mods that ship a unit with the same id. Adding a DLL under an existing id replaces it.

The page shows a red “contains native code” notice: a unit runs inside the game and can do anything the game can. PulseDepot shows players the same warning.

Under Attachments, add a README or other files players should get with the mod. The changelog and artwork come from the mod metadata.

If your unit has a menu, add its translated texts to the mod as well (see In-game settings).

  1. Choose Export… in the navigator. A project with extension units can be exported even without file changes.
  2. Choose Shard (.cws).
  3. Fill in the Mod metadata: name, description and a semver version are required; add the changes for this version.
  4. Choose Build shard. CrystalWorkshop builds the shard, verifies it and writes it to the Output path shown in the metadata form.

The full export options are in the Mod export reference.

  1. Start PulseDepot, pick the game, choose Add mod… and select the .cws.
  2. If your menu needs it, also install the XIII Mod Settings mod.
  3. Review and apply, then start the game (see Install shard mods).
  4. Read Crux.jsonl for your unit’s lines (see Logging).

Removing the mod in PulseDepot removes the unit. The game’s saves are never touched.

The same steps are available to scripts and AI clients through CrystalWorkshop’s MCP server: the project tool’s add_unit operation (id, path to the DLL, late) and add_attachment, then the shard export. See AI clients (MCP).