Module:Changelog/doc: Difference between revisions
m tag tree, similar tags are assigned, missing tags INITIAL |
m moved What are tags; notes removed; TODO updated |
||
Line 3: | Line 3: | ||
=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 | |||
* 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 it was intentionally written verbosely by the wiki | ||
* | * Ability (or other entity) name is old, i.e. [[Yamato]]'s [[Shadow Explosion]] was renamed to [[Shadow Transformation]]. See [[Module:Changelog/doc#Missing tags]] for detailed examples | ||
* Similarly named but unrelated tags are both mistakenly assigned, i.e. [[Barrage]] and [[Heavy Barrage]]. See [[Module:Changelog/doc#Similar tags are assigned]] for detailed examples | |||
==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 | |||
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]]. | |||
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'. | |||
==Missing tags== | ==Missing tags== | ||
Line 127: | Line 135: | ||
{{#invoke:Changelog|write_data_pages_list}} | {{#invoke:Changelog|write_data_pages_list}} | ||
=Todo= | =Todo= | ||
<b>Backend</b> | <b>Backend</b> | ||
* <s>Replace hyphens with asterisk to be bullet pointed by wikitext</s> <b>complete</b> | * <s>Replace hyphens with asterisk to be bullet pointed by wikitext</s> <b>complete</b> | ||
* Output list of all group-tags (Heroes, Abilities, Weapon Items, etc.) | * <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>Add functionality for a 'Weapon' tag maybe?</s> <b>dropped for now, very easy to add in the future</b> | ||
* 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>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> | ||
* Switch <code><nowiki>{{Icon}} with {{PageRef}}</nowiki></code> | * <s>Switch <code><nowiki>{{Icon}} with {{PageRef}}</nowiki></code></s> | ||
* Find a non-inefficient way to expand {Icon}/{PageRef} templates for the icon and reference | * <s>Find a non-inefficient way to expand {Icon}/{PageRef} templates for the icon and reference</s> | ||
<b>Frontend</b> | <b>Frontend</b> |
Revision as of 00:00, 26 October 2024
Overview
Generates changelog lines from data pages such as Data:Changelog_05-03-2024.json
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
- Typos by the poster should have
{{sic}}
added so that readers know it was intentionally written verbosely by the wiki - Ability (or other entity) name is old, i.e. Yamato's Shadow Explosion was renamed to Shadow Transformation. See Module:Changelog/doc#Missing tags for detailed examples
- Similarly named but unrelated tags are both mistakenly assigned, i.e. Barrage and Heavy Barrage. See Module:Changelog/doc#Similar tags are assigned for detailed examples
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 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.
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'.
Missing tags
Given the line * Yamato: Shadow Explosion bonus Spirit per victim increased from 10 to 15
, the backend 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", "Heroes" ]
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", "Heroes", "Abilities", "Shadow Transformation" ]
Similar tags are assigned
Given the line * McGinnis: Heavy Barrage spirit scaling increased from 0.3 to 0.35
, the backend 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", "Heroes", "Heavy Barrage", "Abilities", "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", "Heroes", "Heavy Barrage", "Abilities", ]
Similarly, for the following example
"Description": "* {{PageRef|Torment Pulse}}: Interval improved from 2s to 1.5s", "Tags": [ "Torment Pulse", "Items", "Spirit Items", "Pulse", "Abilities", "Rutger", "Heroes" ]
It is actually referring to Torment Pulse the Item, so the tags "Pulse"
, "Abilities"
, and "Rutger"
, "Heroes"
would all need to be removed.
Tag tree
The tag tree is how to determine what tags are related. Pick a random tag anywhere on the tree. Tags that are in the same chain and have a shorter indentation should be added to the list of tags.
More Tag tree examples:
- If
Map
tag is assigned, no other tags should be assigned - If
Weapon Items
is assigned,Basic Magazine
shouldn't be assigned unless it is also referenced in the line, butItems
should be assigned - If
Basic Magazine
is assigned,Weapon Items
, andItems
should be assigned
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 |
---|---|
- {{HeroIcon|Pocket}} Pocket Enchanter’s Satchel visual effects updated | |
- Pocket's nerf gun now does.. blah blah |
For use on Pocket#Update history:
{{#invoke:Changelog|write_changelogs|Pocket|3}}
Outputs
Update | Changes |
---|---|
- {{HeroIcon|Pocket}} Pocket Enchanter’s Satchel visual effects updated | |
- Pocket's nerf gun now does.. blah blah |
write_data_pages_list
Writes list of all changelog data pages using the list of dates at Data:Changelog Dates. Used on Changelog Dates.
Parameters
None
Examples
{{#invoke:Changelog|write_data_pages_list}}
Outputs
Data:Changelog 05-10-2024.json
Data:Changelog 05-03-2024.json
Todo
Backend
Replace hyphens with asterisk to be bullet pointed by wikitextcompleteOutput list of all group-tags (Heroes, Abilities, Weapon Items, etc.)Add functionality for a 'Weapon' tag maybe?dropped for now, very easy to add in the futureDon'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?Switch{{Icon}} with {{PageRef}}
Find a non-inefficient way to expand {Icon}/{PageRef} templates for the icon and reference
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, 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.
- 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