djgade Posted July 12, 2013 Report Posted July 12, 2013 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
Pete Dowson Posted July 12, 2013 Report Posted July 12, 2013 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
English Rebel Posted July 14, 2013 Report Posted July 14, 2013 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
cmdr114 Posted February 17, 2014 Report Posted February 17, 2014 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.
cmdr114 Posted February 18, 2014 Report Posted February 18, 2014 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.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200CLAutofthrOf.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200CLAutofthrTs.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200Sign.wav.wavC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AftBlwerOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AftBlwerON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoFthr_OF.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoFthr_OFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoFthr_ON.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgL_OFF.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgL_ON.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgn_OFF.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgn_ON.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgR_OFF.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AutoIgR_ON.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AuxTrnsfLOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AuxTrnsfLON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AuxTrnsfROF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_AuxTrnsfRON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Bat_Off.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Bat_On.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirinstr.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirLEOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirLEOP.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirLinsr.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirREOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirREOP.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BldAirRinsr.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BleedAirLft.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BleedAirRt.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BrakeIceOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_BrakeIceON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CabAirOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CabAirON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CoffeeOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CoffFrnON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CoPilAirOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_CoPilAirON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_ElecHtOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_ElecHtON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest1.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest2.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest3.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest4.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTest5.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FireTestOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FSBON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelQtyAux.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelQtyMain.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelShutLOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelShutLON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelShutROF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelShutRON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVentLFT.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVentLOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVentLON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVentRT.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVnetROF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelVnetRON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelXfeedL.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_FuelXfeedR.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Functionlist.txtC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Gearhorn.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenLeft.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenLFTOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenLFTON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenRGTOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenRGTON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_GenRight.lua.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_HydPrsSwOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_HydPrsSwON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_IceLight.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_IceLightOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_IceLightON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_IceVanes.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LEnAntIceOF.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LEnAntIceON.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LogoLight.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LogoLightOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_LogoLightON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxCoPil.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxCPilOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxCPilON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxPil.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxPilOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MICOxPilON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MstCautnRst.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_MstrWarnRst.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_NoSmkFSBOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_NoSmkFSBON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_NoSmokeFSB.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1AirOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1AirON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1Defrost.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1DefrstOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P1DefrstON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P2AirOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_P2AirON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PitotOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PitotON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PreeDump.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PresDmptoDP.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PresDmptoNo.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PresDmptoOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_propgovOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_propgovON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_PropSync.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_RecoLightOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_RuddBoost.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_RuddBoostOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_RuddBoostON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallReset.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallRstOn.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallWnTsOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallWnTsON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallWrnOFF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StallWrnON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StandbyPmpL.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StandbyPmpR.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Startbright.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_Startdim.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StarterL.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StarterR.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StartLOFF.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StartLON.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StartROFF.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StartRON.LUAC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StnbyPmpLOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StnbyPmpLON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StnbyPmpROF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_StnbyPmpRON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_SurfDeiceOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_SurfDeiceON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_WndShdLftOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_WndShdLftON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_WndShdRtOF.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\B200_WndShdRtON.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\Bu0836X Control.luaC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4 Install.logC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.1.logC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLLC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.iniC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.keyC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.logC:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\WideServer.logC:\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
Gypsy Baron Posted February 19, 2014 Report Posted February 19, 2014 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
cmdr114 Posted February 19, 2014 Report Posted February 19, 2014 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
Pete Dowson Posted March 3, 2014 Report Posted March 3, 2014 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
cmdr114 Posted March 3, 2014 Report Posted March 3, 2014 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 FSthread." The warning that you suggest seems like a very good idea. John
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now