Module:GameData/doc: Difference between revisions

Update to support 2023 Birthday event
(Update documentation in line with changes to how data is loaded)
(Update to support 2023 Birthday event)
 
Line 7: Line 7:
# Open the browser console/developer mode (usually by hitting the F12 key for most browsers)
# Open the browser console/developer mode (usually by hitting the F12 key for most browsers)
# Within the browser console, enter the following code then hit enter. If successful, the game data should appear within the console
# Within the browser console, enter the following code then hit enter. If successful, the game data should appear within the console
# Copy the game data & update [[Module:GameData/data.json]] and [[Module:GameData/data2.json]] accordingly
# Copy the game data & update [[Module:GameData/data]] and [[Module:GameData/data2]] accordingly


{{SpoilerBox|color=default|title=Code|text=<syntaxhighlight lang="javascript" line>class Wiki {
{{SpoilerBox|color=default|title=Code|text=<syntaxhighlight lang="javascript" line>class Wiki {
Line 18: Line 18:
melvorF: { displayName: "Full Version", url: "https://" + location.hostname + this.baseDir + "melvorFull.json" },
melvorF: { displayName: "Full Version", url: "https://" + location.hostname + this.baseDir + "melvorFull.json" },
melvorTotH: { displayName: "Throne of the Herald", url: "https://" + location.hostname + this.baseDir + "melvorTotH.json" },
melvorTotH: { displayName: "Throne of the Herald", url: "https://" + location.hostname + this.baseDir + "melvorTotH.json" },
melvorAoD: { displayName: "Atlas of Discovery", url: "https://" + location.hostname + this.baseDir + "melvorExpansion2.json" }
melvorAoD: { displayName: "Atlas of Discovery", url: "https://" + location.hostname + this.baseDir + "melvorExpansion2.json" },
melvorBirthday2023: { displayName: "Melvor Birthday 2023", url: "https://" + location.hostname + this.baseDir + "melvorBirthday2023.json" }
};
};
// Check all required namespaces are registered, as there are still some bits of data extracted from in-game rather than the data packages
// Check all required namespaces are registered, as there are still some bits of data extracted from in-game rather than the data packages