- LE-CODE & LEX
- LE-CODE: General description
- LE-CODE: FAQ for track creators
- LE-CODE: Distribution Tutorial
- LE-CODE: FAQ for distribution creators
- Slot Usage
- LEX: File format and definitions
- Extended presence flags
- Related Categories
- 1 Cannon Settings (KMP/CNPT)
- 2 Common Files
- 3 Extended presence flags
- 4 Finish line (Second KTPT)
- 5 Hide the position tracker
- 6 Item positions if playing online
- 7 Mushroom Car (penguin_m)
- 8 Woodbox: Respawn height
Cannon Settings (KMP/CNPT)
There are 3 hard coded cannon types. They have different characteristics. A track can select the type by KMP/CNPT. Changing the characteristics will affect all other tracks with cannons. So the track designer has to live with the predefined characteristics.
A LEX file is the solution. If such file exists and has a cannon section defined, LE-CODE will use these local characteristics instead of the global characteristics. It is also possible to define more than 3 different characteristics.
Example Track: Test: Cannon
Reference: Tracks with alternative cannon settings
Creating a LEX file
Example for a minimal LEX text file with original cannon values (can be used as template):
#LEX [CANN] #--------------------------------------------------- # Deceleration End # Idx Speed Height Factor Deceleration #--------------------------------------------------- 0 500.000 0.000 6000.000 -1.000 1 500.000 5000.000 6000.000 -1.000 2 120.000 2000.000 1000.000 45.000
All tracks use objects and settings loaded from Common.szs. A modification has impact to all tracks. So modifications are generally forbidden.
Place private versions of Common files into the sub-directory ./Common/ of the track's SZS.
Supported since LE-CODE build 13
Supported since LE-CODE build 15
Reference: Tracks with common files
Extended presence flags
- Because of different object timings offline and online, 2 track files with 2 different objects settings must be relased. Is it possible to put all into 1 SZS file?
- I want an object, that is only activated in Balloon Battle, but not in Coin Runners. Is it possible?
- I want that a tracks looks different on every start. Is it possible?
Example Track: Test: Display XPF
Reference: Tracks with extended presence flags
Finish line (Second KTPT)
Usually, the start position of a track is placed very near to the finish line (CKPT lap counter). But some tracks use special start positions (starting boxes) far away from the finish line and sometimes with different direction. In this case, the finish line of the minimap is drawn at the wrong place.
LE-CODE provides a solution for this issue. If a second KTPT at index #1 with player_id -1 is defined, it is used as alternative draw position for the finish line. The point at offset #0 is still used for start position.
If you set up a second KTPT, search the relevant lap counter (section CKPT) and place the KTPT at the check point line. The direction (Y-rotation) of the KTPT is important.
Wiimm edited more than 40 SZS files to insert a second KTPT. If you update such track and don't change the finish line, please copy the second KTPT (leave it unchanged).
Reference: Tracks with second KTPT
Solution using Wiimms SZS Tools
As of v2.03 of Wiimms SZS Tools, command »wkmpt KTPT« analyses the track and prints a recommendation for the second KTPT in 2 formats: as a complete KTPT record, and as option --ktpt2:
Recommendation based on nearest ENPT #32: Recommended KTPT record: 1 -82892.672 152.510 50314.219 0 33.52 0 -1 0 Recommended patch option: --ktpt2=-82893,50314
The option can be used to insert or replace the second KTPT:
wszst patch --ktpt2=-82893,50314 FILE.szs
Rotation and Y-position (height) are determined automatically. The position is adjusted.
As of v2.05a of Wiimms SZS Tools, both steps of above can be combined into a single command:
wszst patch --ktpt2=auto FILE.szs
Hide the position tracker
The position tracker spins in an area of the track and displays incorrect values. This could be due to unusual check points.
As of LE-CODE build 15, the position tracker can be hidden dependent on offline/online, the current lap index and the current check point of the player. Therefor you have to create a LEX file with section HIPT.
Example Track: Test: Hide Pos Tracker
Reference: Tracks with hidden position tracker
Item positions if playing online
If playing online, items are disintegrated immediately in some parts of the track. The reason is that the online protocol only supports start positions for items in the range of ±131071.
Mushroom Car (penguin_m)
You want to integrate a Mushroom Car for tracks like GCN Mushroom City.
Add 1 or more objects of type KMP/GOBJ and set setting #8 to value 1 (= Mushroom Car support enabled). Don't forget to set up a route and a start point. Usually the route of the other cars are used. Setting #3 can be used to define the item the mushroom car should drop (same as ).to
The track needs the following new and modified files:
Reference: Tracks with Mushroom Cars
Woodbox: Respawn height
Object DS Airship Fortress is an example for this.respawns after 5 seconds, drops from 5000 units above the origin and drops onto the first face they touch. This is problematic, if an upper floor exists less than 5000 units above. In this case, the woodbox will respawn in the wrong floor.
Use setting #8. Set it to a value >0 to define an alternative drop height.
Reference: Tracks with alternative woodbox height