Enemy routes in battle arenas
- File formats
- KMP File Format & Sections
- AREA type
- ENPT Settings
- ITPT Settings
- Item Settings - Item Boxes
- Item Settings - Objects
- KMP Editing
- KMP Editing/Cameras
- Start Position
- Check Point
- Respawn Point
- Presence flags
- Enemy routes in battle arenas
- Testing a Track
- Visual Review with »wkmpt DRAW«
This article is about enemy routes in battle arenas. Nintendo used other methods to create the enemy route system than for racing tracks. This article analyses Nintendo's work and gives a tutorial for custom battle arenas.
Enemy routes are divided into 2 logical groups for battle arenas:
- Dispatch points
- Dispatch points are special routes with exact 1 route point. The NEXT links point to different routes, which have at least one end in the neighborhood of the dispatch point. Dispatch points have never PREV links and always 2 or more NEXT links.
- Standard routes
- All other routes that are not Dispatch points are standard routes. Standard routes have usually at least 2 points and are used bidirectionally by the enemies. Standard routes with 1 point can be detected by an existing PREV link. Both settings of standard routes are always 0.
The section order of routes and dispatch points is irrelevant as usual.
Each standard route has 2 ends: The first point of the route related to the PREV links, and the last point of the route related to the NEXT links. PREV and NEXT links are listed with 6 entries. This means that each end of a route can be connected to 0–6 other routes or dispatch points.
For dispatch points, the first and last points are the same. Usually, only the NEXT links are used. The impact of the PREV link is unknown.
How Nintendo implemented enemy routes of battle arenas
Nintendo created standard routes, which follow some main directions (e.g. counterclockwise). This keeps the logic clean. Each standard route consists of 2 to 5 points. Each end of the standard route is connected by a single PREV and a single NEXT link to a dispatch point in the neighborhood. Each dispatch point is linked (NEXT links only) to standard routes of the neighborhood. Here, it doesn't matter which end of the standard route is closer to the dispatch point; the engine selects the correct end automatically.
For example, see the image on the right:
- The red points are the dispatch points, existing of exactly 1 point.
- The blue arrows are the standard routes with 2 or more (usually up to 5) points.
- The yellow lines are the bidirectional connections between the dispatch point and standard route. Bidirectional means that the NEXT links of the dispatch point directs to a standard route, and one end of the standard route directs to the dispatch point. If only a one-way connection is needed, the other one is dropped.
The enemies will follow the yellow and blue routes in both directions. At each dispatch point, they choose a new route, and maybe the one where they come from.
The second image shows the complete enemy route system of Block Plaza. It was drawn by wkmpt DRAW v1.60a with special support for dispatch points.
The third image shows the complete enemy route system of Funky Stadium with focus on dispatch points. See Settings of Dispatch Points for details.
SNES Battle Course 4 (A21) don't use dispatch points. The following observations are based only on the other 9 arenas:
- All dispatch points have 0 PREV links and 2 or more NEXT links. (1 NEXT link makes no sense.)
- All standard routes have at least 1 PREV and 1 NEXT link.
- Both settings of all standard routes are always 0.
- Chain Chomp Wheel (A14) uses standard routes, that are directly linked to other standard routes, in addition to dispatch points.
- Delfino Pier (A12) has 2 standard routes with 9 points each.
- Dispatch points of Block Plaza (A11) has 2 standard routes and Dispatch points of GBA Battle Course 3 (A22) 8 standard routes with exact 1 point. All 10 routes have exact one PREV and one NEXT link. Dispatch points have never PREV links.
- For halfpipes, routes with 3 points are used and the middle points lays on the halfpipe KCL. See Funky Stadium (A13) for examples.
- GBA Battle Course 3 (A22) needs 8 outgoing connections at the center, but max 6 links are possible. So Nintendo placed 2 dispatch points with a distance of 113 units in the middle. The points are not connected, but share some destinations.
- The routes of DS Twilight House (A25) are very symmetric, but the settings of the dispatch points are not. This is the same for all other symmetric arenas.
- Dispatch points have a width (scale) between 12 and 100. Only DS Twilight House (A25) uses 6 or 7.
- Route points have a width (scale) between 2 and 103.
- Nintendo used the values 0, 5, 10, 15, 20, 30 for ENPT Settings #1. All values are used by dispatch points and standard routes. Looks like a weight or scale. This is different in comparison to racing tracks.
- Nintendo used the values 0, 2 and 20 for ENPT Settings #2 of dispatch points and values 0, 1, 2 and 10 for standard routes.
- Nintendo used the values 0x00 and 0x80 for ENPT Settings #3. The value for dispatch points is always 0.
The KMP sections ENPH, ITPH and CKPH share the same data structure of 16 bytes for each record. The bytes of offsets 0x0e and 0x0f are usually 0 (padding). The only exception is section ENPH for battle arenas, and only for dispatch points if no PREV link is defined:
- The value of offset 0x0e is between 0 and 7.
- The value of offset 0x0f is either 0x00, 0x40, 0x80 or 0xc0.
The meaning of both bytes is unknown. Page Settings of Dispatch Points focuses on the settings used by Nintendo.
The following table is a reference about the combinations of both bytes and in which areas they appear:
|count||byte 0x0e||byte 0x0f||found in arena|
|25||0||0x00|| 3*A11, 3*A12, 6*A13, 8*A22, 4*A23, 1*A25
Some of these points (2*A11 + 8*A22) are standard routes with 1 point. All these routes have exact one PREV and one NEXT link.
|34||0||0x40||10*A11, 3*A12, 3*A13, 2*A14, 1*A15, 4*A22, 1*A24, 10*A25|
|14||0||0x80||2*A12, 1*A13, 4*A22, 1*A24, 6*A25|
|25||0||0xc0||7*A11, 6*A13, 2*A14, 2*A15, 4*A22, 1*A24, 3*A25|
|9||1||0x00||3*A11, 2*A12, 3*A13, 1*A24|
|20||1||0x40||7*A11, 7*A12, 1*A14, 3*A22, 2*A24|
|10||1||0x80||3*A11, 2*A12, 1*A22, 4*A25|
|14||1||0xc0||1*A11, 1*A12, 3*A13, 5*A22, 4*A25|
|3||2||0x00||1*A11, 1*A12, 1*A13|
|15||2||0x40||7*A12, 2*A13, 1*A15, 1*A22, 4*A25|
|8||2||0x80||1*A12, 1*A13, 1*A15, 3*A22, 2*A25|
|12||2||0xc0||2*A11, 1*A13, 3*A14, 2*A22, 2*A23, 2*A25|
|3||3||0x00||1*A11, 1*A12, 1*A13|
|6||3||0x40||1*A13, 1*A22, 4*A25|
|3||4||0x40||1*A11, 1*A22, 1*A23|
The tutorial is very simple:
- Insert small (standard) routes at every place, where enemies should drive.
- Both ends of all routes should point to central places, where the enemies should change the direction.
- Place dispatch points with exact one route point at these central places.
- Define settings for the dispatch points (experimental, because impact is unknown).
- Link the ends (PREV and NEXT) of the standard routes to the nearest dispatch point.
- Link NEXT links of dispatch points to the standard routes, that points to it (step before).
- Leave the PREV links of dispatch points empty and avoid automatic calculation of PREV links.
Steps 1 to 4 must always be done manually by the user. Steps 5 to 7 can be done by a tool. Tutorial »Creating enemy routes of battle arenas with Wiimm's tools« explains the automatic connection using Wiimms SZS Tools.
Introduction – Textures – Scale – Modeling – BRRES: CTools – BRRES: BrawlBox
Minimap – Solidity – KCL: Wiimms Tools – KMP Editing – Object Editing
Cameras – Cannons – Post-effects – Videos