Toggle menu
517
2.5K
889
23.2K
Deadlock Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Changelog/doc: Difference between revisions

From Deadlock Wiki
Sur (talk | contribs)
Sur (talk | contribs)
m moved How to Edit type info over to Help:Contributing to Patch Notes
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Overview=
=Overview=
Generates changelog lines from data pages such as [[Data:Changelog_05-03-2024.json]]
Generates lines of changes for all data pages. See <nowiki>[[Category:Changelog Dates]]</nowiki> for the dates of all changelogs, and [[Changelogs]] for list of all the data pages that contain a Changelog.


=Invokes=
=Functions=
Invokes are callable by wikitext, i.e. <pre style="width: fit-content">{{#invoke|Changelog|invokable_name|param1|paramN}}</pre>
All of these functions are callable by wikitext, i.e. <code><nowiki>{{#invoke|Changelog|invokable_name|param1|paramN}}</nowiki></code>


==test==
==write_changelog_by_tag==
not a final invoke, just used for testing purposes right now
The main invokable that will be used. Given a specific tag, it outputs all relevant changelogs from all dates in a [[Template:Update history table]].


=Functions=
===Parameters===
Functions are callable by lua modules, i.e. <pre style="width: fit-content">function_name(param1, paramN)</pre>
* '''tag''' - Tag to search relevant changelogs for. Should be localized, i.e. Abrams for hero_atlas in english.
* '''num_dates''' - (OPTIONAL) Number of dates to add, recommend 3 for articles. If unprovided, defaults to all.
 
===Examples===
For use on [[Pocket/Update history]]:
<code><nowiki>{{#invoke:Changelog|write_changelog_by_tag|Pocket}}</nowiki></code>
 
Outputs
{{#invoke:Changelog|write_changelog_by_tag|Pocket}}
 
 
For use on [[Pocket#Update history]]:
<code><nowiki>{{#invoke:Changelog|write_changelog_by_tag|Pocket|3}}</nowiki></code>
 
Outputs
 
{{#invoke:Changelog|write_changelog_by_tag|Pocket|3}}
 
==write_changelog_by_date_id==
Write's a specific date's changelog, as opposed to a specific tag's changelog.
 
===Parameters===
* '''date_id_to_write''' - Date-id to write, format yyyy-mm-dd, view all at <nowiki>[[Category:Changelog Dates]]</nowiki>
 
===Examples===
For a non-herolab patch page<br>
<code><nowiki>{{#invoke:Changelog|write_changelog_by_date_id|2024-05-03}}</nowiki></code>
 
{{#invoke:Changelog|write_changelog_by_date_id|2024-05-03}}
 
 
For a herolab patch page<br>
<code><nowiki>{{#invoke:Changelog|write_changelog_by_date_id|2024-12-06_HeroLab}}</nowiki></code>
 
{{#invoke:Changelog|write_changelog_by_date_id|2024-12-06_HeroLab}}
 
==write_data_pages_list==
Writes list of all changelog data pages using the list of patches at [[Data:ChangelogConfigs.json]]. Used on <nowiki>[[Category:Changelog Dates]]</nowiki>.
 
===Parameters===
None
 
===Examples===
<code><nowiki>{{#invoke:Changelog|write_data_pages_list}}</nowiki></code>
 
Outputs
 
{{#invoke:Changelog|write_data_pages_list}}


==date_tag_to_lines==
==get_last_updated==
Given the data of a changelog and a specific tag, output the lines / bullet points of that changelog that pertain to that tag.
Retrieve the last (or first) date that a tag was updated on. Planned to be used on a given tag's page, i.e. [[Abrams]]'s infobox could mention that it was last updated on 2024-05-03, or that Mirage was released on 2024-05-03, etc.


===Parameters===
===Parameters===
* '''date''' - Date of the changelog, in the format 05-03-2024
* '''tag''' - Tag to search
* '''tag''' - Tag to search relevant changelogs for
* '''last_or_first''' - Named optional - Must be ''last'' or ''first'' - defaults to ''last'' - Retrieves last or first date


===Examples===
===Examples===
<pre style="width: fit-content">date_tag_to_lines('05-03-2024','Abrams')</pre>
Example using ''last''
<code><nowiki>{{#invoke:Changelog|get_last_updated|Basic Magazine}}</nowiki></code>


Outputs
Outputs


{{#invoke:Changelog|test}}
{{#invoke:Changelog|get_last_updated|Basic Magazine}}
 
 
Example using ''first''
<code><nowiki>{{#invoke:Changelog|get_last_updated|Basic Magazine|last_or_first=first}}</nowiki></code>
 
Outputs


===Notes===
{{#invoke:Changelog|get_last_updated|Basic Magazine|last_or_first=first}}
To see list of all tags, see [[Changelog Tags]] (WIP). To see all tags that aren't individual entities, see [[Changelogs]] (WIP).