Skip to content

Commit cadb2c6

Browse files
authored
Include addon maintenance information in README
1 parent 6afc1fa commit cadb2c6

File tree

1 file changed

+46
-9
lines changed

1 file changed

+46
-9
lines changed

README.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
SuperTux Addon
1+
SuperTux Addons
22
==============
33

4+
## Packaging your addon
5+
6+
To package your addon, you can use the "Package Add-on" option in the main level editor menu.
7+
8+
<details>
9+
<summary>Additional information for addon .nfo files</summary>
10+
<br>
411
Addon .nfo files look like this:
512

6-
(supertux-addoninfo
7-
(id "octo-levels")
8-
(version 1)
9-
(type "worldmap")
10-
(title "Octo's Levels")
11-
(author "Octo")
12-
(license "GPL 2+ / CC-by-sa 3.0"))
13+
```
14+
(supertux-addoninfo
15+
(id "octo-levels")
16+
(version 1)
17+
(type "worldmap")
18+
(title "Octo's Levels")
19+
(author "Octo")
20+
(license "GPL 2+ / CC-by-sa 3.0")
21+
)
22+
```
1323

1424
The `id` is a identifier for this addon, it has to be unique across
1525
all addons, as it is used to compare the addons with new ones from
@@ -28,4 +38,31 @@ the addon is handled.
2838

2939
The .nfo file itself needs to be stored in the top-level directory of
3040
the addon and should be named by the unique id of the addon, i.e.
31-
"/octo-levels.nfo" in this example.
41+
`/octo-levels.nfo` in this example.
42+
</details>
43+
44+
## Adding/Updating an addon
45+
To update an addon in the repository, you would need to submit a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
46+
The pull request should contain two commits:
47+
48+
1. Adds/replaces the archive of your addon, contained in the `repository/` directory with a new one, which contains your changes.
49+
2. Edits the `index.nfo` for the latest SuperTux version, by adding/modifying the entry for your addon. This will allow it to be downloaded from the in-game addon manager.
50+
51+
An addon data entry looks like this:
52+
53+
<pre>
54+
(supertux-addoninfo
55+
(id "<b>addon-id</b>")
56+
(version <b>addon-version</b>)
57+
(type <b>addon-type</b>)
58+
(title "<b>addon-title</b>")
59+
(author "<b>addon-author</b>")
60+
(license "<b>addon-license</b>")
61+
(url "https://raw.githubusercontent.com/SuperTux/addons/<b>addon-commit-hash</b>/repository/<b>addon-file-name</b>")
62+
(md5 "<b>addon-md5-checksum</b>")
63+
)
64+
</pre>
65+
66+
* **addon-commit-hash** represents the full commit hash of your first commit, which adds/replaces your addon in the `repository/` directory. This is important to include, because it allows the current SuperTux release to always get its versions of all addons for backwards compatibility.
67+
* **addon-md5-checksum** represents your new, modified addon archive's MD5 checksum hash. This needs to be updated every time the addon is updated, because the game will not be able to download your addon otherwise. The MD5 checksum is being used for checking the integrity of the addon.
68+
* For the rest of the entries, the rules listed above for addon `.nfo` files also apply here.

0 commit comments

Comments
 (0)