Jump to content

Recommended Posts

Posted

So I have a nice cockpit I built for DCS World that I've been using for quite a bit of time now. (old video of it: [ame]

[/ame]). In the DCS World it was working great. I was able to program the switches to turn on and turn off.

 

Recently I got inspired to build another panel that I could use while flying with the Oculus rift on and for functions that are usually blocked by the stick. I modeled it after the L-39 Armament panel. I also added another 4-way joystick in there to make gear up and down a little cooler. This would be used in open beta for the L-39 initially and other aircraft later

 

So everything is wired up with a GP-Wiz40 USB controller currently and I went into the L-39 options and mapped things out. This works fine to turn things on.

 

In the past I would then have to go into the /users/me/saved games/dcs/input/joystick folder and find my controlled and modify the lua file. This medication pretty much meant finding the function and adding a value_up to it so it would know what to do when the switch was off.

 

So I went to the saved folder and looked at my L-39 input for the controller and it's much different. The file extension is DIFF and things look like this:

		["d3031pnilunilcd3vd1vpnilvunil"] = {
		["added"] = {
			[1] = {
				["key"] = "JOY_BTN28",
			},
		},
		["name"] = "Missiles Heating Switch - ON",
	},

 

So figured it was just adding to what the default had in it. So I found the default folder in mods/aircraf/L-39/config/input/joysticks and saw the default. But I don't really want to modify this and would rather modify it for the specific input controller (G-wiz40p). But I figured I'd do some tests. So I modified one setting as such:

{down = device_commands.Button_31,	cockpit_device_id = devices.WEAPON_SYSTEM,	value_down = 1,value_up=0		name = _('Missiles Heating Switch - ON'),		category = _('Armament Control Panel')},

 

Basically adding the value up...but that made the switch not work at all. So I restored the default to it's original setting.

 

So how do you program the off portion for switches in Open Beta and above?

Coder - Oculus Rift Guy - Court Jester

Posted

This change is not new to 1.5, is has been in 1.2 for quite some time now. The files in the "Saved Games" folder will only store the differences to the default configuration so your key bindings survive DCS updates better.

 

You can edit the default configuration file for your aircraft instead, for example as mentioned in this post (on the pages before that post, you can see how everyone else in that thread figured that out, my post was just a summary of that and most of it deals with how to find the correct argument numbers and device IDs).

Posted

Guess it has been quite a bit of time since I updated my cockpit Thanks for the information. Guess I'll wait until DCS 2.0 is out and start the programming then.

 

In theory though I should be able to copy my DIFF files from my user folder into DCS 2.0 folder when it comes out right? Hate to have to remap everything from scratch for the A-10c.

Coder - Oculus Rift Guy - Court Jester

  • Recently Browsing   0 members

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