Jump to content

Help with FC3 axisCommands for mouse control


Recommended Posts

Hi, I’m pretty new to DCS and I’ve just got FC3. Prior to me getting it, I managed to rig my mouse as a stick for the SU-25T. (I found it from an old forum post by a certain T. Jacob, the code is a bit ways down the page):

To save you some scrolling, here is the code: 
 

return {
 

keyCommands = {

{combos = {{key = 'MOUSE_BTN2'}}, down = iCommand_ExplorationStart, name = 'Enable visual recon mode', category = 'View Cockpit'},

{combos = {{key = 'MOUSE_BTN3'}}, down = iCommandViewTransposeModeOn, up = iCommandViewTransposeModeOff, name = 'Camera transpose mode (press and hold)', category = 'View Cockpit'},

},

 

axisCommands = {

-- mouse axes

{combos = {{key = "MOUSE_X", filter ={saturationX = 0.1, saturationY = 0.1, deadzone = 0.0, invert = false, slider = false, curvature = {-0.9}}}}, action = iCommandPlaneRollDelta, name = 'Roll'},

{combos = {{key = "MOUSE_Y", filter ={saturationX = 0.1, saturationY = 0.1, deadzone = 0.0, invert = false, slider = false, curvature = {-0.9}}}}, action = iCommandPlanePitchDelta, name = 'Pitch'},

{combos = {{key = "MOUSE_Z", filter ={saturationX = 1.0, saturationY = 1.0, deadzone = 0.0, invert = false, slider = true, curvature = {0}}}}, action = iCommandPlaneThrustCommonDelta, name = 'Thrust'},

{combos = {{key = 'MOUSE_X', reformers ={"LShift"}}}, action = iCommandPlaneViewHorizontal, name = 'Camera Horizontal View (mouse)'},

{combos = {{key = 'MOUSE_Y', reformers ={"LShift"}}}, action = iCommandPlaneViewVertical, name = 'Camera Vertical View (mouse)'},

{combos = {{key = 'MOUSE_Z', reformers ={"LShift"}}}, action = iCommandPlaneZoomView, name = 'Camera Zoom View (mouse)'},

 

--{action = iCommandPlaneSelecterHorizontal , name = 'I-251 Slew Horizontal (mouse)'},

--{action = iCommandPlaneSelecterVertical , name = 'I-251 Slew Vertical (mouse)'},

},

}

The code takes input from the mouse as aircraft control, while the scroll wheel changes the throttle. The SHIFT modifier with the mouse moves the player camera, so you can still look around, and SHIFT + scroll zooms in and out. The pathway for the code was:

DCS World OpenBeta \ Mods \ aircraft \ Su-25T \ Input \ su-25T \ mouse

However, when I created/edited the mouse files of FC3 aircraft with the same code, only the modified camera movement worked with the SHIFT modifier. Moving the mouse without the SHIFT modifier did nothing to maneuver the aircraft, and using scroll to adjust throttle didn’t work. I suspect this is because the iCommandPlaneRollDelta, iCommandPlanePitchDelta, and iCommandPlaneThrustCommonDelta are not defined for FC3 aircraft, but I’m not sure.
Some FC3 aircraft have their own mouse files, which contain one line of code. Judging by the name, it, well, binds keyboard commands to the mouse, but I'm not entirely sure how it works or how I could use it: 

return bindKeyboardCommandsToMouse(folder .. "../")

I would love to have an actual joystick (or even just a console controller), but I probably won’t be able to get one for some time now. It’s not about the money, as it’s more of a personal issue. I’d prefer not to discuss about it. I would greatly appreciate focusing on the topic of fixing this bug rather than discussing why I should get a joystick over a mouse stick. I would also not like to argue about how the developers should include mouse control in the base game. It might be nice for players without joysticks (like me), but they definitely have bigger priorities. Any help would be greatly appreciated. 

EDIT:
I realize now that I should attach my log file. I apologize for that. By this point, only the SU-25T and the SU-33 had the modified mouse file. The SU-25T's file worked, while the SU-33's file didn't.

dcs.log


Edited by AlphaCentauri_12
Link to comment
Share on other sites

  • 2 weeks later...
2 hours ago, AlphaCentauri_12 said:

Hello?


Hi, I’m sorry that no one has helped you with this .. on my case I have no experience trying to use a Mouse as a flight control, so I couldn’t really help with your issue.

 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

On 7/26/2022 at 2:47 AM, Rudel_chw said:


Hi, I’m sorry that no one has helped you with this .. on my case I have no experience trying to use a Mouse as a flight control, so I couldn’t really help with your issue.

 

 

On 7/27/2022 at 5:21 AM, Xupicor said:

I tried to muck about with but couldn't get it to work either.

 

No problem, but I really appreciate the response though

Link to comment
Share on other sites

  • 2 weeks later...
5 hours ago, AlphaCentauri_12 said:

It could also just be a simple syntax issue with the written code. Possibly the syntax is different between the stock SU-25T and other FC3 aircraft, but I'm not sure, and I can't really find any information on axisCommand syntax online. Any information on that might be useful. 

also sorry no one has answered. you sound adept at coding so i am throwing out a suggestion. i do not mean to be snarky. have you compared the syntax between the frogfoot and an FC plane. all modules have their own input configs, including each of the FC planes. this is definitely an unusual subject and i really have no idea if what you want is feasible. good luck! 

  • Like 1

AKA_SilverDevil AKA Forums My YouTube

“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.” — Mark Twain

Link to comment
Share on other sites

On 8/11/2022 at 5:24 AM, silverdevil said:

also sorry no one has answered. you sound adept at coding so i am throwing out a suggestion. i do not mean to be snarky. have you compared the syntax between the frogfoot and an FC plane. all modules have their own input configs, including each of the FC planes. this is definitely an unusual subject and i really have no idea if what you want is feasible. good luck! 

I guess you could say I am adept to coding, just not in Lua sadly. Thanks for letting me know that there is a syntax difference, and I don't mean to be passively aggressive, but do you know where I can find some of the documentation on FC plane input configs? And if not, I still appreciate the reply, I'll definitely look into it myself. 

Link to comment
Share on other sites

5 hours ago, AlphaCentauri_12 said:

I guess you could say I am adept to coding, just not in Lua sadly. Thanks for letting me know that there is a syntax difference, and I don't mean to be passively aggressive, but do you know where I can find some of the documentation on FC plane input configs? And if not, I still appreciate the reply, I'll definitely look into it myself. 

I started in IT by way of being an AutoCAD jockey. So i had lots of early coding experience like LISP, BASIC etc. I honestly have never seen any documentation on the LUA aspects of any modules. You may want to post up in the modding forum. https://forum.dcs.world/forum/69-dcs-modding/ This is general bugs forum which might not get the visibility for your question. If I find any other info either way I will post it.

  • Like 1

AKA_SilverDevil AKA Forums My YouTube

“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.” — Mark Twain

Link to comment
Share on other sites

On 8/14/2022 at 5:14 AM, silverdevil said:

I started in IT by way of being an AutoCAD jockey. So i had lots of early coding experience like LISP, BASIC etc. I honestly have never seen any documentation on the LUA aspects of any modules. You may want to post up in the modding forum. https://forum.dcs.world/forum/69-dcs-modding/ This is general bugs forum which might not get the visibility for your question. If I find any other info either way I will post it.

Thanks!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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