17,030
edits
(Update code) |
(Ensure no modded namespaces are active when generating data) |
||
Line 2: | Line 2: | ||
# Navigate to https://melvoridle.com within your preferred web browser | # Navigate to https://melvoridle.com within your preferred web browser | ||
# Select any character, the character that is chosen has no impact but you may consider creating a new one as a precaution - the below code is designed to execute without affecting the character, although this is not guaranteed | # Select any character, the character that is chosen has no impact but you may consider creating a new one as a precaution - the below code is designed to execute without affecting the character, although this is not guaranteed | ||
# Ensure mods are disabled such that the generated data excludes any modded content. If disabling mods, the game should be reloaded first before trying to generate game data | |||
# 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 | ||
Line 507: | Line 508: | ||
if (this.gameData.namespaces === undefined) { | if (this.gameData.namespaces === undefined) { | ||
const nsData = []; | const nsData = []; | ||
game.registeredNamespaces.forEach((ns) => nsData.push(ns)); | game.registeredNamespaces.forEach((ns) => { | ||
if (ns.isModded) { | |||
throw new Error(`Modded namespace '${ ns.displayName }' found, all mods must be disabled before game data can be generated`); | |||
} | |||
else { | |||
nsData.push(ns); | |||
} | |||
}); | |||
this.gameData.namespaces = nsData; | this.gameData.namespaces = nsData; | ||
} | } |