Package Format¶
An exported mod is a single file under Mods/:
Mods/My Mod.cne encrypted package, the normal export
Mods/My Mod.zip plain package, the unencrypted variant
Players drop this file into their Mods/ folder; the game detects what is there at startup.
Do not author packages directly
A package is a build output, not an editing format. Its sprites have been repacked into texture atlases and its per-frame PNGs no longer exist as separate files, so there is nothing sensible to hand-edit. Author the source folder under Editor/<Mod Name>/ and re-export.
Structure¶
Both extensions are ZIP archives. .cne writes the archive through an encryption stream; .zip writes it plainly. The archive contents are otherwise identical.
Inside, the layout mirrors the source folder, with the same config.json, entity JSON, level JSON, audio, and scripts. Three things differ.
Sprites become atlases. Individual 0.png, 1.png frames are gone. Their pixels are packed into shared texture pages under Sprite Atlases/:
| Entry | Contents |
|---|---|
Sprite Atlases/core <n>.png |
Entity sprite pages. |
Sprite Atlases/presentation.png |
Presentation and menu art. |
Sprite Atlases/palette.png |
The default palette, stored separately so its index stays coherent. |
Levels/Sprite Atlases/level <level>-<scene> <n>.png |
Level background pages. |
Levels/Sprite Atlases/animation <n>.png |
Level animation pages. |
Atlas pages are capped at 4096 pixels square and target about 80% occupancy, so a large pack produces several numbered pages.
atlasesData.json is added at the archive root. It maps every original sprite to its page and rectangle. It is generated during export and has no meaning outside a package.
Checksums are filled in. config.json dependenciesChecksums, empty in a source pack, is populated with the actual checksum of each dependency at export time. id is kept as is, and dependenciesIds records the id of each dependency that has one.
Music may also be trimmed on export: a track with a loopEndTimeInSeconds can be cut at that point, since nothing after it is ever heard.
Exporting¶
Export is done from the in-game editor's export step, which is also where you choose encrypted or plain. It reads Editor/<Mod Name>/ and writes to Mods/.
The name of the output file comes from the pack's display name, which is the source folder name. A mod with an id is the same mod under any name: exporting it after a rename replaces the file exported under the previous name.
Sharing¶
The exported file is the whole mod. Players copy it into Mods/ and restart the game.
Because dependency checksums are captured at export, a mod that depends on another pack expects that specific version. Re-export after a dependency changes.