Updated API

Discussion in 'Lua Discussions' started by Chris, Nov 11, 2019.

  1. Chris

    Chris Tech Lord Moderator SOTA Developer Ambassador

    Messages:
    2,453
    Likes Received:
    27,629
    Trophy Points:
    190
    Gender:
    Male
  2. Lesni

    Lesni Avatar

    Messages:
    968
    Likes Received:
    2,159
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Novia
    Works now. Thanks
     
    Last edited: Nov 11, 2019
  3. Chris

    Chris Tech Lord Moderator SOTA Developer Ambassador

    Messages:
    2,453
    Likes Received:
    27,629
    Trophy Points:
    190
    Gender:
    Male
    Try now:
     
    Barugon, Sara Dreygon, Lesni and 2 others like this.
  4. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,053
    Likes Received:
    1,812
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    Awesome. Thanks Chris!
     
  5. Drake Aedus

    Drake Aedus Avatar

    Messages:
    542
    Likes Received:
    890
    Trophy Points:
    75
    Gender:
    Male
    Is ShroudOnConsoleInput the new HandleConsole?
     
  6. Toular

    Toular Avatar

    Messages:
    492
    Likes Received:
    484
    Trophy Points:
    43
    The google doc currently says:
    int ShroudGetStatValueByNumber(int)
    int ShroudGetStatValueByName(string)​

    But aren't some of those values floating point? Seems like several of them are. In my first script I had string.format using %d for the values and it was always showing "0", until I switched to "%f".
     
  7. Chris

    Chris Tech Lord Moderator SOTA Developer Ambassador

    Messages:
    2,453
    Likes Received:
    27,629
    Trophy Points:
    190
    Gender:
    Male
    BTW, I'm apparently down with the sickness. Stayed away from the computer most the day. I'll get some more work done for a Thursday build but at the moment... blarg.
     
    Sara Dreygon, Jaesun, Barugon and 2 others like this.
  8. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,053
    Likes Received:
    1,812
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    Try to get unsick. Our impudent demands will still be there when you feel better.
     
  9. that_shawn_guy

    that_shawn_guy Bug Hunter

    Messages:
    1,036
    Likes Received:
    2,706
    Trophy Points:
    125
    Location:
    earth... mostly
    The community does not approve!

    take your time and get better. no point burning the candle at 9 ends. :)
     
    fooBrew and Rentier like this.
  10. King Robert

    King Robert Avatar

    Messages:
    485
    Likes Received:
    1,371
    Trophy Points:
    43
    Gender:
    Male
    Hope you feel better soon.
     
    fooBrew likes this.
  11. fooBrew

    fooBrew Avatar

    Messages:
    34
    Likes Received:
    31
    Trophy Points:
    8
    Gender:
    Male
    Location:
    San Diego, CA
    I guess we'll have to hold off on our unreasonable demands for a while. I'm making a list, though.

    Feel better soon :)
     
  12. majoria70

    majoria70 Avatar

    Messages:
    9,859
    Likes Received:
    23,997
    Trophy Points:
    153
    Gender:
    Female
    Location:
    United States
    Sorry You are sick again Chris. I know you've been watching your diet but some interesting stuff around sugar and the immune system.

    Eating or drinking too much sugar curbs immune system cells that attack bacteria. This effect lasts for at least a few hours after downing a couple of sugary drinks. Eat more fruits and vegetables, which are rich in nutrients like vitamins C and E, plus beta-carotene and zinc.Jul 7, 2019
     
  13. Barugon

    Barugon Avatar

    Messages:
    13,033
    Likes Received:
    20,391
    Trophy Points:
    153
    Gender:
    Male
    Are ShroudGetScreenX and ShroudGetScreenY the width and height of the screen? If so then shouldn't they be called ShroudGetScreenWidth and ShroudGetScreenHeight?

    [edit] Also, shouldn't ShroudGetFullScreen return a bool instead of an int?

    @Chris
     
    Last edited: Nov 13, 2019
  14. Drake Aedus

    Drake Aedus Avatar

    Messages:
    542
    Likes Received:
    890
    Trophy Points:
    75
    Gender:
    Male
    We already have "Shroud" before all the functions and variables... I think we'll be safe with the internal access functions being X and Y before we populate our local script variables. :)
     
    Aeryk likes this.
  15. Aeryk

    Aeryk Avatar

    Messages:
    140
    Likes Received:
    174
    Trophy Points:
    18
    Location:
    Terra (thus far)
    There is no concept of namespaces in LUA and modules were removed, however the same functionality can be achieved using a table. The require statement in LUA (available in MoonScript, but not sure about restrictions) supports this usage. Any module loaded with require is bound to a table of the same name as the module. If there was a library "Shroud", we could call the functions with Shroud.GetScreenX.

    On that note, library projects for WoW and ESO became incredibly useful and they certainly prompted more mods to be written. The downside was issues related to compatibility as libs were updated. So we learn to deal with that. We all end up depending on someone else's code at some point to do anything sufficiently interesting without recreating the wheel each time.

    I suspect the bootstrap file (or equivalent since any given mod will need a starting point) may be locked down at some point and used only to load scripts that the user has flagged to enable. This will allow multiple "mods" and "libs" (if we are going to call them that) to be installed, but then selectively loaded without having to further muck with (and possible break) the file system. Guessing @Chris is already thinking about how this will work.
     
    fooBrew likes this.
  16. Barugon

    Barugon Avatar

    Messages:
    13,033
    Likes Received:
    20,391
    Trophy Points:
    153
    Gender:
    Male
    What does that have to do with the question I asked?
     
  17. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,053
    Likes Received:
    1,812
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    I think so, but it's not on QA yet. Hopefully it will be tonight! :)
     
    Barugon likes this.
  18. oplek

    oplek Avatar

    Messages:
    1,095
    Likes Received:
    2,718
    Trophy Points:
    113
    Gender:
    Male
    How up to date is this document?
     
  19. Daxxe Diggler

    Daxxe Diggler Avatar

    Messages:
    2,704
    Likes Received:
    5,738
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Virtue Oasis - Hidden Vale
    It has references in there to LUA, so I'd say it's probably at least been updated in December, 2019.
     
  20. icuszda

    icuszda Avatar

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Location:
    Fort Hood, Texas
    this is cool, want to start using addons. I typed lua folder location in the searchbox and got nothing. I believe I have to create the folder, but where? Just a regular non programmer sota player that wants to use lua addons, but cant even figure out where the lua folder goes and can't find the information myself. Sorry if this is annoying and I am bother everyone.