edit frog.mod.toml spec

This commit is contained in:
lilly 2024-06-10 11:57:02 -05:00
parent 03262dfbdc
commit a8123209a6
Signed by: MaeMachineBroke
GPG key ID: B54591A4805E9CC8

View file

@ -1,7 +1,46 @@
# frog.mod.toml Specification # frog.mod.toml Specification
### Full Example **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 ```toml
[frog] [frog]
format_version = "1.0.0" # the version of this file format format_version = "1.0.0" # the version of this file format
@ -34,13 +73,9 @@ provides = [
mixin_config = "example_mod.mixins.json" mixin_config = "example_mod.mixins.json"
frog_aw = "example_mod.accesswidener" frog_aw = "example_mod.accesswidener"
pre_launch = "com/example/frog/PreLaunch" pre_launch = "com/example/frog/PreLaunch"
```
These keys are automatically inserted by [Phytotelma](/contributing/tools#phytotelma) for generated metadata files and their host mods respectively.
You should never need to insert them yourself.
```toml
included_jars = [ included_jars = [
{ id = "mod_id", path = "META-INF/jars/mod.jar" } { id = "mod_id", path = "META-INF/jars/mod.jar" }
] ]
phytotelma.generated = true phytotelma.generated = true
``` ```