Mod Creation/Enabling DevTools for the Steam and Epic Clients
This page was last updated for (v0.20). |
Disclaimer: It is highly recommended to BACKUP YOUR SAVE before running any scripts or extensions.
Disclaimer: Do not run code you can not understand or do not trust. Malicious code could be included in any script and extension.
Before You Begin
It's highly recommended before doing anything to
- back up your save by exporting or downloading the save file.
- read all instructions before following them.
- verify the code is not malicious.
Steam Console and Scripts
How to use console commands, scripts, and extensions on Steam.
Setup
You only have to do this once.
- Download Melvor Idle on Steam, and find the installation directory [...]/steamapps/common/Melvor Idle
- Download the 0.49.2 version of NW.js SDK. The version might change in the future, but you need the specific one listed.
- 64bit Windows: https://dl.nwjs.io/v0.49.2/nwjs-sdk-v0.49.2-win-x64.zip
- 64bit Linux: https://dl.nwjs.io/v0.49.2/nwjs-sdk-v0.49.2-linux-x64.tar.gz
- Others: https://dl.nwjs.io/
- Download the scripts and extensions you want to use.
- Download from the script manager website. e.g. GreasyFork
- Download from the extension's browser store page.
- Download the source from the extension's repository. e.g.
- Extract all zipped files.
- Place the contents of the nwjs-sdk* directory in the Melvor Idle installation directory.
- Place the icons, styles, and source (i.e. scripts or sources) directories of the extracted extensions in the Melvor Idle installation directory.
- Open the game and load a character.
- Open the dev tools console (F12).
- Set the context of the console to game.
- The top left of the console has a dropdown: change it from top to game (steam.melvoridle.com). After doing this, you can use the console.
- Load the scripts and extensions you placed in the installation directory before.
- You can load SEMI like this:
require('fs').readFile('scripts/SEMI.js', 'utf8', (err, data) => {eval(data);}) $(document.head).append(`<link rel="stylesheet" href="${chrome.runtime.getURL('styles/semi.css')}">`)
- You can load the Combat Simulator like this:
require('fs').readFile('sources/contentScript.js', 'utf8', (err, data) => {eval(data);}) $(document.head).append(`<link rel="stylesheet" href="${chrome.runtime.getURL('styles/mainStyle.css')}">`)
- You can load user scripts like this, by changing the file name:
require('fs').readFile('relativePathToMyReallyCoolScript.js', 'utf8', (err, data) => {eval(data);})
Alternate Variation
(C) Cleaner variation - You don't have to do the following at all, it is a slight variant to the previous instructions, which takes some more fiddling but results in a cleaner directory without potential file name clashes. Note that the above does not clash for Combat Simulator + SEMI at the moment.
The (cleaner) way I do it mainly differs in the target location of steps (4) and (5) : I made a directory Extensions in the Melvor Idle installation directory, in which I made new directories for the extensions and scripts: Extensions/
Greasy Fork/ Melvor Completion Log Helper.js Melvor Idle - Timestamped Saves.js Melvor-ETA/ time-remaining.js MICS-steam/ icons/ sources/ styles/ scripts/ nameOfMyReallyCoolScript.js SEMI-steam/ icons/ scripts/ styles/
The script in (9) then has to be changed accordingly: [
// own 'Extensions/scripts/nameOfMyReallyCoolScript.js', 'Extensions/Melvor-ETA/time-remaining.js',
// extensions // other than the main script, extensions typically also require the insertion of a css file 'Extensions/MICS-steam/sources/contentScript.js', //'Extensions/SEMI-steam/scripts/SEMI.js',
// Greasy Fork user scripts 'Extensions/Greasy Fork/Melvor Completion Log Helper.js', 'Extensions/Greasy Fork/Melvor Idle - Timestamped Saves.js',
].forEach(pts => require('fs').readFile(pts, 'utf8', (err, data) => {eval(data);}));
// Extension css [
'Extensions/MICS-steam/styles/mainStyle.css', //'Extensions/SEMI-steam/styles/semi.css',
].forEach(cssFile => $(document.head).append(`<link rel="stylesheet" href="${chrome.runtime.getURL(cssFile)}">`));
Note that SEMI is commented here since I don't use that, you can easily swap scripts in and out by commenting them. Personally I keep a copy of this script saved as yet another script, and each time I load the game I just copy paste it in the console. Additionally. this variant approach (C) needs an additional setup step if you are using extensions: (5.1) Edit the main extension script, i.e. contentScript.js for Combat Simulator and SEMI.js for SEMI, so all source files and icons can be found. In particular you will find references to the icons and source directories in these files, replace these with the appropriate paths:
- Combat Simulator: - - icons/ -> Extensions/MICS-steam/icons/ - - sources/ -> Extensions/MICS-steam/sources/ - SEMI: - - icons/ -> Extensions/SEMI-steam/icons/ - - scripts/ -> Extensions/SEMI-steam/scripts/
Auto-loading Scripts in Steam
1. You need to make a .js file in the directory Melvor is in. 2. That .js file needs to be
setTimeout(function(){ /*insert all of the commands you would normally put in the console to load your scripts*/ }, 15000);
The 15000 is just to give the game 15 seconds to get up and running, it doesn't seem to matter if it fires on the character screen or once you load a character.
3. There should be a file in the directory named package.json, open that and add "inject_js_end": "pathToYourFile/yourFileName.js" to the parameters.
Melvor Idle version v1.3.1 (Released: 30th October 2024) |
---|
Error creating thumbnail: File missing Combat: Error creating thumbnail: File missing Attack • Error creating thumbnail: File missing Strength • Error creating thumbnail: File missing Defence • Error creating thumbnail: File missing Hitpoints • Error creating thumbnail: File missing Ranged • Error creating thumbnail: File missing Magic • Error creating thumbnail: File missing Prayer • Error creating thumbnail: File missing Slayer • Error creating thumbnail: File missing Corruption
|
Skills: Error creating thumbnail: File missing Farming • Error creating thumbnail: File missing Township • Error creating thumbnail: File missing Woodcutting • Error creating thumbnail: File missing Fishing • Error creating thumbnail: File missing Firemaking • Error creating thumbnail: File missing Cooking • Error creating thumbnail: File missing Mining • Error creating thumbnail: File missing Smithing • Error creating thumbnail: File missing Thieving • Error creating thumbnail: File missing Fletching • Error creating thumbnail: File missing Crafting • Error creating thumbnail: File missing Runecrafting • Error creating thumbnail: File missing Herblore • Error creating thumbnail: File missing Agility • Error creating thumbnail: File missing Summoning • Error creating thumbnail: File missing Astrology • Error creating thumbnail: File missing Alternative Magic • Error creating thumbnail: File missing Cartography • Error creating thumbnail: File missing Archaeology • Error creating thumbnail: File missing Harvesting
|
Other: Error creating thumbnail: File missing Beginners Guide • Guides • Error creating thumbnail: File missing Bank • Error creating thumbnail: File missing Combat • Error creating thumbnail: File missing Mastery • Error creating thumbnail: File missing Money Making • Error creating thumbnail: File missing Shop • Easter Eggs • Pets • Error creating thumbnail: File missing Golbin Raid • Error creating thumbnail: File missing Full Version • Throne of the Herald • Atlas of Discovery • Error creating thumbnail: File missing Into the Abyss
|
Reference Tables: Items, Equipment, Experience Table, Upgrading Items, Combat Areas, Slayer Areas, Dungeons, Strongholds, The Abyss, Monsters |