Presence flag
- File formats
- KMP File Format & Sections
- AREA type
- Cameras
- ENPT Settings
- ITPT Settings
- Item Settings - Item Boxes
- Item Settings - Objects
- Lists
- Tutorials
- KMP Editing
- KMP Editing/Cameras
- Start Position
- Check Point
- Respawn Point
- Cannon
- Presence flags
- Enemy routes in battle arenas
- Testing a Track
- Visual Review with »wkmpt DRAW«
- Tools
Overview
Presence flags are 16-bit parameters of the GOBJ section in KMP files and define when objects load for a certain amount of players.
Wrong First Analysis
The first analysis of these flags were derived from /Race/Course/koopa_course.szs/course.0:
<ObjDefine> ... format sepa1_SW user_data 1 Bool 1 format sepa2_SW user_data 1 Bool 1 format sepa4_SW user_data 1 Bool 1 format sepaW1_SW user_data 1 Bool 1 format sepaW2_SW user_data 1 Bool 1 format sepaW4_SW user_data 1 Bool 1 </ObjDefine>
As the usual presence flag has a value of 0x3f, the first analysis was wrong:
Bit number | Hex value | Enables during/with |
---|---|---|
0 | 0x01 | Offline single player Time Trials |
1 | 0x02 | Offline two players |
2 | 0x04 | Offline three or four players |
3 | 0x08 | Online single player |
4 | 0x10 | Online two players |
5 | 0x20 | Online three or four players |
Correct Second Analysis
In 2016, Wiimm tested all 16 possible bits of the flags and discovered only the three least significant bits are used and others get ignored:
Bit number | Hex value | Enables during/with |
---|---|---|
0 | 0x01 | Offline or online single player Time Trials |
1 | 0x02 | Offline or online two players |
2 | 0x04 | Offline three or four players |
3 | 0x08 | — |
4 | 0x10 | — |
5 | 0x20 | — |
It is important to note that objects should be disabled for two or more players if they are only decorative. When this is not the case, online players using split-screen will get an advantage because objects that affect gameplay have been disabled. To avoid this, simply set bit 0 and 1 to equal values.
Functions of Values
The following table shows the effect certain values have. The second column (Same as) reduces the value to the three least significant bits:
Value | Same as | Function | Usage |
---|---|---|---|
0x00 | 0 | Object is always disabled. | Can be used to disable objects temporarily. |
0x09 | 1 | Object is only enabled for online or offline single player. Do not use this value for objects with gameplay impact. | Can be used to reduce the Slow Motion Bug when using Multiplayer split-screen. This value is only used for decorative objects, like WLscreenGC and dkmonitor. |
0x39 | |||
0x3f | 7 | Object is always enabled. | The standard value. |
Alternative Multiplayer Files
Each track file with the name *.szs has an alternative file with the name *_d.szs, which is loaded for two, three and four players, but only offline. Theoretically, it can be a totally different track. The idea is to allow fewer and simpler animations to reduce the Slow Motion Bug, but it does not help for online racing.
Extended Presence Flags
As of LE-CODE build 15 (2020-02-14), full implementation of extended presence flags has been completed.