BeauFForce Documentation Help

Keys Conf File

Overview

The confKeys.xml file is an XML configuration file used in the project to define key bindings for various actions in the game. Each key binding is represented by a key element with a name attribute representing the action and a value attribute representing the key assigned to the action.

Structure

The XML file is structured as follows:

<confKeys> <keys> <key name="action" value="key" /> <!-- More key elements can be added here --> </keys> </confKeys>

Key Elements

Each key element represents a key binding in the game. It has two attributes:

  • name: This attribute represents the action that the key is bound to. It is a string value.

  • value: This attribute represents the key that is assigned to the action. It is a string value representing a key on the keyboard.

Example

Here is an example of a confKeys.xml file:

<confKeys> <keys> <key name="jump" value="Space" /> <key name="shiftLeft" value="LeftShift" /> <key name="attack" value="H" /> </keys> </confKeys>

In this example, the Space key is bound to the "jump" action, the LeftShift key is bound to the "shiftLeft" action, and the H key is bound to the "attack" action.

Usage

The confKeys.xml file is read by the game at startup to configure the key bindings. The game uses the name attribute to identify the action and the value attribute to identify the key. If the confKeys.xml file is modified while the game is running, the changes will not take effect until the game is restarted.

Last modified: 31 mai 2024