Jump to content

Control Profile Request to DEVs


Recommended Posts

These 2 commands work with keyboard keys if you add them to "...Mods\aircraft\SpitfireLFMkIX\Input\SpitfireLFMkIX\keyboard\default.lua", or with a pair of buttons or an ON/OFF/ON toggle if you add them to "...Mods\aircraft\SpitfireLFMkIX\Input\SpitfireLFMkIX\joystick\default.lua".

 

{down = device_commands.Button_1, cockpit_device_id = devices.WEAPONS, value_down = 1.0, name = _('Guns Safety Lever FIRE'), category = _('Stick')},
{down = device_commands.Button_1, cockpit_device_id = devices.WEAPONS, value_down = 0.0, name = _('Guns Safety Lever SAFE'), category = _('Stick')},

 

LOL

 

Yes, just did this too :D

 

The only points I have to make are

 

1. that the values are backwards. SAFE value_down is 1.0, and FIRE value_down is 0.0 . I though for sure it would be the other way around too, but when I bound 'N' to SAFE and 'J' to FIRE, it worked backwards.

 

2. add the exact same two lines to the joystick's default file to use two different buttons from your controllers for SAFE and FIRE.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

"keybind" not device Captain. Like the pic attached:

 

I send the keystroke from my device via the switch and Target software. I need a place to put the keystroke for on and the keystroke for off. Don't give it another thought. I'll come back when I learn this stuff better.

arms.thumb.jpg.5398422abdcc16a810900508c0d10480.jpg


Edited by DeepDrummer
Legal BS

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

I don't understand what your issue is in the present. You know have the 2 objects, to which you can bind keyboard keys. I've done it myself. They work.

 

The only thing now that I can think of, is that I have the same objects in my default.lua for joystick as well. I haven't tested what happens if I comment those 2 lines out of that file, but I would be surprised if it made a difference, but then again, it wouldn't be the first time I was surprised by DCS.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

I don't understand what your issue is in the present. You know have the 2 objects, to which you can bind keyboard keys. I've done it myself. They work.

 

The only thing now that I can think of, is that I have the same objects in my default.lua for joystick as well. I haven't tested what happens if I comment those 2 lines out of that file, but I would be surprised if it made a difference, but then again, it wouldn't be the first time I was surprised by DCS.

 

I will try to explain my point of view on all this. I do not play M/P for those who would consider chiming in saying I am a cheater. This is quite a place. Quite unique.

 

No doubt I've messed something up. I haven't even gotten back to taking it out of the joystick file yet. I am so bad at looking at code these days. I was a whiz when I was a youngster but that is eons ago. I find it extremely stressful and bad for my health. lol. This is 5 am for me. at 5 am I just want to fly.

I set the guns safe to a hat to the right this morning. I accidently hit it twice and toggled my guns to safe off. It ruins a half hour run when you have to go back around in a bit of a mission I made.

 

I just modified my Target script again and set it back to a 2 position switch which is, unfortunately, both sides set to a toggle. That works perfectly with my checklist and preflight flow and as long as I only use ramp start, it'll do. I never get it mixed up. Gunsight turns on WITH the Gun to fire function. If my gunsight is on, my guns are set to fire. It never fails. Runway starts and air start of course have that reversed and so I need to toggle it back in those cases.

If I toggle it in the normal layer with a momentary push button, I inevitably get it reversed without knowing.

Runway start has the switch opposite (fire) for some super strange reason.

If I flip my 2 position (both set to toggle) at that time, it toggles it off. That switch is programmed via MY script to do 6 functions. It works very well.

When one is programming a joystick/device directly via the control settings page, one needs to have the devices combined for the Target script.

That means when you try to set up that device in game and you move that control, you are actually asking DCS to perform 10-20 keystrokes most of which are with a modifier or 2.

 

It was really simply a request to the developer to make the change so it would not revert biweekly. Hopefully they can use your examples and I thank you for taking the time.

 

I'll try it again when I am in the proper mood for problem solving since I could type 2 brackets in a row without getting messed up most days. I never had any doubt that it was possible.

I never had any desire to edit their .lua files nor any need and I am simply very bad at it. Especially when they name more than one file default.lua. sheesh. No damage done.

I just want to turn it on and fly. It's not fun when one turns it on and an update has wiped all that kind of thing out. I have gone back to factory stock pristine install a few months ago and swore I wouldn't change anything ever again.

 

Even if this discussion gets the next warbird released to be released with the proper availability of switch states, I would be happy.

 

I mean, what you guys seem to be saying is that the developer won't change a couple lines in the stock default.lua to better reflect the proper switch operation in the airplane they sold me? I can't believe that.

 

No doubt if your way works the developer can insert that into the default.lua which in itself can become confusing since there are a number of those files of the same name. I realize where they are and where they go and don't need a lesson on that as well.

 

If you are not running a target script, we very well may be running down different roads.

My 10,000 lines in some cases don't meld well with yours.

Only axis are assigned to my devices in game. All fields for the thrustmaster combined are blank. It's a target thing. Target supplies the keystrokes and so keybinds are really the best way I have found in order to assign over 300 different possible commands with one throttle and one joystick. I am not going to stop running such a work of art for one errant switch state and I simply requested it be updated by the Developer as the title would suggest.

 

I will revisit this thread and give some of your suggestions another go maybe someday but knowing it is possible and knowing it is easy only furthers my case to the Developers and it should not be necessary to edit the luas in the end and everyone can enjoy proper switch state options on this or if not this all new aircraft released.

 

I do not ever need pre-made controller profiles and so I certainly am not asking the developer or anyone else to build a custom one for myself.

 

I like my controller/device profiles blank.

 

If it turns out that they have abandoned this aircraft and I don't believe they have but a suggestion in the future that no aircraft be considered out of Beta until such time as all switch states reflect the real life aircraft should be the rule. "Toggle" actions are for momentary push button style switches. I have been saying this for somewhere around 2 years.

 

Thanks again for your time and for your suggestions. I will play with them someday again.

 

OK Let's "Ramp Start" this thing for the thousandth time.

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

I agree with you philosophically, but such is life. I tried around a bit, and this code line works for the guns safety:

{down = device_commands.Button_1, up = device_commands.Button_1, cockpit_device_id = devices.WEAPONS, value_down = 1.0, value_up = 0.0, name = _('Guns Safety Lever 2-Pos FIRE/SAFE'), category = _('Stick')},

I assigned the new command "Guns Safety Lever 2-Pos FIRE/SAFE" to Boat Switch Forward (JOY_BTN9) on my WH throttle.

 

Even after overriding the cockpit switch with a keyboard command, the switch still operates correctly.

You might not have messed with the default.lua before; so some advice:

1. Changes to the default.lua are recognized when you start DCS world. So you should get out of DCS world before you make these changes.

2. Use the free Notepad++ for editing the file.

3. Do not overwrite stock lines but add your lines to the file.

4. Added lines must be between this line at the top of the file:

keyCommands = {

and this line near the end of the file:

},

I recommend you insert them just below the line

keyCommands = {

5. If you don't like the name "Guns Safety Lever 2-Pos FIRE/SAFE" you can change it; but it must be unique!

The new command "Guns Safety Lever 2-Pos FIRE/SAFE" will appear in Options / Controls. Bind it to the switch of your choice.

 

This as you suggested returned this in pics attached.:

It worked perfectly with those additional instructions.

Input from all is well appreciated and forced me to thrash out my understanding. Not an easy task. Well done!

 

As I said before, It had to be me. I put it on the wrong line and then on another wrong line. Sometimes with an extra curly bracket or lacking one.

We don't want to talk about me having to overwrite my users saved keyboard.diff. I must have saved the ED mods version to it or something. Minor detail.

 

Both of you have rocketed me into customizing a few more toggles shortly.

I can't thank you enough for the help and putting up with my coding incompetency's. I just lose it when that is toggled wrong and an opponent gets away. Right on! Thanks so much. :)

 

I'll post the pics so I can remember if I have to redo it.

I am the worlds worst coder. I am a Bramma Bull in Geeks clothing.

 

I am heading into the wild blue with one huge smile. Awesome people here. Just awesome!

yes.thumb.jpg.eaf0176eae6ea285b0247bc826585884.jpg

1060516049_GunSafeKeybind.thumb.jpg.7d417c146d409229248ed98502dd758e.jpg

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

Looking into it, the only other one not offering off/ons/open/close is the Mirror toggle and I leave mine on and use glance a lot anyway so done deal. Perfection has been achieved.

 

I wonder if I could dig deep enough to find a way to turn that little switch under the throttle off.

I think it is not so simple and I can live with it. One mouse click to that button on mission end only required. I can handle that. Near perfection has been achieved if only temporarily.

 

Thanks again. I just had a flawless flight with no stress. Goal achieved.

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

  • 2 weeks later...

I found the little switch under the throttle. U/C indicator on and more importantly U/C indicator OFF.

Done deal.

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

  • 4 weeks later...

On the Gun safety Lever when the tang is to the right, the guns are to fire.

I watched some actual footage the other day and noticed that it agreed with my extrapolation.

 

Definitely right thumb operated.

 

Thank you for your consideration

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

  • Recently Browsing   0 members

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