Jump to content
The simFlight Network Forums

LUA Files are not shown in FSUIPC GUI


Recommended Posts

Hello,

 

I have the latest FSUIPC Version installed and I tried to run a lua script, that i copied into FSX/Modules Folder. I tried with two lua scripts, one of them from the lua examples, one is a Engine Switch for the Twin Otter.

 

 

The problem is, i can't see them in the list in the FSUIPC Gui. But they are shown properly in the FSUIPC.ini !!

Why can't I see them?

 

Thank you for help

 

Dennis

Link to comment
Share on other sites

I have the latest FSUIPC Version installed and I tried to run a lua script, that i copied into FSX/Modules Folder. I tried with two lua scripts, one of them from the lua examples, one is a Engine Switch for the Twin Otter.

 

The problem is, i can't see them in the list in the FSUIPC Gui. But they are shown properly in the FSUIPC.ini !!

Why can't I see them?

 

What exactly are you looking for in the drop-down assignments list? They'll be added as entries like

 

lua <name>

luaclear <name>

luakill <name>

luaset <name>

luatoggle <name>

luavalue <name>

 

where <name> is the name of the Lua file, without the .lua part. That name must be no more than 16 characters.

 

Pete

Link to comment
Share on other sites

Dennis

For some unknown reason I had the exact same problem -- Lua file not showing up in the drop down list after I added it to the Modules folder.   I closed and restarted FS four or five times and it still didn't show up.  I rebooted and restarted FS but still no joy.  Then on the next close and restart of FS it magically appeared.  As I said I have no idea why this happened but you may want to try that.

Alan

Link to comment
Share on other sites

  • 7 months later...

I know this thread is a little old now but I wondered if anyone knows why this happens.

I have added around 100 key switch actions using LUA files without a problem and then for no apparent reason not all the LUA files are now not shown in the drop down from

"Control sent when button pressed" list.

I have checked that all the file name lengths are 16 characters or less so I am happy that that is not the cause.

The list itself misses some 26 file names from those available.

It is quite possible this due to something I have done but I do not seem to be able to fix it.

Any help appreciated.

John.

Link to comment
Share on other sites

I have been working on this issue this evening and I seem to be able to replicate the problem quite consistently

I started with a clean installation of FSUIPC (Version 4.929).

I had a module directory that contained the following files:-

 

C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200CLAutofthrAu.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200CLAutofthrOf.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200CLAutofthrTs.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200Sign.wav.wav
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AftBlwerOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AftBlwerON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoFthr_OF.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoFthr_OFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoFthr_ON.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgL_OFF.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgL_ON.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgn_OFF.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgn_ON.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgR_OFF.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgR_ON.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AuxTrnsfLOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AuxTrnsfLON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AuxTrnsfROF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AuxTrnsfRON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Bat_Off.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Bat_On.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirinstr.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirLEOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirLEOP.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirLinsr.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirREOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirREOP.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirRinsr.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BleedAirLft.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BleedAirRt.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BrakeIceOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BrakeIceON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CabAirOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CabAirON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CoffeeOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CoffFrnON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CoPilAirOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CoPilAirON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_ElecHtOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_ElecHtON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest1.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest2.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest3.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest4.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest5.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTestOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FSBON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelQtyAux.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelQtyMain.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelShutLOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelShutLON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelShutROF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelShutRON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVentLFT.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVentLOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVentLON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVentRT.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVnetROF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVnetRON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelXfeedL.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelXfeedR.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Functionlist.txt
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Gearhorn.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenLeft.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenLFTOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenLFTON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenRGTOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenRGTON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenRight.lua.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_HydPrsSwOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_HydPrsSwON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_IceLight.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_IceLightOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_IceLightON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_IceVanes.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LEnAntIceOF.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LEnAntIceON.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LogoLight.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LogoLightOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LogoLightON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxCoPil.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxCPilOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxCPilON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxPil.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxPilOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxPilON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MstCautnRst.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MstrWarnRst.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_NoSmkFSBOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_NoSmkFSBON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_NoSmokeFSB.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1AirOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1AirON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1Defrost.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1DefrstOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1DefrstON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P2AirOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P2AirON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PitotOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PitotON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PreeDump.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PresDmptoDP.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PresDmptoNo.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PresDmptoOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_propgovOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_propgovON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PropSync.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_RecoLightOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_RuddBoost.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_RuddBoostOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_RuddBoostON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallReset.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallRstOn.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallWnTsOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallWnTsON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallWrnOFF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallWrnON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StandbyPmpL.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StandbyPmpR.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Startbright.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Startdim.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StarterL.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StarterR.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StartLOFF.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StartLON.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StartROFF.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StartRON.LUA
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StnbyPmpLOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StnbyPmpLON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StnbyPmpROF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StnbyPmpRON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_SurfDeiceOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_SurfDeiceON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_WndShdLftOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_WndShdLftON.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_WndShdRtOF.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_WndShdRtON.lua

C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\Bu0836X Control.lua
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4 Install.log
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.1.log
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.ini
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.key
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.log
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\WideServer.log
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\WideServer0.log
 

If I now open the drop down menu in the Button & Switches page under "Controls sent when button pressed"

then I can only see my lua files up to Lua B200CLAutofthrTs so the files in bold are not listed.

 

I can get round this by editing the FSUIPC.ini file manually but its a pain to keep doing.

Am I right in assuming that there is no limit to the number of LUA files you can have?

 

Again any help anyone can give would be appreciated.

John                                                  

Link to comment
Share on other sites

It looks to me like you should consolidate most of those lua functions into

one or two .lua files and use event triggers to activate the various functions.

 

You should read the Lua Library PDF to get an idea of the various ways you can

trigger functions in lua scripts.

 

I usually wind up with one, or two at the most, lua files for each aircraft that needs

special handling via lua scripts.

 

This will save you a whole lot of ini entries to start all those scrips.

 

 Paul

Link to comment
Share on other sites

Thanks for that Paul,

I will do just that, I was aware you could use a single file but I guess as I had not considered that that would be a better way.

I thought it would be easier to manage when things did not work as expected.

 

But I will take your advice and give that a go.

Thanks again

John

Link to comment
Share on other sites

  • 2 weeks later...

I can get round this by editing the FSUIPC.ini file manually but its a pain to keep doing.

Am I right in assuming that there is no limit to the number of LUA files you can have?

 

There's a limit in the internal coding of the controls assigned to Lua files -- only 7 bits are available for this, and to alter this would be pretty much a rewrite of so much code it would seriously jeopardise stability. This in turn means that a maximum of 127 Lua files can be assigned -- the first 127 in the list in the INI file. You can have other Lua files, preferably in other folders, which can be called by any of those, or directly in [Auto] sections. 

 

I think I will add something to FSUIPC to make it log a warning when more that the accepted number of Lua files are present, and exclude the extras from the INI list.

 

Pete

Link to comment
Share on other sites

Hi Pete,

Thanks for your response, I overcome the problem using the method that Paul suggested.

 

What confused me was that the LUA Plug-Ins.pdf document states "FSUIPC allows up to 256 simultaneously running Lua programs, each independently running in their own FS
thread."

 

The warning that you suggest seems like a very good idea.

John

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.