keepcalculator

06 Numbers and Powers

Disable Hostile Creatures on a Vintage Story Server

Card No. 06·16989 · Updated · Standard formula, shown below

This guide walks you through disabling hostile creatures (drifters, wolves, bears, and other aggressive mobs) on your own Vintage Story server. You’ll edit the server’s configuration files to set their spawn rates to zero, making the world safe for peaceful building, exploration, or roleplay. You’ll need access to the server’s file system, either through a hosting panel’s file manager or via FTP/SFTP.

What You’ll Need

  • Access to your Vintage Story server’s root directory (usually where the server executable or the VintagestoryServer file is located).
  • A text editor (Notepad++, VS Code, or even the basic Notepad) to edit configuration files.
  • The server should be stopped during the edit to avoid overwriting your changes.

Step-by-Step

  1. Stop the server. If you’re using a hosting panel, click the “Stop” button. If you run the server from a terminal, press Ctrl+C. This prevents the server from overwriting your edits when it saves on shutdown.
  2. Navigate to the world config folder. Inside your server’s root directory, go to WorldData/ and then into the folder named after your world (e.g., Default). You should see a file called serverconfig.json.
  3. Backup the config file. Copy serverconfig.json and paste it as serverconfig.json.bak in the same folder. This lets you easily restore the original settings if something goes wrong.
  4. Open the config file. Double-click serverconfig.json to open it in your text editor. If your editor asks which program to use, choose a text editor like Notepad or VS Code.
  5. Find the hostile mob settings. Press Ctrl+F (or Cmd+F on Mac) and search for "hostileSpawnCap". This is the setting that controls the maximum number of hostile creatures that can exist in the world at once.
  6. Set the spawn cap to zero. Change the number next to "hostileSpawnCap" from its default value (usually 40) to 0. The line should look like: "hostileSpawnCap": 0, (note the comma if it’s not the last item in the list).
  7. Also check for a “hostileSpawnRate” setting. Some versions of the config have a "hostileSpawnRate" value (often a percentage). If you see it, change it to 0 as well. This ensures no new hostiles spawn.
  8. Save the file. Press Ctrl+S (or Cmd+S on Mac) to save your changes. Close the text editor.
  9. Restart the server. Start the server again from your hosting panel or terminal. Wait for it to fully load the world.
  10. Test in-game. Join the server and walk around for a few minutes, including at night. You should see no drifters or other hostile mobs. If you see any existing ones, they may have been spawned before the change; they will despawn over time or when you get far enough away.

Common Mistakes

  • Editing the wrong file. The serverconfig.json is in the world-specific folder under WorldData. Editing the main serverconfig.json in the root folder (if it exists) may not affect the world.
  • Forgetting to stop the server. If the server is running, it may overwrite your changes when it saves on shutdown. Always stop it first.
  • Missing the comma. If you change the value but leave a trailing comma where there shouldn’t be one (or remove a comma that should be there), the JSON will be invalid, and the server may fail to start.
  • Only changing one setting. Some versions have both a spawn cap and a spawn rate. Changing only the cap might still allow spawns if the rate is set to a percentage of the cap (which would be 0, but it’s safer to set both).

Tips

  • Use the in-game command first. If you just want a temporary peaceful session, use the command /worldconfig hostileSpawnCap 0 in the chat (requires admin privileges). This changes the setting without editing files, but it resets on server restart.
  • Keep a backup. Always keep a copy of the original serverconfig.json. If you later want to re-enable hostiles, you can restore it or just set the values back.
  • Consider the difficulty setting. If you want to keep hostiles but make them less aggressive, you can adjust the "creatureStrength" or "creatureAggression" settings instead of disabling them entirely.
  • Test on a single-player world first. If you’re unsure about editing files, practice on a local single-player world by editing its serverconfig.json in the same way. This helps you understand the structure before touching your server.

Troubleshooting

Server won’t start after editing. This usually means the JSON is malformed. Open the file and look for missing commas, extra commas, or unquoted values. If you have the backup, restore it and try again.

Hostiles still appear. First, check that you edited the correct file for the world. Then verify the values are actually 0. If you changed them while the server was running, restart the server again. Also, note that any hostiles that were already spawned will remain until they despawn or are killed.

Can’t find the setting. If you don’t see hostileSpawnCap in the file, your server version might use a different name. Search for "spawn" to see all spawn-related options. In some older versions, it was called "mobSpawnCap" or "creatureSpawnCap". You can also add the line manually if it’s missing, but make sure to follow the JSON syntax.

Changes revert after restart. This happens if you edited the file while the server was running, and the server saved its own state on shutdown. Always stop the server, edit, then start it again.

Frequently Asked Questions

Will this also disable passive animals like rabbits and deer?

No. The hostileSpawnCap and hostileSpawnRate settings only affect hostile creatures (drifters, wolves, bears, etc.). Passive animals will still spawn normally.

Can I re-enable hostiles later?

Yes. Just change the values back to their original numbers (or restore your backup file) and restart the server.

Does this affect the Temporal Storm events?

No. Temporal Storms and their rifts are separate mechanics. They will still occur, but the creatures that come through them are considered hostile, so they should not spawn if the cap is zero. However, the storm itself may still cause screen effects.

Will this work on a multiplayer server?

Yes, the server config applies to all players. This is the standard way to make a peaceful server.

Is there a command to do this without editing files?

Yes, as an admin you can use /worldconfig hostileSpawnCap 0 in the chat. This is temporary and resets on restart, but it’s useful for quick changes.

What if I want to disable only specific creatures, like drifters?

Vintage Story doesn’t have per-creature spawn toggles in the base game. You would need a mod that adds such control. The config file only has global hostile/passive settings.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →