What it is (page wip)

This is an addon for mods that require other mods. It is for example used in my Plugins that require MultiSlot.

How it works

The lua program in this mod automatically checks if either:

  • a required extension is loaded
  • required mod’s ID is present
  • the required mod’s name is in the folder structure of the mods

If none get detected, the script automatically subscribes to the required mod via the Mod’s ID with the ingame repository.

Dependency-Resolver-Installer

The easiest way to add this to your own mod, is by using the Installer UI. To load the Installer UI, you need to first install this as a normal mod by cloning it into the mods-directory.

After that you then load the UI by entering the following command in BeamNG’s Console: extensions.load("tommot_depInstallerUi")

You can also load this by using the newest (GitHub-) Version of GMSG / MultiSlot in the Utils-Tab under Advanced. After that you can just enter all the required stuff and press install. If you missed something, or something isn’t right, the Installer will display a Popup. Installer UI Picture 1: Installer UI

To get the ModID, you need to visit the required- mod’s Page on beamng.com and find it on the left side. This means that you need to have the required mod (dependency) already released on the game’s repository.

The Installer will get all activated Mod’s IDs and display them as a selectable list. If the mod is downloaded from the Repository, the Mod’s Name will also get displayed next to the ID.

You also need to select a mod where the dependency resolver should get installed to and enter your name.

If a mod, where you want to install this into is packed as a zip, it will ask you to unpack first, which can be done with the UI itself.

Use it in your own mod, Manual installation

To make your own mod automatically resolve dependencies using this, you can also copy this manually and edit some stuff.

  1. from GitHub download the lua and scripts directories and copy them to your mod
Example for the pasted directories

Example of the pasted folders Picture 2: Example of the copied directories added to a mod

  1. Choose a fitting name, for example the required-mod-ID+Downloader as “modname” ➡ Here we take gmsgDownloader as “modname” instead, from here always enter your chosen “modname”
    • to find the required mods-ID go to the mods page on beamng.com and copy the Unique ID Unique ID Picture 3: Example of the Unique ID on BeamNG’s-Website
  2. change directory name from /scripts/gmsgDownloader to /scripts/“modname”
  3. change /lua/ge/extensions/tommot/gmsgDownloader.lua to /lua/ge/extensions/“yourname”/“modname”.lua
  4. edit the following line in /scripts/“modname”/modScript.lua so this reflects your name and modname
setExtensionUnloadMode("'yourname'/'modname'","manual")
Example for gmsgDownloader by TommoT

modScript.lua example Picture 4: Example modScript.lua

  1. edit /lua/ge/extensions/“yourname”/“modname”.lua: find stuff to edit below -- START OF ADJUSTMENTS \/ EDIT BELOW THIS LINE \/ gmsgDownloader.lua example Picture 5: Lines in the extension’s Lua file to edit
  2. pack your mod and release it :)

Safety / Security

The mod is completely safe as it uses just the already included functions of the game and it cannot access anything from the internet. Therefore it cannot be abused or misused to download malware or anything.

(This page is a Work in Progress)