Cool Dan Luke Posted February 27, 2021 Report Posted February 27, 2021 Hi, I have latest version of P3D version 5 and full paid version of FSUIPC. I was following a tutorial using the sample LUA script HidDemo.lua. I replaced the joystick vendor and product id with the correct values. I copied the lua script file into the P3D module folder: D:\Program Files\Lockheed Martin\Prepar3D v5\Modules I enabled logging to see the results. I checked both boxes for the "Log lua files separately" and "Debug/trace lua plugins". However nothing gets logged to screen. Nor there is a separate lua log for my script. I also checked the .ini file to see if the lua script was added to the lua section. Nothing. So I tried dropping the script into the main FSUIPC6 folder: C:\Users\xxx\Documents\Prepar3D v5 Add-ons\FSUIPC6 After restarting P3D, the .ini file now picks up the lua script and adds it to the lua section. However I still don't see any logs. Thoughts?
aua668 Posted February 27, 2021 Report Posted February 27, 2021 Hi, LUA scripts are not executed automatically per default. You have to put a line into the [Auto] section of the INI file or you have to start the LUA procedure by assigning it to a button or key. Details are found in the manual for advanced users. Rgds Reinhard
Cool Dan Luke Posted March 1, 2021 Author Report Posted March 1, 2021 Thank you, that worked. I guess I was expecting it to behave similar like version 7 that adds this entry automatically.
John Dowson Posted March 1, 2021 Report Posted March 1, 2021 31 minutes ago, Cool Dan Luke said: I guess I was expecting it to behave similar like version 7 that adds this entry automatically. Luas are NEVER automatically added to the [Auto] section. They are automatically added to your [LuaFiles] section. They are different. Certainly all luas should NOT be auto started, that depends on the lua, so we cannot automatically do this.
Pete Dowson Posted March 1, 2021 Report Posted March 1, 2021 33 minutes ago, Cool Dan Luke said: I guess I was expecting it to behave similar like version 7 that adds this entry automatically. As John said, no version of FSUIPC has ever started any Lua plug-in automatically except those specifically named for this -- see this part of the very first page of the supplied Lua plug-ins document, which you have: There are currently three explicitly reserved Lua names, for programs which are run automatically if present: ipcinit.lua automatically run as soon as FSUIPC has connected to the FS. ipcready.lua automatically run when FS is really “ready to fly”. ipcDebug.lua automatically loaded before any Lua program which is started in Debug mode. Pete
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