Rename bmod to just mod

This commit is contained in:
2026-11-04 22:07:45 -03:00
parent fe0d857021
commit 5baaf0239a
33 changed files with 253 additions and 253 deletions
+4 -4
View File
@@ -50,11 +50,11 @@ Folders in `mods/` starting with `_` or `.` are skipped, which is handy for park
## Building and Running
```sh
deno task build # packs every mod in mods/ into server_mods/<id>.bmod, and builds the client
deno task server # starts a server with every .bmod in server_mods/
deno task build # packs every mod in mods/ into server_mods/<id>.cubi, and builds the client
deno task server # starts a server with every .cubi in server_mods/
```
`build` refuses to pack a mod that has errors. The server checks every `.bmod` again when it starts, and a problem in
`build` refuses to pack a mod that has errors. The server checks every `.cubi` again when it starts, and a problem in
any mod stops it from starting, naming the mod and what's wrong. The game never runs with some mods missing.
Open the server's address in a browser to play. To try a change, rebuild and restart the server, then rejoin. Leaving a
@@ -101,6 +101,6 @@ Deno.test("a hoe turns grass into farmland", async () => {
## Next Steps
- [Mod Files](modfiles.md): the manifest, the folder layout, and `.bmod` files.
- [Mod Files](modfiles.md): the manifest, the folder layout, and `.cubi` files.
- [Sides](../concepts/sides.md): which script runs where, and why it matters.
- [Blocks](../blocks/index.md) and [Items](../items/index.md): most mods start here.
+6 -6
View File
@@ -1,7 +1,7 @@
# Mod Files
A mod is a folder with a `manifest.json`, some data files, textures, and up to four scripts. The build packs it into a
single `.bmod` file, which is what servers load.
single `.cubi` file, which is what servers load.
## Layout
@@ -109,18 +109,18 @@ this repository. That config maps the API types, which scripts import as `cubi/s
import type { ServerContext } from "cubi/server";
```
## `.bmod` Files
## `.cubi` Files
A `.bmod` is a built mod in one zip file. Servers load every `.bmod` in their `server_mods/` folder, so installing a mod
A `.cubi` is a built mod in one zip file. Servers load every `.cubi` in their `server_mods/` folder, so installing a mod
on a server is dropping its file there and restarting.
```sh
deno task pack-mod mods/copper_tools # writes copper_tools.bmod, to share
deno task pack-mod mods/copper_tools # writes copper_tools.cubi, to share
deno task build # packs every mod in mods/ into server_mods/
```
```
copper_tools.bmod
copper_tools.cubi
manifest.json # with scripts and credits pointing into the zip
data.json # every block, model, item, entity, recipe, ore, tag and loot table, and the config
scripts/server.js # each script bundled into one module
@@ -134,7 +134,7 @@ copper_tools.bmod
- Packing checks the mod first, like `check-mods`, and refuses one with errors.
- Packing the same mod twice gives the same bytes, so the file only changes when the mod does.
- `deno task build` leaves other `.bmod` files in `server_mods/` alone, so mods from elsewhere can sit next to the ones
- `deno task build` leaves other `.cubi` files in `server_mods/` alone, so mods from elsewhere can sit next to the ones
it builds.
- Players get a copy **without** `scripts/server.js`, `scripts/worldgen.js` and the config. See
[Networking](../networking/index.md).