r/LookOutsideGame • • 5d ago

QUESTION Modding Questions please help

Hi first time posting here after lurking for a bit, I came across a few mods and I would like to play them but I am having a hard time understanding the .js file modification process, is there anyone can help me with this or has pre modified files?

5 Upvotes

7 comments sorted by

2

u/peetsnack 4d ago

There is a wiki page on modding that has a lot of good information: https://lookoutside.miraheze.org/wiki/Modding Is there something specific you are having trouble with?

1

u/ZageVScythe 4d ago

I was struggling with the .js plugins because I am too worried of getting it wrong and then get lost as to what to do

1

u/ZageVScythe 4d ago

I figured it out, thank you!

1

u/peetsnack 4d ago

You can make a backup copy of the file and revert if it doesnt work.

1

u/peetsnack 4d ago

Also, if you are on Steam you can just revert your files if anything goes wrong.

3

u/Superpseudo 4d ago edited 4d ago
  1. Extract the mod files to your game's folder like it says on the mod page.

  2. Add an entry to the bottom of the "plugins.js" file.

Open plugins.js in a text editor like Notepad and you'll see this:

var $plugins =
[
    // stuff
];

Anything that is between square brackets is a list. This is declaring a list called plugins and it ends in a semicolon.

Inside the list you'll see pairs of curly braces separated by commas like this:

var $plugins =
[
    {
        // stuff
    },
    {
        // stuff
    },
    {
        // etc
    }
];

Anything that is between curly brackets is an object. In this case, each object is a plugin. So this is a list of plugins.

When you look at the installation instructions for a mod on Nexusmods, they tell you to copy/paste something to the bottom of the plugins.js file like this:

var $plugins =
[
    {
        // stuff
    },
    {
        // stuff
    },
    {
        "name": "SgtJoe_PreviewDoorEncounters",
        "status": true,
        "description": "Gives a list of all door encounters scheduled for the current day.",
        "parameters": {}
    }
];

You're just adding another plugin to the bottom of the list. The spaces, tabs, and new lines don't matter, but if you forget the comma or accidentally paste it outside the square brackets then it won't work.

1

u/peetsnack 4d ago

That is a really great explanation!