# How to Configure Your Soulmask Dedicated Server (/docs/soulmask/server-config)



import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Files, Folder, File } from 'fumadocs-ui/components/files';

Soulmask uses three layers of configuration: **startup parameters** (highest priority), **Engine.ini**, and **GameXishu.json** (gameplay tuning). Startup parameters override Engine.ini values.

Server File Structure [#server-file-structure]

<Files>
  <Folder name="WS" defaultOpen>
    <Folder name="Saved" defaultOpen>
      <Folder name="Config" defaultOpen>
        <Folder name="LinuxServer">
          <File name="Engine.ini" />
        </Folder>
      </Folder>

      <Folder name="GameplaySettings" defaultOpen>
        <File name="GameXishu.json" />
      </Folder>

      <Folder name="Worlds" defaultOpen>
        <Folder name="Dedicated">
          <Folder name="Level01_Main">
            <File name="world.db" />
          </Folder>
        </Folder>
      </Folder>

      <Folder name="Logs">
        <File name="WS.log" />
      </Folder>
    </Folder>
  </Folder>
</Files>

Startup Parameters [#startup-parameters]

These are set via **Startup** in the [XGamingServer Panel](https://panel.xgamingserver.com) sidebar.

{/* Screenshot needed: Startup tab with Soulmask variables */}

<Tabs items={['Server Identity', 'Network', 'Game Mode', 'Save & Backup', 'Mods']}>
  <Tab value="Server Identity">
    | Parameter                 | Description                            |
    | ------------------------- | -------------------------------------- |
    | `-SteamServerName="Name"` | Server name in the browser             |
    | `-MaxPlayers=50`          | Maximum players (default 20)           |
    | `-PSW="password"`         | Join password (omit for public)        |
    | `-adminpsw="adminpass"`   | Admin/GM password for in-game commands |
  </Tab>

  <Tab value="Network">
    | Parameter          | Default | Description                               |
    | ------------------ | ------- | ----------------------------------------- |
    | `-Port=8777`       | 8777    | Game port (UDP)                           |
    | `-QueryPort=27015` | 27015   | Steam query port (UDP)                    |
    | `-EchoPort=18888`  | 18888   | Telnet console port (TCP, localhost only) |
    | `-rconpsw="pass"`  | —       | RCON password (enables RCON)              |
    | `-rconport=19000`  | 19000   | RCON port (TCP)                           |
  </Tab>

  <Tab value="Game Mode">
    | Parameter              | Description                        |
    | ---------------------- | ---------------------------------- |
    | `-pve`                 | Enable PvE mode (no player damage) |
    | `-pvp`                 | Enable PvP mode                    |
    | `-GongHuiMaxMember=50` | Max tribe/guild member count       |
  </Tab>

  <Tab value="Save & Backup">
    | Parameter     | Default | Description                                         |
    | ------------- | ------- | --------------------------------------------------- |
    | `-saving=600` | 600     | In-memory save interval (seconds). Default = 10 min |
    | `-backup=900` | 900     | Disk backup interval (seconds). Default = 15 min    |
    | `-initbackup` | —       | Create a backup every time the server starts        |

    > The server **never auto-deletes old backups**. You'll need to clean them up manually via **Files** to avoid running out of disk space.
  </Tab>

  <Tab value="Mods">
    | Parameter            | Description                                        |
    | -------------------- | -------------------------------------------------- |
    | `-mod="ID1,ID2,ID3"` | Comma-separated Steam Workshop mod IDs (no spaces) |

    See [Mod Setup](/docs/soulmask/mod-setup) for details.
  </Tab>
</Tabs>

Ports [#ports]

| Port      | Protocol | Purpose                                    |
| --------- | -------- | ------------------------------------------ |
| **8777**  | UDP      | Game traffic                               |
| **27015** | UDP      | Steam query (server browser)               |
| **18888** | TCP      | Telnet console (localhost only by default) |
| **19000** | TCP      | RCON (optional, requires `-rconpsw`)       |

GameXishu.json (Gameplay Tuning) [#gamexishujson-gameplay-tuning]

This JSON file at `WS/Saved/GameplaySettings/GameXishu.json` controls all gameplay multipliers. **Stop the server before editing** — changes are overwritten while running.

> Setting names are in Chinese (Pinyin) by default. Here are the most important ones translated:

<Tabs items={['XP & Resources', 'Combat & Survival', 'NPCs & Animals', 'Building & Raids', 'Time & Performance']}>
  <Tab value="XP & Resources">
    | Setting                | Default | Description              |
    | ---------------------- | ------- | ------------------------ |
    | `ExpRatio`             | 1       | General XP multiplier    |
    | `MJExpRatio`           | 1       | Mask XP multiplier       |
    | `CaiJiExpRatio`        | 1       | Gathering XP             |
    | `ZhiZuoExpRatio`       | 1       | Crafting XP              |
    | `MaxLevel`             | 60      | Maximum character level  |
    | `CaiJiDiaoLuoRatio`    | 1       | Gathering drop rate      |
    | `CaiKuangDiaoLuoRatio` | 1       | Mining drop rate         |
    | `FaMuDiaoLuoRatio`     | 1       | Woodcutting drop rate    |
    | `BaoXiangDropRatio`    | 1       | Treasure chest drop rate |

    > Set `ExpRatio` to `2` or `3` for faster progression. Set gathering ratios higher for boosted resource collection.
  </Tab>

  <Tab value="Combat & Survival">
    | Setting                       | Default | Description                     |
    | ----------------------------- | ------- | ------------------------------- |
    | `DongWuDamageRatio`           | 1       | Animal damage dealt to players  |
    | `DongWuJianShangRatio`        | 1       | Animal damage reduction         |
    | `ShiWuXiaoHaoRatio`           | 1       | Food consumption rate           |
    | `ShuiXiaoHaoRatio`            | 1       | Water consumption rate          |
    | `RanLiaoXiaoHaoRatio`         | 1       | Fuel consumption rate           |
    | `NaiJiuXiShu`                 | 1       | Equipment durability multiplier |
    | `PVP_ShangHaiRatio_JinZhan`   | 0.4     | PvP melee damage ratio          |
    | `PVP_ShangHaiRatio_YuanCheng` | 0.4     | PvP ranged damage ratio         |
  </Tab>

  <Tab value="NPCs & Animals">
    | Setting                     | Default | Description                         |
    | --------------------------- | ------- | ----------------------------------- |
    | `GeRenMaxZhaoMuCount`       | 6       | Personal max NPC recruits (level 1) |
    | `GeRenMaxZhaoMuCount_Two`   | 10      | Personal max (level 2)              |
    | `GeRenMaxZhaoMuCount_Three` | 15      | Personal max (level 3)              |
    | `GongHuiMaxZhaoMuCount`     | 50      | Guild max NPC recruits              |
    | `GeRenMaxDongWuCount`       | 10      | Personal max tamed animals          |
    | `GongHuiMaxDongWuCount`     | 50      | Guild max tamed animals             |
    | `DongWuShengZhangRatio`     | 1       | Animal growth speed                 |
    | `FanZhiJianGeRatio`         | 1       | Breeding interval                   |
    | `ZuoWuShengZhangRatio`      | 1       | Crop growth speed                   |
  </Tab>

  <Tab value="Building & Raids">
    | Setting               | Default | Description                      |
    | --------------------- | ------- | -------------------------------- |
    | `JianZhuFuLanKaiGuan` | 1       | Building decay on (1) or off (0) |
    | `JianZhuFuLanMul`     | 1       | Building decay speed multiplier  |
    | `RuQinKaiGuan`        | 1       | NPC raids on (1) or off (0)      |
    | `RuQinQiangDuXiShu`   | 1       | Raid intensity multiplier        |
    | `RuQinGuiMoXiShu`     | 1       | Raid scale multiplier            |
    | `RuQinGuaiCountMin`   | 8       | Min monsters per raid            |
    | `RuQinGuaiCountMax`   | 128     | Max monsters per raid            |
    | `SuiJiRuQinKaiGuan`   | 1       | Random raids on (1) or off (0)   |

    > Set `RuQinKaiGuan` to `0` to disable raids entirely. Set `JianZhuFuLanKaiGuan` to `0` to prevent base decay.
  </Tab>

  <Tab value="Time & Performance">
    | Setting                   | Default | Description                                              |
    | ------------------------- | ------- | -------------------------------------------------------- |
    | `GameWorldTimePower`      | 24      | Time speed multiplier (24 = 1 real hour = 1 game day)    |
    | `GameWorldDayTimePortion` | \~0.7   | Daytime portion (0.7 = 70% day, 30% night)               |
    | `WuLiYouHuaKaiGuan`       | 1       | Physics optimization on/off                              |
    | `WuLiYouHuaDist`          | 6666    | Physics simulation distance (lower = better performance) |
    | `XiuMianDistance`         | 10000   | NPC sleep/hibernate distance from players                |
    | `HuanXingDistance`        | 9000    | NPC wake distance                                        |
    | `XiuMianOfflineDays`      | 7       | Days before offline players' NPCs hibernate              |
  </Tab>
</Tabs>

Proper Shutdown [#proper-shutdown]

> **Never force-close the server** — this causes data rollback. Always use one of these methods:

* **Panel**: Use the **Stop** button in **Console**
* **In-game**: `gm exit` (requires admin)
* **Telnet**: `quit 180` (saves then shuts down with 180-second countdown)

Related Guides [#related-guides]

* [Admin Setup & Commands](/docs/soulmask/admin-setup)
* [Connect to Your Server](/docs/soulmask/join-server)
* [Install Mods](/docs/soulmask/mod-setup)
* [Backup System](/docs/soulmask/backup-system)
