Skip to content

Creating a Map

The game world is made up of maps grouped into areas. An area is a collection of related maps, like all the rooms in Boo's Mansion. Generally there are 1 or 2 areas per chapter.

Vanilla areas
FolderJapaneseEnglish
kmrクリむらGoomba Village
macまちToad Town
tikまちのちかToad Town Tunnels
kgrくじらのなかInside the Whale
kkjきのこ城Princess Peach's Castle
hos星ふる丘Shooting Star Summit
nokノコノコむらKoopa Village
trdとりでKoopa Bros. Fortress
iwa岩山Mt. Rugged
droカラカラタウンDry Dry Outpost
sbkカラカラ砂漠Dry Dry Desert
iskカラカラいせきDry Dry Ruins
mim迷いの森Forever Forest
obkテレサハウスBoo's Mansion
arnあれのGusty Gulch
dgbドガボンの城Tubba Blubba's Castle
omoヘイホーのおもちゃばこShy Guy's Toy Box
janジャングルJade Jungle
kzn火山Mt. Lavalava
floフラワーランドFlower Fields
samさむいさむい村Shiver City
praパラレルきゅうでんCrystal Palace
kpaクッパ城Bowser's Castle
osrきのこ城そとOutside Peach's Castle
endエンディングEnding
mgmミニゲームMinigames
gvゲームオーバーGame Over
tstテストマップTest Map

Vanilla uses three-letter area names and map names that correspond to them, e.g. kmr has the map kmr_20. You don't need to do this.

Every map has two parts, both in the map's folder:

  • map.xml: the map's models, collision, and zones, which you make in Star Rod.
  • Overlay: C code that controls what happens in the map.

Create the map folder

  1. In src/world/area, create a folder for the area, such as src/world/area/cool_city. If the world or area folders don't exist, create them.
  2. Inside the area folder, create a folder named after the map, such as src/world/area/cool_city/house_of_fun.

You can name the area folder whatever you want. To add a map to a vanilla area, use the vanilla area's three-letter name, such as kmr.

The map's name must be unique across all areas, so make it short and memorable.

The build finds maps by their folders, so there's no list to add the map to.

Write the overlay

In the map folder, create main.c with this template:

EntryList Entrances = {
    { 0.0, 0.0, 0.0, 0.0 },
};

EvtScript EVS_BindExitTriggers = {
    Return
    End
};

EvtScript EVS_Main = {
    Set(GB_WorldLocation, LOCATION_TOAD_TOWN)
    Call(SetSpriteShading, SHADING_NONE)
    EVT_SETUP_CAMERA_NO_LEAD(0, 0, 0)

    Set(LVar0, Ref(EVS_BindExitTriggers))
    Exec(EnterWalk)

    Return
    End
};

export MapSettings settings = {
    .main = &EVS_Main,
    .entryList = &Entrances,
    .entryCount = ENTRY_COUNT(Entrances),
    .bgName = "kmr_bg",
    .textureArchive = "kmr",
};

textureArchive and bgName pick the textures and background the map uses. This template uses Goomba Village's.

Make the map in Star Rod

  1. Open the Star Rod Map Editor.
  2. Select Create. To start from a copy of another map instead, select that map and then select Duplicate.
  3. For Name, enter the map folder's name, such as house_of_fun. Star Rod finds the folder and fills in its Area. If the folder doesn't exist yet, choose or type an area, such as cool_city. The dialog shows where Star Rod will save the map.
  4. Make the map, and then save.

Star Rod saves the map to map.xml in the map folder, next to main.c. The next build compiles it.

Refer to the map from the overlay

The build names each model, collider, and zone in the map, such as MODEL_o101, COLLIDER_deilie, and ZONE_1, so the overlay can refer to them. To use the names, include the map's headers:

#include "mapfs/house_of_fun_shape.h"
#include "mapfs/house_of_fun_hit.h"

Test the map

By this point, you should have created these files:

  • Directorysrc
    • Directoryworld
      • Directoryarea
        • Directorycool_city
          • Directoryhouse_of_fun
            • main.c
            • map.xml Saved by Star Rod

Build your mod, and then use the debug menu to select Load Map and warp to your new map.

Edit a vanilla map

Open the map in the Star Rod Map Editor, make your changes, and save. Star Rod saves your copy to the map's folder in src/world/area, such as src/world/area/kmr/kmr_02/map.xml, and the build uses it instead of the original. Battle stages save the same way under src/battle/common/stage, such as src/battle/common/stage/area_kmr/kmr_bt03/map.xml.