Using the Lua Add-On(s) Manager.

Discussion in 'Lua Discussions' started by DavidDC, Apr 28, 2022.

Thread Status:
Not open for further replies.
  1. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    Installing and using a Lua script

    All you have to do is download a script made from a player either in this section of the forum or from a friend.

    Once it's downloaded, put the files (or unzip them if they are zipped) into the Lua folder.
    You can use the Add-On(s) Manager to open the folder which can be found in the window selector like shown below:

    [​IMG][​IMG]
    The main script file with the extension .lua should be placed at the origin of the Lua folder.
    Once file is there, click the Reload Script(s) button in the Add-On(s) Manager and the script should appear.
    You have the option to set the script On or Off (it's set to On by default).

    Adding information into the Lua Add-On(s) Manager as a Lua scripter

    If you are the creator of a script and want to load the lua manager with informations, all you have to do is write this local variable into the global section of your lua script like this:

    Code:
    local ScriptName = "Awesome Script!";
    local Version = "1.0";
    local CreatorName = "Myself!";
    local Description = "Awesome script doing awesome stuff!";
    local IconPath = "images/awesomeicon.png";
    When turning a script Off, the creator of the script have the convenience option to unload and stop whatever is being played from their script themself by using a callback event ShroudOnDisableScript. If that function is not used within the script, the manager will ask the player if he accept to reload all the script in order to disable your, which is also fine.

    Example and detail can be found into the Lua API documentation.
     
  2. Duke Gréagóir

    Duke Gréagóir Legend of the Hearth

    Messages:
    5,686
    Likes Received:
    11,826
    Trophy Points:
    165
    Location:
    Dara Brae
    Awesome! :D
     
    that_shawn_guy likes this.
Thread Status:
Not open for further replies.