LUA requests

Discussion in 'Lua Discussions' started by Vladamir Begemot, Nov 5, 2019.

  1. Katu

    Katu Avatar

    Messages:
    419
    Likes Received:
    719
    Trophy Points:
    55
    Gender:
    Male
    Location:
    Finland
    Lua sandboxing is a bit different task. You can easily define, which functions are available and which are not. Thats a feature of Lua.
    If you give it full power and access to the hosting computer, there is nothing it can't do. I can't remember any game, with inbuilt scripting, that gives this kind of access.

    Account data can be accessed with keylogging and external softwares that the Lua can download and run.

    I get what you are saying, but that is not how people works :D
    Average internet user is dumb and 50% are worse than that.

    So, to make it absolutely clear what my thinking could mean.

    Lua os and io library needs restrictions. At minimum, notification that the script can run anything on your computer, delete any files it sees fit and send all your data to internet.
    They can easily block the obvious ones and/or write a wrapper that replaces the original function, to restrict it.

    I too, would like to get my hands on fully powered Lua, but I don't think it should be the default.
     
  2. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,053
    Likes Received:
    1,812
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    Well, we'll likely know soon: https://twitter.com/catnipgames/status/1192813478354071553
     
    Jaesun and Katu like this.
  3. Vladamir Begemot

    Vladamir Begemot Avatar

    Messages:
    6,161
    Likes Received:
    11,990
    Trophy Points:
    153
    Gender:
    Male
    Spacial voice chat?
     
  4. Elwyn

    Elwyn Avatar

    Messages:
    3,484
    Likes Received:
    4,654
    Trophy Points:
    153
    Gender:
    Male
    Location:
    San Antonio, TX
    That makes me cry a little inside every time I see it happen. It's just wrong.
    It first showed up one release on enemies in Blood River Outskirts. I bug reported it as being the wrong way to do it. Then it appeared everywhere else. It's one of the many reasons I got burned out on sending bug reports into a black hole.

    I don't think this is something that lua is going to be able to fix. Lua can be used to add new things, but unless major parts of the current UI are re-implemented into lua where users can override them, it can't fix problems with the UI that is already there.
     
    Last edited: Nov 9, 2019
  5. Ravalox

    Ravalox Dev At Large Moderator SOTA Developer

    Messages:
    948
    Likes Received:
    2,035
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Austin, TX
    Moved thread into new LUA forum area :)
     
  6. Browncoat Jayson

    Browncoat Jayson Legend of the Hearth

    Messages:
    6,259
    Likes Received:
    13,936
    Trophy Points:
    153
    That it kind of the point of phase 2. User-created UI
     
    Astirian likes this.
  7. Chris

    Chris Tech Lord Moderator SOTA Developer Ambassador

    Messages:
    2,453
    Likes Received:
    27,629
    Trophy Points:
    190
    Gender:
    Male
    Phase 2 is more about me building a solution that allows you guys to build new UIs. The visual side of things is not the toughest part. The toughest part is giving you a way where you can have UI that calls into the server and executes skills that can't be automated for bots and attacks.
     
    Aeryk, Barugon, Jaesun and 1 other person like this.
  8. Helverian

    Helverian Avatar

    Messages:
    72
    Likes Received:
    53
    Trophy Points:
    8
    Hi do you mean UI call a function from/to the sota server or a function from an outside service.

    On my wishlist is a chance to call and query rest apis from the internet. Then we can develop alliance chats incl relay this messages when needed to mobile phones when someone is on work and want to be informed what his guild or friends guild are planning for this evening and so on.
     
  9. Katu

    Katu Avatar

    Messages:
    419
    Likes Received:
    719
    Trophy Points:
    55
    Gender:
    Male
    Location:
    Finland
    You can do that with chatlogs already.
    Would be pretty simple to create listener for certain type chatmessages.

    One could use something like "[ANNOUNCE]" ( or whatever you wanna use ) and look for chatmessage containing that and when found, do what you need.
     
  10. Helverian

    Helverian Avatar

    Messages:
    72
    Likes Received:
    53
    Trophy Points:
    8
    Yes but...

    - only one way from sota to the web via a local exe / app / script which parse the logs
    - no way back into sota
     
  11. Chris

    Chris Tech Lord Moderator SOTA Developer Ambassador

    Messages:
    2,453
    Likes Received:
    27,629
    Trophy Points:
    190
    Gender:
    Male
    If I give you a function call to trigger skill 1 so you can then call that from a button press, guess what? I just opened up full automated calling of that skill from the API and made you a bot client. Instead, I need to have a button class, that let's you associate a button and a key and an event and make it so the only way that the event can be triggered is through a button press or key press. I know it isn't completely clear but this is why I'm trying to rush out the client only side of things and then make phase 2 the part where I let you hook that stuff.
     
    Barugon, Katu, Tiina Onir and 3 others like this.
  12. Helverian

    Helverian Avatar

    Messages:
    72
    Likes Received:
    53
    Trophy Points:
    8
    No i do not want bots. I would like have something like alliance chat, looking for group and so even if the palyer arent in the game. Like discord or something but integrated in sota.

    All i need is something to call rest api get/post and query the json. And this integrsted within sota. I know it has to be done async from the game loop.

    Chat with decorate cmd. Lua/moonsharp parse the chat live. Lua function calls a function. This function make a short http post. The backend get it and transfer it back to everyone who want it...incl mobile phones and so on. Also back to sota. I think i have to pull http get. Then paint the log as gui or inside the log. With buttons then we were also able to answer questions from outside.
     
  13. Mishikal

    Mishikal Avatar

    Messages:
    1,965
    Likes Received:
    2,833
    Trophy Points:
    113
    Location:
    Brittany Estates
    Astirian likes this.
  14. Mishikal

    Mishikal Avatar

    Messages:
    1,965
    Likes Received:
    2,833
    Trophy Points:
    113
    Location:
    Brittany Estates
  15. Toular

    Toular Avatar

    Messages:
    492
    Likes Received:
    484
    Trophy Points:
    43
    How about an emotes interface? Suggest something like:
    bool ShroudEmote( string, int )

    Plays the emote given in the first argument. Since some emotes have an indefinite duration, the second argument specifies the length of time to play the emote; a duration of 0 means indefinitely. A value of -1 runs the emote for the minimum time possible. For "one shot" emotes, that would be just a single execution.

    So, " ShroudEmote( 'backflip', 0 ) " would cause the character to repeatedly play the backflip emote.

    Ideally, these could be queued, so you could do this:
    ShroudEmote( 'backflip', -1 )
    ShroudEmote( 'belly', 5 )
    ShroudEmote( 'backflip', -1 )
    ShroudEmote( 'playdead', 5 )
    ShroudEmote( 'backflip', -1 )

    The return value would be 'true' if the emote is known and can be played, false of the emote is either not known, or can't be played at this time ( BatonThrow without a baton )

    Of course, a programmed sequence can be manually aborted as with normal emotes.
     
    oplek and Tiina Onir like this.
  16. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,053
    Likes Received:
    1,812
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    I wrote that before I knew how Chris was implementing it. The link I suggested will probably not work, but I would expect Chris could give us a binding to play a sound.

    Something similar, not sure it needs to be quite as complex.
     
  17. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,053
    Likes Received:
    1,812
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    I would think a count wouldn't be required, Just loop over the action.
     
  18. Mishikal

    Mishikal Avatar

    Messages:
    1,965
    Likes Received:
    2,833
    Trophy Points:
    113
    Location:
    Brittany Estates
    One thing I'd like to see is some solid ideas on the framework for addons. I.e., to use WoW as an example (since it's what I'm familiar with):

    a) There is a directory dedicated to addons to be loaded out of (Interface\Addons\)

    b) There is a directory dedicated to storing addon saved variables (broken out for individual characters and for global data)

    c) Every addon ships with a "TOC" file (table of contents). It contains pertinent information, such as:

    Interface version: What game API version it's guaranteed to work with (doesn't mean it won't work with later versions, but it may not)
    An addon title (for display in the in-game addon manager bits via the menu)
    Localization for the addon title
    Author(s)
    Any global saved variables that it will be using
    Any per-character saved variables it will be using
    A list of optional dependencies (other addons it can use, but aren't required for functioning)
    A list of mandatory dependencies (other addosn it requires be installed for it to function)
    Addon version

    Then, a list of file(s) to load for processing (note that those files may also include additional files to load, as in my first example below, the embeds.xml file loads additional files). For example:

    Code:
    ## Interface: 11302
    ## Title: Titan Panel Classic [|cffeda55fGuild|r] |cff00aa001.0.0.3|r
    ## Title-esES: Titan Panel Classic [Hermandad]
    ## Notes: A simple guild list for the Titan Panel Classic AddOn.
    ## Notes-esES: Una lista de la hermandad para el Titan Panel Classic.
    ## Author: kernighan
    ## SavedVariables:
    ## SavedVariablesPerCharacter: TitanGuildVar
    ## OptionalDeps:
    ## Dependencies: TitanClassic
    ## Version: 1.0.0.3
    ## X-Date: 2019-10-12
    TitanClassicGuild.xml
    
    or

    Code:
    ## Interface: 11302
    ## Version: 1.0.0.23
    ## Title: Recipe Radar Classic
    ## Author: Kernighan
    ## X-Contributor: speedwaystar, SecureAgent, Kernighan, Yunohu, Jay Miller
    ## Notes: Locates vendors who sell recipes in the current region or by profession.
    ## Notes-deDE: Lokalisiert Händler, die Rezepte im Strombereich oder durch Beruf verkaufen.
    ## Notes-frFR: Localise les marchands qui vendent des recettes, par région ou par profession.
    ## Notes-esMX: Localiza a vendedores que venden recetas en la región actual o por la profesión.
    ## Notes-esES: Localiza a vendedores que venden recetas en la región actual o por la profesión.
    ## Notes-zhTW: 位於售賣食譜在當前區域或者專業.
    ## SavedVariables: RecipeRadar_SkillDB RecipeRadar_NameCache RecipeRadarDB
    ## SavedVariablesPerCharacter: RecipeRadar_Options RecipeRadar_Filters
    
    #@no-lib-strip@
    embeds.xml
    #@end-no-lib-strip@
    
    locales\enUS.lua
    locales\esMX.lua
    locales\esES.lua
    locales\deDE.lua
    locales\frFR.lua
    locales\koKR.lua
    locales\ruRU.lua
    locales\zhCN.lua
    locales\zhTW.lua
    
    Globals.lua
    MinimapButton.lua
    FontStyles.xml
    FrameTemplates.xml
    Maps.xml
    AvailabilityTooltip.xml
    RecipeRadarClassic.xml
    
    
     
    Aeryk, Astirian and Lained like this.
  19. Daxxe Diggler

    Daxxe Diggler Avatar

    Messages:
    2,704
    Likes Received:
    5,738
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Virtue Oasis - Hidden Vale
    Not sure if all of these are possible, but here are some things I'd like to see a modded UI do:
    1. Allow repositioning / locking of all UI elements. - Let me move things where I want them and lock them so I don't have to re-place every time I load the game.

    2. Allow resizing / scaling of all windows on an individual basis. Not all monitors are the same size or resolution... so let me make things fit my screen.

    3. Buff / Debuff notifiers. -
    Simple but impossible to ignore notifiers on-screen when any buff or debuff is applied, about to expire, or has expired (option to select some for it to ignore if desired and/or customize warning times, etc. would be a bonus.)

    4. Re-shape the combat/utility bars -
    Would love to be able to make it a 2x5 bar instead of 1x10... or perhaps a 3-4-3 pattern... or even better, allow us to make it 10 individual buttons that we could separate and move 1 or more to a different location. Some might like to be able to have smaller groups of attacks / buffs / heals / utilities / potions / ammo / etc. Maybe I want to place them in a circular pattern around my characters avatar in-game? Basically, allow full customization of the hot bar button(s) placement on my screen.

    5. Magnifier Cursor -
    Have icons (buffs), equipped items on char sheet, inventory items, etc. get enlarged to maybe 3x size (preference adjustable) when you mouse over them. Perhaps could require a mouse button press or keyboard press to activate it? - Temporary zooming could be a good thing if you like to keep things reduced normally to have less distractions on the screen. This would allow you to read information quickly.

    6.Custom Group member health bars -
    Let me resize / reshape /reposition individual group members health bars and individually control whether their buff icons show up or not. Wouldn't mind if someone redesigned these bars too to make them more streamlined and easy to read without taking up a lot of screen space.

    That's all I have for now. Might think of some others to add later.
     
  20. Mishikal

    Mishikal Avatar

    Messages:
    1,965
    Likes Received:
    2,833
    Trophy Points:
    113
    Location:
    Brittany Estates
    I would like the following tooltip extensions:

    When mousing over a planting barrel or pot in my inventory, bank, or random storage container -- Tell if it's empty or if not, what's planted in it.

    Bonus points: Work out something for garden beds (with symbols for each plant type?) letting me know what's in it and in what formation. :)
     
    Daxxe Diggler likes this.