# How to Transfer Buildings Between Soulmask Saves (/docs/soulmask/building-transfer)



import { Step, Steps } from 'fumadocs-ui/components/steps';

Soulmask has four built-in GM commands that capture the buildings around you to an `.ini` file and load them again — anywhere, on any save. Use this to clone a base, move a build to a new server, or relocate a structure on the same map.

> ⚠️ **Buildings only.** These commands save the structures themselves. Chest contents, NPC ownership of buildings, claim flag membership, and tribesmen are not part of the export — verify after import.

> **Admin required.** Authenticate first with `gm key <adminPsw>` (see [Adding Admins](/docs/soulmask/admin-setup)).

***

The Four Commands [#the-four-commands]

| Command                                                | Purpose                                                         |
| ------------------------------------------------------ | --------------------------------------------------------------- |
| `gm SetJianZhuToFileMode <radius>`                     | Set the capture radius around you (in centimeters).             |
| `gm SaveJianZhuToFile <filename>`                      | Save all buildings within the radius to a file on the server.   |
| `gm LoadJianZhuFromFile <useExactPosition> <filename>` | Load buildings from the file.                                   |
| `gm CuiHuiViewGongHuiJianZhuByRadius <radius>`         | Bulk-destroy buildings around your target — useful for cleanup. |

***

Save Buildings to a File [#save-buildings-to-a-file]

<Steps>
  <Step>
    Stand on the ground in the center of the area you want to capture. Standing on the ground gives the loader a reliable origin for "exact position" reloads.
  </Step>

  <Step>
    Set the capture radius (in cm — `10000` = 100 meters):

    ```
    gm SetJianZhuToFileMode 10000
    ```
  </Step>

  <Step>
    Save the buildings to a file:

    ```
    gm SaveJianZhuToFile MyBase1
    ```

    The file is written to `WS/Saved/MyBase1.ini` on the **server** running the command.
  </Step>
</Steps>

***

Load Buildings from a File [#load-buildings-from-a-file]

```
gm LoadJianZhuFromFile <useExactPosition> <filename>
```

| `<useExactPosition>` | Result                                                                                                                 |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `0`                  | Spawn at the player's current location (use to relocate a build).                                                      |
| `1`                  | Spawn at the **same world coordinates** the build was saved at (use to clone to a different server with the same map). |

Clone a base to a new location on the same server [#clone-a-base-to-a-new-location-on-the-same-server]

```
gm LoadJianZhuFromFile 0 MyBase1
```

Restore a base on a fresh server at its original spot [#restore-a-base-on-a-fresh-server-at-its-original-spot]

```
gm LoadJianZhuFromFile 1 MyBase1
```

> ⚠️ Don't load with `1` if the original buildings still exist at those coordinates — overlapping geometry causes pathfinding bugs and visual glitches.

***

Move a Build Between Servers [#move-a-build-between-servers]

<Steps>
  <Step>
    On the **source server**, run `SetJianZhuToFileMode` and `SaveJianZhuToFile` as above. The file is written to `WS/Saved/<filename>.ini`.
  </Step>

  <Step>
    **Stop both servers.** In **File Manager**, download the `.ini` from the source server's `WS/Saved/` folder.
  </Step>

  <Step>
    Upload the same file to the **destination server's** `WS/Saved/` folder.
  </Step>

  <Step>
    Start both servers. On the destination, log in, authenticate as admin, and run:

    ```
    gm LoadJianZhuFromFile 1 MyBase1
    ```

    (Use `0` if the destination map is different and you want to spawn at your current position.)
  </Step>
</Steps>

> The destination map should match the source map if you're loading at exact coordinates — coordinates from Cloud Mist Forest won't be valid in Shifting Sands.

***

Cleanup Before Loading [#cleanup-before-loading]

If you need to clear an area before loading a build (to prevent overlap), target a building or NPC in the area and run:

```
gm CuiHuiViewGongHuiJianZhuByRadius 5000
```

This destroys all buildings within 5000 cm (50 m) of your target. **There is no undo** — back up your `world.db` first.

***

Managing Saved Building Files [#managing-saved-building-files]

There is **no in-game command to delete saved building files**. To remove old `.ini` files:

<Steps>
  <Step>
    Stop the server.
  </Step>

  <Step>
    Open **File Manager** and navigate to `WS/Saved/`.
  </Step>

  <Step>
    Delete the `.ini` files you no longer need.
  </Step>

  <Step>
    Start the server.
  </Step>
</Steps>

***

What Doesn't Transfer [#what-doesnt-transfer]

The export captures the building structures only. After loading, you will need to manually re-do:

* Chest contents and storage inventories
* NPC tribesmen assignments (workstation owners, etc.)
* Tribe claim flag ownership of the build
* Decorative item placement that isn't part of a building piece

For player progression (character, awareness, tech unlocks), use the [CopyRoles tool](/docs/soulmask/copyroles-tool).

***

Troubleshooting [#troubleshooting]

**`SaveJianZhuToFile` produces an empty or tiny file**

* Capture radius is too small — increase `SetJianZhuToFileMode` and try again
* You're standing inside terrain or on a floor that's blocking the radius — move to open ground

**Loaded build clips into the terrain or other buildings**

* You used `1` (exact position) where another build already exists — use `0` to spawn at your location, or run `CuiHuiViewGongHuiJianZhuByRadius` to clear the area first

**Build loads but I can't open doors / interact with workstations**

* Ownership wasn't transferred — buildings load as un-owned. Re-claim with your tribe flag, or rebuild ownership-bound pieces individually.

**File doesn't appear after the save command**

* Check `WS/Saved/` on the server (not the client). Confirm the server console didn't print an error.

***

Related Guides [#related-guides]

* [Adding Admins & GM Commands](/docs/soulmask/admin-setup)
* [CopyRoles Tool](/docs/soulmask/copyroles-tool)
* [Cluster Setup](/docs/soulmask/cluster-setup)
* [Backup System](/docs/soulmask/backup-system)
