Repository navigation
Monument swap
Swap Monuments (Замена Монументов)
The swap replaces vanilla monuments on the map with your own versions from .map files made in RustEdit. Position, rotation, roads and rails are kept from the original.
"Swap Monuments": {
"Enabled": true,
"Save both maps (with swap and without)": true
}| Key | Description |
|---|---|
Enabled (Включить) |
Enable the swap |
Save both maps (with swap and without) (Сохранить обе карты (с заменой и без)) |
true keeps the original as <name>.map and saves the swapped version as <name>.swapped.map. false overwrites the original with the swapped version |
The swap runs after generation, once the map is saved:
- The mod opens the saved map
maps/<name>.map. - For every file
maps/prefabs/<name>.mapit looks for monuments whose path contains<name>(case-insensitive). - It removes each match and places every prefab from your file in its spot: position and rotation come from the original, and the other prefabs are placed relative to the first object in your file.
- It saves the result (see
Save both maps).
The log and the report show what was replaced, for example Swap: harbor_1.prefab.map: replaced 1 x 'harbor_1.prefab'. A file that matches nothing on the map gives a warning.
What is not transferred:
- terrain, textures and topology from your
.map. Only prefabs are taken, the ground under the monument stays vanilla; - roads and rails: they stay connected to the original monument's layout;
- the preview in
mapimages/: it's rendered before the swap and shows the original monuments.
IO (wires) of your file is carried over and works with CustomGenerator.Server on the live server. Shops of vending machines aren't carried over yet.
Option A: based on the original (you add objects around a vanilla monument):
- Place the original monument without rotation (0, 0, 0). Point (0, 0, 0) is easiest, but the position doesn't matter: everything is calculated relative to it.
- Add your objects around it.
- The original monument must be the first object in the hierarchy.
Option B: fully custom (no original):
- Place a SpawnPoint at (0, 0, 0) without rotation and make it first in the hierarchy. It marks the center of the original monument yours will replace.
- Build your monument around that point.
- The center of a vanilla monument isn't always its visual center. For example, a gas station's center sits below the building because of the cave under it, so a custom gas station has to be raised or it ends up underground. See the examples in
Examples/prefabs/full_custom_monuments/.
During the swap the SpawnPoint is replaced by a zero-scale helper prefab and isn't visible on the map.
Ready-made templates are in CustomPrefabs/ (thanks to FlySelf), examples are in Examples/prefabs/.
<vanilla prefab name>.prefab.map
Examples: harbor_1.prefab.map, fishing_village_c.prefab.map, gas_station_1.prefab.map.
- The mod strips
.mapand looks forharbor_1.prefabin monument paths. -
Don't drop
.prefab. A file namedharbor_1.mapalso works, but it matches justharbor_1and may catch things you didn't mean. - You can find the vanilla prefab name in RustEdit or in the monument log (the
availablelist, see Group fields).
<mod folder>/maps/prefabs/harbor_1.prefab.map
The folder is created automatically on the first swap. You can have any number of files, and each one replaces every matching monument on the map.
Run a generation. [SWAP MN] lines appear in the server log. Check the result by opening .swapped.map (or .map) in RustEdit.
They work together. For example, make 3 harbors with PrefabCopies and replace every harbor_1 with your version: the swap replaces each copy.