To use console commands, scripts, and extensions on Steam, follow the instructions in Setup and Loading Scripts. There is an alternate variation that may result in a cleaner Melvor Idle folder.
Setup
You only have to do this once.
- Download Melvor Idle on Steam, and find the installation folder. e.g.
[...]/steamapps/common/Melvor Idle
- Download the 0.54.0 version of NW.js SDK. The version might change in the future, but you need the specific one listed.
Download the scripts and extensions you want to use.
- Download from the script manager website. e.g. from 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*
folder in the Melvor Idle installation folder.
- The current contents of the
nwjs-sdk-v0.54.0-win-x64
folder has 22 total items. Moving this to the Melvor Idle folder will overwrite over 100 existing files.
Place the icons
, styles
, and source (i.e. scripts
or sources
) directories of the extracted extensions in the Melvor Idle installation folder.
Loading Scripts
Loading scripts must be run every time the game is opened on Steam.
- Open the game and load a character.
- Open the dev tools console by pressing F12.
- You can also open the console by right clicking in the game and selecting
Inspect
. You may need to switch from Element
to Console
.
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 folder 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
The following variant results in a cleaner directory without potential file name clashes. Note that the above does not clash for Combat Simulator + SEMI at the moment.
Additional Setup
Do all the normal steps 1-5 of the Setup section then follow the below instructions.
- Create a folder
Extensions
in the Melvor Idle installation folder.
- Make new directories for the extensions and scripts. e.g.
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/
- Place the
icons
, styles
, and source (i.e. scripts
or sources
) directories of the extracted extensions in the Melvor Idle installation folder.
- If you are using extensions, edit the main extension script so all source files and icons can be found.
- e.g. edit the paths in
contentScript.js
for Combat Simulator and SEMI.js
for SEMI
Combat Simulator:
-icons/ -> Extensions/MICS-steam/icons/
-sources/ -> Extensions/MICS-steam/sources/
SEMI:
-icons/ -> Extensions/SEMI-steam/icons/
-scripts/ -> Extensions/SEMI-steam/scripts/
Alternate Variation Loading Scripts
If you followed the alternate variation setup steps, you will have to load scripts slightly differently.
- Open the game and load a character.
- Open the dev tools console by pressing F12
- You can also open the console by right clicking in the game and selecting
Inspect
. You may need to switch from Element
to Console
.
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 folder before.
[
// 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)}">`));
Auto-loading Scripts in Steam
- Follow the setup instructions.
- Create a
filename.js
file in the Melvor Idle folder.
- Set the contents of the
filename.js
file
- 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.
setTimeout(function(){
/*insert all of the commands you would normally put in the console to load your scripts*/
}, 15000);
Add "inject_js_end": "pathToYourFile/yourFileName.js"
to the parameters of package.json
FAQ
Common issues and solutions with installation.
Q: I can't get the console to work!
A: You must download the specific version in the instructions. Newer versions will not work or help.
- Make sure to move the contents of
nwjs-sdk*
, not the entire folder.
Q: The console won't open when I hit F12.
A: If you followed the proper nwjs installation instructions and the console still does not open when you press F12, you may have to change your Steam screenshot button. Alternatively, you can open the console by right-clicking the game and clicking Inspect
.
Q: I installed nwjs but nothing works.
A: When you move the contents of nwjs-sdk*
, you will be asked to overwrite over 100 files to your Melvor Idle folder. If you don't get this prompt, you didn't select the right files/folders.