Difference between revisions of "Keymapper Advanced"

From WWII Online Wiki
Jump to navigationJump to search
Line 30: Line 30:
The second column is the primary keypress and axis are set up. </br>
The second column is the primary keypress and axis are set up. </br>
The third column is where you can set secondary keys for a function. If the function is an axis, you will see it allows for using + and - key, this allows you to set what would normally be a joystick or mouse axis function to a pair of keys or buttons. </br>
The third column is where you can set secondary keys for a function. If the function is an axis, you will see it allows for using + and - key, this allows you to set what would normally be a joystick or mouse axis function to a pair of keys or buttons. </br>
For example the Vertical Aim Axis can be used with the up/down arrows. Also you will notice any changes made outside the default will appear yellow.
For example the Vertical Aim Axis can be used with the up/down arrows.  


[[File:Keymapper_-_Secondary.png|1500px]]
[[File:Keymapper_-_Secondary.png|1500px]]




The game comes with every unit mapped to a standard default key layout which is shown in the following [[Keymappaer|page]]
The game comes with every unit mapped to a standard default key layout which is shown in the following [[Keymapper|page]]. </br>
 
You can modify individually how every unit in the game is controlled or you can modify the entire category. </br>
you can modify individually how every unit in the game is controlled.
 
You can modify for the entire category, like all tanks or all infantry, or you can select each unit individually and give different units
 
different control lay outs as you see fit.
 
 
When modifying units, always remember to click SAVE.
When modifying units, always remember to click SAVE.



Revision as of 01:31, 23 July 2023

Basics

The keymapper is where you adjust the Keypress on how to control the various game units in WWII Online.
You can access the keymapper both before and after spawning into the game. In the UI under Preferences/Keymapper and when in the game world by pressing P.
Either way you access it, the functionality is the same. The Keymapper is arranged under 8 Catorgories - General, Views, Infantry, Tanks and Armoured Cars, Trucks and Haulers, AT and AAA Guns, Fighters and Bombers, Ships and Boats.

Keymapper

Creating and editing keyboard and axis bindings happens here. Select a category, then a function from the Keymap Categories pane then create or edit the binding in the Modify pane. Binding is as simple as selecting the Primary or Secondary Keymap that corresponds to the function you are binding, double click and enter the key or axis to bind. It's that simple. You can also bind multiple key presses to a single function.

Keymapper Controls: There are five buttons along the bottom of the Keymapper that allow you to manage your bindings and categories very simply.

  • Category Defaults: Set all Keymaps in the current category back to the game defaults. Use this button when wishing to “start from scratch” or reclaim the defaults in that category.
  • Default Keymap: Set currently selected keymap back to the game default. Use this button if you want to return a single keymap to its original binding.
  • Discard Changes: Discard any changes that have occured since the last save.
  • Clear Keymap: Clears the currently select keymap.
  • Save Changes: Saves any changes since the last save. Note that you can still set any binding or category back to its defaults even after you save if needed.

When you save a changed keymap, this will be stored within a file called cfml at the current locations:

  • C:\Users\<username>\My Documents\WWIIOnline\cfml [Windows]
  • <users>\Documents\WWIIOnline\cfml [Mac]

Note for Windows: The My Documents folder under Windows OS can be relocated, so the exact location may not be as indicated. However the available "My Documents" shortcut will always point to where ever it is located.

Making Changes

The basic keymapper is fairly straight forward.
The first column is the fuction and what the keypress will do. The second column is the primary keypress and axis are set up.
The third column is where you can set secondary keys for a function. If the function is an axis, you will see it allows for using + and - key, this allows you to set what would normally be a joystick or mouse axis function to a pair of keys or buttons.
For example the Vertical Aim Axis can be used with the up/down arrows.

Keymapper - Secondary.png


The game comes with every unit mapped to a standard default key layout which is shown in the following page.
You can modify individually how every unit in the game is controlled or you can modify the entire category.
When modifying units, always remember to click SAVE.

If you want to remove a key from the mapping, select the key you want to remove, and click CLEAR KEYMAP

If you want to reset a unit to default, click DEFAULT KEYMAP

If you want to reset the entire category, like all trucks, click CATEGORY DEFAULTS

Keymapper saving.jpg

Now when you are mapping a function, the game will hint to you how to invert the axis, and how to split the axis

Axis mod.jpg

As the picture shows, you hold control to reverse the axis you are moving

If you want to split the axis, for example throttle/brake

Hold + for the game to only use forward/right motion of the axis you move for that control

and hold - to only use back/let motion

So hold + and push stick forward for throttle, and hold - and move same stick back for brakes


After you have gotten the basics down and played for a while

You may find that you wish that the game allowed more control over the functions.

This is where the hidden capabilities of the games input handling really shine.

Perhaps you use a keyboard, and you wish that when driving a truck, you had more control than just full throttle or full brakes.

With no other tool than a simple text editor such as notepad++ or wordpad or textedit on a mac

windows notepad not the best option as it does not understand the linebreaks

You can edit the control files you have created in the keymapper and give yourself virtually unlimited control possibilities

By default the game has no control files created, it uses the built in templates

To make the game create files, select either a single unit, or the entire category in the keymapper.

Make your initial changes, or if you have none, just change or add one key.

Then click save.

The files will be created in

  • C:\Documents & Settings\<username>\My Documents\Battleground Europe\cfml [Windows XP]
  • C:\Users\<username>\Documents\Battleground Europe\cfml [Windows Vista/Windows 7]
  • /Users//Library/Preferences/ww2olcfml/ [Mac]

It will look like this

Cfml files.JPG

Open any of these files and you will see a basic xml document.

ALWAYS make a copy of the file before you edit, so if you make a mistake you can simply restore the copy.

Here is what the cfml looks like opened in notepad++

Cfml in editor.JPG

It is IMPORTANT to note

Your editing will only take place between the controls name and the /control tag

for example

<control function="Hatch control">

<joybutton stick="1">5</joybutton>

</control>

We want to add a secondary button to open the hatch (And no Anti Tank guns do not have hatches )

We only edit between <control function="Hatch control"> and </control>

these have to remain intact or the game will not know where the control ends

So lets say you want have a joystick and a gamepad plugged into the PC and sometimes you like to use the gamepad

and you want the 2 button on the game pad to also open the hatch

AND... sometimes you just want to keyboard it and not be bothered with the joystick or the game pad.

WWII Online will see and operate with at least 4 joysticks plugged into a single PC (If you want to know why, google simpit )

the game identifies each joystick numerically, 1 2 3 4 etc

If you are not sure which the game sees as one and 2, just map a button from each to two different controls, and save, then look at the cfml

It is sometimes hard to tell how the operating system is enumerating the joysticks, so asking the game is easiest

So, on your super flightstick, we open hatch with button 5, on our gamepad we use button 2 and on our keyboard we want to hit H

Then our lines will look like this

<joybutton stick="1">5</joybutton>

<joybutton stick="2">2</joybutton>

<key>h</key>

So our complete control will look like so

  • <control function="Hatch control">
  • <joybutton stick="1">5</joybutton>
  • <joybutton stick="2">2</joybutton>
  • <key>h</key>
  • </control>
  • note that the indenting is not important for the cfml file, it is just used to make it easier to read.

Now our hatch will open from either joystick, AND the keyboard, all at the same time.

Cool right? But, we can do even more cool things for functions that have variable movement, like moving a gun, using a gas pedal etc

We have to talk about 3 things 1st

  • <keyabsolute
  • <keydelta per second
  • <keydelta per keypress

Keyabsolute gives an absolute value for a given input, on press it gives it max value, on release it returns to neutral.

Neutral (CENTER) is 50.00 Minimum (LEFT or DOWN) is 0.00 Maximum (RIGHT or UP) is 100.00 Think of it as if it were a joystick axis

in the center is 50, full left is 100 full right is 0

The smallest amount of deflection the game will except in a keyabsolute is 6% anything less, the game doesn't consider it movement

This matters because some times you want a key, say for aiming a tank, with very slow fine movement, say for aiming at a far away target.

So setting A to 46 and D to 54 would let you move the turret really really slowly left and right

and doing the same for W and S would to the same for up and down.


So for the turret of a tank for example this would be the traverse (left and right) with both normal FAST moving keys, and slow precision keys and as an added bonus, mouse control added.

A and D are normal full speed movement

J and L are very slow precise movement

  • <control function="Turret traverse">
  • <mouseaxis>x</mouseaxis>
  • <keyabsolute value="44.00" onrelease="50.00">
  • <key>j</key>
  • </keyabsolute>
  • <keyabsolute value="00.00" onrelease="50.00">
  • <key>a</key>
  • </keyabsolute>
  • <keyabsolute value="56.00" onrelease="50.00">
  • <key>l</key>
  • </keyabsolute>
  • <keyabsolute value="100.00" onrelease="50.00">
  • <key>d</key>
  • </keyabsolute>
  • </control>

You can use this to use buttons or keyboards to control things that have variable movement speeds as if the buttons were little joysticks almost

Now there are two other special input types as i mentioned above

  • <keydelta per second
  • <keydelta per keypress

A keydelta has no return, when you release it, it continues to do what ever it is that you told it to do.

You either have to press the opposite key, or simply touch your main control key, which would over ride the keydelta

keydelta's are always over ridden by any other control moving the same thing.

There are some very useful things you can do with them.

Cruise control for a throttle, variable flap settings on an airplane, automatic pushing of an AA or Anti Tank gun or anything you would otherwise

have to keep holding the button down for

They work like so

  • <keydelta value="1.00" per="sec">
  • <key>A</key>
  • </keydelta>
  • <keydelta value="-1.00" per="sec">
  • <key>D</key>
  • </keydelta>

Per Sec means per second. What ever you are moving will increase in increments of 1% per second the button is held

and will remain at that position when the button is released

If you mapped a trucks throttle like this, holding the key down for 10 seconds would give you 10% throttle and it would remain on when released

If you mapped the movement of an AT or AA gun, then it would begin to walk forward at 10% speed and keep walking, until you stopped it by

using the other key to reduce speed to a stop, OR you moved your main movement control which would over ride the keydelta

EXAMPLE AT Gun cruise control W and S normal moving T and G cruisecontrol

  • <control function="AT Gun Move">
  • <keyabsolute value="0.00" onrelease="50.00">
  • <key>W</key>
  • </keyabsolute>
  • <keydelta value="1.00" per="sec">
  • <key>T</key>
  • </keydelta>
  • <keyabsolute value="100.00" onrelease="50.00" index="10">
  • <key>S</key>
  • </keyabsolute>
  • <keydelta value="1.00" per="sec">
  • <key>G</key>
  • </keydelta>
  • </control>

So what about the other keydelta ?

  • <keydelta per keypress

As you have already probably guessed, instead of holding it down, it moves to the designated percent per key press

Otherwise it functions the same way as the per second, you simply tap it to increment the designated percentage

For example

  • <keydelta value="10.00" per "keypress">

would move the throttle or control up 10% each time you pressed the key, rather than holding it.

This only works for things that have variable speeds or positions, you can not use it for infantry for example, they have 3 fixed speeds

walk, jog, sprint toggled by the appropriate keys.


Now one last super secret thing.

  • <keyabsolute

We covered how it works above and how release it returns to the on return value, which normally you'd use "0.00" for center

But you can make it simply not return.

How? do not give it any on release value.

Below is an example of incremental flaps on an airplane made by giving no release value

  • <control function="Flap control">
  • <keyabsolute value="0.00">
  • <key>numpad 0</key>
  • </keyabsolute>
  • <keyabsolute value="10.00" index="2">
  • <key>numpad 1</key>
  • </keyabsolute>
  • <keyabsolute value="20.00" index="4">
  • <key>numpad 2</key>
  • </keyabsolute>
  • <keyabsolute value="30.00" index="5">
  • <key>numpad 3</key>
  • </keyabsolute>
  • <keyabsolute value="40.00" index="7">
  • <key>numpad 4</key>
  • </keyabsolute>
  • <keyabsolute value="50.00" index="8">
  • <key>numpad 5</key>
  • </keyabsolute>
  • <keyabsolute value="60.00" index="9">
  • <key>numpad 6</key>
  • </keyabsolute>
  • <keyabsolute value="70.00" index="10">
  • <key>numpad 7</key>
  • </keyabsolute>
  • <keyabsolute value="80.00" index="11">
  • <key>numpad 8</key>
  • </keyabsolute>
  • <keyabsolute value="90.00" index="12">
  • <key>numpad 9</key>
  • </keyabsolute>
  • <keyabsolute value="100.00" index="13">
  • <key>numpad +</key>
  • </keyabsolute>
  • </control>

The numpad increments in 10% increments from 0% flaps to 100% flaps in the above example.

Now you may not need to have every increment in the example, you would only create the ones you need, perhaps 0 100 and 10 for combat flaps

but you can use the example to built other things, a quick programmable throttle etc.


This page was last modified on 15 July 2017, at 01:59 by Merlin51