forked from addonscript/addonscript-spec
Merge pull request 'grammar and markdown format fixes' (#4) from LordMZTE/addonscript-spec:grammarfix into master
Reviewed-on: https://tilera.xyz/git/AddonScript/addonscript-spec/pulls/4
This commit is contained in:
commit
7018277402
10 changed files with 76 additions and 70 deletions
26
README.md
26
README.md
|
@ -5,30 +5,30 @@ This repository contains the AddonScript specification.
|
||||||
## What is AddonScript?
|
## What is AddonScript?
|
||||||
|
|
||||||
AddonScript is a format to distribute Minecraft addons. An addon could be anything, which is installed
|
AddonScript is a format to distribute Minecraft addons. An addon could be anything, which is installed
|
||||||
to the Minecraft game, like a mod, modpack, modloader, texturepack or even a world could be an addon.
|
into the Minecraft game, like a mod, modpack, modloader, texturepack or even a world.
|
||||||
AddonScript can be used for example to define, how addons should be installed or to specify dependencies
|
AddonScript can be used for example to define how addons are installed, or to specify dependencies
|
||||||
for addons. This way addon creators just have to publish the AddonScript file for their addon and let
|
for addons. This way, addon creators just have to publish the AddonScript file for their addon and let
|
||||||
AddonScript compatible tools (for example launchers) install them.
|
AddonScript compatible tools (for example launchers) install them.
|
||||||
|
|
||||||
## The values of AddonScript
|
## The values of AddonScript
|
||||||
|
|
||||||
### Open
|
### Open
|
||||||
|
|
||||||
AddonScript can be used by everyone. There is no company or economic interest behind AddonScript,
|
AddonScript can be used by everyone. There is no company or economic interest behind AddonScript.
|
||||||
it is intended to be an open standard, which can be implemented by anyone who like to. Anyone can
|
It is intended to be an open standard, which can be implemented by anyone who likes to. Anyone can
|
||||||
contribute ideas to the AddonScript specification.
|
contribute ideas to the AddonScript specification.
|
||||||
|
|
||||||
### Independent
|
### Independent
|
||||||
|
|
||||||
AddonScript depends on nothing, except Minecraft itself (and Java). This means, that the specification
|
AddonScript depends on nothing, except Minecraft itself (and Java). This means that the specification
|
||||||
does not depend on existing APIs and formats like Curseforge and it also does not reference any specific
|
does not depend on existing APIs and formats like Curseforge. It also does not reference any specific
|
||||||
modloader like Forge or Fabric, instead they are itself addons, which can be defined using AddonScript.
|
modloader like Forge or Fabric, instead they are themselves addons, which can be defined using AddonScript.
|
||||||
This means, that AddonScript is not bound to a specific set of modloaders, instead you can use any
|
This means, that AddonScript is not bound to a specific set of modloaders, instead you can use any
|
||||||
modloader you want.
|
modloader.
|
||||||
|
|
||||||
### Universal
|
### Universal
|
||||||
|
|
||||||
AddonScript is not bound to any specific use case like just for modpack or just for mods. Instead it
|
AddonScript is not bound to any specific use case like just for modpacks or just for mods. Instead it
|
||||||
is considered to be a universal format, which could handle anything, that should be installed into
|
is considered to be a universal format, which can handle anything, that is installed into
|
||||||
the Minecraft game. AddonScript could handle modloaders, mods, modpacks, texturepacks and even worlds
|
the Minecraft game. AddonScript can handle modloaders, mods, modpacks, texturepacks and even worlds
|
||||||
and maybe other things, we can't think of.
|
and maybe other things as well.
|
||||||
|
|
|
@ -3,39 +3,44 @@
|
||||||
## Install steps
|
## Install steps
|
||||||
|
|
||||||
### move
|
### move
|
||||||
```move [location]``` \
|
`move [location]`
|
||||||
move is simplest install step of all. It just moves the selected file to
|
|
||||||
|
`move` is simplest install step of all. It just moves the selected file to
|
||||||
the given location.
|
the given location.
|
||||||
|
|
||||||
### extract
|
### extract
|
||||||
```extract [location]``` \
|
`extract [location]`
|
||||||
extract can be used with zip files, to extract the contents of the zip file
|
|
||||||
|
`extract` can be used with zip files, to extract the contents of the zip file
|
||||||
to the given location.
|
to the given location.
|
||||||
|
|
||||||
### rename
|
### rename
|
||||||
```rename [new name]``` \
|
`rename [new name]`
|
||||||
rename renames the selected file to the new given filename.
|
|
||||||
|
`rename` renames the selected file to the new given filename.
|
||||||
|
|
||||||
### execute
|
### execute
|
||||||
```execute [location] [arguments]```
|
`execute [location] [arguments]`
|
||||||
execute can be used with an executable jar file. The jar file will be executed with the given arguments and
|
|
||||||
|
`execute` can be used with an executable jar file. The jar file will be executed with the given arguments and
|
||||||
the given location as working directory. A client should inform the user before just executing the file and
|
the given location as working directory. A client should inform the user before just executing the file and
|
||||||
ask him for permission to do so and/or it should execute the jar in a closed environment, like a container,
|
ask them for permission to do so and/or it should execute the jar in a closed environment like a container
|
||||||
to prevent viruses from being installed.
|
to prevent malicous code from running.
|
||||||
|
|
||||||
### select
|
### select
|
||||||
```select [filename]```
|
`select [filename]`
|
||||||
select is used to select the file with the given file name for other installation steps.
|
|
||||||
|
`select` is used to select the file with the given file name for other installation steps.
|
||||||
The file name can also be a relative path, if the file is not directly in the Minecraft directory.
|
The file name can also be a relative path, if the file is not directly in the Minecraft directory.
|
||||||
If no file name is given, the selection resets to the original file itself, also if it was already moved to another location.
|
If no file name is given, the selection resets to the original file itself, also if it was already moved to another location.
|
||||||
|
|
||||||
## Locations
|
## Locations
|
||||||
|
|
||||||
Locations are specified as a relative path from the Minecraft directory. For example `./mods`
|
Locations are specified as a relative path from the Minecraft directory to which the file should be installed.
|
||||||
would point to the mods directory of the Minecraft instance, to which the file should be installed.
|
For example `./mods` would point to the mods directory of the Minecraft instance.
|
||||||
|
|
||||||
## Directories
|
## Directories
|
||||||
|
|
||||||
If the selected file is a directory, then it is treated like a zip file, which means, that you can move and
|
If the selected file is a directory, then it is treated like a zip file, which means, that you can move and
|
||||||
rename it like normal files, but also use the `extract` install step, to move all contents of the directory
|
rename it like a normal file, but also use the `extract` install step to move all contents of the directory
|
||||||
to the specified location.
|
to the specified location.
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
``` json
|
``` json
|
||||||
{
|
{
|
||||||
"version": 2
|
"version": 2
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Currently the AddonScript object only contains the version of AddonScript, the file ist using.
|
Currently the AddonScript object only contains the version of AddonScript the file uses.
|
||||||
In future versions there may be other information in this.
|
In future versions, there may be other information added to this.
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
``` json
|
``` json
|
||||||
{
|
{
|
||||||
"id": "modfile",
|
"id": "modfile",
|
||||||
"url": "https://example.com/mymod.jar",
|
"url": "https://example.com/mymod.jar",
|
||||||
"flags": [],
|
"flags": [],
|
||||||
"install": [
|
"install": [
|
||||||
"move mods"
|
"move mods"
|
||||||
],
|
],
|
||||||
"sha1": "somesha1checksum"
|
"sha1": "somesha1checksum"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -16,10 +16,11 @@
|
||||||
|
|
||||||
### id
|
### id
|
||||||
|
|
||||||
This is the ID of the file. It should only contain lowercase letters, numbers and dashes.
|
This is the ID of the file. It should only contain **lowercase letters, numbers and dashes**.
|
||||||
|
|
||||||
If multiple file objects in the same array have the same ID, they are treated as the same file,
|
If multiple file objects in the same array have the same ID, they are treated as the same file,
|
||||||
which means, that the first one of them in the array will be used unless it can't be retrieved from the URL,
|
which means that the first one of them in the array will be used unless it can't be retrieved from the URL,
|
||||||
in which case the next one will be used as fallback.
|
in which case the next one will be used as a fallback.
|
||||||
|
|
||||||
### url
|
### url
|
||||||
|
|
||||||
|
@ -27,15 +28,15 @@ This is URL, which points to the actual file. The URL can have one of the scheme
|
||||||
|
|
||||||
### install
|
### install
|
||||||
|
|
||||||
This is an array of [install steps](../install.md). They describe, how the file should be installed to the game.
|
This is an array of [install steps](../install.md). They describe how the file should be installed to the game.
|
||||||
The order in the array correspond to the order, in which the install steps should be applied.
|
The order in the array corresponds to the order in which the install steps should be applied.
|
||||||
|
|
||||||
## Optional properties
|
## Optional properties
|
||||||
|
|
||||||
### flags
|
### flags
|
||||||
|
|
||||||
This is an array of [flags](../flags.md) for this file. If this property is not present in a file object, the file
|
This is an array of [flags](../flags.md) for this file. If this property is not present in a file object, the file
|
||||||
will have the flags, which are set as default for files or, if no default was set, it will inherit the flags from the
|
will have the flags which are set as default for files, or if no default was set, it will inherit the flags from the
|
||||||
associated version, which are applicable for files.
|
associated version, which are applicable for files.
|
||||||
|
|
||||||
### sha1
|
### sha1
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
|
|
||||||
### versions
|
### versions
|
||||||
|
|
||||||
This is a map, with version numbers as keys and URLs to AddonScript files as values. The AddonScript file, to which the URL
|
This is an object, with version numbers as keys and URLs to AddonScript files as values. The AddonScript file which the URL
|
||||||
points, must include the version number, which is the key in the map, and its addon ID must match the addon ID of the AddonScript
|
points to must include the version number, which is the key in the map, and its addon ID must match the addon ID of the AddonScript
|
||||||
file, which includes the index object.
|
file which includes the index object.
|
||||||
|
|
||||||
### addons
|
### addons
|
||||||
|
|
||||||
This is a map, with addon IDs as keys and URLs to AddonScript files as values. The addon ID of the AddonScript file, to
|
This is an object, with addon IDs as keys and URLs to AddonScript files as values. The addon ID of the AddonScript file, to
|
||||||
which the URL points, must match the key in the map.
|
which the URL points, must match the key in the map.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Meta Object
|
# Meta Object
|
||||||
|
|
||||||
Meta objects can be included in [addon](root.md) and [version](version.md) objects.
|
Meta objects can be included in [addon](root.md) and [version](version.md) objects.
|
||||||
They should be used, to give information about the addon or the version, like a name,
|
They should be used to give information about the addon or the version, like a **name**,
|
||||||
a description or a changelog. The specification does not require a specific format
|
a **description** or a **changelog**. The specification does not require a specific format
|
||||||
for meta objects, therefore you can add any property you want to it. It is however
|
for meta objects, therefore you can add any property to it.
|
||||||
recommended, to follow conventions for it.
|
It is however recommended to follow conventions for it.
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
### id
|
### id
|
||||||
|
|
||||||
This is the ID or namespaced ID of the addon, this relation refers to.
|
This is the ID or namespaced ID of the addon this relation refers to.
|
||||||
|
|
||||||
### version
|
### version
|
||||||
|
|
||||||
|
@ -23,5 +23,5 @@ This is a [maven version range](https://maven.apache.org/enforcer/enforcer-rules
|
||||||
### flags
|
### flags
|
||||||
|
|
||||||
This is an array of [flags](../flags.md) for this relation. If this property is not present in a relation object, the relation
|
This is an array of [flags](../flags.md) for this relation. If this property is not present in a relation object, the relation
|
||||||
will have the flags, which are set as default for relations or, if no default was set, it will inherit the flags from the
|
will have the flags which are set as default for relations or, if no default was set, it will inherit the flags
|
||||||
associated version, which are applicable for relations.
|
which are applicable for relations from the associated version.
|
||||||
|
|
|
@ -16,7 +16,7 @@ This is the ID of the repository. It has to be unique to the AddonScript file.
|
||||||
|
|
||||||
### type
|
### type
|
||||||
|
|
||||||
This is the type of the repository. Possible values are ```api``` or ```maven```.
|
This is the type of the repository. Possible values are `api` or `maven`.
|
||||||
|
|
||||||
### link
|
### link
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
``` json
|
``` json
|
||||||
{
|
{
|
||||||
"addonscript": {},
|
"addonscript": {},
|
||||||
"id": "myaddon",
|
"id": "myaddon",
|
||||||
"versions": [],
|
"versions": [],
|
||||||
"repositories": [],
|
"repositories": [],
|
||||||
"index": {},
|
"index": {},
|
||||||
"flags": {},
|
"flags": {},
|
||||||
"meta": {}
|
"meta": {}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -20,24 +20,24 @@ This is an [AddonScript object](addonscript.md) containing information about the
|
||||||
|
|
||||||
### id
|
### id
|
||||||
|
|
||||||
This is the ID of your addon. It should only contain lowercase letters, numbers and dashes.
|
This is the ID of your addon. It should only contain **lowercase letters, numbers and dashes**.
|
||||||
|
|
||||||
## Optional properties
|
## Optional properties
|
||||||
|
|
||||||
### versions
|
### versions
|
||||||
|
|
||||||
This is an array of [version objects](version.md). It is possible to define multiple versions of the addon in one AddonScript file,
|
This is an array of [version objects](version.md). It is possible to define multiple versions of the addon in one AddonScript file,
|
||||||
but in the most cases, there should be just one version per file. Although this property is optional, as you can define versions
|
but in the most cases there should be just one version per file. Athough this property is optional, as you can define versions
|
||||||
in the [index](index.md), it can be used to define a list of versions, which can be found in the index.
|
in the [index](index.md), it can be used to define a list of versions, which can be found in the index.
|
||||||
|
|
||||||
### repositories
|
### repositories
|
||||||
|
|
||||||
This is an array of [repository objects](repository.md). Each repository object defines one repository, from which files or
|
This is an array of [repository objects](repository.md). Each repository object defines one repository from which files or
|
||||||
addons can be retrieved.
|
addons can be retrieved.
|
||||||
|
|
||||||
### index
|
### index
|
||||||
|
|
||||||
This is an [index object](index.md), which includes links to other versions of this addon or to other related addons.
|
This is an [index object](index.md) which includes links to other versions of this addon, or to other related addons.
|
||||||
|
|
||||||
### flags
|
### flags
|
||||||
|
|
||||||
|
|
|
@ -21,16 +21,16 @@ as they are used to comparing versions.
|
||||||
|
|
||||||
### files
|
### files
|
||||||
|
|
||||||
This is an array of [file objects](file.md), including the files, belonging to this version.
|
This is an array of [file objects](file.md) including the files belonging to this version.
|
||||||
|
|
||||||
### relations
|
### relations
|
||||||
|
|
||||||
This is an array of [relation objects](relation.md), which represents related addons.
|
This is an array of [relation objects](relation.md) which represents related addons.
|
||||||
|
|
||||||
### flags
|
### flags
|
||||||
|
|
||||||
This is an array of [flags](../flags.md) for this version. If this property is not present in a version object, the version
|
This is an array of [flags](../flags.md) for this version. If this property is not present in a version object, the version
|
||||||
will have the flags, which are set as default for versions.
|
will have the flags which are set as default for versions.
|
||||||
|
|
||||||
### meta
|
### meta
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue