Team Cereustooling wiki

Work with the variations of a Nightreign POI tile

Checkedagainst the code on 2026-11-12 11:36

A Nightreign POI tile holds up to ten enemy setups, called variations, in one MSB. Each part has EntityData.Variation and each region Common_VariationID. The value -1 means shared: it loads with every variation. A seed picks one variation per tile. Without help Smithbox draws every variation on top of each other. The Variations panel lists them, shows one at a time, copies one into a new index and moves objects between them.

Read against the code. Not run in game.

Before you start

  • A POI map is loaded and selected in the Map List. The panel works on the map selected there.
  • View > Variations Panel is on (it is by default). The window title is Variations.

Opening a map replaces the open ones

The team changed how the Map List opens maps, so one POI is on screen at a time:

  • Right-click a map and choose Load Map: the maps this view has open are closed first. If any has unsaved changes a dialog asks: Yes saves then unloads, No discards, Cancel keeps everything as it was.
  • Load Alongside Open Maps in the same menu keeps the open maps.
  • Double-click loads a map the same way, and Ctrl + double-click keeps the open maps. Double-click only loads when the preference Enable Load on Double-click (Map Editor, Map List) is on. It is off by default in the code.
  • The toggle Loading a map replaces the open ones in the same right-click menu turns the behaviour off (setting MapEditor_Load_Replaces_Open_Maps, on by default).

Block maps loaded as context are not closed by this, see block-maps-and-far-objects.md.

See one variation at a time

  1. Open the map. The panel shows a table with one row per variation: Var (shared, v0 to v9), Name, Contents (counts by kind) and Actions.
  2. Click a row to focus that variation.
  3. Tick Show only the focused variation. The other variations' objects are hidden in the viewport. Shared objects stay visible. This changes editor visibility only, not the map.

Select in a row selects every object of that variation. The line next to the checkbox says which variations the current selection is in.

If the map has no variation values at all the panel says "This map has no variations: every object is shared."

Name a variation

  1. Focus the variation.
  2. Type in the name field and press Save name. An empty name clears it.

Names are stored in <project>/.smithbox/variation-names.json. They override the registry's name.

Names also come, read-only, from a registry TSV (columns: tile, variant, var, status, seeds, note). Open Names registry at the bottom of the panel to set its path (setting MapEditor_Variation_Registry_Path). When the setting is empty and S:\souls-script-kt\scripts\tools\castle-variants\config\poi-variants.tsv exists, that file is used.

Add a variation by copying one

  1. Focus the variation to copy.
  2. Leave New entity IDs ticked to give the copies their own entity IDs, unique in this map. Unticked, the copies keep the originals' IDs, so events that target the original also target them.
  3. Press Copy as new variation vN. N is the lowest free index from 0 to 9. The button reads "No free variation index (0-9)" when all ten are used.

Every object of the variation is copied with new names and instance IDs. References inside the copied set point at the copies. The original stays as it is.

Move objects between variations

  1. Select the objects in the viewport or map tree.
  2. Focus the target variation and press Move to vN under Selection, or press Make shared to set them to -1.

Delete a variation

  1. Focus it and press Delete....
  2. Confirm in the Delete variation? dialog. It is one undo step.

How to tell it worked

  • The table shows the new row or the changed counts.
  • With Show only the focused variation on, only that variation's objects and the shared ones are drawn.
  • Nothing reaches disk until you save the map.

What a new variation still needs

From the panel's own help text (How variations reach the game): a variation added here exists in the map, but it appears in game only once a seed routes to it (LotResultSmallBaseAndSpot.variationId), with SmallBaseMapVariationParam giving its icon and lottery weight, and its enemies need their event setup in the map's EMEVD event 0. Eclipse's castle-variants tool does both for its variants. This page does not cover that tool.

What goes wrong

  • "Open a map to see its variations." No loaded map is selected in the Map List. Click the map there.
  • Objects stay hidden after closing the panel. Closing the panel shows everything again. If something is still hidden, press Alt+H (see move-rotate-snap.md).
  • The registry shows "Not found: only names typed here are shown." The registry path does not exist on this PC.

Through the MCP bridge

The bridge has variations, focus_variation, copy_variation and open_map tools. smithbox_mcp.py does not wrap them as named tools at the time of writing; load_map and unload_map are wrapped. See mcp-bridge.md.

Source files this page documents (3)
  • smithbox:src/Smithbox.Program/Editors/Map Editor/Tools/Variations/VariationsTool.cs
  • smithbox:src/Smithbox.Program/Editors/Map Editor/GUI/MapListView.cs
  • smithbox:src/Smithbox.Program/Editors/Map Editor/MapUniverse.cs

Changed one of these? Update this page: smithbox/poi-variations.md (how).