[AA, EL] Control Systems and Options...

For help with SW3DG game related technical issues.
Locked
User avatar
Vice
Administrator
Administrator
Posts: 11617
Joined: Fri Apr 25, 2003 1:38 am
Contact:

[AA, EL] Control Systems and Options...

Post by Vice »

Introduction to SW3DG Space-sim Control Systems
SW3DG space-sims are generally designed to work best with HOTAS (Hands-On-Throttle-And-Stick) and/or keyboard+mouse controls. The control systems and options for the games are also designed to work with specific input signals best suited to their functionality. By many accounts, SW3DG space-sims are generally considered complex games utilizing many key and button controls along with various axis channel inputs for flight controls (and in some cases, other options). This guide provides some information on control input signals and various options for devices that can use them.

For issues with devices not being detected or functioning as desired, additional information is available further below.




Control Input Signals
There are three main control input signals the games look for and can apply controls to:

- Buttons and keys provide an on/off only input signal, so control options for them are limited to on or off functionality. Such control options are available in the 'Configure Key/Button Controls' menu in SW3DG space-sims. You can generally click on the control option you want to bind a button or key to, then press the button or key to bind the control to it.

- Axis controls provide a variable input signal, so control options for them are generally limited to functions that utilize a variable range of values beyond only 0 (off) and 1 (on). Typically, devices return values between 0 and 1000 for these signal ranges. Flight controls (throttle, roll, pitch, yaw, and thrusters) are best used with axis inputs since it allows the player to quickly specify a precise level of variable input.

- Degree controls, also known as 'HAT' or 'POV' inputs, provide a rotational input signal, usually in degree or low integer numerical format. SW3DG space-sims typically offer control options specific to this input format without the need for manual binding. For example, in Evochron and Arvoch, you can select strafe thruster controls, panning view controls, or fixed view controls for HAT input that aligns with the rotational values it returns.


Selecting the Device You Want to Use
SW3DG space-sims support multiple control devices simultaneously. This allows for options such as using separate dedicated rudder pedals with a joystick along with a separate throttle and an auxiliary keypad input. The games can generally support up to 8-10 separate control devices simultaneously. This means that the games don't just look for one preferred device nor are they limited to only using one at a time. They will accept input from any device on any compatible channel all at the same time.

To manage multiple device options, the games provide a device ID selection system at the top of the control configuration menus. To change the current device for control input and mapping, click on the left or right arrows at the top of the menu. You can also optionally click directly on the device listed for a drop-down menu of all available detected devices, then click on the device you want the game to listen for input response from. If you have more than one input device active on your system, you be able to swap between the different device ID's assigned to each of them (as listed in Windows). Once you select a device ID, you can test the device to verify the game is receiving input from it on that ID. Once verified, you can then map the controls as desired in the configuration menu. The games support up to the 8-10 axis channels displayed in the axis configuration menu and up to 32-128 buttons for each device (depending on input mode). Some devices may return an axis signal on more than one of the displayed indicators. This is normal and you can select any of the axis channels that respond to the control function you prefer. Once you've configured the device(s) you want, make sure to enable the 'Joystick/Gamepad' flight control type mode in the main Options menu or in the Axis Configuration menu (if you want to use one or more of the devices for flight control).


SW3DG's Global Control System (GCS)
All flight input control options use the same global control system. The input signals any device provides that the game can detect are converted/ported over to the main control system. This allows consistent control behavior, sensitivity setting options, and input range limits. The caps, centers, and ranges are applied the same for all of them, subject to the inherent variability of each device (ie one joystick can behave differently from another). This also provides matching custom setting options such as the mouse flight control modes having the same deadzone and sensitivity options as the joystick flight control mode.


Dedicated Flight Control Type Modes
SW3DG space-sims support dedicated control modes for each type of device input. The type can be selected in the main Options menu next to 'Flight Control Type'. There are dedicated type modes for keyboard, mouse, and joystick/controller. Joystick and controller devices are grouped together since they can share the same series of axis inputs and buttons together in the same mode. While you can map control input separately for keyboard, mouse, and joystick/controller devices, the flight control type mode will need to be set to the device type you want to use in order for the game to respond to its inputs. This way, you can control what devices the game respond to for flight control (save for the keyboard, which will still provide response since it uses static on/off key input that doesn't interfere with axis and button input from other devices). The control system is set up this way so you can switch to using the mouse or keyboard for flight control without having to remap anything or lose existing control configurations. You can also change the control type mode if you want to use a different input device for a particular environment. With the ability to switch the flight control type mode in-game, you can select whatever mode you prefer at any time while leaving all of your custom control mappings and configurations intact.


Mouse Flight Control
SW3DG space-sims also support variable control axis input options for mouse flight control. And there are two primary modes. One mode (Point) lets you use a visible on screen pointer to apply variable input based on how far away the pointer is from the center of the screen. This option is generally preferred by players using a traditional mouse. The other mode (Direction) lets you apply variable input by how fast you move the mouse in a particular direction, then it auto-centers the input once the movement stops. Different flight control type mode are available for mouse input to support reversing the Y axis for pitch and/or swapping yaw and roll control on the X axis. This option is generally preferred by players using laptop/notebook touchsticks as it lets them fly their ship as though they were using a joystick since they can regulate the level of input by the amount of pressure they apply to the touchstick.


Managing Devices
The new control system attempts to exclude devices that are not useful for game controls. So devices such as keyboard, mouse, and audio components are generally left out. A device must also report that it has at least 1 button and/or 1 axis input in order to be visible. If a device you want to use does not appear in the list of available devices in-game, you can optionally instruct the game to display all devices. However, this may clutter the list with undesired devices and limit what devices are available in more are added to the list than the game has index positions for. But if you want to enable detection of all devices, create a text file named 'deviceall.txt' inside the game's save data folder (default location is '\Documents\EvochronLegacySE' or also '\Users\[UserName]\Documents\EvochronLegacySE') and save the file (no value needs to be included). The game will then disable all device type and input type filters to display all devices reported by Windows. You can then also optionally exclude devices individually using the next option described below.

The new control input system may detect devices that were previously not picked up by the earlier control system. If a device is detected that you do not want to include is the list of available devices, you can exclude any you want to remove. To do this, create a text file inside the game's save data folder (default location is '\Documents\EvochronLegacySE' or also '\Users\[UserName]\Documents\EvochronLegacySE') named 'deviceexclusions.txt'. You can specify a device to exclude either by its device ID or by its exact name. If you're not sure what the ID is for a particular device (as the displayed list may be populated in a different way compared to all potential devices Windows may report), you can download and launch this small test utility program to retrieve the ID values for all detected devices:

https://www.starwraith.com/evochronlega ... vanced.zip

Simply extract the program from the ZIP above and run it. The program will display primary devices it detects and generate a global list of all devices. Once the program has been run once, it will create a text file in the root '\Documents' folder named 'JoystickTestOutput.txt'. That file will contain a list of all detected devices in sequential order. The first line of the file will display the total number of devices like this:

Total Detected Devices: 10

Then the list of devices and details about them will follow. The 'Device Index:' line will provide the ID number needed to exclude any devices from the list you may want to remove. Keep in mind that this value may change if you plug in new devices or unplug existing devices, potentially causing a different device to switch to a difference ID index. If that happens, you may wind up excluding devices you don't want to remove. So this method is only recommended if you don't plan to shift your device configuration around. Otherwise, it may be best if you use the second option to exclude devices based on their exact names.

To exclude a device based on its name, use the second line labelled 'Device Name:' to retrieve the name of the device(s) you want to remove. You can then add one or more to the 'deviceexclusions.txt' file as desired. The device name(s) must match exactly with what is displayed in the 'JoystickTestOutput.txt' file for an exclusion to work, including case sensitive letters and no space character preceding the name(s). If you have multiple devices using the same name and want to keep one, then you'll need to use the device ID method instead to avoid blocking multiples.

The 'JoystickTestOutput.txt' file that the utility program generates also provides a list of devices that are indexed as compatible controllers followed by a list of any errors.


Keyboard Input
Keyboard input works much like joystick/controller button input. You can bind individual keys or two key pair combinations for each control function. When mapping keys, the game will listen for touch and release events to reset each control input register. So you can touch and release a key to more quickly activate a control function repeatedly, depending on the type of control function. Control functions with specific minimum time delays or flight controls with no time delays can respond differently. If you map two keys to a control function, then the game will listen to the first key as the primary register. This means that if you hold the first/primary key, the game will treat it as an active register, resulting in the same kind of delay (up to around 0.5 second) for response from the second key that would occur if you held any single key down. So you will need to release both the first and second keys for the more rapid release and repeat option described earlier. If you would prefer to have the rapid release and repeat option while holding a preferred primary key (example: 'Control+E'), simply reverse the key mappings (so: 'E+Control') so that the previous secondary key becomes the primary key. That way, when you release the primary key, the game will ignore input from the secondary key and immediately reset the control input register. You can then tap the primary key again while holding the secondary key for more immediate touch-and-release response.

The key input system is numlock aware, so you can switch the numlock mode to select different keys on the numpad. Some two key combinations won't be available or may have unwanted results due to system behavior or changes to key register values. For example, the Alt keys can be used to map controls to, but combinations like Alt-Tab will toggle apps/programs in Windows, so it's not feasible to use for control input. Likewise, Shift+Numpad# number keys can alter key registers to not provide useable input. When such conditions may apply, alternate inputs may be needed, such as Alt-[letter] or Control-Numpad#.

____________________________________________________________________________

Joystick or Other Controller Not Working
This issue seems to surface once in a while and the solution is usually the same. So this section is provided as a guide on getting joysticks and gamepads working with the game if they are not initially detected. Details on a diagnosis utility program as well as steps to restore communication between control devices and the game are included.

First, Evochron Legacy SE and Arvoch Alliance SE both use traditional DirectInput and XInput API’s for control input, which are the default mechanisms the come with Windows for games to communicate with control devices. So the games submit to whatever device configuration Windows detects and enumerates. These mechanisms are the primary direct lines of communication between the games and any connected control devices. Both the 'Limited' and the 'Advanced' control inputs modes use these default Windows input systems.

The direct lines of communication between games and Windows can be blocked by the use of third party software. This includes interference from SteamInput as well as other programs designed to take over input controls by breaking the lines of communication between Windows and games, then substituting their own signals in place of what would otherwise be default input. Many Steam users have already run into this and are familiar with disabling SteamInput on a per game basis in order to restore default and full communication between Windows and their games. But some may forget and leave it enabled by default, impacting any new game they might acquire. Or they may not be aware of the interference that can be caused by SteamInput (or other possible third party control input software).

If SteamInput is active, it can interfere with Windows control input mechanisms, causing games that depend on default DirectInput and/or XInput to not be able to detect connected control devices nor retrieve input signals from them. Once disabled, then the game will be allowed to communicate directly with Windows normally. To disable SteamInput, right click on the game in your library, then click on ‘Controller’, then under ‘Override for Evochron Legacy SE’, select ‘Disable Steam Input’ from the drop down menu. Then launch and test the game for changes.

As mentioned above, a small utility is available that displays all detected devices, their signals, their Windows assigned indexes, and allows for applying different control inputs for testing. Again, it is available here: https://www.starwraith.com/evochronlega ... vanced.zip You can extract and run the program from anywhere. After you launch the program for the first time, it will create a log file in the root '\Documents' folder named 'JoystickTestOutput.txt'. This file contains a list of all of the detected devices as Windows reports them, including non-game control devices and also provides any errors that may occur when polling for such devices. You can use this log file to evaluate what devices can be detected as well as some of their reported input parameters. Since this program uses the same default Windows input mechanisms as the game, it can be a quick and easy way to gauge just what the game should be able to see and access when not blocked by any outside interference.


Additional Detection Options
If you are still having trouble getting a device to be detected by the game, it may have a specialized/non-standard identity type that Windows is not detected as a game control device. This may happen with some custom control input devices using a generic driver/identity system not matched with a game control device ID in Windows. The game can still access such devices by applying a text file. To direct the game to accept generic devices, create a text file named 'devicelimit.txt' inside the '\media' folder (within the game's install folder) and you can optionally include the word 'enable' in the first line. If the game detects the file, it will register any generic devices with reported button and/or axis inputs as well as regular game control devices. So it may require a bit more sorting and selecting when mapping control inputs.

If you want to further expand device detection to include any device that reports it has button or axis inputs, you can create a text file named 'deviceall.txt' in the same '\media' folder and any such device will be included. Even if they report they are a keyboard, mouse, or USB receiver device.

Once a non-standard/generic device can be accessed by the game, you can optionally restrict other devices from detection as may be desired to clear the list of unwanted entries. To do that, create a text file named 'deviceexclusions.txt' in the '\media' folder and include any device entries you want to exclude line by line with the prefix 'DeviceID=' and then the number of the device to exclude (the number displayed next to 'Device Index:' for the device using the diagnosis tool above). So for example, if you want to clear devices 4 and 8 from the overall list of devices, you would enter:

DeviceID=4
DeviceID=8

And the devices will be removed from the internal list of available control devices within the game. Using non-standard devices and/or drivers may produce unexpected results, so these options are merely available as a testing option accessible via text files. If you change the device configuration on your system, these files may need to be updated.
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
Locked