Difference between revisions of "SuperTuxKart"

From Noisebridge
Jump to: navigation, search
 
Line 4: Line 4:
  
 
     <input version="1">
 
     <input version="1">
 
 
     <keyboard enabled="true">
 
     <keyboard enabled="true">
 
         <action name="steerLeft" event="1" id="37" character="53" />
 
         <action name="steerLeft" event="1" id="37" character="53" />
Line 23: Line 22:
 
         <action name="menuCancel" event="1" id="27" character="53" />
 
         <action name="menuCancel" event="1" id="27" character="53" />
 
     </keyboard>
 
     </keyboard>
 
 
     <gamepad name ="Wheel (DriveFX Racing Wheel)" deadzone="4096" desensitize="0" analog="1"
 
     <gamepad name ="Wheel (DriveFX Racing Wheel)" deadzone="4096" desensitize="0" analog="1"
 
         enabled="true">
 
         enabled="true">
Line 43: Line 41:
 
         <action name="menuCancel" event="3" id="1" />
 
         <action name="menuCancel" event="3" id="1" />
 
     </gamepad>
 
     </gamepad>
 
 
     <gamepad name ="FGT Rumble 3-in-1" deadzone="4096" desensitize="0" analog="1"
 
     <gamepad name ="FGT Rumble 3-in-1" deadzone="4096" desensitize="0" analog="1"
 
         enabled="true">
 
         enabled="true">
Line 63: Line 60:
 
         <action name="menuCancel" event="3" id="2" />
 
         <action name="menuCancel" event="3" id="2" />
 
     </gamepad>
 
     </gamepad>
 
 
     </input>
 
     </input>
  

Latest revision as of 06:12, 1 April 2019

This is the page for documenting anything related to the SuperTuxKart with Racing Wheels setup.

Below is the working controller config file.

   <input version="1">
   <keyboard enabled="true">
       <action name="steerLeft" event="1" id="37" character="53" />
       <action name="steerRight" event="1" id="39" character="53" />
       <action name="accel" event="1" id="38" character="53" />
       <action name="brake" event="1" id="40" character="53" />
       <action name="nitro" event="1" id="78" character="53" />
       <action name="drift" event="1" id="86" character="53" />
       <action name="rescue" event="1" id="8" character="53" />
       <action name="fire" event="1" id="32" character="53" />
       <action name="lookBack" event="1" id="66" character="53" />
       <action name="pauserace" event="1" id="27" character="53" />
       <action name="menuUp" event="1" id="38" character="53" />
       <action name="menuDown" event="1" id="40" character="53" />
       <action name="menuLeft" event="1" id="37" character="53" />
       <action name="menuRight" event="1" id="39" character="53" />
       <action name="menuSelect" event="1" id="13" character="53" />
       <action name="menuCancel" event="1" id="27" character="53" />
   </keyboard>
   <gamepad name ="Wheel (DriveFX Racing Wheel)" deadzone="4096" desensitize="0" analog="1"
        enabled="true">
       <action name="steerLeft" event="2" id="0" direction="0" range="0" />
       <action name="steerRight" event="2" id="0" direction="1" range="0" />
       <action name="accel" event="2" id="5" direction="1" range="0" />
       <action name="brake" event="2" id="2" direction="1" range="0" />
       <action name="nitro" event="3" id="4" />
       <action name="drift" event="3" id="5" />
       <action name="rescue" event="3" id="6" />
       <action name="fire" event="3" id="1" />
       <action name="lookBack" event="3" id="3" />
       <action name="pauserace" event="3" id="7" />
       <action name="menuUp" event="2" id="100" direction="1" range="0" />
       <action name="menuDown" event="2" id="100" direction="0" range="0" />
       <action name="menuLeft" event="2" id="101" direction="0" range="0" />
       <action name="menuRight" event="2" id="101" direction="1" range="0" />
       <action name="menuSelect" event="3" id="0" />
       <action name="menuCancel" event="3" id="1" />
   </gamepad>
   <gamepad name ="FGT Rumble 3-in-1" deadzone="4096" desensitize="0" analog="1"
        enabled="true">
       <action name="steerLeft" event="2" id="0" direction="0" range="0" />
       <action name="steerRight" event="2" id="0" direction="1" range="0" />
       <action name="accel" event="2" id="2" direction="0" range="0" />
       <action name="brake" event="2" id="1" direction="0" range="0" />
       <action name="nitro" event="3" id="4" />
       <action name="drift" event="3" id="5" />
       <action name="rescue" event="3" id="8" />
       <action name="fire" event="3" id="2" />
       <action name="lookBack" event="3" id="3" />
      <action name="pauserace" event="3" id="9" />
       <action name="menuUp" event="2" id="100" direction="1" range="0" />
       <action name="menuDown" event="2" id="100" direction="0" range="0" />
       <action name="menuLeft" event="2" id="101" direction="0" range="0" />
       <action name="menuRight" event="2" id="101" direction="1" range="0" />
       <action name="menuSelect" event="3" id="1" />
       <action name="menuCancel" event="3" id="2" />
   </gamepad>
   </input>


It is located at `C:\Users\Tux\AppData\Roaming\supertuxkart\0.10-beta\input`. This file has the proper settings for the two racing wheels to work correctly in the game. This was created manually by analyzing the output of `supertuxkart.exe --gamepad-visualization`. This is necessary for the Logitech wheel because it is not made for a computer but rather for an XBOX, thus it has weird axes making input calls constantly to the computer and makes it impossible to set the controller up from within TuxKart.

Here[1] is a picture of the data read from the visualizer for the Logitech controller, just for reference. The controller config above should be referenced for what Tuxkart actually expects as a controller config. The entries in the config look like the following XML:

   <action name="steerLeft" event="2" id="0" direction="0" range="0" />
   <action name="steerRight" event="2" id="0" direction="1" range="0" />
   <action name="accel" event="2" id="5" direction="1" range="0" />
   <action name="brake" event="2" id="2" direction="1" range="0" />
   <action name="nitro" event="3" id="5" />

The `event` field refers to the type of input. `2` is an axis input, `3` is a button input, and I think `1` is a keyboard key. The `id` field refers to the axis or button number from the visualizer, zero-indexed. The `direction` field is for axis input. `0` is negative, `1` is positive. Not sure about the `range` field, but it's usually `0`.