ark1320 Posted May 2, 2020 Report Posted May 2, 2020 I use a lot of Lua scripts and am trying to figure out how best to use the add-on.xml method with the scripts. Do I need to move all the Lua scripts out of the 'typical' models folder in the sim's directory to the add-on.xml location in the documents directory? I tired to simply point to the sim's modules folder with an add-on xml component entry like: <AddOn.Component> <Category>Scripts</Category> <Path>C:\P3Dv4\Modules</Path> </AddOn.Component> but that didn't work. I also tried to add a modules folder to the FSUIPC6 add-ons file structure but that also didn't work. What is the best way to incorporate Lua scripts with the add-on xml method? Thanks, Al
Thomas Richter Posted May 2, 2020 Report Posted May 2, 2020 Hi, you just keep the same structure as before. So all extra files you had, like Lua scripts or Macros, you just copy into the location where the FSUIPC6.dll is located. If you are not sure where that is then kust run P3Dv4/v5 and go to Logging tab, there in the center bottom press the button "Open Folder" , that will open the FSUIPC6 location folder in explorer. Just move your files or additional folders from the original Modules folder to that location. There is no need for an additional Modules folder. FSUIPC is designed to look for those files in its own location, if not other defined in FSUIPC INI file like for macro files. Thomas
ark1320 Posted May 2, 2020 Author Report Posted May 2, 2020 2 hours ago, Thomas Richter said: you just keep the same structure as before. So all extra files you had, like Lua scripts or Macros, you just copy into the location where the FSUIPC6.dll is located. Hi Tom, Thanks for clearing things up for me. As you said, the key question when setting up the add-on xml structure is to ask yourself "where does the FSUIPC6.dll expect files to be?". So in case it helps others, here are two structures that I found work where the overall add-on is called FSUIPC6 in the Prepar3D v4 Add-ons ( or Prepar3D v5 Add-ons ) directory. Structure 1 So here all the FSUIPC6 files are on the same level as the add-on.xml file itself, along with the two Lua files (I've only shown two of my 50+ Lua files here). In other words (and as you said) the contents of the 'old' modules folder is simply moved to the same level as the add-on.xml file. In this case the add-on.xml file looks like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <SimBase.Document Type="AddOnXml" version="4,0" id="add-on"> <AddOn.Name>FSUIPC6</AddOn.Name> <AddOn.Description>Flight Simulator Universal Inter-Process Communication version 6</AddOn.Description> <AddOn.Component> <Category>DLL</Category> <Path>FSUIPC6.dll</Path> </AddOn.Component> </SimBase.Document> Structure 2 Here all the FSUIPC files and Lua files from structure 1 have been moved inside a Modules folder, and so we need to change the <Path> entry to point to where the FSUIPC6.dll file is. The add-on.xml now looks like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <SimBase.Document Type="AddOnXml" version="4,0" id="add-on"> <AddOn.Name>FSUIPC6</AddOn.Name> <AddOn.Description>Flight Simulator Universal Inter-Process Communication version 6</AddOn.Description> <AddOn.Component> <Category>DLL</Category> <Path>Modules\FSUIPC6.dll</Path> </AddOn.Component> </SimBase.Document> In both structures above the FSUIPC6.dll, FSUIPC6.ini and Lua files are all 'together' at the same level as the FSUIPC6.dll file expects -- just as you advised. I happen to prefer the structure with the Modules folder. It seems a bit neater to me, probably because I have a lot of Lua files. If you see any issues with the above please advise, and thanks again for the help! Al
Thomas Richter Posted May 2, 2020 Report Posted May 2, 2020 Hi Al, that second version is Ok as long you don't manually change the add-on.xml file after FSUIPC6 installation. The reason is simply because when you install an update the uninstaller doesn't know the changed path and you would end up with problems, Really not recommended to change the add-on.xml after installation. Thomas
John Dowson Posted May 3, 2020 Report Posted May 3, 2020 It is recommended to install FSUIPC6 outside of the add-on.xml folder. You can even select your old Modules folder if thats where you want to keep everything, and you wouldn't have to change anything, except for renaming your FSUIPC5.ini file to FSUIPC6.ini. Please see the Installation and Registration guide.
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