frogmc.dev/spec/fmt.md

4 KiB

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 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 specification.
  • license: the license of your mod. Should be either an SPDX License Identifier or a hyperlink to your license. Optional but recommended.
  • credits: the credits of your mod. Should be made up of 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.

[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 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, or a range of SemVer versions (see this for a more detailed specification on SemVer ranges). 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: reference to a .mixins.json file contained within the src/resources folder. See Mixin.
  • accesswidener: reference to a .accesswidener file contained within the src/resources folder. See AccessWidener.
  • prelaunch: reference to a PreLaunch class on the classpath, separated by forward slashes. See PreLaunch.

Internal Keys

The included_jars and phytotelma.generated keys are inserted by the Phytotelma tool and should not be edited manually.

Full Example

The following is an example of a complete well-formated frog.mod.toml file.

[frog]
format_version = "1.0.0"

[frog.mod]
id = "example_mod"
name = "Example Mod"
version = "1.0.0"
license = "CC0-1.0"
credits = [
    { name = "You", roles = ["author", "other_role"] }
]

[frog.dependencies]
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" }
]

[frog.extensions]
mixin = "example_mod.mixins.json"
accesswidener = "example_mod.accesswidener"
prelaunch = "com/example/frog/PreLaunch"

included_jars = [
    { id = "mod_id", path = "META-INF/jars/mod.jar" }
]
phytotelma.generated = true