Difference between revisions of "Template:Patch notes"
m (italic text and spacing) |
(add data page last revision for enemies, books and skills) |
||
| Line 193: | Line 193: | ||
-->{{#ifeq: {{:Weapon_data|{{BASEPAGENAME}}}}|Data does not exist.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP:Weapon data}} }} }} }}<!-- | -->{{#ifeq: {{:Weapon_data|{{BASEPAGENAME}}}}|Data does not exist.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP:Weapon data}} }} }} }}<!-- | ||
-->{{#ifeq: {{:Armor_data|{{BASEPAGENAME}}}}|Data does not exist.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP:Armor data}} }} }} }}<!-- | -->{{#ifeq: {{:Armor_data|{{BASEPAGENAME}}}}|Data does not exist.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP:Armor data}} }} }} }}<!-- | ||
---{{#ifeq: {{:Consumable_data|{{BASEPAGENAME}}}}|Data does not exist.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP: Consumable data}} }} }} }}--- | ---{{#ifeq: {{:Consumable_data|{{BASEPAGENAME}}}}|Data does not exist.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP:Consumable data}} }} }} }}--- | ||
-->{{#ifeq: {{:Enemy_data|{{BASEPAGENAME}}}}|Data does not exist.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP:Enemy data}} }} }} }}<!-- | |||
-->{{#ifeq: {{:Book_data|{{BASEPAGENAME}}}}|Data does not exist.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP:Book data}} }} }} }}<!-- | |||
--- For Skills, load the timestamp from the respective skill tree data page. Conveniently, the name is provided by switch on the Skill_data page. --- | |||
-->{{#ifeq: {{:Skill_data|{{BASEPAGENAME}}}}Skill data missing.||{{#vardefine:DataTime|{{#time: xNU|{{REVISIONTIMESTAMP:{{:Skill_data|{{BASEPAGENAME}}}}}} }} }} }}<!-- | |||
--- Convert the timestamp into game version --- | --- Convert the timestamp into game version --- | ||
-->{{#if: {{#var:DataTime}}|{{!}} ''Data Page last updated in:'' {{#ifexpr: {{#var:DataTime}} > {{#time: xNU|20250214}} | -->{{#if: {{#var:DataTime}}|{{!}} ''Data Page last updated in:'' {{#ifexpr: {{#var:DataTime}} > {{#time: xNU|20250214}} | ||
Revision as of 15:10, 16 February 2025
0.9.1.19
This one is a little rough. Basically this template takes the latest edit timestamp, converts it to a number using the #time function and then we compare that number with the date when a patch was released. I'm inputting the patch dates manually, and I take them from the News section on Steam.
If the last page revision happened AFTER the patch date (ie. REVISIONTIMESTAMP > patch date is true), it returns the patch number.
If the last page revision happened BEFORE the patch date (ie. REVISIONTIMESTAMP > patch is false), it moves on to previous patch date and runs the same check again.
Adding new patch:
1) Edit the Template:Patch notes page, add these lines on a new line after ''Last edited during patch:''
{{#ifexpr: {{#time: xNU|{{REVISIONTIMESTAMP}}}} > {{#time: xNU|date of patch release, using format YYYYMMDD}}
| patch number
|
2) Edit the patch number and date of patch release in the lines you just added. Example: Patch 0.5.7.18 was released on 20.02.2020, so the date should be 20200220
3) Then find the line with many brackets:
}} }} }} }} }} }}
4) Now add new brackets at the end.
}}