Jump to content

Using a diff for adding missing binds


Kercheiz

Recommended Posts

Hi,

 

I'm pretty new into the input controls customization trough LUA.

 

On the M2000-C, there are no binds for switching radio channels, you can change them only by clicking the cockpit. Now since this is a PITA I found how to find clickable cockpit action ids, and add binds in the default.lua files of the mod.

Now this modifies the base module files, so this will likely be reset at every update, or worse.

I know there is the ovgme tool that allows you to enable/disable mods via a gui. But still, you have to manually do things, the only difference is it's with a GUI.

 

Now is it possible to do this via a .diff.lua in user space?

 

Thanks!

Link to comment
Share on other sites

No. The "...diff.lua" defines bindings (adds and deletions) of switches/buttons/keys to commands. It does not define the commands. The "default.lua" and its equivalents ("Throttle - HOTAS Warthog.lua" etc.) are the only files where you can define new commands. And unfortunately they do not work if you put them under "Saved Games".

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

Update, as well as Repair, restores original versions of "default.lu" and its equivalents. It does not affect the .diff.lua files that record your binding changes. In general, "....lua" files that record changes made via the User Interface are not affected. All other .lua files are restored to the stock version.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

The update has always shoved modified files into a folder ending in .001, .002, etc. Certain repairs can just plain delete files without backup. I found using JSGME allows for these modified files to be easily applied/unapplied so all updates can be done on the original files and then apply the update before putting the modified files back. There is a danger that the new DCS version won't play nice with old modified files but that's easy to remedy.

Link to comment
Share on other sites

  • 4 weeks later...

The infrequent updates of some config files can catch you unawares, so it it is a good idea to occasionally compare your modified files with the default versions using the handy compare plugin free with Notepad++.  These command binds are sneaky, and you might be adding a mod to a file that was fixed in an update.

 

Additionally, JSGME was no longer supported last time I looked, and although it still seems to work, you may find that the newer OvGME is a more reliable alternative.

Link to comment
Share on other sites

OvGME is no longer supported by the author, just like JsGME. But I use OvGME regularly and it has never failed. So the fact that it's no longer supported isn't really an issue. And I think the same is true for JsGME.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • 2 weeks later...

I have found an interesting workaround, I put my binds in a separate file. Then, in default.lua, I only have to add three lines which will include the other file.

My separate file is not overwritten during updates, just the include lines, which I keep commented in the separate file.

 

Attached, an example for M2000-C and F14B

galinette-f14bp.luagalinette-m2k.lua

Link to comment
Share on other sites

Interesting approach, I had been trying to do something like this but couldn't make it work. Will have a look again.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...