82 lines
4.6 KiB
Markdown
82 lines
4.6 KiB
Markdown
# frog.mod.toml Specification
|
|
|
|
**frog.mod.toml** is a file containing metadata related to your mod in frog. It is quite similar to the metadata formats of other mod loaders, however it is reorganized to be less cluttered. It is in the [TOML](https://toml.io/) format, and this document will use the grammar of that format.
|
|
|
|
#### `[frog]`
|
|
The `[frog]` table contains information about this metadata file.
|
|
- `format_version`: the format version of this frog.mod.toml file. The current format version is 1.0.0.
|
|
|
|
#### `[frog.mod]`
|
|
The `[frog.mod]` table contains information about your mod.
|
|
- `id`: your mods namespace id. Should be alphanumeric without spaces, and all lowercase.
|
|
- `name`: the formatted name of your mod. Optional but strongly recommended.
|
|
- `version`: the version of your mod. Should respect the [SemVer](https://semver.org/) specification.
|
|
- `license`: the license of your mod. Should be either an [SPDX License Identifier](https://spdx.org/licenses/) or a hyperlink to your license. Optional but recommended.
|
|
- `credits`: the credits of your mod. Should be made up of [Person](#Person) inline tables. Optional but recommended.
|
|
|
|
##### Person
|
|
The Person inline table identifies someone associated with your mod. It contains the following fields:
|
|
- `name`: The name of the person. Can be any string.
|
|
- `roles`: The roles of the person in the project. Should be an array of strings. The strings can be arbitrary, but the following are recommended for consistency between mods:
|
|
- TODO
|
|
|
|
#### `[frog.dependencies]`
|
|
The `[frog.dependencies]` table contains information about this mod's dependencies, as well as mod incompatibilities. `depends`, `breaks`, `suggests`, and `provides` are all arrays of [Mod](#Mod) inline tables.
|
|
|
|
##### Mod
|
|
The Mod inline table contains information referencing a mod other than your own. It contains the following fields:
|
|
- `id`: the other mods namespace id. Should be alphanumeric without spaces and all lowercase, unless the source mod isn't.
|
|
- `versions`: the range of versions of the other mod that your mod requires. Should be a SemVer version, optionally preceded by `>`, `<`, `>=`, `<=` to indicate inequality operators, (greater than, less than, greater than or equal to, and less than or equal to respectively). If any version is acceptable, can also be set to `*`. In the `provides` array, this must be an exact version.
|
|
- `name`: the formatted name of the required mod. Optional.
|
|
- `link`: a link to the download page of the mod. Mods from certain sites may be able to be handled specially by frog loader. Optional.
|
|
|
|
#### `[frog.extensions]`
|
|
The `[frog.extensions]` table contains information on definitions that modify the behavior of the loader or game. It can contain the following fields, all of which are optional:
|
|
- `mixin_config`: reference to a `mixins.json` file contained within the `src/resources` folder. See [Mixin Config Specification](/spec/mixin-config).
|
|
- `frog_aw`: reference to a `.accesswidener` file contained within the `src/resources` folder. See [AccessWidener Specification](/spec/aw).
|
|
- `pre_launch`: reference to a PreLaunch class. Packages should be separated by forward slashes instead of periods. See [PreLaunch (TODO)]().
|
|
|
|
#### Internal Keys
|
|
The `included_jars` and `phytotelma.generated` keys are inserted by the [Phytotelma](/contributing/tools#phytotelma) tool and should not be edited manually.
|
|
|
|
### Full Example
|
|
The following is an example of a complete well-formated frog.mod.toml file.
|
|
```toml
|
|
[frog]
|
|
format_version = "1.0.0" # the version of this file format
|
|
|
|
[frog.mod]
|
|
id = "example_mod" # Your mod's id
|
|
name = "Example Mod"# The name of your mod
|
|
version = "1.0.0" # the mod version, must respect SemVer
|
|
license = "CC0-1.0" # License (SPDX Format recommended)
|
|
credits = [ # List of Person declarations
|
|
{ name = "You", roles = ["author", "other_role"] }
|
|
]
|
|
|
|
[frog.dependencies] # Dependency declarations
|
|
# For all dependencies only the id and version (range) are required.
|
|
depends = [
|
|
{ id = "other_mod", versions = ">=0.2.0", name = "Other Mod", link = "https://modrinth.com/mod/<slug>" }
|
|
]
|
|
breaks = [
|
|
{ id = "old_mod", versions = "*" }
|
|
]
|
|
suggests = [
|
|
{ id = "frogloader", versions = "*" }
|
|
]
|
|
provides = [
|
|
{ id = "provided_mod", version = "2.0.0" } # note: provides does not support version ranges, only a single version!
|
|
]
|
|
|
|
[frog.extensions] # key-value pairs for whatever else is needed (Entrypoints, custom values, lists of files, indicators...)
|
|
mixin_config = "example_mod.mixins.json"
|
|
frog_aw = "example_mod.accesswidener"
|
|
pre_launch = "com/example/frog/PreLaunch"
|
|
included_jars = [
|
|
{ id = "mod_id", path = "META-INF/jars/mod.jar" }
|
|
]
|
|
phytotelma.generated = true
|
|
|
|
```
|