Friday, 2017-07-28, 2:45 PM
[Forgotten Hope Secret Weapon] European CommunityMain

Registration

Login
Welcome Guest | RSS
/
[ Neue Beiträge · Teilnehmer · Forumregeln · Suche · RSS ]
Page 1 of 11
Forum » [FHSW Europ] FHSW 0.51 Server: » Support & Help: » Custom key bindings.
Custom key bindings.
RYDate: Thursday, 2012-03-08, 12:06 PM | Message # 1
Sergeant
Group: Trusted
Messages: 24
Awards: 3
Reputation: 0
Status: Offline
I am a little new to BF1942(played it for a few days back in 2003-2004, and again started playing FHSW and original BF about 1 week ago).

I was wondering how to bind custom things to keys in BF1942, for example - changing mouse sensitivity using keys.
I have tryed to look into *.con files in Mods\bf1942\Settings folder. The scripting language(if it can be called so) used in .con files must be very powerful, but I couldn't find any examples of the things similar to what I want to do.

I could figure out only few things...

example from common key binds:
Code
ControlMap.addKeyToTriggerMapping c_PISayAll IDFKeyboard IDKey_K c_CMNonRepetive
'ControlMap.addKeyToTriggerMapping' -- what is used as the initial command that does a bind to a keyboard (there is also a few other commands similar to this that do a little different things)
'c_PISayAll' -- function/action/??? that will be bound to a key (chat with everyone in this case)
'IDFKeyboard' -- type of the device (Mouse or Keyboard, haven't found anything else in con files)
'IDKey_K' -- the key to which action will be bound ("k" in this case)
'c_CMNonRepetive' -- how it will be used (press once, holding doesn't do anything)

examples from air key binds:
Code
ControlMap.addButtonToTriggerMapping c_PIFire IDFMouse IDButton_0 c_CMPushAndHold
'ControlMap.addButtonToTriggerMapping' -- what is used as the initial command that does a bind to a mouse
'c_PIFire' -- action that is bound to a key (fire in this case)
'IDFMouse' -- type of the device (Mouse or Keyboard, haven't found anything else in con files)
'IDButton_0' -- the button to which action will be bound (left mouse button(must be right, if you have set your mouse in 'lefthanded' mode in windows or used something esle to swap the keys))
'c_CMPushAndHold' -- how it will be used ('push and hold', holding must be just repeating the command bound to this key with some delay(like few ms) pushing button only once must work same as 'c_CMNonRepetive')

Code
ControlMap.addKeyToTriggerMapping c_PIFire IDFKeyboard IDKey_Space c_CMPushAndHold 1
This is an alternative bind for primary fire, it's almost the same as example above, but it has "1" in the end... This "1" must mean that it is used as alternative, but could be something else...

Code
ControlMap.addAxisToAxisMapping c_PIPitch IDFMouse IDAxis_1 0
ControlMap.addKeysToAxisMapping c_PIPitch IDFKeyboard IDKey_ArrowUp IDKey_ArrowDown 1
ControlMap.addAxisToAxisMapping c_PIRoll IDFMouse IDAxis_0 0
ControlMap.addKeysToAxisMapping c_PIRoll IDFKeyboard IDKey_ArrowRight IDKey_ArrowLeft 1
This is waht used for axis mapping (main air controls in this case), keyboard and mouse example.
'ControlMap.addAxisToAxisMapping' -- command that does mouse axis(on hardware device) to axis(ingame axis) mapping (sadly, I don't know a better explanation, probably because my vocabulary is too small T_T)
'ControlMap.addKeysToAxisMapping' -- command that does keyboard keys to axis mapping (same as above, can't explain better)
It looks like there is no additional parameter for type of use, but there is 2 parameters for keys when using 'KeysToAxisMapping' command... And also there is additional parameter (that 0 and 1 in the end) must mean if that is a main or alternative bind.. But I'm not sure.

Code
game.setAirKeyboardSensitivity 0.500000
game.setAirMouseSensitivity 0.700000
game.setAirMouseInvert 1
This is how the game set variables, it is also from the same air.con(located in \Mods\bf1942\Settings\Profiles\Custom\Controls\ (that \Custom\ is the profile name (not the player name in profile)) file.

And what I want to do, for example:
add one or 2 keys that will change "game.setAirMouseSensitivity" from 0.700000 to 0.400000 and back...
also, I would like to know how to make keys that will increase or decrease the value of that variable... if that is possible (must be >_> I hope)

I have tryed to google for info about that, but found only modding related con file descritions, con script tutorials and such... Tryed to quickly look into that guides, tutorials and so on, but haven't found much info that can help me....
Is there anyone who know where I can find info about how to do that custom binds or maybe tell me how to do them?..



[Drink Sq] RadYogh


Message edited by RY - Thursday, 2012-03-08, 12:08 PM
 
Endless_NamelessDate: Thursday, 2012-03-08, 5:54 PM | Message # 2
General
Group: Admins
Messages: 1340
Awards: 38
Reputation: 18
Status: Offline
You can set custom keys under options, you don't need to fiddle with the files. You can also set different mouse sensitivity for Land/Air. Why would you want two sensitivities for air? On most good gaming mice you can change sensitivity quickly via button that's the easiest way I guess.

Or did I understand you wrong?


My Youtube Channel
aka eYe.ris
 
RYDate: Thursday, 2012-03-08, 7:36 PM | Message # 3
Sergeant
Group: Trusted
Messages: 24
Awards: 3
Reputation: 0
Status: Offline
Well, changing mouse sensitivity useing keys is not the only thing that I want...

And yes, I know about different sensitivity for land/air/infantry/common.
The reason why I want to be able to change sensitivity quickly(using keyboard) is that the lower sensitivity could be used for better aiming. I don't have a 'good gaming mice' and I don't think that there is any getting any, they are mostly much more expensive than just a good mice and it does not realy worth that, and I'm pretty happy with my Logitech RX1500. :)



[Drink Sq] RadYogh
 
GreenShiftDate: Friday, 2012-03-09, 1:12 PM | Message # 4
SSM Modder
Group: Trusted
Messages: 105
Awards: 0
Reputation: 3
Status: Offline
No you dont need a real expensive one, the "premium" one I bought with my computer cost about $15 more but thats through a HP so it would really be less if you bought something similar yourself

http://www.newegg.com/Product/Product.aspx?Item=N82E16826664019

$20 plus shipping. Not sure where you live but you likely could find something online that ships to your country. It would probably be easier than figuring out how to change the sensitivity without going to them menu if its even possible.
 
RYDate: Friday, 2012-03-09, 1:38 PM | Message # 5
Sergeant
Group: Trusted
Messages: 24
Awards: 3
Reputation: 0
Status: Offline
GreenShift, sensitivity is not the only thing that I want to change. It was there just for an example...

And thanks for the recomendation, but I am not going to buy 'gaming mouse' or something like that, as I said - I'm pretty happy with my RX1500, and I have more reasons(strange/weird/fancy resons, I am not going to explain them) to not buy stuff like 'gaming mouse'. :)

I am still trying to google info about con files, asking on forums and other things...

Added:
Since everyone is so much concentrated on that 'sensitivity' thing, I will provide more examples nice key binds that probably(there must be some way to do that!) could be:
Disabling HUD
Changing sound volume(can be very useful in some cases)
Enabling/Disabling FPS counter
and there is a lot more things that may be nice to change pressing a single key...



[Drink Sq] RadYogh


Message edited by RY - Friday, 2012-03-09, 1:59 PM
 
Mr_JDate: Friday, 2012-03-09, 10:08 PM | Message # 6
Accessory Admin
Group: Admins
Messages: 690
Awards: 22
Reputation: 13
Status: Offline
You have broached a very interesting question RY. However I would go to bfmods.com, a large bf1942 modding forum, where all game tweaking experts are flocking to.
 
Stefan1990Date: Friday, 2012-03-09, 10:48 PM | Message # 7
Lieutenant General
Group: Admins
Messages: 1395
Awards: 7
Reputation: 2
Status: Offline
sorry RY... thats too neardy for me :P
 
GreenShiftDate: Saturday, 2012-03-10, 4:13 PM | Message # 8
SSM Modder
Group: Trusted
Messages: 105
Awards: 0
Reputation: 3
Status: Offline
Yes I understand why you want them however I do not know if it is possible or not because those are located only on the settings menu that is loaded only when you press escape, and it often has to really load it and not have it on standby and instant like many games. I have no coding knowledge however, Im not sure many of us do so your best bet would probably be where Mr J said. Sorry we cant help!
 
RYDate: Wednesday, 2012-03-14, 4:17 PM | Message # 9
Sergeant
Group: Trusted
Messages: 24
Awards: 3
Reputation: 0
Status: Offline
Yeah... I guess I'll try asking on bfmods.com... A little later...

But.... Thanks to everyone, anyway. :)



[Drink Sq] RadYogh
 
Forum » [FHSW Europ] FHSW 0.51 Server: » Support & Help: » Custom key bindings.
Page 1 of 11
Search:

Copyright MyCorp © 2017 Powered by Stefan1990