Module:Changelog/doc: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m get_tag_last_updated -> get_last_updated
Sur (talk | contribs)
m reference Changelogs as the main tag tree
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Overview=
=Overview=
Generates lines of changes for all data pages. See [[Category:Changelog Dates.json]] for the dates of all changelogs, and [[Changelog]] for list of all the data pages that contain a Changelog.
Generates lines of changes for all data pages. See [[Category:Changelog Dates]] for the dates of all changelogs, and [[Changelogs]] for list of all the data pages that contain a Changelog.


=How to edit changelogs=
=How to edit changelogs=
Each changelogs should be exactly as written on the forum post, so edits are rarely justified, below are the exceptions to look out for
Each changelogs should be exactly as written on the forum post, so edits are rarely justified, below are the exceptions to look out for


* Typos by the poster should have <code><nowiki>{{sic}}</nowiki></code> added so that readers know it was intentionally written verbosely by the wiki
* Typos by the poster should have <code><nowiki>{{sic}}</nowiki></code> added so that readers know the typoe was intentionally written verbatim
* An entity's name is old, i.e. [[Yamato]]'s [[Shadow Explosion]] was renamed to [[Shadow Transformation]]. See [[Module:Changelog/doc#Missing tags]] for detailed examples
* An entity's name is old, i.e. [[Yamato]]'s [[Shadow Explosion]] was renamed to [[Shadow Transformation]]. See [[Module:Changelog/doc#Missing tags|#Missing tags]] for detailed examples
* Similarly named but unrelated entities (tags) are both mistakenly assigned, i.e. [[Barrage]] and [[Heavy Barrage]]. See [[Module:Changelog/doc#Similar tags are assigned]] for detailed examples
* Similarly named but unrelated entities (tags) are both mistakenly assigned, i.e. [[Barrage]] and [[Heavy Barrage]]. See [[Module:Changelog/doc#Similar tags are assigned|#Similar tags are assigned]] for detailed examples
* Entity is referenced but isn't affected by the change. See [[Module:Changelog/doc#Tag referenced but unaffected]] for a detailed example
* Entity is referenced but isn't affected by the change. See [[Module:Changelog/doc#Tag referenced but unaffected|#Tag referenced but unaffected]] for a detailed example


==What are tags?==
==What are tags?==
Each line in a changelog is parsed by [[User:DeadBot]] to have certain tags assigned to it. For example, if the forum post looks like
Each line in a changelog is parsed by [[User:DeadBot]] to have certain tags assigned to it. For example, if the forum post looks like <code>Abrams: Shoulder Bash blah blah</code>
Heroes:
- Abrams: Shoulder Bash blah blah


The "Abrams: Shoulder Bash blah blah" line will be assigned tags, 'Shoulder Bash' since its named explicitly, and therefore 'Abilities', 'Abrams', and 'Heroes'. This will make this line added to all changelogs on pages [[Abrams/Update history]], [[Shoulder Bash/Update history]], [[Abilities/Update history]], and [[Heroes/Update history]].
It will be assigned tags, <code>Shoulder Bash</code> since its named explicitly, and therefore <code>Ability</code>, <code>Abrams</code>, and <code>Hero</code>. This will make this line added to all changelogs on pages [[Abrams/Update history]], [[Shoulder Bash/Update history]], [[Ability/Update history]], and [[Hero/Update history]].


Similarly, for the line "Warp Stone: Distance traveled blah blah", the tags assigned would be 'Warp Stone' since its named explicitly, along with the tags 'Items' and 'Weapon Items'.  
Similarly, for the line <code>Warp Stone: Distance traveled blah blah</code>, the tags assigned would be <code>Warp Stone</code> since its named explicitly, along with the tags <code>Item</code> and <code>Weapon Item</code>.  




==Missing tags==
==Missing tags==
Given the line <code>* Yamato: Shadow Explosion bonus Spirit per victim increased from 10 to 15</code>, [[User:DeadBot]] will be able to assign the <code>Yamato</code> tag, but will not know which ability it is referring to, as [[Yamato]]'s ability was renamed to [[Shadow Transformation]]. This would originally appear as
Given the line <code>Yamato: Shadow Explosion bonus Spirit per victim increased from 10 to 15</code>, [[User:DeadBot]] will be able to assign the <code>Yamato</code> tag, but will not know which ability it is referring to, as [[Yamato]]'s ability was renamed to [[Shadow Transformation]]. This would originally appear as


<pre>
<pre>
Line 27: Line 25:
         "Tags": [
         "Tags": [
             "Yamato",
             "Yamato",
             "Heroes"
             "Hero"
         ]
         ]
</pre>
</pre>
Line 37: Line 35:
         "Tags": [
         "Tags": [
             "Yamato",
             "Yamato",
             "Heroes",
             "Hero",
             "Abilities",
             "Ability",
             "Shadow Transformation"
             "Shadow Transformation"
         ]
         ]
Line 45: Line 43:


==Similar tags are assigned==
==Similar tags are assigned==
Given the line <code>* McGinnis: Heavy Barrage spirit scaling increased from 0.3 to 0.35</code>, [[User:DeadBot]] will see both [[McGinnis]' [[Heavy Barrage]] ability and [[Pocket]]'s [[Barrage]] ability and assign both as tags. This would originally appear as
Given the line <code>* McGinnis: Heavy Barrage spirit scaling increased from 0.3 to 0.35</code>, [[User:DeadBot]] will see both [[McGinnis]]' [[Heavy Barrage]] ability and [[Pocket]]'s [[Barrage]] ability and assign both as tags. This would originally appear as


<pre>
<pre>
Line 51: Line 49:
         "Tags": [
         "Tags": [
             "McGinnis",
             "McGinnis",
             "Heroes",
             "Hero",
             "Heavy Barrage",
             "Heavy Barrage",
             "Abilities",
             "Ability",
             "Barrage",
             "Barrage",
             "Pocket"
             "Pocket"
Line 66: Line 64:
         "Tags": [
         "Tags": [
             "McGinnis",
             "McGinnis",
             "Heroes",
             "Hero",
             "Heavy Barrage",
             "Heavy Barrage",
             "Abilities",
             "Ability",
         ]
         ]
</pre>
</pre>
Line 78: Line 76:
         "Tags": [
         "Tags": [
             "Torment Pulse",
             "Torment Pulse",
             "Items",
             "Item",
             "Spirit Items",
             "Spirit Item",
             "Pulse",
             "Pulse",
             "Abilities",
             "Ability",
             "Rutger",
             "Rutger",
             "Heroes"
             "Hero"
         ]
         ]
</pre>
</pre>


It is actually referring to Torment Pulse the Item, so the tags <code>"Pulse"</code>, <code>"Abilities"</code>, and <code>"Rutger"</code>, <code>"Heroes"</code> would all need to be removed.  
It is actually referring to Torment Pulse the Item, so the tags <code>"Pulse"</code>, <code>"Ability"</code>, and <code>"Rutger"</code>, <code>"Hero"</code> would all need to be removed.  
 
 
 
Another example, given the line:
 
<pre>
        "Description": "* {{PageRef|Cosmic Veil|alt_name=Veil}} {{PageRef|Walker}}: Cooldown increased from 20s to 25s",
        "Tags": [
            "Veil Walker",
            "Item",
            "Vitality Item",
            "Objective",
            "NPC",
            "Walker"
            "Cosmic Veil"
        ]
</pre>
 
Here, the changelog is clearly referring to the item [[Veil Walker]], not [[Cosmic Veil]]s and [[Walker]]s. The fixed line would be:
 
<pre>
        "Description": "* {{PageRef|Veil Walker}}: Cooldown increased from 20s to 25s",
        "Tags": [
            "Veil Walker",
            "Item",
            "Vitality Item",
            "Objective",
            "NPC",
        ]
</pre>


==Tag referenced but unaffected==
==Tag referenced but unaffected==
Given the line <code>* Surge of Power: When the passive procs, you no longer get slowed when shooting (similar to Fleetfoot).</code>, [[User:DeadBot]] will assign the tag [[Fleetfoot]] and all its related tags, even if Fleetfloot wasn't actually changed or modified at all. This would originally appear as
Given the line <code>Surge of Power: When the passive procs, you no longer get slowed when shooting (similar to Fleetfoot).</code>, [[User:DeadBot]] will assign the tag [[Fleetfoot]] and all its related tags, even if Fleetfloot wasn't actually changed or modified at all. This would originally appear as


<pre>
<pre>
Line 96: Line 124:
         "Tags": [
         "Tags": [
             "Fleetfoot",
             "Fleetfoot",
             "Items",
             "Item",
             "Weapon Items",
             "Weapon Item",
             "Surge of Power",
             "Surge of Power",
             "Spirit Items"
             "Spirit Item"
         ]
         ]
</pre>
</pre>


To correct it, remove Fleetfoot and all its related tags (Weapon Items tag in this case), but leave the call to PageRef so that it can still refer users to the [[Fleetfoot]] page. After correction it should be
To correct it, remove Fleetfoot and all its related tags (Weapon Item tag in this case), but leave the call to PageRef so that it can still refer users to the [[Fleetfoot]] page. After correction it should be


<pre>
<pre>
         "Description": "* {{PageRef|Surge of Power}}: When the passive procs, you no longer get slowed when shooting (similar to {{PageRef|Fleetfoot}})",
         "Description": "* {{PageRef|Surge of Power}}: When the passive procs, you no longer get slowed when shooting (similar to {{PageRef|Fleetfoot}})",
         "Tags": [
         "Tags": [
             "Items",
             "Item",
             "Surge of Power",
             "Surge of Power",
             "Spirit Items"
             "Spirit Item"
         ]
         ]
</pre>
</pre>
Line 117: Line 145:
The tag tree is how to determine what tags are related. Given a tag, the tags that are in the same chain and have a shorter indentation will/should also be added to the list of tags.
The tag tree is how to determine what tags are related. Given a tag, the tags that are in the same chain and have a shorter indentation will/should also be added to the list of tags.


For example, any change to [[Frost Bomb]] will also be referenced on the pages [[Abilities]], [[Kelvin]], and [[Heroes]].
For example, any change to [[Frost Bomb]] will also be referenced on the pages [[Ability]], [[Kelvin]], and [[Hero]].


* Heroes
* Hero
** <hero_name> i.e. [[Abrams]]
** <hero_name> i.e. [[Abrams]]
*** Abilities
*** Ability
**** <ability_name> i.e. [[Frost Bomb]]
**** <ability_name> i.e. [[Frost Bomb]]
* Items
* Item
** Weapon Items
** Weapon Item
*** <weapon_item_name> i.e. [[Basic Magazine]]
*** <weapon_item_name> i.e. [[Basic Magazine]]
** Vitality Items
** Vitality Item
*** <vitality_item_name> i.e. [[Extra Health]]
*** <vitality_item_name> i.e. [[Extra Health]]
** Spirit Items
** Spirit Item
*** <spirit_item_name> i.e. [[Boundless Spirit]]
*** <spirit_item_name> i.e. [[Boundless Spirit]]
* Map
* Map
Line 135: Line 163:
More Tag tree examples:
More Tag tree examples:
* If <code>Map</code> tag is assigned, no other tags should be assigned
* If <code>Map</code> tag is assigned, no other tags should be assigned
* If <code>Weapon Items</code> is assigned, <code>Basic Magazine</code> shouldn't be assigned unless it is also referenced in the line, but <code>Items</code> should be assigned
* If <code>Weapon Item</code> is assigned, <code>Basic Magazine</code> shouldn't be assigned unless it is also referenced in the line, but <code>Item</code> should be assigned
* If <code>Basic Magazine</code> is assigned, <code>Weapon Items</code>, and <code>Items</code> should be assigned
* If <code>Basic Magazine</code> is assigned, <code>Weapon Item</code>, and <code>Item</code> should be assigned
 
<b>The full tree can be found at [[Changelogs]]</b>


=Invokes=
=Invokes=
Line 175: Line 205:


{{#invoke:Changelog|write_data_pages_list}}
{{#invoke:Changelog|write_data_pages_list}}
==write_changelog_by_date==
Write's a specific date's changelog, as opposed to a specific tag's changelog.
===Parameters===
* '''date_to_write''' - Date to write, format dd-mm-yyyy (for now)
===Examples===
<code><nowiki>{{#invoke:Changelog|write_changelog_by_date|05-03-2024}}</nowiki></code>
{{#invoke:Changelog|write_changelog_by_date|05-03-2024}}


==get_last_updated==
==get_last_updated==
Line 191: Line 232:


=Todo=
=Todo=
<b>Backend</b>
* <s>Replace hyphens with asterisk to be bullet pointed by wikitext</s> <b>complete</b>
* <s>Output list of all group-tags (Heroes, Abilities, Weapon Items, etc.)</s>
* <s>Add functionality for a 'Weapon' tag maybe?</s> <b>dropped for now, very easy to add in the future</b>
* <s>Don't remove the prefix "Mo & Krill: " from lines such as "No longer listed as a recommended new player hero" as it prevents the ability to determine the hero on pages other than Mo and Krill/Update history. Is this prefix removal necessary? </s>
* <s>Switch <code><nowiki>{{Icon}} with {{PageRef}}</nowiki></code></s>
* <s>Find a non-inefficient way to expand {Icon}/{PageRef} templates for the icon and reference</s>
<b>Frontend</b>
<b>Frontend</b>
* <i>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'.</i>
* <i>Create a more generic icon template [[Template:PageRef]] for svg's with color inverting depending on light/dark mode
* Make a navbar for group-tags to be presented on [[Changelog]]
** Make a lua function to retrieve list of group-tags sent to the nav-bar, i.e. Heroes, Abilities, Items, Weapon Items, etc.
** Navbar will go to pages <group_tag>/Update history like [[Heroes/Update history]], [[Abilities/Update history]], [[Items/Update history]], etc.

Revision as of 01:33, 8 December 2024

Overview

Generates lines of changes for all data pages. See for the dates of all changelogs, and Changelogs for list of all the data pages that contain a Changelog.

How to edit changelogs

Each changelogs should be exactly as written on the forum post, so edits are rarely justified, below are the exceptions to look out for

What are tags?

Each line in a changelog is parsed by User:DeadBot to have certain tags assigned to it. For example, if the forum post looks like Abrams: Shoulder Bash blah blah

It will be assigned tags, Shoulder Bash since its named explicitly, and therefore Ability, Abrams, and Hero. This will make this line added to all changelogs on pages Abrams/Update history, Shoulder Bash/Update history, Ability/Update history, and Hero/Update history.

Similarly, for the line Warp Stone: Distance traveled blah blah, the tags assigned would be Warp Stone since its named explicitly, along with the tags Item and Weapon Item.


Missing tags

Given the line Yamato: Shadow Explosion bonus Spirit per victim increased from 10 to 15, User:DeadBot will be able to assign the Yamato tag, but will not know which ability it is referring to, as Yamato's ability was renamed to Shadow Transformation. This would originally appear as

        "Description": "* {{PageRef|Yamato}}: Shadow Explosion bonus Spirit per victim increased from 10 to 15",
        "Tags": [
            "Yamato",
            "Hero"
        ]

To correct is, simply add the related tags for Shadow Transformation. To determine the related tags, see To see all related tags, see Module:Changelog/doc#Tag tree. Add the call to Template:PageRef in the description. The alt_name parameter will need to be passed to nickname the ability as Shadow Explosion, so that it stays written as is, but still links and is added to the relevant pages. The corrected changelog would then be

        "Description": "* {{PageRef|Yamato}}: {{PageRef|Shadow Transformation|alt_name=Shadow Explosion}} bonus Spirit per victim increased from 10 to 15",
        "Tags": [
            "Yamato",
            "Hero",
            "Ability",
            "Shadow Transformation"
        ]


Similar tags are assigned

Given the line * McGinnis: Heavy Barrage spirit scaling increased from 0.3 to 0.35, User:DeadBot will see both McGinnis' Heavy Barrage ability and Pocket's Barrage ability and assign both as tags. This would originally appear as

        "Description": "* {{PageRef|McGinnis}}: {{PageRef|Heavy Barrage}} spirit scaling increased from 0.3 to 0.35",
        "Tags": [
            "McGinnis",
            "Hero",
            "Heavy Barrage",
            "Ability",
            "Barrage",
            "Pocket"
        ]

To correct it, first determine if its referring to McGinnis' Heavy Barrage or Pocket's Barrage. In this case, it is quite obvious that its referring to McGinnis' Heavy Barrage. Then, simply remove all tags related to Pocket's Barrage. This includes both "Barrage" and "Pocket". To determine all related tags, see Module:Changelog/doc#Tag tree.

The corrected list of tags would then be

        "Tags": [
            "McGinnis",
            "Hero",
            "Heavy Barrage",
            "Ability",
        ]

Similarly, for the following example

        "Description": "* {{PageRef|Torment Pulse}}: Interval improved from 2s to 1.5s",
        "Tags": [
            "Torment Pulse",
            "Item",
            "Spirit Item",
            "Pulse",
            "Ability",
            "Rutger",
            "Hero"
        ]

It is actually referring to Torment Pulse the Item, so the tags "Pulse", "Ability", and "Rutger", "Hero" would all need to be removed.


Another example, given the line:

        "Description": "* {{PageRef|Cosmic Veil|alt_name=Veil}} {{PageRef|Walker}}: Cooldown increased from 20s to 25s",
        "Tags": [
            "Veil Walker",
            "Item",
            "Vitality Item",
            "Objective",
            "NPC",
            "Walker"
            "Cosmic Veil"
        ]

Here, the changelog is clearly referring to the item Veil Walker, not Cosmic Veils and Walkers. The fixed line would be:

        "Description": "* {{PageRef|Veil Walker}}: Cooldown increased from 20s to 25s",
        "Tags": [
            "Veil Walker",
            "Item",
            "Vitality Item",
            "Objective",
            "NPC",
        ]

Tag referenced but unaffected

Given the line Surge of Power: When the passive procs, you no longer get slowed when shooting (similar to Fleetfoot)., User:DeadBot will assign the tag Fleetfoot and all its related tags, even if Fleetfloot wasn't actually changed or modified at all. This would originally appear as

        "Description": "* {{PageRef|Surge of Power}}: When the passive procs, you no longer get slowed when shooting (similar to {{PageRef|Fleetfoot}})",
        "Tags": [
            "Fleetfoot",
            "Item",
            "Weapon Item",
            "Surge of Power",
            "Spirit Item"
        ]

To correct it, remove Fleetfoot and all its related tags (Weapon Item tag in this case), but leave the call to PageRef so that it can still refer users to the Fleetfoot page. After correction it should be

        "Description": "* {{PageRef|Surge of Power}}: When the passive procs, you no longer get slowed when shooting (similar to {{PageRef|Fleetfoot}})",
        "Tags": [
            "Item",
            "Surge of Power",
            "Spirit Item"
        ]

Tag tree

The tag tree is how to determine what tags are related. Given a tag, the tags that are in the same chain and have a shorter indentation will/should also be added to the list of tags.

For example, any change to Frost Bomb will also be referenced on the pages Ability, Kelvin, and Hero.

More Tag tree examples:

  • If Map tag is assigned, no other tags should be assigned
  • If Weapon Item is assigned, Basic Magazine shouldn't be assigned unless it is also referenced in the line, but Item should be assigned
  • If Basic Magazine is assigned, Weapon Item, and Item should be assigned

The full tree can be found at Changelogs

Invokes

Invokes are callable by wikitext, i.e. {{#invoke|Changelog|invokable_name|param1|paramN}}

write_changelogs

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.

Parameters

  • 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: {{#invoke:Changelog|write_changelogs|Pocket}}

Outputs

Update Changes

2024-05-03

  • Fixed Flying Cloak teleporting players into geometry or out of the world
    * McGinnis: Heavy Barrage now reduces your speed rather than setting it to a low cap (by itself this change isn't a buff or a nerf, but it allows you to buy items to move faster during the ultimate)
    * McGinnis: Heavy Barrage camera interaction with Fleetfoot Boots has been fixed


For use on Pocket#Update history: {{#invoke:Changelog|write_changelogs|Pocket|3}}

Outputs

Update Changes

2024-05-03

  • Fixed Flying Cloak teleporting players into geometry or out of the world
    * McGinnis: Heavy Barrage now reduces your speed rather than setting it to a low cap (by itself this change isn't a buff or a nerf, but it allows you to buy items to move faster during the ultimate)
    * McGinnis: Heavy Barrage camera interaction with Fleetfoot Boots has been fixed

write_data_pages_list

Writes list of all changelog data pages using the list of dates at Data:Changelog Dates.json. Used on .

Parameters

None

Examples

{{#invoke:Changelog|write_data_pages_list}}

Outputs

Data:Changelog 2024-05-03.json
Data:Changelog 2024-05-10.json
Data:Changelog 2024-05-13.json
Data:Changelog 2024-05-16.json
Data:Changelog 2024-05-19.json
Data:Changelog 2024-05-23.json
Data:Changelog 2024-05-24.json
Data:Changelog 2024-05-30.json
Data:Changelog 2024-06-01.json
Data:Changelog 2024-06-06.json
Data:Changelog 2024-06-07.json
Data:Changelog 2024-06-13.json
Data:Changelog 2024-06-14.json
Data:Changelog 2024-06-16.json
Data:Changelog 2024-06-20.json
Data:Changelog 2024-06-23.json
Data:Changelog 2024-06-27.json
Data:Changelog 2024-07-04.json
Data:Changelog 2024-07-11.json
Data:Changelog 2024-07-18.json
Data:Changelog 2024-07-23.json
Data:Changelog 2024-08-01.json
Data:Changelog 2024-08-06.json
Data:Changelog 2024-08-15.json
Data:Changelog 2024-08-16.json
Data:Changelog 2024-08-18.json
Data:Changelog 2024-08-22.json
Data:Changelog 2024-08-23.json
Data:Changelog 2024-08-29.json
Data:Changelog 2024-09-01.json
Data:Changelog 2024-09-12.json
Data:Changelog 2024-09-14.json
Data:Changelog 2024-09-17.json
Data:Changelog 2024-09-19.json
Data:Changelog 2024-09-26.json
Data:Changelog 2024-09-27.json
Data:Changelog 2024-09-29.json
Data:Changelog 2024-10-02.json
Data:Changelog 2024-10-07.json
Data:Changelog 2024-10-10.json
Data:Changelog 2024-10-11.json
Data:Changelog 2024-10-15.json
Data:Changelog 2024-10-18.json
Data:Changelog 2024-10-18-1.json
Data:Changelog 2024-10-24.json
Data:Changelog 2024-10-24_HeroLab.json
Data:Changelog 2024-10-27.json
Data:Changelog 2024-10-29.json
Data:Changelog 2024-10-29_HeroLab.json
Data:Changelog 2024-11-01.json
Data:Changelog 2024-11-01_HeroLab.json
Data:Changelog 2024-11-07.json
Data:Changelog 2024-11-07_HeroLab.json
Data:Changelog 2024-11-08_HeroLab.json
Data:Changelog 2024-11-10.json
Data:Changelog 2024-11-13.json
Data:Changelog 2024-11-21.json
Data:Changelog 2024-11-21_HeroLab.json
Data:Changelog 2024-11-24_HeroLab.json
Data:Changelog 2024-11-26_HeroLab.json
Data:Changelog 2024-11-29.json
Data:Changelog 2024-12-06.json
Data:Changelog 2024-12-06_HeroLab.json
Data:Changelog 2024-12-17.json

write_changelog_by_date

Write's a specific date's changelog, as opposed to a specific tag's changelog.

Parameters

  • date_to_write - Date to write, format dd-mm-yyyy (for now)

Examples

{{#invoke:Changelog|write_changelog_by_date|05-03-2024}}

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

get_last_updated

Retrieve the last date that a tag was updated on

Parameters

  • tag - Tag to search

Examples

{{#invoke:Changelog|get_last_updated|Basic Magazine}}

Outputs

2024-05-10


Todo

Frontend

  • Create a more generic icon template Template:PageRef for svg's with color inverting depending on light/dark mode