Profile image

Variable-Package Installer - v0.1

67.1k SnoWFLakE0s  3.1 years ago

Hello everyone!

With the introduction of variables in 1.11, it's now possible to create little programs that function based on variables. This also means that it's possible to share these "programs" by sharing the list of variables to others!

These kind of sets of variables are typically called libraries, but given the way how these will be implemented I've opted to just call them variable packages. I've built a sample package for a simple variable program that counts button clicks--dubbed keyCounter, which you can see the source code for here.

That's all fine and dandy, but what I've done that's nice is create an installer for the variable package. You can download it here, on the Git repo for this project. If you download the .exe (do so at your own discretion--the source code is available for your scrutiny however) you'll be able to open it after the Windows security warning. Detailed installation instructions are available on the link above.

Anyhow, the current installer comes bundled with only the keyCounter package, but I'm planning to have this greatly expanded to include a variety of user-made variable program packages. This is really just a test of the installer, and I'm glad how it turned out.

Regarding the usage of the keyCounter package itself, please refer to the README for the package. Once installed, just create a button that fits the requirements of the package, and you'll have a button that you can see the number of clicks by accessing the pressCount variable!

This is just a testament to how expansive FT has become, and I'm excited to see what lies ahead!

As always have fun!
- SnoWFLakE0s

  • Log in to leave a comment
  • Profile image
    4,347 Formula350

    @SnoWFLakE0s
    It's allll good!
    Again, it's just great to at least have a utility like that, period, even standalone!
    Since that also gives you the freedom to have a menu system of your own, that's what the bulk of those suggestions were for anyways. :)
    .
    :thinking_emoji:
    Given it WILL remain to be a standalone utility... Perhaps if you gave it:
    - A tickbox for "Always On Top", which in addition to doing that, sets temporary conditions that make...
    - "_Minimize_" collapse the window it into a small rectangle at the bottom of the screen (instead of going to the Taskbar)
    - "[X]" then would instead "Close to Task Tray" (or ideally, taskbar, if that's possible instead), to quickly/easily get it off screen, but not closed.
    .
    For those of us who play in Fullscreen, we could still have it open and accessible, whilst still having SP in the foreground and continue doing our thang. :)
    Just a thought, though.
    (I can appreciate I... have lots of ideas/suggestions... so if at any point I'm becoming ""too much"", by all means, do let me know! heh)

    3.1 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @Formula350
    .
    It'd be great if this could be done in-game, but for one I'm not as competent in C#, and two, I've found that Unity is hard to work with for me... lol
    .
    If it was done with a mod, it'd probably be done with a mod, but it'd have to use aircraft modifying methods similar to Overload, and that is considered pretty much black magic... So not anytime soon. RIP

    +1 3.1 years ago
  • Profile image
    4,347 Formula350

    @SnoWFLakE0s hah Awesome :D
    That'll be great, even though I only now realized my failure to convey (in my original comment) that I was thinking this was going to be accessible from in-game. :}
    .
    Nevertheless, being able to grab variables from other downloaded builds, to build up a library, will be great for ignoramuses such as myself! lol
    Some 'care' might need to be taken, though, during this record-keeping. Otherwise we may have a huge and great DB we can access... but have no idea which variables make up a "set" -- i.e. rely on each other to be present, or even noting they were from the same build (file).
    .
    Which might also require mentioning the specific part where the Variable was used as well, plus providing the actual line containing the Variable (I say "line" instead of input due to my understanding that Variables CAN get used in various other fields, like activationGroup or designText in for a Label). As someone like me does best when there are examples of use provided, so having that info to be able to see the correlation is key; hands-on-learning in essence.
    .
    Furthermore, while I'm keeping myself in mind and thus others who have limited understanding in all things FT/Variable, BUT also that not everyone using it would be like myself... So having a menu system with the option to display all the variables as a library without the aforementioned "where it came from and which others came with it", might be preferable for those like yourself who can most likely look at a line of code and make quick sense of what it does. :P
    .
    Much appreciated though, whatever the final result ends up being! Thanks!

    3.1 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @Formula350
    .

    export Variables into a single Database file, which then we'd be able to access from any build we open, to "install" them onto that plane

    I can make that happen, given the that the installer works in what it does adding an ability to read from other files isn't too hard. The functionality for having more than one variable package is planned anyway. Reminder that this is marked v0.1-alpha lol. Barebones functional, still some kinks to iron out.

    +1 3.1 years ago
  • Profile image
    49.5k PlaneFlightX

    @Formula350 yup

    3.1 years ago
  • Profile image
    4,347 Formula350

    @PlaneFlightX
    That's a long comment.

    Go big, or go home, right? LOL

    3.1 years ago
  • Profile image
    49.5k PlaneFlightX

    @Formula350 That's a long comment.
    .
    I actually don't own SP on Android, and I recently copied all my stuff off my iPad (which is a piece of garbage), but I'm sure other players might use this info.

    3.1 years ago
  • Profile image
    4,347 Formula350

    @PlaneFlightX This was kind of what I had hoped this release was going to be: A tool that would export Variables into a single Database file, which then we'd be able to access from any build we open, to "install" them onto that plane. heh
    .
    Nevertheless, this does sounds like it'll be quite handy still! :)
    Thanks, @SnoWFLakE0s :D


    OFF-TOPIC:
    @PlaneFlightX If your ending sentiment reflects your own situation, I might have a solution for "doing work on PC but manipulating files on an Android device", ie copy-pasting your Variables between files and across platforms.
    .
    The app called ES File Explorer has a handy feature where you can have your Android device (tablet/smartphone) configured as a Local FTP. Which then you could use something like FileZilla or WinSCP to connect to it, which with a tiny bit of configuring, set it to check for file-changes.
    .
    After you've connected from your desktop machine, navigate to the directory where SP stores its files, and through either of those two programs, right-click the file in question and select either "Open" or "Edit". (You'd have to probably set that up as well, to have it execute "*.splane" with Notepad.exe or Notepad++.exe, etc)
    Then, every time you make a change, CTRL+S the file in whatever you're editing it in, and FileZilla/WinSCP will ask if you want it to update the remote file. :)
    .
    Using FileZilla/WinSCP was to edit files was how I ran my Minecraft server for years, which was hosted by a service. It had a web-accessible front end as well that was provided by the MC Server Management software I was running, but modifying config files this way was SO much faster and easier.
    I use the ES File Explorer FTP method when I need to transfer large files to/from my smartphone, since it lets you set up a homescreen shortcut to one-click enable the FTP. Which in the end makes it faster than tracking down its USB-C cable lol
    (Caveat: I haven't updated my version of ES in a MANY years, since I only really use it for that function, I presume they still offer the function though. If not, ye olde v3.1.4 is what I use, and I'm sure the APK can easily be found on an App Archive site since it's a Free program.)

    3.1 years ago
  • Profile image
    52.3k Ahtzee

    Will you be making a video on how to set variables to objects? Like engine start and whatnot? I have ZERO clue how to do it. LOL

    3.1 years ago
  • Profile image
    49.5k PlaneFlightX

    @SnoWFLakE0s I do think SP needs some way of making 'variable subassemblies'. I am building my new plane, the SWL-120, in different files for reasons (engines, fuselage, nose, cockpit interior, landing gear, etc, and I keep copying variables across using a text editor, which isn't easily available on iOS and Android.

    +1 3.1 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @PlaneFlightX
    .
    Well, you can only be so different with basic functions. The key counter is just a simple enough program to test out the installer; I don't find it really of that much value. Probably the first thing I did with buttons. Lol.

    +2 3.1 years ago
  • Profile image
    49.5k PlaneFlightX

    The core of my Radio Selection works similarly to this. I have so many, I edit the variable by having the plane's xml file open in a text editor. Whenever I have a value were I can increase and decrease that value (variable) using buttons, I have a variables list similar to this.
    .
    TL;DR We developed similar code independently of each other.

    +1 3.1 years ago