Mod Creation/Enabling DevTools for the Steam and Epic Clients: Difference between revisions

Line 146: Line 146:
<ol>
<ol>
<li>Follow the [[Scripting_and_Extensions_Instructions#Setup|setup instructions]].</li>
<li>Follow the [[Scripting_and_Extensions_Instructions#Setup|setup instructions]].</li>
<li>Create a <code>filename.js</code> file in the Melvor Idle folder.</li>
<li>Create a <code>autorun.js</code> file in the Melvor Idle folder.</li>
<li>Set the contents of the <code>filename.js</code> file</li>
<li>Edit <code>autorun.js</code> using a text editor:</li>
<ul>
<ul><li>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.</li></ul>
<li>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.</li>
</ul>
<pre>setTimeout(function(){  
<pre>setTimeout(function(){  
     /*insert all of the commands you would normally put in the console to load your scripts*/
     /*insert all of the commands you would normally put in the console to load your scripts*/
}, 15000);</pre>
}, 15000);</pre>
<li>Add <code>"inject_js_end": "filename.js"</code> to the parameters of <code>package.json</code></li>
<li>Add <code>"inject_js_end": "autorun.js"</code> to the parameters of <code>package.json</code>, which should look like this:</li>
<pre>"node-remote":["*://*"], "inject_js_end": "autorun.js"}</pre>
</ol>
</ol>


17

edits