diff --git a/docs/manual/getting-started.md b/docs/manual/getting-started.md index 9d8f0d19c..2c49a7993 100644 --- a/docs/manual/getting-started.md +++ b/docs/manual/getting-started.md @@ -9,6 +9,7 @@ When the server finishes loading everything, Lua For Barotrauma starts up and re When creating a new Lua mod, you will need to create a new folder on the **LocalMods** folder, then inside this folder you will need to create a folder called **Lua**, and then inside the Lua folder you create a folder called **Autorun**, inside this folder you can add your Lua scripts that will be executed automatically, it will look something like this `LocalMods/MyMod/Lua/Autorun/test.lua`, remember that your mod will only work if it's a valid xml mod that has a filelist.xml. If you use ForcedAurorun, the mod executes even if it's disabled. Now you can open **test.lua** in your favorite text editor (VSCode with the Lua Sumneko extension recommended) and type in **print("Hello, world")**, now start the server by hosting a game or running the server executable manually, you will see in your console a text appear with the text that you entered in print, you can now type in the server console `reloadlua`, this will re-execute all the Lua scripts. You can also type in `lua yourscript` to run a short lua snippet, like this `lua print('Hello, world')`, remember to remove double quotes, because Barotrauma console automatically formats those. +**Note: When you host a server via the in game menus, you won't be able to see the first server debug prints, because the server will print those before your client joins the server.** ## Including other files