Jump to content
The simFlight Network Forums

LUA Script for the VRS F/A-18E for FSX


Glenn Weston

Recommended Posts

Hello Everybody.

Here is my LUA script I have put together that will give you access to every switch, knob and button in the VRS F/A-18E for FSX.

This is my first attempt at LUA scripting, I am no programmer by any means, I simply studied alot of the fine examples here on the contribution forum & worked it out from there.

Thankyou everyone for your examples & so here is my little contribution to help out others.

One thing I have realised is that the LUA plugin feature available now in FSUIPC is extremely powerful, it is open to all sorts of possibilities limited only by the imagination & your programming skills, I feel I have made an incredible discovery.

I used LINDA to assist with tracking down & confirming which L:Vars to work with.

The script utilises a mixture of L:Vars, FSUIPC offsets, FSUIPC Controls & Keypresses to get the job done.

It could probably be written a little more efficiently using IF, THEN, ELSE Statements but I wanted to define each and every switch position to an FSUIPC parameter value, so I strictly used just IF statements for all switch positions.

A rather simple approach but it seems to get the job done, so I am happy !!

You will find full instructions commented into the script itself, I have referenced a PDF file in the instructions which does not exitst at this point.

I will eventually create a PDF file with some screenies that will demonstrate how to assign switches for those not aware of how to do it, but for most users familiar with FSUIPC my commented instructions will get you going.

Cheers Glenn.

SuperScript_VRS.zip

Link to comment
Share on other sites

  • 3 months later...

Hi Everyone, I have made many changes to the original version of this script posted above, that was Version 1.0

It is now at Version 1.04

I have written a 30 page PDF User Manual with assignment examples including screen shots, the manual also contains a complete change log from version 1.00 to 1.04.

I also have created a Parameter Map in a seperate PDF file to make switch assignments easier to lookup.

Something unique I have introduced is the ability to use analogue AXIS' to control knobs in the VRS aircraft, in fact I have written a Knob script for every rotary type knob in the cockpit that calls on the main script to command knobs to discrete positions via L:Vars.

The Knob scripts are event driven and contain full on screen diagnostic facilities to assist in setup.

The Knob scripts also have error trapping built into them in cases where the user does not setup the predefined AXIS parameters for individual knobs correctly, all explained in the manual.

I would eventually like to make the main script event driven too, so that it does not have to re-compile every time it is called, that will probably be the case in a future version and will make it all much more efficient but it works very well just the way it is at he moment.

I feel it is a good example of just basic capabilities of lua scripting in FSUIPC and worth studying for anyone interested or starting out with lua scripts in FSUIPC, you should get a fairly good idea of how it works even if you do not have the VRS model because of the documentation I have written up.

Here is some links for download, I am hosting the file on Google Drive and Dropbox as I was having some issues with Google Drive that seems to have cleared up now.

Here http://bit.ly/SlEQIm

Or

Here http://bit.ly/VdnAFM

Please let me know what you think.

Cheers Glenn.

Link to comment
Share on other sites

  • 2 years later...

Hi Guys, No I am still kicken' around here Pete !!

 

Rustam, 

 

This script to support the VRS SuperBug has now developed into a Suite of Script Modules that I have written using Pete's FANTASTIC Lua Libraries which now provide a FULL Cockpit I/O Interface to the VRS Superbug and is aptly named "SuperScript" for the VRS SuperBug. 

 

It handles many things, not just switches now. Current versions give access to Annunciators, Knobs using Pots, Rotaries with software acceleration, a Special TDC Radar Cursor Control and even non flight Gauge Instrument data extraction to build real instruments if you want. I have also written a module that allows VATSIM Transponder control from the F18's UFCD/MIP.

The package has complete built in on screen Diagnostic routines to help troubleshoot when assigning and building annunciator panels etc.

 

Shortly I will be adding UDP Network Packet transmission for all the output modules and am also considering a UDP INPUT Module too. 

So it is still currently being maintained by Myself and is only available from http://www.hornetpits.org That is a cockpit building site dedicated not only to the VRS Superbug builders but F18 Hornet builders in general, no matter what platform you are building on. However all are welcome and the signup to the forum is free, there is a wealth of knowledge at the site, so please take a look around, grab a coffee and make yourself at home.  

 

The current version is Version 2.08 and currently supports VRS Superbug/Tacpack 1.4.2.3.

I am actively working on a 2.09 Release and in the middle of UDP Testing which is the reason for the delay, as I also have to write some documentation and it all takes time. 

There are dedicated Support threads for the package which I and others monitor and assist when required. 

The good news is that it is still available for download for free, I provide it as a "Donation Ware" package.

 

Here are some Links to get you going....

 

Downloads for Version 2.00 through 2.08 can be found here, registration will be required to access the download section :

 

http://hornetpits.org/index.php?board=55.0

 

For Support thread for the various versions, Really only the current 2.08 Version is supported.

Take a look through these links:

 

Version 1.04

http://hornetpits.org/index.php?topic=132.0

 

Version 2.03

http://hornetpits.org/index.php?topic=135.0

 

Version 2.04

http://hornetpits.org/index.php?topic=206.0

 

Version 2.05

http://hornetpits.org/index.php?topic=353.0

 

Version 2.06

http://hornetpits.org/index.php?topic=413.0

 

Version 2.07

http://hornetpits.org/index.php?topic=459.0

 

Version 2.08

http://hornetpits.org/index.php?topic=502.0

 

Regards Glenn.

  • Upvote 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.