Difference between revisions of "LE-CODE/Item Cheat"

From Custom Mario Kart
Jump to navigation Jump to search
Line 35: Line 35:
 
<br clear=all>
 
<br clear=all>
  
== Use a joystick as buttons ==
+
== Using a Joystick as a Button ==
 
 
 
This is a technical section that explains how an analog stick is analyzed to simulate 8 buttons.  
 
This is a technical section that explains how an analog stick is analyzed to simulate 8 buttons.  
  
Line 44: Line 43:
 
|+ Joystick Analysis
 
|+ Joystick Analysis
 
! Controller !! Data<br>type
 
! Controller !! Data<br>type
! minimal<br>position<sup>1</sup> !! maximal<br>position<sup>1</sup>
+
! Minimal<br>position<sup>1</sup> !! Maximal<br>position<sup>1</sup>
! neutral<br>position<sup>2</sup> !! neutral<br>range<sup>2</sup>
+
! Neutral<br>position<sup>2</sup> !! Neutral<br>range<sup>2</sup>
 
|-
 
|-
| Wiimote+Nunchuk<sup>3</sup>
+
| Wii Remote and Nunchuk<sup>3</sup>
 
| align=center | int16_t
 
| align=center | int16_t
 
| align=center | −25856
 
| align=center | −25856

Revision as of 01:42, 14 March 2021

As of build 27, LE-CODE includes a built-in expanded version of Wiimm's Item Cheat. It now supports all four regions, and also supports the Classic Controller in addition to the previously compatible Wii Remote and Nunchuk and GameCube Controller. The base Wii Wheel is still not supported due to a lack of available buttons to use.


Overview

The main purpose of this feature is to test tracks and battle arenas both offline and online with all available items. The cheat code works with the first connected supported controller.

The player can select all available items using various button combinations (see controller specific descriptions below). The items are placed into the item container (top left on-screen). If "Off" is selected, the cheat code is disabled and normal item handling is enabled. All controller options place the items on three layers, with the most important items for testing being on the primary layer.

The Thunder Cloud is a useful item for testing jumps in tracks while small. In Wiimm's Intermezzo, he sets the duration of the effect to 30 seconds to allow for easier testing.

Enabling the Item Cheat

The Item Cheat can be enabled by a LPAR parameter. Wiimmfi detects the usage of this item code. So use it only for testing, but never in regular online races.

Wii Remote and Nunchuk

Buttons for Wii Remote and Nunchuk

The Wii Remote and Nunchuk uses directions on the D-Pad in addition to the , 1, and 2 buttons to select items. Use those in combination with the C and B buttons to access the second and third layers, respectively.

Classic Controller

Buttons for Classic Controller

The Classic Controller uses directions on the right joystick to select items. Select a direction in combination with the Left and Right directions on the D-Pad to access the second and third layers, respectively.

GameCube Controller

Buttons for GameCube Controller

The GameCube Controller uses directions on the C-stick to select items. Select a direction in combination with the Z and B buttons to access the second and third layers, respectively. The Classic Controller and GameCube Controller use identical joystick layouts, with the only difference being the buttons to activate the additional layers.

Using a Joystick as a Button

This is a technical section that explains how an analog stick is analyzed to simulate 8 buttons.

??? (will be completed soon)

Joystick Analysis
Controller Data
type
Minimal
position1
Maximal
position1
Neutral
position2
Neutral
range2
Wii Remote and Nunchuk3 int16_t −25856 +26880 0 −5273 .. +5273
Classic Controller int16_t −512 +480 0 −100 .. +100
GCN Controller uint8_t 16 238 128 106 .. 150
Notes
1) Minimum and maximum positions are only an approximation and vary from controller to controller.
2) The neutral position is a target value. In fact, you should assume at least ±10% of the total area as a neutral position. Column neutral range reflects this recommendation.
3) The stick of the Nunchuk is not used for this item cheat. The information is provided for completeness only.