Jump to content

Recommended Posts

Posted

Using the script editor to set up some definitions

 

I have the following in the code at the bottom of this post in my file - straight copy of the document

 

I can set up the plane and trim for level straight flight, but as soon as i make a big throttle adjustment - plane yaws and goes into a dive.

 

Not good.

 

What am I doing wrong.

 

Thanks.

 

MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

 

MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

Posted
One of the two throttles is mapped as a rudder axis inside DCS.

 

I should clarify that i'm getting the above behavior if I comment out

 

MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

 

 

But with those active also - there's something wrong.

Posted (edited)

Target is not where the problem lies. All that code does is assign the physical axis to a Direct X axis. Those are then assigned, in game, to the aircraft controls.

 

Your in game control mapping is likely to be the source of the problem.

 

EDIT: The lines you comment out are for the 'slew' axis, so they have even less to do with your issue.

Edited by cichlidfan
  • Like 1

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted
Target is not where the problem lies. All that code does is assign the physical axis to a Direct X axis. Those are then assigned, in game, to the aircraft controls.

 

Your in game control mapping is likely to be the source of the problem.

 

EDIT: The lines you comment out are for the 'slew' axis, so they have even less to do with your issue.

 

But if I don't use my script - i.e. run TARGET - then when I run raw

DCS - my setup runs fine.

 

Doesn't that mean that DCS itself and the controls are set up correctly.

 

I get this behavior only when I run via TARGET script editor.

Posted

When you run target, you are using a completely different control configuration inside the game. Did you check it for conflicts?

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted
When you run target, you are using a completely different control configuration inside the game. Did you check it for conflicts?

 

I run by clicking on DCS icon - everything's ok. No target running here right?

 

I'm running the TARGET script editor w/ my script (with the above definition for the axis) and that causes the problems.

 

I think if I leave the 2 commented lines in - it's a little bit better but not normal. i.e. as running DCS by itself.

 

That code is straight from the script editor pdf file.

 

I guess I could try the graphical TARGET editor and see what it does.

Posted

You could, but it is going to make the same code.

 

You should post a pic of your in game axis settings, when Target is running.

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted
I run by clicking on DCS icon - everything's ok. No target running here right?

 

I'm running the TARGET script editor w/ my script (with the above definition for the axis) and that causes the problems.

 

Let me try to rephrase what cichlidfan already wrote.

 

When you're not running a TARGET profile, DCS sees the Warthog as two separate devices. One device is called "Throttle - HOTAS Warthog" and the other is called "Joystick - HOTAS Warthog".

 

While a TARGET profile is running, all of the above disappear and instead a new device comes up that's called "Thrustmaster Combined".

 

It's like unplugging the Warthog Joystick and the Warthog Throttle and then plugging in an entirely different Joystick.

 

Therefore, when you run TARGET, all axes and most buttons must be re-mapped in DCS.

 

Also note that you'll probably have to exit and restart DCS whenever you start or stop a TARGET profile because DCS can't detect new controllers while it's running.

 

So my guess, as well, would be that your axis-mapping in DCS works fine without TARGET but must be re-worked for when a TARGET profile is running.

  • Like 1
Posted (edited)

Thanks for the responses.

 

I understand that TARGET creates 1 virtual device.

 

My axis definition for this virtual device is in the original post - copied straight from the documentation.

 

Not right?

 

If I define them as I have, I would think that overrides the in-game settings in DCS. I haven't done anything there.

 

Should I go into DCS options and clear out the RUDDER definition.

Edited by erjdriver
  • Like 1
Posted (edited)

See post number 4 again.

 

EDIT:

 

This is the root of your problem.

 

...I would think that overrides the in-game settings in DCS. I haven't done anything there.
Edited by cichlidfan

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted
See post number 4 again.

 

EDIT:

 

This is the root of your problem.

 

Ok I went to the DCS in-game options and looked at the axis definitions for the combined virtual device.

 

The problem seems to be that for RUDDER I have RZ defined.

 

When I run DCS by itself - there's nothing for RUDDER - which makes sense.

 

How did that definition for RUDDER get in there (from my file?)

Posted

Post #2

 

One of the two throttles is mapped as a rudder axis inside DCS.

 

Though the latest patch has supposedly made some changes in this regard (I haven't checked), historically DCS assigns random, nonsensical, axis and button assignments to each controller. The 'plug-n-play' for the TM Warthog (without Target) with the A-10C being a notable exception.

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted
Post #2

 

 

 

Though the latest patch has supposedly made some changes in this regard (I haven't checked), historically DCS assigns random, nonsensical, axis and button assignments to each controller. The 'plug-n-play' for the TM Warthog (without Target) with the A-10C being a notable exception.

 

So in DCS I should go and clear the definition for RUDDER - right?

 

It'll be "saved" for all subsequent sessions?

Posted (edited)

Yes. Clear it.

 

I would also use the Save Profile option, since it will give you a proper saved file that can be imported later, if needed.

 

Note: The Save Profile option may not work the way you expect. To use it select a cell in the column for the controller you wish to save. Then click the Save Profile button and save the file. You must do this for each controller and for each aircraft.

 

EDIT: IMHO, the best way to start out, when setting up your controls, is to clear every button and axis and then start assigning things exactly the way you want them. The reduction in surprises is worth the effort.

Edited by cichlidfan

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted

Thanks for the help -

 

I cleared the rudder settings and now works like a charm.

 

Also FYI, seems like DCS saves the setting on subsequent restarts - so no need to do it manually every time.

 

Why one would set the throttle to the rudder beyond me.

 

 

Now a way to automate startup.

 

Right now I start up TARGET script editor and then select my file, run it and then run DCS.

 

Any way to automate that?

 

Can I select my script also from the TARGET GUI editor.

Posted
Also FYI, seems like DCS saves the setting on subsequent restarts - so no need to do it manually every time.

 

Why one would set the throttle to the rudder beyond me.

 

Yup, DCS saves the controller configuration. It may get lost when an update is installed, but it should withstand updates under normal circumstances.

 

The weird assignments are probably caused by the plethora of controllers out there. Every vendor can assign axes as he wishes, and there are only a handful of quasi-standard assignments like the stick's X and Y axis.

 

The common ground is Microsoft's DirectX. A Joystick is seen by the computer as a DirectX device, and it tells the computer "I have 2 axes and 18 buttons" (just an example, of course).

 

Now when you go to the controls configuration in DCS, is just sees what Windows sees - a DirectX device with a certain number of axes and a certain number of buttons.

 

DCS tries to map these axes by default. And with some controllers, it may be a perfect fit, with other controllers it may be way off. The way you set up the Thrustmaster Combined controller in TARGET is apparently way off in DCS, so you could either assign other DirectX axes in TARGET or, as you have done, re-assign the axes in DCS.

 

That's just the way it is.

 

No clue about automation, sorry. (I try to avoid TARGET, but when I use it, I do it the same way you described).

 

I just tested opening TARGET scripts from within the GUI, but when I do (selecting the filter "All files" first), it says the file is corrupted, so it seems that TARGET script files and TARGET GUI configurations are not compatible.

 

Can anyone confirm this? I can see some potential for conflicts there, but it doesn't make a whole lot of sense that these applications would not be using the same input file format.

Posted

This TARGET setup is amazing and also a huge pain!

 

I'm just trying to add some additional functionality - but looks like I have to redefine every button. Has someone already done this that can be downloaded?

 

I'm trying to wrap my head around this thing and am confused by something.

 

When I define a button, do I define it as a key or a DCS action. And if the latter sometimes there are no keys for some actions.

 

For example, trying to define china-hat forward.

 

Doc tells me what the action should be under different SOI scenarios - so what do I define.

 

For example when HUD is SOI, the short is Set Mav as SOI and long is Slave all to spi.

 

Now I can't find the definitions for these.

 

Since there are different SOI contexts - i would imagine DCS just needs to know the button was pressed (long/short) as opposed to the exact action (that would depend on the context). Right?

 

Any help appreciated?

 

Actually a full TARGET tmc would be great.

 

p.s. the slew button on the controls wasn't working. Had to go into DCS options to map them. They're a little bit too fast - any way to slow them down.

Posted

Interesting! I have made many scripts but never for the A-10C, because the functionality of the WH is great as default.

May i ask what you are missing?

[sIGPIC][/sIGPIC]

Win10 64, Asus Maximus VIII Formula, i5 6600K, Geforce 980 GTX Ti, 32 GB Ram, Samsung EVO SSD.

Posted
Interesting! I have made many scripts but never for the A-10C, because the functionality of the WH is great as default.

May i ask what you are missing?

 

One of the great benefits of a combined device (throttle+joystick) is you can define commands w/o the requirement to touch the keyboard.

 

For example,

 

The main trim button is VIEW around in default mode. if you want to press a button in the cockpit, you have to switch by pressing alt-c. zoom another key or mouse. You're taking away from the simulation by touching the keyboard and mouse.

 

With TARGET - you define the same VIEW button to do different things in different modes.

 

For example, if you have the boat-switch forward - you can set it up to trim the airplane.

 

if you have it backwards, you can make up/down VIEW buttons zoom and the LEFT/RIGHT do other things - (e.g. view the theater map) etc.

 

But alas it seems like it's going to be a lot of work and am giving up.

Posted (edited)

You can also ad modifiers ingame. f.ex DX4 will act as a modifier, so pressing the paddle will give you a new joystick layer. which a good one since it's not mapped to anything ingame.

Don't get me wrong, i think TARGET is amazing and I can program stuff I could only dream of in foxy, but so far I have only found it useful for flaming cliffs and the other modules, but not the A-10C and thats the reason i ask. :)

 

EDIT: It seems like you don't have TrackIR. It saves you a lot of old school panning on the hat switch. I have the MFD's as well as rudders and with that the A-10C is plug and play.

 

But take a look at the modifier in your control options. I think it will do what you want but without the hazzle..

Edited by Svend_Dellepude

[sIGPIC][/sIGPIC]

Win10 64, Asus Maximus VIII Formula, i5 6600K, Geforce 980 GTX Ti, 32 GB Ram, Samsung EVO SSD.

Posted (edited)

I've actually done what I need - that is program the layers.

 

But now it looks like I have to re-define every button on the HOTAS.

 

Whee I'm stuck at is can I write via TARGET that this button was pressed (e.g. COOLIE forward) and then DCS assign the correct action based on context.

 

Right now it seems like I have to use map-key to a DCS action.

 

But then I get confused how to figure out the different contexts (e.g. SOI)

 

WHen I use MapKey( &Throttle, CHF, ??? );

 

for ??? can i use DX? whatever as opposed to a keyboard assigned action.

Edited by erjdriver
  • Recently Browsing   0 members

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