Tutorial:Mod changelog format: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (date duplication?)
(Intro, some reordering, data and version info complete, see also section)
Line 1: Line 1:
This is the format required by the in-game changelog viewer to display mod changelogs in the browse mods GUI. The changelog.txt file is expected to be located in the root of the mod folder, see [[Tutorial:Mod_structure#Files]].
The online [https://mods.factorio.com/ mod portal] does ''not'' require this changelog format, it will display any changelog.txt file content.


TODO
TODO
mod portal doesnt parse changelog like this
completely empty lines are ignored?
completely empty lines are ignored?
mod structure tutorial link for where the file should be


* Parsing errors can be found in the [[log file]] in the [[user data directory]].
* Parsing errors can be found in the [[log file]] in the [[user data directory]].
* It may be simpler to copy and modify the [[#Example changelog]] than to start from scratch.


<!-- maybe https://forums.factorio.com/67140 -->
<!-- maybe link to vs code extension that has changelog hinting from jarg -->
<!-- maybe link to vs code extension that has changelog hinting from jarg -->


Line 17: Line 18:


Usually, text editors can enforce this automatically, it is recommended to set this up.
Usually, text editors can enforce this automatically, it is recommended to set this up.
== Example ==
It may be simpler to copy this example into your changelog and modify it than to start from scratch.
<pre>---------------------------------------------------------------------------------------------------
Version: 1.1.60
Date: 06. 06. 2022
  Features:
    - This is an entry in the "Features" category.
    - This is another entry in the "Features" category.
  Balancing:
    - This is a multiline entry in the "Balancing" category.
      There is some extra information here because it is needed for the example.
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Bugfixes:
    - Fixed that item requests didn't subtract items picked up from ground when reviving ghosts. (https://forums.factorio.com/102329)
    - Fixed burner inserter would not fuel itself when drop target was full. (https://forums.factorio.com/102449)
---------------------------------------------------------------------------------------------------
Version: 1.1.66
Date: 19. 08. 2022
  Major Features:
    - Initial release.
</pre>


== Formatting rules ==
== Formatting rules ==
Line 46: Line 25:


=== Version section start ===
=== Version section start ===
Must start with exactly <code>---------------------------------------------------------------------------------------------------</code> followed by a newline.
Must be exactly <code>---------------------------------------------------------------------------------------------------</code>.


The next line must be a [[#Version]] line.
The next line must be a [[#Version]] line.
=== Version ===
=== Version ===
Must start with exactly <code>Version: </code>, note the space after the colon. The remaining part of the line will be parsed as the version the section is about. TODO version format<br>
Must start with exactly <code>Version:&nbsp;</code>, note the space after the colon. The remaining part of the line will be parsed as the version the section is about.<br>
The version itself is expected in the format <code>number.number.number</code> for <code>major.minor.sub</code>, for example <code>0.6.4</code>. Each number can range from 0 to 65535. <code>0.0.0</code> is not considered a valid version.
 
There may not be two version sections with the same version.<br>
There may not be two version sections with the same version.<br>
This line is mandatory.
This line is mandatory.
Example:<br>
<code>Version: 0.12.35</code>
=== Date ===
=== Date ===
Must start with exactly <code>Date: </code>, note the space after the colon. The remaining part of the line will be parsed as the date the version was released. TODO no format restrictions (beside not putting a newline in there lol)
Must start with exactly <code>Date:&nbsp;</code>, note the space after the colon. The remaining part of the line will be parsed as the date the version was released. There are no restrictions for the format of the date itself.
TODO duplication is fine wait but not within the same version?<br>
 
There may not be two date lines within the same version section.<br>
This line is optional.
This line is optional.
Example:<br>
<code>Date: 01. 06. 2016</code>
=== Category ===
=== Category ===


Line 63: Line 51:
=== Entry ===
=== Entry ===


Must start with exactly four spaces followed by exactly <code>- </code> (note the space after the dash) for a single line entry. For a multiline entry, lines after the first line must start with exactly six spaces.<br>
Must start with exactly four spaces followed by exactly <code>- </code>&nbsp;(note the space after the dash) for a single line entry. For a multiline entry, lines after the first line must start with exactly six spaces.
Entries in the same version and the same category may not be exact duplicates.  
 
TODO
Entries in the same version and the same category may not be exact duplicates.
 
Example:<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;- Fixed the missing title in character logistics window.</code>
 
== Example changelog ==
<pre>---------------------------------------------------------------------------------------------------
Version: 1.1.60
Date: 06. 06. 2022
  Features:
    - This is an entry in the "Features" category.
    - This is another entry in the "Features" category.
    - This general section is the 1.1.60 version section.
  Balancing:
    - This is a multiline entry in the "Balancing" category.
      There is some extra text here because it is needed for the example.
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Bugfixes:
    - Fixed that canceling syncing mods with a save would exit the GUI.
    - Fixed a desync when fast-replacing burner generators.
---------------------------------------------------------------------------------------------------
Version: 1.1.59
Date: 06. 05. 2022
  Bugfixes:
    - This general section is the 1.1.59 version section.
    - This is an entry in the "Bugfixes" category.
    - Fixed grenade shadows.
---------------------------------------------------------------------------------------------------
Version: 0.1.0
Date: 24. 12. 2012
  Major Features:
    - Initial release.
    - This general section is the 0.1.0 version section.
</pre>
 
== See also ==
* [https://forums.factorio.com/67140 Forum thread about the changelog format]
* [[Tutorial:Mod structure]]

Revision as of 14:57, 11 November 2022

This is the format required by the in-game changelog viewer to display mod changelogs in the browse mods GUI. The changelog.txt file is expected to be located in the root of the mod folder, see Tutorial:Mod_structure#Files.

The online mod portal does not require this changelog format, it will display any changelog.txt file content.

TODO completely empty lines are ignored?


Important general format

  • Do not use tabs
    • Indentation is done with two spaces
  • Do not leave whitespace at the end of lines ("trailing spaces")

Usually, text editors can enforce this automatically, it is recommended to set this up.

Formatting rules

#Important general format applies everywhere and will lead to confusing error messages if not followed.

TODO One section per version.

Version section start

Must be exactly ---------------------------------------------------------------------------------------------------.

The next line must be a #Version line.

Version

Must start with exactly Version: , note the space after the colon. The remaining part of the line will be parsed as the version the section is about.
The version itself is expected in the format number.number.number for major.minor.sub, for example 0.6.4. Each number can range from 0 to 65535. 0.0.0 is not considered a valid version.

There may not be two version sections with the same version.
This line is mandatory.

Example:
Version: 0.12.35

Date

Must start with exactly Date: , note the space after the colon. The remaining part of the line will be parsed as the date the version was released. There are no restrictions for the format of the date itself.

There may not be two date lines within the same version section.
This line is optional.

Example:
Date: 01. 06. 2016

Category

Must start with exactly two spaces. The remaining part of the line will be parsed as the category. Must end with a colon (reminder, no whitespace at end of line!). This colon is removed for the purpose of display. TODO names and sorting

Entry

Must start with exactly four spaces followed by exactly -  (note the space after the dash) for a single line entry. For a multiline entry, lines after the first line must start with exactly six spaces.

Entries in the same version and the same category may not be exact duplicates.

Example:
    - Fixed the missing title in character logistics window.

Example changelog

---------------------------------------------------------------------------------------------------
Version: 1.1.60
Date: 06. 06. 2022
  Features:
    - This is an entry in the "Features" category.
    - This is another entry in the "Features" category.
    - This general section is the 1.1.60 version section.
  Balancing:
    - This is a multiline entry in the "Balancing" category.
      There is some extra text here because it is needed for the example.
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Bugfixes:
    - Fixed that canceling syncing mods with a save would exit the GUI.
    - Fixed a desync when fast-replacing burner generators.
---------------------------------------------------------------------------------------------------
Version: 1.1.59
Date: 06. 05. 2022
  Bugfixes:
    - This general section is the 1.1.59 version section.
    - This is an entry in the "Bugfixes" category.
    - Fixed grenade shadows.
---------------------------------------------------------------------------------------------------
Version: 0.1.0
Date: 24. 12. 2012
  Major Features:
    - Initial release.
    - This general section is the 0.1.0 version section.

See also