Lua Problem Solving: Requests for help from Lua USERS with running scripts

Discussion in 'Lua Discussions' started by Steevodeevo, Dec 4, 2019.

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

    Steevodeevo Avatar

    Messages:
    1,431
    Likes Received:
    2,806
    Trophy Points:
    113
    Hi folks,

    I simply cannot get Lua scripts to run. When I request help the script designers and other Lua knowledgeable folk kindly respond but in Cantonese :) Or at least it sounds like Cantonese to me.

    I therefore thought a thread for numbskulls like myself and other players who wish to use lua scripts who are not designers and are having issues of a general nature running scripts can request general help.

    Obviously if folks are having more specific problems with a particular script they would ask the author, but my issues seem to be of a more general nature...


    - I have a Lua directory (Chris's recent patch installed a Lua directory by default), but I was concerned as I am a STEAM user that the default location may be my issue, so I have a Lua directory here:

    C:\Program Files (x86)\Steam\steamapps\common\SotA\Lua
    and HERE:
    C:\Users\Steve\AppData\Roaming\Portalarium\Shroud of the Avatar\Lua

    - I have Lua Chat enabled
    - I have a Lua script loaded into BOTH of those Lua folders which has been validated by others as working.
    - Have used /lua unload and /lua reload
    - Multiple restarts

    Some clues and symptoms?

    - I can't change my chat directory to /Lua in game. It is listed on the Chat drop down but cant be selected. Not sure if it is supposed to be able to be selected.
    - I use Steam. Is anyone else using a lua script successfully, such as Amalgamate, who runs the game via Steam?

    Thanks for any help.
     
  2. Lesni

    Lesni Avatar

    Messages:
    971
    Likes Received:
    2,153
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Novia
    One thing most don't tell you is the /lua reload must be done in the LOCAL chart area of the chat screen.
    Also, some of the scripts were having issues if you were in a PVP area but should be resolved now.

    @devilcult may be able to help more than I.
    FWIW
    p.s. You can type /debug and notice if there are any errors shown when running lua scripts
     
    Last edited: Dec 4, 2019
    Anpu likes this.
  3. Drake Aedus

    Drake Aedus Avatar

    Messages:
    536
    Likes Received:
    886
    Trophy Points:
    75
    Gender:
    Male
    From ingame, type /datafolder in your chat window. That will open SotA's current folder for chatlogs, books, lua etc (even if you've changed it somehow in the past from the default). That is the only Lua folder you need to be concerned about.

    Next, when Lua messages are enabled ingame (see below), the client will output text to show 1) which files it is loading, 2) and caught errors it runs into, and 3) any output messages from the script or its author.

    [​IMG]

    After that, it is very dependent on error messages.
     
    Anpu likes this.
  4. CatweazleX

    CatweazleX Avatar

    Messages:
    653
    Likes Received:
    777
    Trophy Points:
    93
    Location:
    Veritas Sanctuary
    As Drake Aedus said: type /datafolder go into Lua folder, drop the lua scripts there.
    If the client is running and there was no Lua script before, you need to restart the client. Else a /lua reload is sufficient.
     
    Anpu likes this.
  5. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    after checking with steam client i can confirm you are in the good data folder.

    Problem can be if you have multiple script and some of them are buggy it wont run the others. Also make sure to have the lua box checked on the cogwheel in chat box in game. If you use amalgamate you should see some colored text appear with instructions.

    but yeah using steam does work with that second folder you posted (users..appdata..)
     
    Last edited: Dec 4, 2019
    Lesni likes this.
  6. Steevodeevo

    Steevodeevo Avatar

    Messages:
    1,431
    Likes Received:
    2,806
    Trophy Points:
    113
    Thanks for comments guys, and thanks to @devilcult for checking out the Steam issue.

    Still doesn't work :(

    I've tried (for example) amalgamate.lua (I believe lua files are formatted as text files?) in a lua directory in various combinations in both those directory paths: in each one separately and also in both together, followed by restarts and /lua unload and /lua load. /Debug doesn't tell me anything.

    I have tried running in full screen and windowed mode.

    All to no avail.

    Gonna leave it now for a while, see how things develop.
     
  7. Drake Aedus

    Drake Aedus Avatar

    Messages:
    536
    Likes Received:
    886
    Trophy Points:
    75
    Gender:
    Male
    To be clear, the in game command /datafolder will take you to where this setting is configured (plus the Portalarium/Shroud of the Avatar/ path):

    [​IMG]

    [​IMG]

    Also, check that its not saved as "Name.lua.txt" or something like that. Most Windows OS default with the file extension hidden. To get around this you can generally go to the folder, select the menu option "View", and select "File Name Extentions" (depending on your version).
     
    Anpu likes this.
  8. CatweazleX

    CatweazleX Avatar

    Messages:
    653
    Likes Received:
    777
    Trophy Points:
    93
    Location:
    Veritas Sanctuary
    + /lua reload not /lua load
     
  9. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    also its Amalgamate.lua, pretty sure its case sensitive important becauase i call it as a module named Amalgamate with a major A
     
    Steevodeevo likes this.
  10. Steevodeevo

    Steevodeevo Avatar

    Messages:
    1,431
    Likes Received:
    2,806
    Trophy Points:
    113
    Yea, sorry meant reload. Wish I didn't and you had cracked it.
     
  11. Tirrag

    Tirrag Avatar

    Messages:
    853
    Likes Received:
    1,820
    Trophy Points:
    93
    Location:
    Iowa, USA
    This is a really good tip. As mentioned Windows by default will hide extensions and tack on what it thinks should be the right one when a file is created. The filename will look correct but you will not realize the ".txt" is on the end because it is hidden. Even if you don't think this is the case just double check using the steps mentioned. Always good to confirm just in case :)

    Another issue may be file rights. If you are not running SotA under the same user you are creating the files as it may not have the ability to read those files. Maybe you can post a screenshot of your datafolder root in Windows explorer and then one of your Lua subfolder (blacking out anything you dont want us to see). We may be able to spot something in there.
     
  12. Drake Aedus

    Drake Aedus Avatar

    Messages:
    536
    Likes Received:
    886
    Trophy Points:
    75
    Gender:
    Male
    I also worry about how files are extracted from archives, as well as encoding when we start to use UTF-8 characters, but that last part is beyond simply making sure the Lua scripts are loading.
     
Thread Status:
Not open for further replies.