Difference between revisions of "LPAR (File Format)"

From Custom Mario Kart
Jump to navigation Jump to search
Line 35: Line 35:
 
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.
 
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.
  
{| class="textbox grid alt sortable"
+
{| class="textbox grid alt sortable" style="margin-top:1em"
 
|+ General Parameters
 
|+ General Parameters
! Parameter<br>Name !! Value !! Related<br>Option !! description
+
! style="min-width:6em" | Parameter<br>Name
 +
! style="min-width:5em" | Value
 +
! style="min-width:5.5em" | Related<br>Option
 +
! Description
 
|-
 
|-
 
| <tt>ENGINE</tt> || <tt>int,int,int</tt> || <tt>--engine</tt>
 
| <tt>ENGINE</tt> || <tt>int,int,int</tt> || <tt>--engine</tt>
| 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.
+
| 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,to force 150cc. Use »0,0,to reset to Nintendos VR based choice.
 
|-
 
|-
| <tt>xxx</tt> || <tt>int</tt> || <tt>--xxx</tt>
+
| <tt>ENABLE-200CC</tt> || <tt>int</tt> || <tt>--200CC</tt>
| xxx
+
| Enable (1) or disable (0) 200cc support. LE-CODE hasn't implemented this feature yet!
 
|-
 
|-
| <tt>xxx</tt> || <tt>int</tt> || <tt>--xxx</tt>
+
| <tt>PERF-MONITOR</tt> || <tt>int</tt> || <tt>--perf-mon</tt>
| xxx
+
| Enable (1) or disable (2) the performance monitor. The special value 2 enables the it for Dolphin too, but it doesn't work correctly with Dolphin.
 
|-
 
|-
| <tt>xxx</tt> || <tt>int</tt> || <tt>--xxx</tt>
+
| <tt>CUSTOM-TT</tt> || <tt>int</tt> || <tt>--custom-tt</tt>
| xxx
+
| Enable (1) or disable (0) time trial for custom tracks.
 
|-
 
|-
| <tt>xxx</tt> || <tt>int</tt> || <tt>--xxx</tt>
+
| <tt>XPFLAGS</tt> || <tt>int</tt> || <tt>--xpflags</tt>
| xxx
+
| Enable (1) or disable (0) support for [[extended presence flags]]. Disable it only for tests!
 
|}
 
|}
  

Revision as of 13:10, 5 April 2020

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.
ENABLE-200CC int --200CC Enable (1) or disable (0) 200cc support. LE-CODE hasn't implemented this feature yet!
PERF-MONITOR int --perf-mon Enable (1) or disable (2) the performance monitor. The special value 2 enables the it for Dolphin too, but it doesn't work correctly with Dolphin.
CUSTOM-TT int --custom-tt Enable (1) or disable (0) time trial for custom tracks.
XPFLAGS int --xpflags Enable (1) or disable (0) support for extended presence flags. Disable it only for tests!

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.