LPAR (File Format)

From Custom Mario Kart
Jump to navigation Jump to search

LPAR (LE-CODE Parameters) is a text file format defined by Wiimm. It is used to define parameters for LE-CODE.


Introduction

A LE-CODE binary file (e.g. lecode-PAL.bin) contains a binary section with magic »LPAR«. It defines how the LE-CODE executor works. Up to Wiimms SZS Tools v2.14a, LE-CODE parameters had to be set via options when patching. As of v2.15a there is also the possibility to define the parameters by a LPAR file. So a LPAR file is a text version of the binary LPAR section. Options are still accepted and have higher priority than a LPAR file.

Using a LPAR file is recommended, because some parameters can only be set by a LPAR file. A typical command looks like this:

wlect patch lecode-PAL.bin --le-define DEFINITION --lpar lpar.txt  ....

Here and in this whole article the filename lpar.txt is used for the LPAR file, but any other filenames like lecode-param.txt are possible too. Read »Use a LPAR file« for more details.

A LPAR file is a text files that always beginns with the magic »#LE-LPAR« as identification. It is divided into sections. At the moment 2 sections are supported, one for General Parameters and one for Chat Messages. So a LPAR file looks like this:

#LE-LPAR

[LECODE-PARAMETERS]

ENGINE          = 10,60,30
ENABLE-200CC    = 0
PERF-MONITOR    = 0
CUSTOM-TT       = 0
XPFLAGS         = 1


[CHAT-MESSAGE-MODES]
# ....

Section »Create a LPAR file« explains how to create and modify a LPAR file.

Sections

General Parameters [LECODE-PARAMETERS]

This section defines general LE-CODE parameters. The corresponding options have a higher priority. Remove or comment-out a parameter if its value should not be changed. All values will be limited to the allowed ranges.

General Parameters
Parameter
Name
Value Related
Option
description
ENGINE int,int,int --engine Define probabilities for engine classes. A list for '100cc,150cc,mirror' is expected. If 200cc is enabled, the values are for '150cc,200cc,mirror'. Any numbers are accepted. They are normalized to get a total of 100 percent. Use '0,1,0' to force 150cc . Use '0,0,0' to reset to Nintendos VR based choice.
xxx int --xxx xxx
xxx int --xxx xxx
xxx int --xxx xxx
xxx int --xxx xxx

Chat Messages [CHAT-MESSAGE-MODES]

Manage LPAR files

Create a LPAR file

Use a LPAR file

Under construction

See »LE-CODE: Distribution Tutorial: LE-CODE parameters« for details until this pages is completed.