Lua Dashboard

Discussion in 'Player Test Environment (QA Server) Feedback' started by Rinaldi, Apr 20, 2022.

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

    Rinaldi Bug Hunter

    Messages:
    1,624
    Likes Received:
    3,795
    Trophy Points:
    113
    Gender:
    Male
    I am not sure if this has been fully implemented.
    But I have a question as to how it is supposed to function.
    If I load 2 lua scripts, the dashboard lists both of them.
    When I select one of the scripts and click "off ", then click "yes", it seems to reload all of the scripts, including the one I turned off. I would have expected it to load all the scripts except the one I turned off.
    In fact, if i turn off all the scripts, they all still seem to reload.
    In other words, the scripts that are turned off are still visible on the screen and still seem to function just fine.
    Am i misinterpreting how this works?

    Anyhoo, i think the dashboard is a great addition.
    Also, the link directly to the SOTA "LUA" folder is a great feature :thumbs up:, but the same link is listed with every lua script...perhaps the link should be listed only once at the top of the dashboard.
     
    Last edited: Apr 20, 2022
    Time Lord likes this.
  2. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    When you click off on a script, if that script doesnt handle their disabling of object themself, all scripts will be reloaded but the one set to off wont be running.

    When the button is On, its cause the script is on, if its Off, the script is off.
     
    Time Lord and Rinaldi like this.
  3. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    It should open the folder where the lua file is, if it open the same its maybe cause lua file are in the same folder?
     
    Time Lord and Rinaldi like this.
  4. Rinaldi

    Rinaldi Bug Hunter

    Messages:
    1,624
    Likes Received:
    3,795
    Trophy Points:
    113
    Gender:
    Male
    So, when i turn a lua script off using the Dashboard, all the windows for that script will stay open (and clicking on the buttons will still function, such as clicking XP will open the XP window), but it will not collect data?
    In other words, the "off" option just stops the script from collecting data? I guess that may help when someone wants to temporarily stop a lua script when it causes hitching and game-slow.
    I thought the "off" function would unload that specific lua function, which would stop it from running and eliminate it from the screen.

    Oh, I assumed all the Lua scripts had to be in the same folder in order to load into SOTA (for windows C:\Users\[User]\AppData\Roaming\Portalarium\Shroud of the Avatar(QA)\Lua).
    Is that not the case?

    Thanks!
     
    Time Lord likes this.
  5. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    When a script is set Off in the screen (the Off is visible) it should not load that script in any way. When its set at On it should load it. Ill look again to make sure nothing broke in the way when sent. Was working fine here so it might be that.

    Ill check again that folder thing i think you are right lol. From my mind player could put it in the sub folder they wanted but i might be wrong.
     
    Time Lord and Rinaldi like this.
  6. Rinaldi

    Rinaldi Bug Hunter

    Messages:
    1,624
    Likes Received:
    3,795
    Trophy Points:
    113
    Gender:
    Male
    @DavidDC hmm.....all of my above observations were when i booted up QA 1305 for the first time. I just quit SOTA and rebooted QA, and now the lua scripts do unload (windows all disappear) in real time when I click off.
    SO, maybe there is something odd that occurs the first time the function is used, and reboot solves it? Or maybe something went wonky with my initial load of QA?
    Anyhow, it seems to be working now.
    I use lua stuff a lot, so I think this feature is stellar!
     
    Time Lord likes this.
  7. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    Ya that what i was suspecting, the saving locally of what is on and off. I did run it many time and deleted it many time myself to check if it was working but i did that 2-3 time already for other stuff in the game and everyone had that problem first time. I guess im doing something wrong there. Ill check that out anyway!
     
    Time Lord and Rinaldi like this.
  8. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    People can set their own title and icon and version etc in the manager by adding some variable down here. Ill make a full guide on forum for release.

    Just write that in your script. (That part shouldnt be obsucated for those doing that)
    Code:
    local ScriptName = "Your script title";
    local IconPath = "pathto/image.png";
    local Version = "1.0";
    local CreatorName = "Your name";
    local Description = "The description";
     
  9. Rinaldi

    Rinaldi Bug Hunter

    Messages:
    1,624
    Likes Received:
    3,795
    Trophy Points:
    113
    Gender:
    Male
    I just checked this: I booted SOTA with 2 lua scripts in the main lua folder (and both showed in the dashboard), then (with SOTA QA running) I put one of the lua scripts in a sub-folder inside the main lua folder (C:\Users\[User]\AppData\Roaming\Portalarium\Shroud of the Avatar(QA)\Lua ).
    I then "/lua unload" and then "/lua reload" and the lua script in the subfolder did not load.
    Also the on/off button in the dashboard did not work for the script that was in the subfolder, and its "folder" link still opened to the main lua folder.
    I then rebooted, and the lua script in the subfolder did not load, and did not show up on the dashboard .
    So, it seems that the lua script has to be in the main lua folder to load.
    I thought i would check to save you some time :)
     
    Last edited: Apr 21, 2022
    Time Lord likes this.
  10. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    Fixed the on off thingy. Ill place that folder button elsewhere along a reload all script button for when player add them while panel is open instaed of doing /lua reload
     
  11. Rinaldi

    Rinaldi Bug Hunter

    Messages:
    1,624
    Likes Received:
    3,795
    Trophy Points:
    113
    Gender:
    Male
    Hi @DavidDC,
    I just tested this on QA 1306....

    The link to forums when no scripts are active is a nice feature :thumbs up:

    Scrolling in the Lua manager window seems wonky. With one item in the window and the scroll bar indicating nothing to scroll (i.e. scroll bar is "full"), the window can still be scrolled.

    Also, Moving lua scripts in and out of the lua folder while SOTA is running seems to mess things up. I am not sure if you plan to make the lua manager able to handle changes while SOTA is running (i.e. adding and removing lua scripts from the lua folder while SOTA is running). But I thought I would share my experience just in case.

    Adding a lua script while SOTA is running using this sequence of steps.
    1. Lua folder is empty
    2. Boot SOTA
    3. Open LUA manager.
    4. Click "folder" to open lua folder.
    5. Copy a Lua script into the lua folder.
    6. Go back to SOTA and click "Reload scripts"​
    In this case, the LUA script starts up and runs (shows up on screen, and appears to track data), but the script does not appear in the dashboard.

    Removing a lua script while sota is running using the following steps:
    1. Lua folder contains a lua script
    2. Boot SOTA, and lua script shows its window on the screen as expected.
    3. Open lua manager (which lists the lua script as expected).
    4. Click "folder" to open the lua folder.
    5. Remove the lua script from the folder.
    6. Go back to SOTA and click "reload scripts"
    In this case, the lua script disappears from the game window, but it does not disappear from the LUA manager, and the On\off button is non-functional
    So, the "reload script" button works fine and institutes all changes to the lua folder while SOTA is running, but the lua dashboard does not seem to reflect the changes unless a SOTA reboot is done.
    Thanks,
    Rin
     
    Last edited: Apr 22, 2022
    Time Lord likes this.
  12. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    Sadly have to reload the scripts for this to work. A user would probably think about placing the script before running the game, or seeing the window is empty they will reload the game (quicker one will click the reload button on the screen). But yeah thats the way it is..
    Its either that or i have to reload all the scripts like every seconds see if there is a change... That would be a bad overhead for not much.

    Edit: Ill add a note saying user have to reload the scripts
     
    Anpu, Time Lord and Rinaldi like this.
  13. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    fixing that
     
    Anpu, Time Lord and Rinaldi like this.
  14. Rinaldi

    Rinaldi Bug Hunter

    Messages:
    1,624
    Likes Received:
    3,795
    Trophy Points:
    113
    Gender:
    Male
    @DavidDC ,
    Great work on this lua dashboard :thumbs up:.
    When i change/add lua scripts in the lua folder while sota is running, the scripts and the dashboard both update flawlessly when i press the reload button...no need to reboot sota! that is pure awesomeness.:D
     
    Anpu and Time Lord like this.
Thread Status:
Not open for further replies.