Module:Changelog/doc: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m invoke_date_tag_to_lines in place of test
Sur (talk | contribs)
m 2nd example using Heroes tag
Line 19: Line 19:


===Examples===
===Examples===
For use in 1 row of [[Abrams/Update history]]
<pre style="width: fit-content">date_tag_to_lines('05-03-2024','Abrams')</pre>
<pre style="width: fit-content">date_tag_to_lines('05-03-2024','Abrams')</pre>


Line 24: Line 25:


{{#invoke:Changelog|invoke_date_tag_to_lines|05-03-2024|Abrams}}
{{#invoke:Changelog|invoke_date_tag_to_lines|05-03-2024|Abrams}}
For use on [[Heroes/Update history]]
<pre style="width: fit-content">date_tag_to_lines('05-03-2024','Heroes')</pre>
Outputs
{{#invoke:Changelog|invoke_date_tag_to_lines|05-03-2024|Heroes}}


===Notes===
===Notes===

Revision as of 19:25, 8 October 2024

Overview

Generates changelog lines from data pages such as Data:Changelog_05-03-2024.json

Invokes

Invokes are callable by wikitext, i.e.

{{#invoke|Changelog|invokable_name|param1|paramN}}

test

not a final invoke, just used for testing purposes right now

Functions

Functions are callable by lua modules, i.e.

function_name(param1, paramN)

date_tag_to_lines

Given the data of a changelog and a specific tag, output the lines / bullet points of that changelog that pertain to that tag.

Parameters

  • date - Date of the changelog, in the format 05-03-2024
  • tag - Tag to search relevant changelogs for

Examples

For use in 1 row of Abrams/Update history

date_tag_to_lines('05-03-2024','Abrams')

Outputs

Script error: The function "invoke_date_tag_to_lines" does not exist.


For use on Heroes/Update history

date_tag_to_lines('05-03-2024','Heroes')

Outputs

Script error: The function "invoke_date_tag_to_lines" does not exist.

Notes

To see list of all tags, see Changelog Tags (WIP). To see all tags that aren't individual entities, see Changelogs (WIP). More notes will also be at these pages, not just a list of tags.

Todo

Backend

  • Replace hyphens with asterisk to be bullet pointed by wikitext
  • Output list of all group-tags (Heroes, Abilities, Weapon Items, etc.)
  • Add functionality for a 'Weapon' tag maybe?
  • Switch
    {{Icon}} with {{PageRef}}

Frontend

  • Create a more generic icon template Template:PageRef for svg's with color inverting depending on light/dark mode, only parameter should be the entity name like 'Abrams', 'Hook', or 'Basic Magazine'.
  • Make a navbar for group-tags to be presented on Changelogs
    • Make a lua function to retrieve list of group-tags sent to the nav-bar
  • Make a lua function to retrieve list of tags for Changelog Tags, no nav bar needed, this page is only really useful for editors, not viewers