Map files
| Do | How |
|---|---|
| Start an empty map | File → New Map |
| Open a map | File → Open Map… (Cmd O) |
| Save | File → Save Map (Cmd S) |
| Save under a new name or format | File → Save Map As… (Cmd Shift S) |
| Save edited prefabs | File → Save Modified Prefab Sets |
| Migrate what Hammerite 1.x saved | File → Migrate 1.x Resources… |
| Leave the editor and return to the game | File → Close Editor |
The file dialogs browse the whole disk. A map that has never been saved asks for a name on Cmd S.
Opening or starting another map with unsaved changes asks whether to save them first.
Backups and autosave
- Each save keeps the file it replaces beside it as
level.hmap.bak. To go back one save, rename it tolevel.hmap. - A save writes a new file first and only then puts it in place, so a crash while saving leaves the old file whole.
- Every five minutes with unsaved changes, the map is written to
level.autosave.hmapbeside it. A map not saved yet autosaves to the game's user folder. Saving deletes the autosave. - Opening a map whose autosave is newer than the file offers to open the autosave instead. It opens as the map with its changes unsaved: save to keep them.
Formats
| Extension | What it is | Where it can live |
|---|---|---|
.hmap |
a Hammerite map: data only | anywhere |
.tres, .res |
a Godot resource | inside the game's project only |
Use .hmap for maps you share or download. It holds values only, so opening one cannot run code. A .tres or .res can, which is why the editor refuses one from outside the project.
To convert a map, open it and Save Map As… with the other extension.
Files from Hammerite 1.x
A .tres, .res or scene saved by Hammerite 1.x does not open in 2.0 until it is migrated. File → Migrate 1.x Resources… does it from the editor:
- It looks in the project (
res://) first. To look somewhere else, type ares://oruser://folder into Folder and pressEnter, or press Choose…. - It lists the files it would migrate, the ones it cannot with why, and how many need nothing. Nothing is written yet.
- Migrate rewrites them, keeping each original beside it as
name.tres.bakunless you untick that, and lists what it did. A file it cannot migrate is left as it was.
The dialog works from the keyboard: Tab moves between its controls, Enter presses the one in focus, Esc closes it. A game that binds a pad's buttons to Godot's ui_accept and ui_cancel drives it from the pad too.
While the game cannot start for its 1.x files, use the same dialog in the Godot editor: Project → Tools → Migrate Hammerite 1.x Resources.... The Godot editor rescans the project when it is done; after migrating from the game, it notices the changed files when you switch back to it.
What else is saved
- A worldrep cache beside the map, named after it:
level.worldrep.hcacheforlevel.hmap,level.worldrep.resfor a resource. It holds the carved world so the map opens without carving it again. Saving writes the cache of the variant in effect; other variants get a file with their number in the name. Deleting a cache is safe: the map is carved on load instead. - Every prefab set you changed.
- A record of what the map names that the game provides: textures, models, sounds.
When the game has changed
When you open a map, the editor checks what it names against what the game provides now: a texture gone, a model now provided by something else. Each change is listed in the Problems panel, under Changed in the game since saving, until you save the map.