Difference between revisions of "LE-CODE/Distribution Tutorial"
Line 1: | Line 1: | ||
− | {{under-construction | + | {{under-construction}} |
[[File:lecode-circ-160x160.png|right]] | [[File:lecode-circ-160x160.png|right]] | ||
This is the '''[[LE-CODE]] [[Distribution]] [[Tutorial]]'''. It explains how to create a custom track distribution based on [[LE-CODE]]. As addition, [[LE-CODE/Distribution FAQ|Distribution FAQ]] explain details, that are not covered here. | This is the '''[[LE-CODE]] [[Distribution]] [[Tutorial]]'''. It explains how to create a custom track distribution based on [[LE-CODE]]. As addition, [[LE-CODE/Distribution FAQ|Distribution FAQ]] explain details, that are not covered here. | ||
Line 62: | Line 62: | ||
Currently [[LE-CODE]] supports 2 battle cups with 5 arenas each and 1024 racing cups with 4 tracks each. | Currently [[LE-CODE]] supports 2 battle cups with 5 arenas each and 1024 racing cups with 4 tracks each. | ||
− | For battle cups and arenas, the standard | + | For battle cups and arenas, the standard definition of slots and properties are predefined. The maintainer can exchange the [[SZS]] files and arena names, but not the property and music id. This will be changed in the future. |
For racing cups, a [[CT-CODE]] configuration file is used to define and assign tracks and slots. It optional supports and additional ''flag'' member. See [[#define|section below]] for details. | For racing cups, a [[CT-CODE]] configuration file is used to define and assign tracks and slots. It optional supports and additional ''flag'' member. See [[#define|section below]] for details. | ||
=== <span id=bmg>BMG</span> === | === <span id=bmg>BMG</span> === | ||
− | |||
??? | ??? | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== <span id=define>Define Slots and Cups</span> == | == <span id=define>Define Slots and Cups</span> == | ||
+ | ??? | ||
− | == Modified | + | == Modified files == |
+ | === Track selection menu === | ||
+ | ??? | ||
− | + | === Korean version === | |
− | + | ??? | |
− | |||
− | == | + | == Hardlinks == |
+ | ??? | ||
− | + | === Creating an ISO image with wit === | |
− | + | ??? | |
− | |||
− | |||
− | |||
− | |||
− | == | + | === Creating a Riivolution setup (XML files) === |
+ | ??? | ||
− | |||
− | |||
== Debugging == | == Debugging == | ||
− | |||
=== <span id=dump>Verify the lecode file</span> === | === <span id=dump>Verify the lecode file</span> === | ||
Revision as of 12:56, 19 June 2019
This is the LE-CODE Distribution Tutorial. It explains how to create a custom track distribution based on LE-CODE. As addition, Distribution FAQ explain details, that are not covered here.
Introduction
Slots and filenames
In LE-CODE, 4028 slots (slot range 68..4095 = 0x044..0xfff) are reserved for custom racing tracks. Additionally, slots for 32 original racing tracks and 10 custom battle arenas are reserved. Including special slots, a total of 4096 slots are available. See »LE-CODE Slot Usage« for details.
For each slot, 3 bytes are reserved:
- Property index
- Music index
- Flags (new marker, random group header, random group member)
This is a total space of 12 KiB for 4096 slots. In contrast, CT-CODE needs 256 bytes for each used slot. This are 64 KiB for 256 slots. The main reason for the less memory is, that LE-CODE uses generic file name instead of a string list with filenames. The filename of each track, this includes original tracks and special slots, is created by 3 lower case hex digits and the extension .szs:
std_file = sprintf("%03x.szs",slot); d_file = sprintf("%03x_d.szs",slot);
If a _d file should be laded but does not exists, the standard track file without _d is loaded instead. To minimize the space of a distribution, a _d file should only be added if it and the standard file differ.
Special random slots
Some slots have a predefined random functionality. To activated it, put the slot id to the track list of cup. The titles are defined by BMG messages 0x703e–0x7041 (0x7000+slot).
- 0x03e: All Tracks
- Select a racing track by random.
- 0x03f: Original Tracks
- Select one of the original tracks (slots 0–31) by random.
- 0x040: Custom Tracks
- Select one of the custom tracks (all used slots beginning from slot 68 = 0x044) by random.
- 0x041: New Tracks
- Select a track, that is marked by flag NEW, by random. If no track is marked, an internal fallback is used.
Common files
The track files are placed in directory ./files/Race/Course/*.szs. Some of the track files contain the sub-directory ./Common/ with private versions of different files. These file must be extracted to ./files/Race/Common/%N, where %N is the slot number. See »Distribution FAQ: Common Files« for details.
Track flags
Besides the standard properties property slot and music id, LE-CODE support a third property: flags. Each of the 3 properties is stored as a byte array of 4096 elements (3*4096 = 12288 byte total).
flags is a bit field with following features:
Cups
Currently LE-CODE supports 2 battle cups with 5 arenas each and 1024 racing cups with 4 tracks each.
For battle cups and arenas, the standard definition of slots and properties are predefined. The maintainer can exchange the SZS files and arena names, but not the property and music id. This will be changed in the future.
For racing cups, a CT-CODE configuration file is used to define and assign tracks and slots. It optional supports and additional flag member. See section below for details.
BMG
???
Define Slots and Cups
???
Modified files
???
Korean version
???
Hardlinks
???
Creating an ISO image with wit
???
Creating a Riivolution setup (XML files)
???
Debugging
Verify the lecode file
Command wlect dump LECODE_FILE dumps the settings of a lecode file as human readable text file. For terminal output, the dump is colored. To force colors, use cdump instead of dump.
Dump example (MKW-Fun 2019-06)
If adding option --long (short -l), a cup and slot reference is added:
Dump example if using option --long
If adding option --verbose (short -v, can be combined with --long), a slot usage map is added:
Dump example if using option --verbose
to do
- Slot list
- BMG