Overview
A quick guide how to import Lua modules Into your mod using the atom editor
About this guide
This is a quick guide to help you setup the Lua “require” keyword in table top simulator
The ‘require’ keyword is a high level function in Lua that loads modules for you written by you or other people.
Requirments
Before reading this guide I am gone assume you followed the official guide on setting up atom within table top simulator. here are 2 links that might help if you don’t have it [link]
[link]
HowTo
First open the Settings View by navigating to Edit > Preferences (Linux), Atom > Preferences (macOS), or File > Settings (Windows).
Then click on the packages button
Then go to Table top simulator -> settings and change it to the following
Basepath : “~DocumentsMy GamesTabletop Simulator”
Bunde file pattern: “Tabletop Simulator Lua?.ttslua;Tabletop Simulator Lua?.lua;?.lua;?.ttslua;”
That is it.
You can then go to “DocumentsMy GamesTabletop SimulatorTabletop Simulator Lua”
And add place in you modules you like to use in your mods.
Note the folder “Tabletop Simulator Lua” needs to be created by you first.
Or you can just dump your modules in the Tabletop Simulator folder.
This is how a basic module could look
There are ofcourse diffrent ways to make modules in Lua but this should atleast get you started
Happy modding