PDA

View Full Version : Brakes Revisited


WWBrian
20-06-2005, 01:16 PM
Greetings All,

I've messed around with the CM editor after viewing all the various threads regarding toe breaks. However, none of them seem to fit the need of a particular game - IL2:FB+AEP+PF ( or Pacific Fighters merged )

PF only recognizes one key or one axis for appying the breaks. There is no differential breaking in this sim title.

All of the threads I have perused have been regarding differential braking and multiple axis setups.


Currently, I just have Y AXIS | D3 (J3.A1) as my break (the left pedal only). The Z Axis cannot be assigned as a "secondary" or alternative command in the HOTAS setup of IL2. However the brakes can also be applied with the B key.

What I'd like to do is be able to assign EITHER pedal (whichever is depressed the most maybe?) to activate the brakes.(both the Y and Z axis)

....is this script a proper start (found it while lurking another IL2 forum)? And if so, what is it missing (it doesnt work). Something tells me I need to define or assign brakeOut somewhere as a key press or something...

script
%define leftBrake js3.a1
%define rightBrake js3.a2
if ([leftBrake GT rightBrake]) then
brakeOut=leftBrake;
else
brakeOut=rightBrake;
endif
endScript

...and can I have this script in the same CM Script file(CMS) where I have another script for J1.B1 or does it somehow need to be seperate?

Thank you in advance.
-WWBrian

531_Ghost
20-06-2005, 01:28 PM
And now ya'll know why I do this...
http://img.photobucket.com/albums/v179/531Ghost/F4Wheelbrakes.jpg

(only replace the k with a b ;) )

:cheers:

abe_beson
20-06-2005, 02:18 PM
Originally posted by WWBrian@Jun 20 2005, 12:16 PM
Greetings All,

I've messed around with the CM editor after viewing all the various threads regarding toe breaks. However, none of them seem to fit the need of a particular game - IL2:FB+AEP+PF ( or Pacific Fighters merged )

PF only recognizes one key or one axis for appying the breaks. There is no differential breaking in this sim title.

All of the threads I have perused have been regarding differential braking and multiple axis setups.


Currently, I just have Y AXIS | D3 (J3.A1) as my break (the left pedal only). The Z Axis cannot be assigned as a "secondary" or alternative command in the HOTAS setup of IL2. However the brakes can also be applied with the B key.

What I'd like to do is be able to assign EITHER pedal (whichever is depressed the most maybe?) to activate the brakes.(both the Y and Z axis)

....is this script a proper start (found it while lurking another IL2 forum)? And if so, what is it missing (it doesnt work). Something tells me I need to define or assign brakeOut somewhere as a key press or something...

script
%define leftBrake js3.a1
%define rightBrake js3.a2
if ([leftBrake GT rightBrake]) then
brakeOut=leftBrake;
else
brakeOut=rightBrake;
endif
endScript

...and can I have this script in the same CM Script file(CMS) where I have another script for J1.B1 or does it somehow need to be seperate?

Thank you in advance.
-WWBrian
<div align="right">13191
[/quote]


Somehow I recognize this script... ;)
Yes you also need this, I forgot to mention that on the IL2 forum...:

%define brakeOut CMS.a1 // or any other unused cms axis

You can't have separate scripts, the only thing you need is to make sure that the axis you chose for brakeOut is unused.

Although I am usually impressed with Ghost's solutions, the script is better this time, since the braking power depends on how much you press the pedals. This is obviously very usesful in planes like LA 5 and other planes that easily turn nose over.

Good luck,
Abe

WWBrian
20-06-2005, 02:51 PM
Originally posted by 531_Ghost@Jun 20 2005, 05:28 AM
And now ya'll know why I do this...

(only replace the k with a bÂ* ;) )

:cheers:
<div align="right">13192
[/quote]

I'd rather use the axis instead of the button as that will give me analog brakes instead of just an ON/OFF. But thanks anyway.

...know why ya do what? Supply images? No, please do tell...

WWBrian
20-06-2005, 02:57 PM
Originally posted by abe_beson@Jun 20 2005, 06:18 AM

Somehow I recognize this script... ;)
Yes you also need this, I forgot to mention that on the IL2 forum...:

%define brakeOutÂ* CMS.a1Â* Â* // or any other unused cms axis

You can't have separate scripts, the only thing you need is to make sure that the axis you chose for brakeOut is unused.

Although I am usually impressed with Ghost's solutions, the script is better this time, since the braking power depends on how much you press the pedals. This is obviously very usesful in planes like LA 5 and other planes that easily turn nose over.

Good luck,
Abe
<div align="right">13193
[/quote]

Thanks Abe,

Was that your response? I would have given ya better credit than just "found it while lurking" had I remembered where I picked it up at.

I'll add the line and give it a try soon as I finish posting this. Thank you for taking the time and extra effort to help the local CH n00b. :thumbsup:

~S!~

531_Ghost
20-06-2005, 03:19 PM
Originally posted by WWBrian+Jun 20 2005, 01:51 PM--><!--QuoteBegin-531_Ghost@Jun 20 2005, 05:28 AM
And now ya'll know why I do this...

(only replace the k with a bÂÂ* ;) )

:cheers:
<div align="right">13192


I'd rather use the axis instead of the button as that will give me analog brakes instead of just an ON/OFF. But thanks anyway.

...know why ya do what? Supply images? No, please do tell...
<div align="right">13194</div>
[/b][/quote]

Abe, I see in this case you are correct (as usual in your scripting greatness ;) ) I tried assigning your script and it works very well. As far as my previous post, I'm not a heavy footed braking kinda guy and this has and still does work for me. WWBrian, they say a picture is worth a 1000 words. Some folks have had this same question and still do. (and have had for years) In some sims scripting diffrential brakeing is not an option so I provided what I did in an attempt to help not only you but others as well. I'll be on my way now...

:salute:

WWBrian
20-06-2005, 03:22 PM
Hmmm....

Doesn't seem to work...I tried it two ways:

script
%define leftBrake js3.a1
%define rightBrake js3.a2
%define brakeOut cms.a1
if ([leftBrake GT rightBrake]) then
brakeOut=leftBrake;
else
brakeOut=rightBrake;
endif
endScript

...and...

script
%define leftBrake js3.a1
%define rightBrake js3.a2
if ([leftBrake GT rightBrake]) then
brakeOut=leftBrake;
else
brakeOut=rightBrake;
endif
cms.a1=brakeOut
endScript

...neither one seemed to work. I have another script in my CMS file so to add this one I simply put in the above do I need it all group in between ONE SET of "Script/endScript" keywords?

example:

script
stuff i had in before
endScript

script
new stuff im trying to add
endScript

...should I just have ONE SET or is the above OK? Left Brake still works fine, but nutin' with the right foot. I've tried removing the middle set of endScript/script keywords too with no difference in result.

I'm sure it's something simple I must be overlooking...

Thanks again!
-WWBrian

abe_beson
20-06-2005, 05:10 PM
No you should have everyting within the scrip/endscrip, except for the defines that should be put before the script.

Also you should configure your existing brakes in dx mode and use none as dx device in the GUI. You also need to configure the CMS axis you have chosen in the script. In order to do this press the CMS tab in the GUI and pick your axis. Then select a dx device and axis. A good choice for this is to use the same dx device and axis as one of the devices you just removed.

I have done tihs so many times that I have forgotten that these things are not obvious. Please have patience with me, and keep asking if it still does not work! :)

/Abe

WWBrian
21-06-2005, 01:04 AM
Originally posted by abe_beson@Jun 20 2005, 09:10 AM

Also you should configure your existing brakes in dx mode and use none as dx device in the GUI. You also need to configure the CMS axis you have chosen in the script.

/Abe
<div align="right">13200
[/quote]

That was exactly it! Needed to go to CMS tab and assign the A1 to Axis Y for Device 3.

Thanks again Abe! It's workin great!

abe_beson
21-06-2005, 11:15 AM
No problems, nice to hear you got it to work! :thumbsup:

Papa_K
24-06-2005, 11:45 PM
Hello All,

Being new to CH, maybe it would help other new people if I listed the steps to set up the pedals and script for toe brakes. Please check for accuracy.

Assuming you already have a map started, to set toe brakes for PF:
1. Go to Control Manager, press the toe axis (brake) on one pedal. Arrow will point to that pedal.
-Ensure DirectX box is checked.
-In Axis Settings, DX Device, select None (scroll to bottom).
-Repeat these steps with the other brake axis.

2. Go to CM Editor to edit CMS Script File.
Input the following after script line and before endScript line:

%define leftBrake js3.a1
%define rightBrake js3.a2
%define brakeOut cms.a1
If ([leftBrake GT rightBrake]) then
brakeOut=leftBrake;
else
brakeOut=rightBrake;
endIf

Exit CM Editor.

3. Back in Control Manager, click the CMS Controls tab.
-In the Axes box, click A1.
-Ensure DirectX box is checked.
-In Axis Settings, DX Device, select CM Device 3 (assuming the pedals are CM Device 3).
-In Axis Settings, DX Axis, select Y Axis.

--If you've already assigned A1, select a different one that isn't assigned, and alter the script line "%define brakeOut cms.a1" - put in the one you're using, instead of a1.

Save your map and download it.

4. Start PF, go to Controls, HOTAS Control (at the bottom).
-Brake Axis: Press left brake. It should read Y-Axis ID3 (assuming pedals are device 3, again)
-Rudder Axis: Press right pedal. It should read Z-Axis ID3.

You're done.

If I'd have seen a post like this, assuming it's correct :blink: , I'd have saved a lot of brain cells.

If anyone sees any errors, please correct.

Question: What's the difference between using the script on an axis in DirectX, as above, versus non-DirectX with the brake keystroke/NULL, as pictured by 531_Ghost? Any advantages?

Have a good one,

Papa_K

WWBrian
26-06-2005, 05:53 PM
Originally posted by Papa_K@Jun 24 2005, 03:45 PM

--snipped proceedure--

If I'd have seen a post like this, assuming it's correctÂ* :blink: , I'd have saved a lot of brain cells.

If anyone sees any errors, please correct.

Question: What's the difference between using the script on an axis in DirectX, as above, versus non-DirectX with the brake keystroke/NULL, as pictured by 531_Ghost?Â* Any advantages?

Have a good one,

Papa_K
<div align="right">13333
[/quote]

Heya Papa_K,

I agree, I was frusterated not being able to get the other "toe-brake solutions" to work in my IL2 setup. Anyway, thank you for posting the step-by-step, it looks correct to me...well, its what I did, let's put it that way.

As to your question, when you use the b/NULL solution, you in effect, have digital brakes - either ON or OFF. thats FULL ON and FULL OFF if you will. However, and I assume this is done somehow within IL2 itself, but the HOTAS/ AXIS solution, you have analog brakes - meaning variable pressure brakes.
I wont say that one is an advantage over the other, I'll let you be the judge of that. I will simply say that it is sort of like either having the joystick to input various analog levels of aileron (or any other contrtol surface) - or pressing a key and either having full aileron or none at all, like off or on, digital.

Hope that helps,

- WWBrian

Dracon
03-07-2005, 10:36 PM
Ok...So is this better than the one I am using?? Always interested in improvements. This works really slick and i like the "deadband".

Okay...Here goes. You must have the CH CM (Control Manager) installed. If you have a FB/AEP/PF profile already, open it and add a CMS Controls tab to it and close the profile. Go to: C:\Program Files\CH Products\Control Manager\Maps and find the FB/AEP/PF profile cms that you created. Mine is simply Forgotten Battles.cms. Open it in Notepad, delete everything there and copy and paste the following into it.

// CMS Script File
//
// Game Title:
// Written By:
// Date:
//
script

IF ([JS3.A1 > JS3.A2]) then // LEFT OR RIGHT TOE BRAKES
CMS.A1 = JS3.A1;
ELSE
CMS.A1 = JS3.A2;
ENDIF

if( [ cms.a1 < 10 ] ) then
cms.a1 = 0;
else
cms.a1 = (255 * (cms.a1 - 10)) / 245;
endIf

endScript

Now save and close it.

Reopen the profile in CH Control manager and select the Pro Pedals tab. Under each of the Toe Breaks select none.

Select and open the CMS Controls tab. Locate the AXES A1. It's in the upper left corner of the AXES block.

If you're using the CM your pedals should be named "CM Device 3. Assign AXES A1 to CM Device 3 and make it look like this:

http://myweb.cableone.net/decon14/images/pedals.jpg

Don't forget to save the Profile and DOWNLOAD it!!!

Finally go into the Game, under Controls HOTAS. Now, at the bottom select Brake. Step on your left Toe Brake. Apply and your done.

<S>
Dracon

pvt_dredge
09-07-2005, 06:39 PM
"Under each of the Toe Breaks select none."

Dracon, do you mean the DX Device drop down should be "none"? TIA

abe_beson
09-07-2005, 06:50 PM
Yes that is the way to do it...

/Abe

Papa_K
10-07-2005, 07:13 AM
There appears to be no diffence in final results between the script I listed (A below), from WWBrian, and the basic brakes section of the script from Dracon (B below):

A.
%define leftBrake js3.a1
%define rightBrake js3.a2
%define brakeOut cms.a1
If ([leftBrake GT rightBrake]) then
brakeOut=leftBrake;
else
brakeOut=rightBrake;
endIf


B.
IF ([JS3.A1 > JS3.A2]) then
CMS.A1 = JS3.A1;
ELSE
CMS.A1 = JS3.A2;
ENDIF

A above first defines js3.a1 and js3.a2 -- B uses them directly in the script.
These are "the same"?

The second part of Dracon's script, for a (10) deadband:

if( [ cms.a1 < 10 ] ) then
cms.a1 = 0;
else
cms.a1 = (255 * (cms.a1 - 10)) / 245;
endIf

As an alternative: In CMS Controls tab, A1, is there any practical problem with leaving the "Centered" box checked, allowing a deadband to be set there?

Papa_K

abe_beson
10-07-2005, 11:52 AM
Those scripts are the same except the deadband thing. All the defines are replaced before compilation of the script.

Yes you would not want to have the centered checked while applying deadband since the deadband would end up in the middle of brake swing.

B.r,
Abe