2021-06-23 22:06:21 +02:00
|
|
|
# File Object
|
|
|
|
|
2021-11-14 00:37:29 +01:00
|
|
|
```json
|
2021-06-23 22:06:21 +02:00
|
|
|
{
|
2021-07-18 12:32:57 +02:00
|
|
|
"id": "modfile",
|
2022-01-29 17:33:32 +01:00
|
|
|
"link": "https://example.com/mymod.jar",
|
2021-07-18 12:32:57 +02:00
|
|
|
"flags": [],
|
2021-09-06 16:43:50 +02:00
|
|
|
"install": [],
|
|
|
|
"sha1": "somesha1checksum",
|
|
|
|
"conditions": {}
|
2021-06-23 22:06:21 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Required properties
|
|
|
|
|
|
|
|
### id
|
|
|
|
|
2021-11-14 00:17:32 +01:00
|
|
|
This is the ID of the file.
|
|
|
|
It should be written in the `kebab-case` format, meaning lowercase only and using `-` instead of spaces.
|
2021-07-18 12:32:57 +02:00
|
|
|
|
2021-11-14 00:17:32 +01:00
|
|
|
<!--TODO: error if there are multiple relations with the same id and allow multiple urls-->
|
2021-11-14 00:37:29 +01:00
|
|
|
|
2021-06-23 22:06:21 +02:00
|
|
|
If multiple file objects in the same array have the same ID, they are treated as the same file,
|
2021-07-18 12:32:57 +02:00
|
|
|
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 a fallback.
|
2021-06-23 22:06:21 +02:00
|
|
|
|
2022-01-29 17:33:32 +01:00
|
|
|
### link
|
2021-06-23 22:06:21 +02:00
|
|
|
|
2022-01-29 17:33:32 +01:00
|
|
|
This is a [link](../link.md), which points to the actual file.
|
2021-06-23 22:06:21 +02:00
|
|
|
|
|
|
|
### install
|
|
|
|
|
2021-09-06 16:43:50 +02:00
|
|
|
This is an array of [install objects](install.md). They describe how the file should be installed to the game.
|
|
|
|
The order in the array corresponds to the order in which the installation steps should be applied.
|
2021-06-23 22:06:21 +02:00
|
|
|
|
|
|
|
## Optional properties
|
|
|
|
|
|
|
|
### flags
|
|
|
|
|
2021-11-14 00:17:32 +01:00
|
|
|
This is an array of [flags](../flags.md) for this file. If this property is not present in a file object, the file will use the default flags.
|
2021-06-23 22:06:21 +02:00
|
|
|
|
|
|
|
### sha1
|
|
|
|
|
2021-11-14 00:17:32 +01:00
|
|
|
This is the sha1 checksum of the file. Although the checksum is optional, it is recommended.
|
2021-09-06 16:43:50 +02:00
|
|
|
|
|
|
|
### conditions
|
|
|
|
|
|
|
|
This is a [conditions object](conditions.md). It can only be used, if the [optional flag](../flags.md) was set.
|