LE-CODE/Item Cheat

From Custom Mario Kart
< LE-CODE
Revision as of 21:45, 13 March 2021 by Wiimm (talk | contribs)
Jump to navigation Jump to search

As of build 27, LE-CODE has a built-in item cheat. Wiimm used his Item Cheat as base, so the the button layout is the same. The built-in item cheats supports all four game regions. The item selection can be controlled by Wiimote+Nunchuck, by Classic Controller or by GCN Controller. Wii Wheel is not supported due the lack of unused buttons.


General description

The main purpose of this cheat code is to test racing tracks and battle arenas offline and online with all available items. The cheat code works with the first Wiimote + Nunchuck, the first Classic Controller and the first connected GameCube Controller.

The player can select all available items (see controller specific descriptions below). The items are placed into the item container (top left on-screen). It must be activated in the usual way. If »Off« is selected, the cheat code is disabled and normal item handling is enabled.

The Thunder Cloud is the perfect item to become small for testing jumps. Therefore Intermezzo sets the duration to 30 seconds.

Enable 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.

Wiimote + Nunchuck

Buttons for Wiimote + Nunchuck

If the Wiimote is used together with a Nunchuck, there are enough free buttons. However, these must be programmed on three levels. Buttons C and B are used to switch from level 1 to levels 2 and 3. The most important items are placed at level 1. See the picture on the right for details.

Classic Controller

Buttons for Classic Controller

The Classic Controller (connected to a Wiimote) has not enough buttons for all 20 different items. But the right joystick is not used during racing. So it can be used to simulate 8 buttons. However, it must be programmed on three levels. Left and Right of the control pad are used to switch from level 1 to levels 2 and 3. The most important items are placed at level 1. See the picture on the right for details.

Classic Controller and GCN Controller uses an identical stick layout.

GCN Controller

Buttons for GameCube Controller

The GameCube Controller (short: GCN Controller) has not enough buttons for all 20 different items. But the right joystick (yellow C-Stick) is not used during racing. So it can be used to simulate 8 buttons. However, it must be programmed on three levels. Left and Right of the control pad are used to switch from level 1 to levels 2 and 3. The most important items are placed at level 1. See the picture on the right for details.

GCN Controller and Classic Controller uses an identical stick layout.

Use a joystick as buttons

This section explains, how analog sticks are analysed to simulate 8 buttons.

???

Joystick Analysis
Controller Data type minimal1 maximal1 neutral2 neutral range2
Wiimote+Nunchuck 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 values 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.