N1G

Lua Scripts and Graphic Settings

Recommended Posts

Hi, I need to understand how this works. I recently downloaded the Advanced Settings UI that uses LUA Scripts to execute Graphic Settings. Do the executed scripts change a file, or do these scripts change something that temporarily exist in memory? 

Thanks

Bob

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

It really is important to read up on what Lua Scripts do, before getting into the advanced render settings. It's not hard to understand, and can be extremely helpful.  The long and the short of it, the Lua scripts make changes to the datarefs contained within XP, eliminating the need to create your own scripts to makes these changes.  The documentation that comes with the advanced render settings, as well as Fly With Lua are a good start to figuring it all out.

Share this post


Link to post
Share on other sites

Thanks Jimm, just wanted to make sure they were written to a file. Do you know where these files are located?

Bob

Share this post


Link to post
Share on other sites

The LUA scripts would be here:

\X-Plane 11\Resources\plugins\FlyWithLua\Scripts

The extension is .lua but I think you can change to txt and edit them.  

Edited by ryanbatcund
  • Upvote 1

Share this post


Link to post
Share on other sites

You don't have to change the extension.  Just open them with Notepad++ or similar editor and edit away.  

  • Upvote 1

Share this post


Link to post
Share on other sites
15 hours ago, N1G said:

Hi, I need to understand how this works. I recently downloaded the Advanced Settings UI that uses LUA Scripts to execute Graphic Settings. Do the executed scripts change a file, or do these scripts change something that temporarily exist in memory? 

Thanks

Bob

To answer your question: the lua scripts change datarefs, that exist only in memory during the run. One should also take note that datarefs are subject to change and those modifications are not supported by Laminar (e.g. if something does not work as expected after an update of X-Plane, try to remove the lua scripts first). 

It is very easy to make the dataref changes persistent with lua scripts, the other option is to download and use the dataref editor (google will find this for you) but this one will not save the changes between runs, so you will need to do them again when you start the sim anew.

Edited by jh71
  • Upvote 1

Share this post


Link to post
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