Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > Technical threads > Controls threads

Controls threads Everything about controls in CoD

Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2011, 08:09 PM
MadBlaster MadBlaster is offline
Approved Member
 
Join Date: Oct 2010
Posts: 666
Default

I wrote a brake glovepie script that may work for you. It works this way.

one button increases overall brake pressure (both wheels) by 10% each time it is pressed. another button decreases overall brake pressure by 10% each time it is pressed. if it turn my rudder outside a deadzone, the brake pressure on the outside wheel decreases proportionally with the rudder, so the plane turns easier. the script is also enhanced with verbal commands (say"more" and brake pressure increases 10%, say "less" and brake pressure decreases by 10%). Anyway, you need to set up virtual joystick in ppjoy to make it work and put those virtual axis in your confuser.ini. Here it is if you want to try and make it work for you:

*BRAKES (in order to use rudder for independent braking, the brake must first be on)
if var.brake=0 then
var.brake=-1
var.ltbrake=var.brake
var.rtbrake=var.brake
say"brake is off"
elseif var.brake>1 then
var.brake=1
say"maximum brake"
elseif var.brake<-1 then
var.brake=-1
say"brake is off"
endif
if (released(joystick1.button7) and var.brake>=-1) or (said("more",5) and var.brake>=-1) then
var.brake=var.brake+.2
say"more"
elseif (released(joystick1.button and var.brake>=-1) or (said("less",5) and var.brake>=-1) then
var.brake=var.brake-.2
say"less"
elseif said("release brake",5) or helddown(joystick1.Button8,1 second) then
var.brake=-1
var.ltbrake=var.brake
var.rtbrake=var.brake
say"brake is off"
elseif said("landing gear",5)
var.brake=-.6
var.ltbrake=var.brake
var.rtbrake=var.brake
elseif said("full brake",5) or helddown(joystick1.Button7,1 second) then
var.brake=1
var.ltbrake=var.brake
var.rtbrake=var.brake
wait var.stnddelay
say"maximum brake"
elseif said("half brake",5)
var.brake=-.01
var.ltbrake=var.brake
var.rtbrake=var.brake
wait var.stnddelay
say"half brake"
endif
if var.brake>-1 then
var.pright=roundto(ensuremaprange(joystick2.z,.2,1 ,0,1),-2)
var.pleft=roundto(ensuremaprange(joystick2.z,-.2,-1,0,1),-2)
if (joystick2.z>=.2) then
if var.brake<=0 then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake+((-1-var.brake)*var.pright),-1)
elseif var.brake>0 then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake+((-var.brake-1)*var.pright),-1)
endif
elseif (joystick2.z<=-.2) then
if var.brake<=0 then
var.ltbrake=roundto(var.brake,-1)
var.rtbrake=roundto(var.brake+((-1-var.brake)*var.pleft),-1)
elseif var.brake>0 then
var.ltbrake=roundto(var.brake,-1)
var.rtbrake=roundto(var.brake+((-var.brake-1)*var.pleft),-1)
endif
elseif (joystick2.z>-.2 and <.2) then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake,-1)
endif
endif

Last edited by MadBlaster; 04-21-2011 at 08:14 PM. Reason: stupid smiley in script, i cant get rid of it. it just shows up. i didn't put it there. it says 8) behind it
Reply With Quote
  #2  
Old 04-21-2011, 09:02 PM
1.JaVA_Platypus's Avatar
1.JaVA_Platypus 1.JaVA_Platypus is offline
Approved Member
 
Join Date: Oct 2007
Location: De Gooische matras!
Posts: 110
Default

Tapping the 'B' key very very gently works for me! RAF fighters didn't have toe-brakes. So, fancy rudder pedals aren't of use for those aircraft.
Reply With Quote
  #3  
Old 04-21-2011, 09:57 PM
MadBlaster MadBlaster is offline
Approved Member
 
Join Date: Oct 2010
Posts: 666
Default

Quote:
Originally Posted by MadBlaster View Post
I wrote a brake glovepie script that may work for you. It works this way.

one button increases overall brake pressure (both wheels) by 10% each time it is pressed. another button decreases overall brake pressure by 10% each time it is pressed. if it turn my rudder outside a deadzone, the brake pressure on the outside wheel decreases proportionally with the rudder, so the plane turns easier. the script is also enhanced with verbal commands (say"more" and brake pressure increases 10%, say "less" and brake pressure decreases by 10%). Anyway, you need to set up virtual joystick in ppjoy to make it work and put those virtual axis in your confuser.ini. Here it is if you want to try and make it work for you:

*BRAKES (in order to use rudder for independent braking, the brake must first be on)
if var.brake=0 then
var.brake=-1
var.ltbrake=var.brake
var.rtbrake=var.brake
say"brake is off"
elseif var.brake>1 then
var.brake=1
say"maximum brake"
elseif var.brake<-1 then
var.brake=-1
say"brake is off"
endif
if (released(joystick1.button7) and var.brake>=-1) or (said("more",5) and var.brake>=-1) then
var.brake=var.brake+.2
say"more"
elseif (released(joystick1.button and var.brake>=-1) or (said("less",5) and var.brake>=-1) then
var.brake=var.brake-.2
say"less"
elseif said("release brake",5) or helddown(joystick1.Button8,1 second) then
var.brake=-1
var.ltbrake=var.brake
var.rtbrake=var.brake
say"brake is off"
elseif said("landing gear",5)
var.brake=-.6
var.ltbrake=var.brake
var.rtbrake=var.brake
elseif said("full brake",5) or helddown(joystick1.Button7,1 second) then
var.brake=1
var.ltbrake=var.brake
var.rtbrake=var.brake
wait var.stnddelay
say"maximum brake"
elseif said("half brake",5)
var.brake=-.01
var.ltbrake=var.brake
var.rtbrake=var.brake
wait var.stnddelay
say"half brake"
endif
if var.brake>-1 then
var.pright=roundto(ensuremaprange(joystick2.z,.2,1 ,0,1),-2)
var.pleft=roundto(ensuremaprange(joystick2.z,-.2,-1,0,1),-2)
if (joystick2.z>=.2) then
if var.brake<=0 then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake+((-1-var.brake)*var.pright),-1)
elseif var.brake>0 then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake+((-var.brake-1)*var.pright),-1)
endif
elseif (joystick2.z<=-.2) then
if var.brake<=0 then
var.ltbrake=roundto(var.brake,-1)
var.rtbrake=roundto(var.brake+((-1-var.brake)*var.pleft),-1)
elseif var.brake>0 then
var.ltbrake=roundto(var.brake,-1)
var.rtbrake=roundto(var.brake+((-var.brake-1)*var.pleft),-1)
endif
elseif (joystick2.z>-.2 and <.2) then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake,-1)
endif
endif
Sorry, forgot to post this part. Variables map to these virtual axis:

*OUTPUT TO GAME AXIS
ppJoy2.Analog4=var.rtbrake /*Joystick4+AXE_U=1brakesrt*/
ppJoy2.Analog5=var.ltbrake /*Joystick4+AXE_V=1brakeslt*/

i.e., (you would set similar virtual axis up in your confUser.ini file.
Reply With Quote
  #4  
Old 04-21-2011, 11:01 PM
Sokol1's Avatar
Sokol1 Sokol1 is offline
Approved Member
 
Join Date: Oct 2007
Posts: 727
Default

In CloD you can use any Axis + modifier key to do some function.
Ie. Use stick X axis + Ctrl or Shift... as brake.

Pull stick back to up elevator (and avoid nose over), hit and hold modifier key, elevator stay up, but now X stick axis work as brake (proportional).

Same with throttle or another axis (to control propeller pitch, radiator...).

Sokol1
Reply With Quote
  #5  
Old 04-22-2011, 07:08 AM
335th_GRAthos 335th_GRAthos is offline
Approved Member
 
Join Date: Oct 2007
Posts: 1,240
Default

Quote:
Originally Posted by Sokol1 View Post
In CloD you can use any Axis + modifier key to do some function.
Ie. Use stick X axis + Ctrl or Shift... as brake.

Pull stick back to up elevator (and avoid nose over), hit and hold modifier key, elevator stay up, but now X stick axis work as brake (proportional).

Same with throttle or another axis (to control propeller pitch, radiator...).

Sokol1


Whaaaaat !!!!?????

This is a great thing Sokol if it is true, it should be added to the Q&A !!!!

I will try it, T H A N K S !
Reply With Quote
  #6  
Old 04-22-2011, 08:35 AM
Dano Dano is offline
Approved Member
 
Join Date: Oct 2007
Location: Petersfield UK
Posts: 1,107
Default

Quote:
Originally Posted by Sokol1 View Post
In CloD you can use any Axis + modifier key to do some function.
Ie. Use stick X axis + Ctrl or Shift... as brake.

Pull stick back to up elevator (and avoid nose over), hit and hold modifier key, elevator stay up, but now X stick axis work as brake (proportional).

Same with throttle or another axis (to control propeller pitch, radiator...).

Sokol1
I already tried this and it failed to work, will try again. But still my request remains, a brake button that functions the same as it did in IL2 is needed.
Reply With Quote
  #7  
Old 04-22-2011, 09:25 AM
MadBlaster MadBlaster is offline
Approved Member
 
Join Date: Oct 2010
Posts: 666
Default

There might be a slight problem with that method. Ok you map control Key + X axis (aileron) to wheel brake axis, as soon as you press that control key, the brake will be on at 50% if your centering you plane to land on the runway (i.e., the x axis runs -1 to 1). That much brake is a bit high and might cause some problems on landing.

Anyway, if that doesn't work for you, I or someone can write up a script for you that does that specifically (i.e., increase pressure at 10% increments, turn off after you hold it down for say 3 seconds). But if you don't have any real axis, you need to install PPJOY and create virtual joystick and put that virtual axis in the confUser.ini. Then you write the script to send the output from the key you choose to press to that axis. So, you press the key, the value goes from -1 to .8 to .6 ...etc. after 10 times its at 1. you hold it down three seconds and value goes to -1 (output 0).

Or, just wait until developers add it.
Reply With Quote
  #8  
Old 04-22-2011, 12:20 PM
MadBlaster MadBlaster is offline
Approved Member
 
Join Date: Oct 2010
Posts: 666
Default

Here you go. copy/paste below into glovepie and save. instruction included below:

*The One Button Brake, MadBlaster style
if var.brake=0 then //initialize variable
var.brake=-1
var.count=0
endif
if helddown(key.b,.05 second) and var.count<10 and var.timedelay=0 then //to increase brake, press the b button on the keyboard
var.brake=var.brake+.22
wait .1 second
midi.BassDrum1=true //this sound, brake power increased
var.count++
endif
if helddown(key.b,1 second) then //to release the brake hold the b key down 2 seconds
var.brake=-1
var.count=0
midi.LowAgogo=true //this sound, brake is off
var.timedelay=1
endif
if var.brake>1 then
var.brake=1
endif
if var.timedelay=1 then
wait 1 second
var.timedelay=0
endif

ppjoy1.Analog0=var.brake //output of virutal axis to the game. Use of lable, "PPjoy1" assumes no other virtual joysticks have been created.
//and Analog0 uses the x axis of the virtual stick.


//Installation Notes:

//you need ppjoy and glovepie installed on your pc. its freeware.

//[HotKey pilotMove] <<<where you map the virtual axis in confUser.ini in the 1CSoftClub folder under My Documents on your desktop.
//the line you will copy paste should look like this >>> Joystick1+AXE_X=1brakes, BUT,
//the number after "Joystick" may need to be changed because it depends on how Windows has
//labeled your virtual joystick. Go to Windows game controllers under control panel. Look at the list
//of game controllers. Find the virtual joystick (e.g., ppjoy1), starting at zero from the top of the list and count down
//the list until you reach the virtual joystick. Use that number. For example, all you have is one real joystick
//and one PPJOY virtual stick. PPjoy is at the bottom of the list, so use the number "1" (i.e., 0,1)

//Joystick1+AXE_X=1brakes

//okay, after you copy/paste that line above under [HotKey pilotMove] section, save the confUser.int.
//now run this script and start the game. go to controls section. find the wheel brake axis. start pressing
//the "b" button on the keyboard. does the blue bar show up and start moving? if so, your good to go.

//to see how it works, remove the forward slashes in front of the debug line below. run this script in glovepie
//and look at the box next to the "stop" button. Make sure to put the forward slashes back or delete the debug line entirely and save.

//debug=var.brake
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:09 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.