Dudester22 Posted June 14, 2014 Posted June 14, 2014 I have got a problem with trying to modify the LUA file using JSGME. I didn't want to screw up my LUA file, so I thought it would far easier if I placed the default LUA in JSGME and modified it from their. The problem is as soon as I save the modified default LUA in JSGME, I find that the default LUA in the main directory has also changed to the one I created in JSGME. Can someone tell me what I am doing wrong here? I get a message when I try to load the Sim, it asks me if I want to reinstall the LUA File or something on those lines. How do I make a LUA file in JSGME that I can modify without it effecting the default LUA in the main directory? Thanks!
Flagrum Posted June 14, 2014 Posted June 14, 2014 Sounds as if you have JSGME not configured properly. Normally, you have a dedicated folder for your JSGME mods. In there, you have one subfolder for each mod. JSGME then copies the contents of such a subfolder to the DCS World installation directory (after backing up the original files) when you enable a mod. Example: ...\JGSME_MODS\MyMod\Config\Input\Aircrafts\Default\joystick\default.lua will be copied to ...\DCS World\Config\Input\Aircrafts\Default\joystick\default.lua So if you work on your files in ...\JGSME_MOD\MyMod that can not affect the original files unless you enable "MyMod".You just need to make sure, your JSGME.ini file points to the correct mods-folder (here "...\JGSME_MOD). I suspect, in your case, it points instead to the DCS World installation folder or something like that. Check out the JGSME docs for more details.
Dudester22 Posted June 14, 2014 Author Posted June 14, 2014 (edited) Sounds as if you have JSGME not configured properly. Normally, you have a dedicated folder for your JSGME mods. In there, you have one subfolder for each mod. JSGME then copies the contents of such a subfolder to the DCS World installation directory (after backing up the original files) when you enable a mod. Example: ...\JGSME_MODS\MyMod\Config\Input\Aircrafts\Default\joystick\default.lua will be copied to ...\DCS World\Config\Input\Aircrafts\Default\joystick\default.lua So if you work on your files in ...\JGSME_MOD\MyMod that can not affect the original files unless you enable "MyMod".You just need to make sure, your JSGME.ini file points to the correct mods-folder (here "...\JGSME_MOD). I suspect, in your case, it points instead to the DCS World installation folder or something like that. Check out the JGSME docs for more details. I have other Mods running mate, so I'm sure it's set up ok. This is the path I placed it in to try and get it to work in JSGME. The LUA file you have mentioned is in saved games is it not? You have to change the LUA file in the directory I have mentioned when configuring toggle switches because that's where all the data is, it's not in the saved games directory. Below is where I placed this in JSGME. C:\Program Files\Eagle Dynamics\DCS World\_MODS\Toggle switches\Mods\aircrafts\A-10C\Input\A-10C\Joystick\ default LUA This is the path of the default LUA file I copied from the main directory and pasted into in JSGME hoping it would work. Eagle Dynamics\DCS World\Mods\aircraft\A-10C\Input\A-10C\Joystick) folder Edited June 14, 2014 by Dudester22
Flagrum Posted June 14, 2014 Posted June 14, 2014 I have other Mods running mate, so I'm sure it's set up ok. This is the path I placed it in to try and get it to work in JSGME. The LUA file you have mentioned is in saved games is it not? You have to change the LUA file in the directory I have mentioned when configuring toggle switches because that's where all the data is, it's not in the saved games directory. Below is where I placed this in JSGME. C:\Program Files\Eagle Dynamics\DCS World\_MODS\Toggle switches\Mods\aircrafts\A-10C\Input\A-10C\Joystick\ default LUA This is the path of the default LUA file I copied from the main directory and pasted into in JSGME hoping it would work. Eagle Dynamics\DCS World\Mods\aircraft\A-10C\Input\A-10C\Joystick) folder The file I used in my example was just that - a random example. The file exists in the DCS World folder ... I think, it is responsible for mapping "global" functions, like "Screenhot" or "Rearm", that are available for every aircraft. Anyhow, if you are confident that your JGSM setup is configured properly, then all I can think of atm is that you might have accidentally created a windows shortcut in the mods folder instead of actually copying the file? You could still double click it in your mod folder and it would open in your editor, but in fact it would be the original file that you were altering.
Dudester22 Posted June 14, 2014 Author Posted June 14, 2014 The file I used in my example was just that - a random example. The file exists in the DCS World folder ... I think, it is responsible for mapping "global" functions, like "Screenhot" or "Rearm", that are available for every aircraft. Anyhow, if you are confident that your JGSM setup is configured properly, then all I can think of atm is that you might have accidentally created a windows shortcut in the mods folder instead of actually copying the file? You could still double click it in your mod folder and it would open in your editor, but in fact it would be the original file that you were altering. I'll have a look at it again later Flagrum, it could well be I did something wrong like that. I'll reply back here if it's still doing the same thing. Thanks for the help.
docfu Posted June 14, 2014 Posted June 14, 2014 I've successfully modified several LUAs using JGSME without any trouble. Just to note: you need to edit the file, then load it via JGSME. You shouldn't edit a file that has been replaced by JGSME because it will cause problems the next time you re-mod.
DeJohn Posted June 14, 2014 Posted June 14, 2014 Dudester22; To start with, you should have never installed DCS in your Program Files directory. For future reference it should installed either into the root directory, or create a folder called Games or anything. How it is on my machine is... C:\Games\Eagle Dynamics\DCS World With that being said, on to the issue at hand.... You should NEVER use the default.lua as the name for your modified file. You should name it something like Button Box Interface.lua Then you won't have to use it as a mod for JSGME. You can save it directly into the game. Afterwards it would look like this..... C:\Eagle Dynamics\DCS World\Mods\Aircrafts\A-10C\Input\A-10C\Joystick\Button Box Interface.lua Remember if you make changes to your Button Box Interface.lua file, the changes won't take effect until you restart DCS.
Flagrum Posted June 15, 2014 Posted June 15, 2014 You should NEVER use the default.lua as the name for your modified file. You should name it something like Button Box Interface.lua Then you won't have to use it as a mod for JSGME. You can save it directly into the game. Afterwards it would look like this..... C:\Eagle Dynamics\DCS World\Mods\Aircrafts\A-10C\Input\A-10C\Joystick\Button Box Interface.lua Remember if you make changes to your Button Box Interface.lua file, the changes won't take effect until you restart DCS. Well, what would that be good for? A lonely file somewhere in the DCS installation directory that is not used by anything? Afaik, the goal here is to allow more options for the assignments of buttons and switches - which can not be done with the saved configs under Saved Games\Input\ since the changes of 1.2.8.
DeJohn Posted June 15, 2014 Posted June 15, 2014 (edited) Well, what would that be good for? A lonely file somewhere in the DCS installation directory that is not used by anything? Afaik, the goal here is to allow more options for the assignments of buttons and switches - which can not be done with the saved configs under Saved Games\Input\ since the changes of 1.2.8. Flagrum; The Button Box Interface.lua file isn't a lonely file. It is a file for someone who has a Leo Bodnar BBI-32 interface card. (BBI = Button Box Interface, 32 - refers to how many buttons it can control) The only way to allow "more" options for assignments, is to add to, or alter the 'Default.lua' file. The problem with making changes to the default file is every time DCS does an update, or the user does a repair, the Default.lua will revert back to the original file. Thus undoing any changes you made, which will mean that you have to go alter the default.lua file all over again. (don't know about you but that’s a PIA for me). Now of course you could make the assignments to your BBI-32 card by way of the 'Options assignment menu' in the game, which will have the result of creating a file named 'Button Box Interface (a bunch of numbers)dif.lua' file in your save games config input folder. For those who don't know what the 'dif' stands for, it’s 'difference'. Difference in what, you may ask? The difference between what the 'Default.lua' file assignments are. Oh darn, we have a problem with using the 'Options assignment menu' for the controller assignments. It doesn't take in to account for toggle switches. How can we fix that, well we can alter the 'Default.lua' file to allow for the two positions of a toggle switch. Yeah that'll work! Oh wait, if DCS does an update, it will change everything I've done. What to do!!! However, buy making a copy of the default.lua file, and renaming it to the controller you wish to make assignments to, i.e.. 'Button Box Interface.lua', and making changes to that file, and having that file in the same folder as the default.lua file, then every time DCS does an update, it will not affect the assignments you made. And you won't even have to use the 'Options assignments menu' to program the BBI-32. Well, the decision of how to program your controller, is up to you. I know how I want to do it, and so far it’s worked for me without any problems. Edited June 15, 2014 by DeJohn
Flagrum Posted June 15, 2014 Posted June 15, 2014 Flagrum; The Button Box Interface.lua file isn't a lonely file. It is a file for someone who has a Leo Bodnar BBI-32 interface card. (BBI = Button Box Interface, 32 - refers to how many buttons it can control) The only way to allow "more" options for assignments, is to add to, or alter the 'Default.lua' file. The problem with making changes to the default file is every time DCS does an update, or the user does a repair, the Default.lua will revert back to the original file. Thus undoing any changes you made, which will mean that you have to go alter the default.lua file all over again. (don't know about you but that’s a PIA for me). Now of course you could make the assignments to your BBI-32 card by way of the 'Options assignment menu' in the game, which will have the result of creating a file named 'Button Box Interface (a bunch of numbers)dif.lua' file in your save games config input folder. For those who don't know what the 'dif' stands for, it’s 'difference'. Difference in what, you may ask? The difference between what the 'Default.lua' file assignments are. Oh darn, we have a problem with using the 'Options assignment menu' for the controller assignments. It doesn't take in to account for toggle switches. How can we fix that, well we can alter the 'Default.lua' file to allow for the two positions of a toggle switch. Yeah that'll work! Oh wait, if DCS does an update, it will change everything I've done. What to do!!! However, buy making a copy of the default.lua file, and renaming it to the controller you wish to make assignments to, i.e.. 'Button Box Interface', and making changes to that file, and having that file in the same folder as the default.lua file, then every time DCS does an update, it will not affect the assignments you made. And you won't even have to use the 'Options assignments menu' to program the BBL-32. Well, the decision of how to program your controller, is up to you. I know how I want to do it, and so far it’s worked for me without any problems. Allright, I was not aware of the connection between a file named that way and the actual board. But concerning the inherent problems of altering the default.lua files ... that is excatly why the OP wants to do it as JSGME mod ...
DeJohn Posted June 15, 2014 Posted June 15, 2014 Allright, I was not aware of the connection between a file named that way and the actual board. But concerning the inherent problems of altering the default.lua files ... that is excatly why the OP wants to do it as JSGME mod ... If someone does it how I described above, they won't have a need to use it as a mod. But as I said, everyone can program their controllers as they wish. That's the great thing about information, you can use it or not. GOD bless the freedom of choice.
Recommended Posts