Red Dog's corner

Cougar World

Red Dog's Corner

General

Sim specific tips
Programming the Cougar for IL2


Welcome to my IL-2 Sturmovik section. As the name implies, we'll be talking about programming our Cougars for IL-2. Of course some of the tips found here could easily be used with other simulators like CFS, EAW,...

I'll start by developing some useful tricks I used in the IL2_RD cougar file but I also want to go beyond that. All tips and tricks are welcome here, if you want me to post one of yours - I'll gladly do it (with all due credits - needless to say.) I also plan to rescue some tips from the Cougar World forum where some interesting threads may disappear quickly due to the flow of messages.
This is your section, so if you want to get some help or have other user's input regarding a sim-specific problem, post on the forum and I'll relay the information here.

Here are the explained functions so far:


Implementing the WEP on the end of the throttle course
What's the best place for the "War Emergency Power" than on the far end of the throttle course, behind a solid notch?? All together: None!
So let's look how we can program it on the Cougar.
Basically, it will imply digital axis programming as we want to create a digital zone on an analogue axis. Now first let's make a quick reminder here because obviously there are also beginners who may want to understand what we are talking about.
The axis is called analogue because it's a DirectX axis (the third one) recognized by Windows as being the throttle axis. When we assign key presses to that very axis, we say we program it digitally. What we plan here is to keep most of the axis course analogue to implement a normal throttle axis. I say most of the axis because at the end of the course, right after the second notch - we will declare a zone wherein a key press will be implemented.

To perform the task, I'll use a TYPE 5 digital statement and will declare more than 2 zones. But first, let's analyse what we need:
- The throttle will perform normally (as a directX axis) until the Second Notch (95%course)
- At the second notch, I want the macro "throttle_100" to be implemented. That would ensure that at that point in the axis travel, I'm at full throttle. Indeed IL-2 allocates the DirectX number 3 axis over the full physical throttle travel, without taking into account the notches we have on the Cougar. As I want to implement 100% throttle on the 90% point of the physical axis, I'm forced to use a cheat.
- Obviously, to be able to travel above 95% of axis travel without the analogue value of the throttle axis being reported, I need to lock the throttle analogue value. This will be done with the LOCK, UNLOCK command. There is an interesting trick here. Normally, you're supposed to use the LOCK value before the UNLOCK value. In our example, The UNLOCK needs to be performed before the LOCK because it's mandatory while decreasing the throttle. The UNLOCK value takes it's action when power is decreased from full course to 90% travel.
- The WEP zone does not need to be at the extreme end of the axis travel. Why? Because I need to get out of it while increasing throttle to allow the macro to be implemented a second time (when entering the zone again) while decreasing the throttle.

Still with me? Let's see:
We would actually need 6 zones:
1. from 0 to 93%: Normal analogue values : the axis is not programmed digitally.
2. from 93 to 94%: The command UNLOCK would be used (necessary when decreasing the TQS out of the digital zones)
3. from 94 to 95%: LOCK the analogue axis at its LASTVALUE so that nothing analogue beyond 95% is reported.
4. from 95 to 96%: Implement the macro "Throttle_max" to ensure that we indeed have 100% power output right on the notch.
5. from 96 to 97%: When passing through that zone, the War Emergency Power is applied.
6. from 97 to 100%: A blank zone. This zone is quite important to ensure that the macro "wep=w" is implemented again when decreasing the TQS from full range through the WEP zone.
Note that Zone 1 and 6 do not need to be programmed digitally. So we end up with a TYPE5 statement with 4 zones:

THR 5 4 (93 94 95 96 97) UNLOCK (THR) LOCK (THR,LASTVALUE) Throttle_max WEP

There are of course plenty of other ways to implement that very function. The one I explained here is the only one that actually ensured that the WEP is always deactivated when pulling the throttle back. I tried others and often the WEP was activated but not deactivated.
The downside of this digital statement is that you would loose power management between 96 and 99% (I noticed that the throttle output goes directly from 96 to 100%) That's something I can live with :)
You may also need to adjust the position of the upper TQS notch so that it's placed right after the "throttle_100" macro. James will post an article on how to adjust the TQS notches.


Switching mouse control to joystick
Why would you want to do that, might you ask? Well I like to use the rear gunner position but controlling it with the mouse is not precise enough. Especially since my mouse (a logitech portable trackball) is velcroed on my TQS which is on my left and I'm right handed. I know I could use the microstick to aim the rear machine gun but again, that would be with my left hand. (Imagine doing it with your right hand :) )
Anyway, as the aircraft controls are handled by the AI when you take over the rear gunner position, there is really no use for the joystick axis. It's not deactivated but simply overridden by the autopilot. So why don't we make a better use of it to aim that machine gun?

What do we need?
- We want the mouse to be assigned on the X and Y joystick axis only when the rear gunner position is selected. As soon as the pilot seat is taken back, the joystick should implement the X and Y directX axes again so we can fly the plane.
- If possible, we want this function to be performed automatically when the button assigned as the rear gunner position is selected. The return to normal operation should also be automatic.
- Programming the mouse on the joystick axis would be done with a TYPE2 digital statement.

As we want the function to be performed automatically, it points to T7 or T8 to be used as the rear gunner position. This would let us program the mouse on the joystick only for a certain position of the dogfight switch (the one programmed for the rear gunner). For the other two positions of the dogfight switch, the mouse is not programmed leaving the joystick to behave normally.

I choose the down position (T8) to select the rear gunner. The /P /R modifiers ensure that when T8 is down - the gunner is selected and as soon as T8 is placed in middle again, the gunner is deselected and you are placed in the pilot seat again.
BTN T8 /P gunner_cockpit
/R gunner_cockpit

Now we need to program digitally the joystick X and Y axis to place the mouse in the /D string. (T8 down corresponds to /D) The /U and /M lines will remain blank as obviously we do not want the joystick to be digitally programmed when we are not in the gunner position. As stated earlier, we will program the mouse as a digital TYPE 2 statement. Of course I could have used any digital mouse programming statements so don't hesitate to try others to see which one suits your best.
JOYX /U
/M
/D 2 9 MSX(8-) MSX(6-) MSX(4-) MSX(2-) MSX(0) MSX(2+) MSX(4+) MSX(6+) MSX(8+)
JOYY /U
/M
/D 2 9 MSY(8-) MSY(6-) MSY(4-) MSY(2-) MSY(0) MSY(2+) MSY(4+) MSY(6+) MSY(8+)

And it's done. When you go to the gunner cockpit by depressing T8 in the down position, the joystick axis gets programmed to behave like the mouse allowing you to use it to aim precisely on that fellow of yours trying to shoot you out of his piece of sky. When you shoot him down, you can move from the gunner position to the pilot seat by placing the T8 in the centre position and start a victory roll to celebrate your aerial victory, (using the same joystick of course!)


Implementing differential braking on a rudder without toe brakes
This function has already been covered in the differential braking section. But I'll place it here also.
The idea would be to find a way to use the rudder pedals as the toe brakes, especially for those not having toe brake equipped rudders :)

Here is the brainstorm part that goes before every step I take at programming the Cougar:
1. Obviously, it's the rudder axis that will be programmed digitally to implement the toe brakes.
2. As the rudder is normally calibrated as an analogue axis, we need to find a way to disable the analogue value for the time that the toe brakes are implemented.
3. Most of the toe brakes shortcuts are "holding down keys". So we would need a Type3 axis (held character generation) with a null character at the centre position

From point 2, we know we need to use the LOCK, UNLOCK function of the Cougar. This function needs two states to work properly. A lock state and an unlock state. This suits perfectly for the /I /O method. Let's assume we want the rudder functioning as an analogue Z axis when S3 is not used and implement the toe brakes only when the rudder is depressed in conjunction with the S3 in. It means we need to assign the LOCK state in a /I string while the /O string would unlock the analogue value.
We also need to set the Z axis analogue value that will be locked. I found that using the parameter LASTVALUE suited very well IL-2. Indeed the sim has a rather interesting way to implement differential braking : Imagine you want to turn left while taxiing at 10 km/h. You need to depress the left rudder pedal and apply main brake while adding a little power. In this particular case, the main brake shortcut behaves as a left toe brake (while the macro stays the same.) Needless to stay that if you want to turn right, the same thing happens but you actually apply right toe brake. That's why IL-2 doesn't have toe brakes shortcut but only one brake keystroke. With that single keystroke you can implement main, left and right braking according to the position of your rudder.
That's where the LASTVALUE parameter becomes interesting. By locking the rudder to its last analogue value and applying brake, you actually apply differential braking according to which way the rudder axis was depressed.
RDDR /I LOCK (RDDR,LASTVALUE) 3 main_brake ^ main_brake
/O UNLOCK (RDDR)

where main_brake = b in the TMM file.

So what does it do?
The rudder is considered as the normal rudder DirectX axis as long as the S3 is not in.
When you press S3, the analogue rudder is locked at its last known value and the main_brake macro is implemented should you depress the rudder left or right.
From there we have three possibilities:
1. The rudder is centred when you apply the brake routine => the main brakes are applied.
2. The rudder was depressed to the right when starting the brake routine => the right brake is applied


Using the ANT knob for Field of Views controls
This one is rather simple. I like to use the ANT knob to set the field of view in IL-2. I tend to zoom in a lot in dogfights to refine my aim while when cruising around I like to enlarge my field of view. The ANT know with it's centre detent is ideally suited for FOV operations.

Here we go:
- As three FOV settings are available, we need to use a digital programming statement with 3 zones.
- Each zone should produce its own macro once. As such, we'll use a TYPE 5.
- The centre zone should roughly correspond to the centre detent of the ANT knob. So defining a zone from 0 to 45, the second one from 45 to 55 and the last one from 55 to 100 should do the trick.

ANT 5 3 (0 45 55 100) fov_large fov_normal fov_close

where the following macros are declared in the TMM file:
fov_close = DEL
fov_normal = END
fov_large = PGDN

The result is that when you turn the ANT knob towards you, the FOV is enlarged. The center detent gives you a normal field of view and pushing the knob away from you will zoom in for precision aiming.

Olivier "Red Dog" Beaumont