FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!

    Accessing OS in LUA code for creating a mod

    Scheduled Pinned Locked Moved I need help
    12 Posts 7 Posters 546 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Brutus5000B Offline
      Brutus5000 FAF Server Admin
      last edited by Brutus5000

      The Lua version in FA is sandboxed and has no access to the file system or the network.

      He said, "I've been to the year 3000
      Not much has changed, but they live underwater
      And your great-great-great-granddaughter
      Is playin' FAF, playin' FAF"

      SpikeyNoobS 1 Reply Last reply Reply Quote 0
      • UvesoU Offline
        Uveso @SusSusAmogus
        last edited by Uveso

        @sussusamogus said in Accessing OS in LUA code for creating a mod:

        Hi there!
        I have some ideas for FAF mods that require executing external script

        Can you give us/me an example?
        what kind of mod or function you have in mind?

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          SusSusAmogus @Uveso
          last edited by

          @uveso I thought about machine learning and neural networks utilization. AFAIK, there's no e.g. tensorflow distribution for lua.

          1 Reply Last reply Reply Quote 0
          • SpikeyNoobS Offline
            SpikeyNoob Moderator @Brutus5000
            last edited by

            @brutus5000 could someone patch the engine to make some outside interaction possible?

            1 Reply Last reply Reply Quote 1
            • BlackYpsB Offline
              BlackYps
              last edited by

              Permitting outside interaction would open the gates for malware

              S SpikeyNoobS 2 Replies Last reply Reply Quote 1
              • S Offline
                SusSusAmogus @BlackYps
                last edited by SusSusAmogus

                @blackyps that's all very understandable. However textures, sounds and effects can be bundled using mods.

                Maybe it could be possible to provide modders with possibility of including some "trusted" scripts into their mods too? Such mods could be double-checked by community, moderators and marked as "unsafe" in storage...

                1 Reply Last reply Reply Quote 0
                • SpikeyNoobS Offline
                  SpikeyNoob Moderator @BlackYps
                  last edited by

                  @blackyps i would not like to see it done for normal games, but if it was possible using some ML for an ai would be quite cool. Even if its not used outside of a dev environment.

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    SusSusAmogus
                    last edited by SusSusAmogus

                    At least file IO would be very helpful and (potentially) not very harmful. Like reading from a file packaged along with a mod - what can go wrong with that?..

                    HTTP IO would be even better. Just like sending and receiving simple JSON requests - no js scripts and stuff...

                    Let me know if you decide to implement it - I can provide any support needed!

                    1 Reply Last reply Reply Quote 0
                    • Brutus5000B Offline
                      Brutus5000 FAF Server Admin
                      last edited by

                      Writing Io is super dangerous. A harmful or buggy mod could overwrite files or flood the disk.
                      Reading http during the game is also dangerous , because requests can fail (=desync) or take longer (=lag).

                      The lua engine is hardcoded into the engine. A few experts tried updating it with a newer version for performance improvements, but despite many years of trying it does not work.

                      He said, "I've been to the year 3000
                      Not much has changed, but they live underwater
                      And your great-great-great-granddaughter
                      Is playin' FAF, playin' FAF"

                      1 Reply Last reply Reply Quote 1
                      • nullptrN Offline
                        nullptr
                        last edited by nullptr

                        @Brutus5000 Well, the current game implementation actually doesn't protect you from flooding a disk (screenshot command) or checking for file existanse in sim may cause desync or creating too many logs causing lags. IO will make it only less complicated at this point.

                        “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
                        — Steve Jobs.
                        My UI Mods
                        Support me

                        1 Reply Last reply Reply Quote 0
                        • JipJ Offline
                          Jip
                          last edited by

                          We won't introduce additional IO functionality. As Brutus states, it is extremely dangerous. @Genos is technically correct that we can already flood the disk, but that isn't an argument to open up more IO functionality.

                          A work of art is never finished, merely abandoned

                          1 Reply Last reply Reply Quote 1

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • First post
                            Last post