|
SpaghettiKart
|
The mods.toml file is a metadata file required for all mods and resource packs in SpaghettiKart. It uses the TOML format and defines important information about your mod, including its name, version, and dependencies.
The mods.toml file must be placed at the root of your mod archive (.o2r, .zip) or folder.
Here's a minimal mods.toml file:
Here's a complete example with all supported fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Unique identifier for your mod. Use lowercase letters, numbers, and hyphens. |
version | String | Yes | Version of your mod following Semantic Versioning (e.g., 1.0.0, 1.0.0-alpha1). |
The [dependencies] section is optional and allows you to specify other mods that your mod requires.
Each dependency is defined as:
Version requirements follow semantic versioning ranges:
| Format | Description | Example |
|---|---|---|
1.0.0 | Exact version | Only version 1.0.0 |
>=1.0.0 | Greater than or equal | Version 1.0.0 or higher |
>=1.0.0 <2.0.0 | Range | Between 1.0.0 (inclusive) and 2.0.0 (exclusive) |
>=1.0.0-alpha1 | With prerelease | Version 1.0.0-alpha1 or higher |
see Semantic Versioning for more details.
SpaghettiKart defines three core packages that are always available:
mk64-assets - The base game resources (version 1.0.0-alpha1) (mk64.o2r)extended-assets - SpaghettiKart additional assets (version 1.0.0-alpha1) (spaghetti.o2r)spaghettikart-core - SpaghettiKart core engine (For verifying that mods support your game version)If your mod depends on touching base game assets or SpaghettiKart assets, you should declare a dependency on these packages. For example:
When SpaghettiKart loads mods, it performs the following validations:
Mods are automatically sorted based on their dependencies:
=1.0.0 because assets may change between versionsWhen using the migration script (migrations.py), a mods.toml file can be automatically generated for your migrated mod. See Migration Guide for details.