Jump to content

Any useful Thrustmaster Warthog "TARGET" scripts for A-A Countermeasures?


Biggles07
 Share

Recommended Posts

Greets all. Ok, just wondering if anyone has any good TARGET scripts for the Warthog, with which I can deploy chaff and flares more effectively using the countermeasures button on the Hog stick. Reason being, in the obvious absence of pre selected countermeasures programs in FC3 fighters, its a PITA to have to keep pressing one button so many times.

 

Not to mention that its probably not good for the health of my poor long suffering 2yr old Hog stick. As we all know, the things of this world are very much temporary.....and much like us all, sometimes even high quality sim peripherals simply 'pass away' and die. :( I believe my Hog stick countermeasures button is simply 'too young to die'.....and it would be a crying shame. *sniffle* :D

 

Generally speaking (particularly with chaff) I am very 'generous' with its deployment when nasty, wicked people are firing all manner of nasty sh*t at me and in the usual 'notch' evasion manoeuvres etc, as I see no sense in conserving it for a rainy day when I might not even live to see the next 3 seconds......Never mind the next day. :D To that end I will usually spam chaff by pressing the button at bare minimum 5+ times. I'm after a TARGET script where maybe one press will act as at least five (for chaff), or perhaps even the length of me holding the button down (in seconds) could determine how much is deployed? Any good and better ideas are greatly appreciated.

 

Flares are slightly different. Sometimes (situation dependent) I will deploy a few "pre-emptive" flares at a merge situation as a security measure if I feel the opponent either has the upper hand in some way or has even an outside chance of a heater shot. This gives away my position of course but I'll only do so if I'm pretty sure he knows where I am anyway. Usually I won't. Therefore, I don't want one flare button depression to always deploy many flares. I know you can set to 'continually deploy" both chaff and flares, but I'm not really a fan of this.

 

There are also (last gasp) situations where I know I'm in an imminent world of pain and want to deploy many flares in an "OMFG....Please don't kill me" last chance saloon moment of undiluted and abject terror. Are there ways to program the stick this way? I know you can offload them all in the sim with a button-key but would prefer not to if possible. I am unacquainted with all of this TARGET voodoo.....Simply looking at a TARGET script actually makes my brain cry tears of bewildered sadness. :D

 

So, any help would be much appreciated, and thanks kindly people.

 

Cheers. :)


Edited by Biggles07

♫ ' Papa was a hairy mole.....Wherever he dug a den was his home ' ♫

Link to comment
Share on other sites

Hello Brun! (lol) :D

 

@Howie, thanks but mine is set up in a similar fashion already (just different directions...ECM excluded)......I want to know how I can cut down on the number of times I have to press the button (especially chaff), as well as perhaps using 'shift' type commands using the 'viper paddle' as shift to do different chaff-flare combos etc and ultimately preserve the button which I fear shall one day perish due to massive over use lol. I don't even know if this is possible with TARGET, but I suspect it is.....it looks like some powerful Voodoo but I have yet to master its dark arts. :)

♫ ' Papa was a hairy mole.....Wherever he dug a den was his home ' ♫

Link to comment
Share on other sites

you can do this with TARGET

 

straight from page 48 in the manual...

 

In the DCS Flaming Cliffs 2 software, you cannot create your own chaff and flare program. T.A.R.G.E.T gives you

the possibility of generating keystroke outputs. This is how we will create our custom chaff and flare program.

We want to release 4 chaffs and 4 flares 400 milliseconds apart, and we will repeat this program every 4 seconds.

We also want the ability to have this program looping automatically.

We will use the Joystick HAT4 to manage the chaff and flares.

 H4U will launch the program and loop it until I release the button.

 H4D will launch the program to loop until I order a stop.

 H4P will stop the Program.

The interesting point here is that we will use the same program twice. So, rather than write it twice, we will create

a function that contains our keystrokes. This way, we will only have to call up the function in H4U and H4D.

For the program, we will use a CHAIN with delays to manage the keystroke outputs. The big difference here is

that we will not associate this CHAIN with any MapKey. We will create a function called: Chaff_Flare_Program_1

Chaff_Flare_program_1 = CHAIN(
PULSE+INS,D(400),
PULSE+INS,D(400),
PULSE+INS,D(400),
PULSE+INS,D(400),
PULSE+DEL,D(400),
PULSE+DEL,D(400),
PULSE+DEL,D(400),
PULSE+DEL);

Now that the program is ready, we need to associate it with our buttons.

We want the function to loop, so we will use REXEC. The program uses 2800 milliseconds, then we want a break

of 4 seconds (4000 milliseconds): we must REXECute our function every 4000+2800 = 6800 milliseconds.

For H4U:

MapKey(&Joystick, H4U, REXEC(0, 6800, "ActKey(KEYON+Chaff_Flare_program_1);"));

For H4D:

MapKey(&Joystick, H4D, REXEC(1, 6800, "ActKey(KEYON+Chaff_Flare_program_1);", RNOSTOP));

And to stop the automatic loop:

MapKey(&Joystick, H4P, EXEC("StopAutoRepeat(0);"));

Now, all we have to do is to declare our Function before the int main ():

int Chaff_Flare_program_1; //we declare our new function

 

You could even do some cool stuff like switch which program is run depending on position of unused switches...there is an autopilot example of this in the manual the mimicks the A-10C style autopilot modes/buttons for FC2(3).

 

I have used both of these examples to make my own functions and they work great

  • Like 1
Link to comment
Share on other sites

you can do this with TARGET

 

straight from page 48 in the manual...

 

In the DCS Flaming Cliffs 2 software, you cannot create your own chaff and flare program. T.A.R.G.E.T gives you

the possibility of generating keystroke outputs. This is how we will create our custom chaff and flare program.

We want to release 4 chaffs and 4 flares 400 milliseconds apart, and we will repeat this program every 4 seconds.

We also want the ability to have this program looping automatically.

We will use the Joystick HAT4 to manage the chaff and flares.

 H4U will launch the program and loop it until I release the button.

 H4D will launch the program to loop until I order a stop.

 H4P will stop the Program.

The interesting point here is that we will use the same program twice. So, rather than write it twice, we will create

a function that contains our keystrokes. This way, we will only have to call up the function in H4U and H4D.

For the program, we will use a CHAIN with delays to manage the keystroke outputs. The big difference here is

that we will not associate this CHAIN with any MapKey. We will create a function called: Chaff_Flare_Program_1

Chaff_Flare_program_1 = CHAIN(
PULSE+INS,D(400),
PULSE+INS,D(400),
PULSE+INS,D(400),
PULSE+INS,D(400),
PULSE+DEL,D(400),
PULSE+DEL,D(400),
PULSE+DEL,D(400),
PULSE+DEL);

Now that the program is ready, we need to associate it with our buttons.

We want the function to loop, so we will use REXEC. The program uses 2800 milliseconds, then we want a break

of 4 seconds (4000 milliseconds): we must REXECute our function every 4000+2800 = 6800 milliseconds.

For H4U:

MapKey(&Joystick, H4U, REXEC(0, 6800, "ActKey(KEYON+Chaff_Flare_program_1);"));

For H4D:

MapKey(&Joystick, H4D, REXEC(1, 6800, "ActKey(KEYON+Chaff_Flare_program_1);", RNOSTOP));

And to stop the automatic loop:

MapKey(&Joystick, H4P, EXEC("StopAutoRepeat(0);"));

Now, all we have to do is to declare our Function before the int main ():

int Chaff_Flare_program_1; //we declare our new function

You could even do some cool stuff like switch which program is run depending on position of unused switches...there is an autopilot example of this in the manual the mimicks the A-10C style autopilot modes/buttons for FC2(3).

 

I have used both of these examples to make my own functions and they work great

 

Brilliant Whartsell, that's the ticket and thank you very much for your help. :thumbup: I'm amazed to say I think I actually understand the logic to it so to speak, I will give this a go and mess around some with my own attempts and versions when I get some time. I may be back again with some questions if I run into any troubles, but it seems fairly straight forward and not quite as terrifying as I thought actually. :) I really need to make some effort and 'RTFM' though in all honesty lol.....think I will get on it this weekend if I can.

 

Thanks again! :)

♫ ' Papa was a hairy mole.....Wherever he dug a den was his home ' ♫

Link to comment
Share on other sites

TARGET advanced scrip programming is really the way to go VS the GUI. IMHO the GUI is useless and I have never used it.

 

TARGET is basically ANSI C so if you know C syntax (not C++) all you need to learn is the TARGET framework.

 

You can even do crazy stuff like load DLLs and execute external binaries from TARGET but I haven't tried it.

Link to comment
Share on other sites

Go for it and ask questions as you need to.

 

Target can do quite a bit and the manual is not that bad, once you get past a few of the errors it contains. In particular, some of the examples are quite good for starting points, as whartsell pointed out.

 

EDIT: I agree, the GUI is of little value. The scripting language is where you can actually do useful things. For one thing, my Joystick is mounted with a rotational offset which I could not do without Target scripting (at least I don't think that can be done in the GUI).


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:

Link to comment
Share on other sites

I just hate how complicated Target is. I'd much rather edit LUA scripts. No messing around with extra software. Also, I only really play FC3 when I can't be bothered with setting up CMS programs and pushing buttons... Target scripting would kinda defeat the purpose!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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