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
| Folder | Japanese | English |
|---|---|---|
| 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
- In
src/world/area, create a folder for the area, such assrc/world/area/cool_city. If theworldorareafolders don't exist, create them. - 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
- Open the Star Rod Map Editor.
- Select Create. To start from a copy of another map instead, select that map and then select Duplicate.
- 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 ascool_city. The dialog shows where Star Rod will save the map. - 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.