Extended presence flags

From Custom Mario Kart
Jump to navigation Jump to search


This page contains an introduction to the Extended presence flags (XPF) defined by Wiimm. It is an extension for the classic Presence flags by Nintendo. It allows to disable or enable objects by many more conditions than the old model does. Additonally it supports random scenarios, so that a track varies each race.

An open source C++ implementation of this system is available here: GitHub.

Issues of the Current Model

Mario Kart Wii uses the presence flags to conditionally enable or disable objects. Only the number of human players can be used as a condition. But there are many more parameters to differentiate between the activation of objects. A few wishes follow:

  • I want to activate an object in Balloon Battle, but not in Coin Runners.
  • I want to disable some objects on Time Trials.
  • I want to disable some objects online.
  • I want to disable some objects if many players are online.
  • I want to disable some objects in Item Rain.
  • I want to exchange an object by another one if seven or more players are online.
  • Because of different timings of objects online and offline, I have to offer two versions of the track to synchronize objects. Is there a way to include both variants of objects and activate one set offline and another set online?
  • LE-CODE supports modifications of ObjFlow.bin, but CTGP Revolution and standard code does not. So I have to provide two versions of the track. Is it possible to deliver only 1 track file for both cases?

So the LE-CODE team implemented the Extended presence flags to fulfill all of these wishes and more. Future extensions were also considered, if known. However, space was also left for extensions that have not yet been considered.

Some questions aim at things that may be implemented in the future:

  • I want to load the low-poly-model for some objects away from the main routes to reduce the slow motion effect.
  • Is it possible for one object to enable/trigger another object if touched during the race?

What is Supported?

Objects can be enabled or disabled by conditions. Enabling means, that the object is disabled if using standard Mario Kart Wii and can be enabled using extended presence flags. Disabling means that the object is enabled if using standard Mario Kart Wii and can be disabled using extended presence flags.

Properties that are queried via the conditions:

  • Game Mode: Balloon Battle, Coin Runners, VS. Race, Item Rain, Time Trials.
  • Number of local players: 1, 2, 3, or 4.
  • Number of total players if online : 1–6, 7–9, 10–12, 13–18, ≥19.
  • Engine Class: Battle, 50cc, 100cc, 150cc, 200cc, and Mirror Mode.
  • Random Scenarios (8 variants are supported)
  • Combinations of above (logical OR and AND)

Track Test: Display XPF by Wiimm displays the current choice by banners, pipes, plants and obake-blocks.

Technical Implementation

For the technical implementation, only records KMP:GOBJ are interpreted in a different way. Bits are used for this that previously had no meaning. A test with all tracks from Wiimm's archive has shown that none of the tracks use these bits.

For details, see »Extended presence flags: Technical Description«


Extended presence flags: