|
|
(15 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]] 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 <nowiki>[[Category:Changelog Dates]]</nowiki> for the dates of all changelogs, and [[Changelogs]] for list of all the data pages that contain a Changelog. |
|
| |
|
| =How to edit changelogs= | | =Functions= |
| Each changelogs should be exactly as written on the forum post, so edits are rarely justified, below are the exceptions to look out for
| | All of these functions are callable by wikitext, i.e. <code><nowiki>{{#invoke|Changelog|invokable_name|param1|paramN}}</nowiki></code> |
|
| |
|
| * Typos by the poster should have <code><nowiki>{{sic}}</nowiki></code> added so that readers know it was intentionally written verbosely by the wiki
| | ==write_changelog_by_tag== |
| * 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
| | 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]]. |
| * 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
| |
| * Entity is referenced but isn't affected by the change. See [[Module:Changelog/doc#Tag referenced but unaffected]] for a detailed example
| |
|
| |
|
| ==What are tags?== | | ===Parameters=== |
| 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
| | * '''tag''' - Tag to search relevant changelogs for. Should be localized, i.e. Abrams for hero_atlas in english. |
| Heroes:
| | * '''num_dates''' - (OPTIONAL) Number of dates to add, recommend 3 for articles. If unprovided, defaults to all. |
| - 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]].
| | ===Examples=== |
| | For use on [[Pocket/Update history]]: |
| | <code><nowiki>{{#invoke:Changelog|write_changelog_by_tag|Pocket}}</nowiki></code> |
|
| |
|
| 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'.
| | Outputs |
| | {{#invoke:Changelog|write_changelog_by_tag|Pocket}} |
|
| |
|
|
| |
|
| ==Missing tags==
| | For use on [[Pocket#Update history]]: |
| 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
| | <code><nowiki>{{#invoke:Changelog|write_changelog_by_tag|Pocket|3}}</nowiki></code> |
|
| |
|
| <pre>
| | Outputs |
| "Description": "* {{PageRef|Yamato}}: Shadow Explosion bonus Spirit per victim increased from 10 to 15",
| |
| "Tags": [
| |
| "Yamato",
| |
| "Heroes"
| |
| ]
| |
| </pre>
| |
|
| |
|
| 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 <code>alt_name</code> 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
| | {{#invoke:Changelog|write_changelog_by_tag|Pocket|3}} |
|
| |
|
| <pre>
| | ==write_changelog_by_date_id== |
| "Description": "* {{PageRef|Yamato}}: {{PageRef|Shadow Transformation|alt_name=Shadow Explosion}} bonus Spirit per victim increased from 10 to 15",
| | Write's a specific date's changelog, as opposed to a specific tag's changelog. |
| "Tags": [
| |
| "Yamato",
| |
| "Heroes",
| |
| "Abilities",
| |
| "Shadow Transformation"
| |
| ]
| |
| </pre>
| |
|
| |
|
| | ===Parameters=== |
| | * '''date_id_to_write''' - Date-id to write, format yyyy-mm-dd, view all at <nowiki>[[Category:Changelog Dates]]</nowiki> |
|
| |
|
| ==Similar tags are assigned== | | ===Examples=== |
| 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
| | For a non-herolab patch page<br> |
| | <code><nowiki>{{#invoke:Changelog|write_changelog_by_date_id|2024-05-03}}</nowiki></code> |
|
| |
|
| <pre>
| | {{#invoke:Changelog|write_changelog_by_date_id|2024-05-03}} |
| "Description": "* {{PageRef|McGinnis}}: {{PageRef|Heavy Barrage}} spirit scaling increased from 0.3 to 0.35",
| |
| "Tags": [
| |
| "McGinnis",
| |
| "Heroes",
| |
| "Heavy Barrage",
| |
| "Abilities",
| |
| "Barrage",
| |
| "Pocket"
| |
| ]
| |
| </pre>
| |
|
| |
|
| 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 <code>"Barrage"</code> and <code>"Pocket"</code>. To determine all related tags, see [[Module:Changelog/doc#Tag tree]].
| |
|
| |
|
| The corrected list of tags would then be
| | For a herolab patch page<br> |
| | <code><nowiki>{{#invoke:Changelog|write_changelog_by_date_id|2024-12-06_HeroLab}}</nowiki></code> |
|
| |
|
| <pre>
| | {{#invoke:Changelog|write_changelog_by_date_id|2024-12-06_HeroLab}} |
| "Tags": [
| |
| "McGinnis",
| |
| "Heroes",
| |
| "Heavy Barrage",
| |
| "Abilities",
| |
| ]
| |
| </pre>
| |
|
| |
|
| Similarly, for the following example
| | ==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>. |
|
| |
|
| <pre>
| | ===Parameters=== |
| "Description": "* {{PageRef|Torment Pulse}}: Interval improved from 2s to 1.5s",
| | None |
| "Tags": [
| |
| "Torment Pulse",
| |
| "Items",
| |
| "Spirit Items",
| |
| "Pulse",
| |
| "Abilities",
| |
| "Rutger",
| |
| "Heroes"
| |
| ]
| |
| </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.
| | ===Examples=== |
| | <code><nowiki>{{#invoke:Changelog|write_data_pages_list}}</nowiki></code> |
|
| |
|
| ==Tag referenced but unaffected==
| | Outputs |
| 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>
| | {{#invoke:Changelog|write_data_pages_list}} |
| "Description": "* {{PageRef|Surge of Power}}: When the passive procs, you no longer get slowed when shooting (similar to {{PageRef|Fleetfoot}})",
| |
| "Tags": [
| |
| "Fleetfoot",
| |
| "Items",
| |
| "Weapon Items",
| |
| "Surge of Power",
| |
| "Spirit Items"
| |
| ]
| |
| </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
| | ==get_last_updated== |
| | | 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. |
| <pre>
| |
| "Description": "* {{PageRef|Surge of Power}}: When the passive procs, you no longer get slowed when shooting (similar to {{PageRef|Fleetfoot}})",
| |
| "Tags": [
| |
| "Items",
| |
| "Surge of Power",
| |
| "Spirit Items"
| |
| ]
| |
| </pre>
| |
| | |
| =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 [[Abilities]], [[Kelvin]], and [[Heroes]].
| |
| | |
| * Heroes
| |
| ** <hero_name> i.e. [[Abrams]]
| |
| *** Abilities
| |
| **** <ability_name> i.e. [[Frost Bomb]]
| |
| * Items
| |
| ** Weapon Items
| |
| *** <weapon_item_name> i.e. [[Basic Magazine]]
| |
| ** Vitality Items
| |
| *** <vitality_item_name> i.e. [[Extra Health]]
| |
| ** Spirit Items
| |
| *** <spirit_item_name> i.e. [[Boundless Spirit]]
| |
| * Map
| |
| * Other
| |
| | |
| More Tag tree examples:
| |
| * 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>Basic Magazine</code> is assigned, <code>Weapon Items</code>, and <code>Items</code> should be assigned
| |
| | |
| =Invokes=
| |
| Invokes are callable by wikitext, i.e. <code><nowiki>{{#invoke|Changelog|invokable_name|param1|paramN}}</nowiki></code>
| |
| | |
| ==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=== | | ===Parameters=== |
| * '''tag''' - Tag to search relevant changelogs for. Should be localized, i.e. Abrams for hero_atlas in english. | | * '''tag''' - Tag to search |
| * '''num_dates''' - (OPTIONAL) Number of dates to add, recommend 3 for articles. If unprovided, defaults to all. | | * '''last_or_first''' - Named optional - Must be ''last'' or ''first'' - defaults to ''last'' - Retrieves last or first date |
|
| |
|
| ===Examples=== | | ===Examples=== |
| For use on [[Pocket/Update history]]:
| | Example using ''last'' |
| <code><nowiki>{{#invoke:Changelog|write_changelogs|Pocket}}</nowiki></code> | | <code><nowiki>{{#invoke:Changelog|get_last_updated|Basic Magazine}}</nowiki></code> |
|
| |
|
| Outputs | | Outputs |
| {{#invoke:Changelog|write_changelogs|Pocket}}
| |
|
| |
|
| | {{#invoke:Changelog|get_last_updated|Basic Magazine}} |
|
| |
|
| For use on [[Pocket#Update history]]:
| |
| <code><nowiki>{{#invoke:Changelog|write_changelogs|Pocket|3}}</nowiki></code>
| |
|
| |
|
| Outputs
| | Example using ''first'' |
| | | <code><nowiki>{{#invoke:Changelog|get_last_updated|Basic Magazine|last_or_first=first}}</nowiki></code> |
| {{#invoke:Changelog|write_changelogs|Pocket|3}}
| |
| | |
| ==write_data_pages_list==
| |
| Writes list of all changelog data pages using the list of dates at [[Data:Changelog Dates]]. Used on [[Category:Changelog Dates]].
| |
| | |
| ===Parameters===
| |
| None
| |
| | |
| ===Examples===
| |
| <code><nowiki>{{#invoke:Changelog|write_data_pages_list}}</nowiki></code> | |
|
| |
|
| Outputs | | Outputs |
|
| |
|
| {{#invoke:Changelog|write_data_pages_list}} | | {{#invoke:Changelog|get_last_updated|Basic Magazine|last_or_first=first}} |
| | |
| =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>
| |
| * <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>
| |
| * 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.
| |