Skip to content Nodecraft
Support / Terraria / Changing and Switching Worlds

Changing and Switching Worlds

Terraria Worlds

On a Terraria world running on a dedicated server, many of the functions that can be set in the main menu of a single player game are inaccessible.

Instead, these are set by editing configuration files that the server will check before running.

<br>

By changing the setting in the configuration files, you can control the following:

  • Determine what size world the server will create: small, medium, or large.

  • Determine the difficulty level: normal or expert mode.

  • Give a newly created world a specific name (beside the default "world")

  • Have the server create a fresh unused world

  • Have the server "switch" worlds and load a different world next time it starts, and by repeating this allow you to switch back and forth between already generated worlds.

Before Using this Guide:

It's highly recommended that before using this guide, that you start your server and let the server finish starting up. When the server is run for the first time, it will automatically generate many of the files and folders you will need to edit. During this process, the game will automatically generate a default world, which will take several minutes. This default world can be deleted later if you wish to create a world with custom settings.

If the server has never been run, many of files you will need to change will not be present, and this guide will be difficult to follow, and your file manager view will not match many of the screenshots used as examples

Where the Config is Located:

The config file that controls most of the settings in the game is located in the main directory of the Terraria game, viewed by selecting "File Manager" tab on the left side of the control panel.

The file is called serverconfig.txt and is highlighted in the following picture:

Where to find the server config file in your file manager

The Worlds Folder:

Also, in the picture below, the worlds folder is highlighted.

Location of the worlds folder in file manager.

The worlds folder is the default location that the game stores all the "save" files for worlds. These files contain the world map, buildings, containers, and items you've created. Player information (your stats and personal inventory) are stored separately from the world information in a different location. You can delete a world without effecting any of your characters, or the character's inventory.

Each separate world will have two files with the same name, one ending in .wldextension, and a second that ends with .wld.bak (which is a backup). The file that ends in .bak is created each time the server stops and is shutdown.

Editing the Config File:

From the file manager tab in the control panel, select the serverconfig.txt file, and then click the Edit button. It's highly recommended that you stop the server, and that it not be running when you make any changes to the config files.

Terraria_changeworlds_editconfig_warrows

This will open a basic text editor, and display the contents of the serverconfig.txt file, which should look like the picture below:

Terraria_changeworlds_serverconfig

On Terraria servers at Nodecraft.com, we have an automated UI built into our server control panel that configures all the world creation settings for our users, and even allows them to create multiple worlds and switch between them easily. Because of this automated system, the config files for Terraria will be dramatically different then the screenshots presented here. The comment lines have been removed, and the settings are directly changed by the UI on the control panel.

Because of this, the specific line numbers referenced in the following sections will only apply to the stock configuration files for Terraria.

The config file has numbered lines down the left side, which makes it more convenient to find specific settings when repeatedly editing the file.

The settings in the config file come in 2 line pairs.

The first line is a comment which describes what the setting does, and in many cases, gives you the actual settings allowed. The second line is the actual setting the game will follow when the server starts next time.

In the config file, any line that begins with a pound sign { # } is a comment, and the game ignores any of the text past the # sign. Placing a # in front of line will cause the game to skip that line, and is referred to as "commenting out" the line.

Some of the settings are optional (like password), and both lines are "commented out". If you want to enable these settings, it is necessary to remove the # from in front of the 2nd line.

Custom Settings for World Generation:

The following settings only take effect when a new world is created. If you change these settings, and then reload an already generated world, they will have no effect.

It is possible to change an already generated Terraria world, using features of TShock for Terraria, but Tshock is incompatible with TmodLoader if you are already playing modded Terraria. It's much simpler to generate a whole new world. If you've already spent considerable time building and playing on a world, don't delete it! Save it! See the section below on "Switching Between Multiple Worlds".

World Size:

Terraria_changingworlds_worldsize

edit line 20 of the config file, which is normally autocreate=1. As it shows in the picture above, change the number after the = sign to set what size world it creates.

  • 1= small world

  • 2 = medium world

  • 3 = large world

Increasing the world size will require more RAM to run the server smoothly. The small world runs fine on 1 GB of RAM, but a medium world will require 2 GB of RAM, while a large world will need 3 GB to run correctly. Generating medium and large size worlds on 1 GB servers will most likely result in severe performance issues that will affect game play.

Difficulty:

Terraria_changingworlds_difficulty

Edit line 23 of the config file, which is normally #difficulty=0

  • 0 = normal mode

  • 1 = Expert Mode

In expert mode, the game is significantly harder: you will take more damage from enemy attacks, special monsters spawn, special items can drop from monsters, and bosses will drop special loot bags with unique items in them. And if we haven't mentioned before, the game is much harder. Did we mention the game is much harder on Expert Mode? Seriously, we're not kidding, it's much harder.

In order for this line to actually take effect, it's necessary to remove the # from in front of "difficulty" so the line is no longer "commented out". It should look like difficulty=1 when finished editing, to enable Expert Mode.

World Name:

Terraria_changingworlds_worldname

Edit line 26, of the config file, which is normally #worldname=Terraria

Normally, the first world created is world.wld. If you change the file name on line 5 of the config, regardless of what file name you use there it will create a new world and call it world2.wld. Change the file name again, and the server creates World3.wld, and so on, and so on. Doesn't matter what filename you use on line 5, it just creates world or world followed by a number.

Changing this setting will cause the game to use a specific filename instead of the generic world, world2, world3, etc when generating a new world.

This line is normally "commented out", and for the game to actually use this setting, it will be necessary to remove the # from in front of the line, so it looks like worldname=Terraria. The word "Terraria" can of course be changed to whatever name you want to use for your new world. Remember that filenames cannot have spaces, or special characters in them. If you want "spaces", use characters like underscore ( _ ) instead.

Deleting a Terraria World:

Terraria_changingworlds_deletingworld_warrows

To get rid of a Terraria world, click on the file manager in the control panel, then click on the "worlds" folder.

Inside the folder, find the world you want to delete. There will be two files with the same name (the default is "world"), one ending in .wld, and the other in .wld.bak. Select the files, and click the "delete" button on file manager. That's it, the world is gone.

And we mean gone. If you delete a world this way, it's permanently gone. Unless you have backups of the server, there will be no way to restore the worlds.

Characters and the character's personal inventory are saved completely separately from worlds, and will not be affected by deleting a world. This only includes the items in the character's hotbar, and inventory. Anything left in any kind of container is part of the world map, and will be deleted along with the world the container is on

Alternative method: Instead of deleting a world, it's possible to simply rename the world files.

The game will only look for specific file names, and if they don't exactly match, will skip them. So, you can select a file and then click the "rename" button on the file manager window, and edit the name of the file. One common method is to add .old onto the very end of the file name.

Terraria_changingworlds_renaming1_warrows

Terraria_changingworlds_rename2_warrows

Repeat this process with the other file (world.wld.bak), and the server will cease to "see" those files anymore since their filenames don't match entries in the config file anymore.

This method is often a safe then deleting files, and you can undo the changes by simply renaming the file again and removed the changes. If the file names exactly match the settings in serverconfig.txt (see next section below), the server will "see" them again, and will load them.

Creating a New Terraria World:

The world that Terraria loads on startup is controlled by lines 4 and 5 in serverconfig.txt

Terraria_changingworld_loadworld

The default name for the world is "world", and the server will look for the file world.wld in the worlds folder, and load that file if that file already exists.

If the server cannot find this specific filename on line 5 of serverconfig.txtat startup in the "worlds" folder, the server will instead create a whole new world.

The server will use whatever auto-create settings are already entered in the config file. Regardless of what filename you add on line 5, the new world will be called "world" followed by a number. The second world you create is world2.wld, the third world created is world3.wld, and so on. If you want to have the new world created be named something else, change the auto-create world name settings on line 26 in the config file (see above).

Of course, you can always rename the world after it's created, but changing line 26 does it automatically for you.

So by deleting, moving, or renaming world files in the "worlds" folder, you can make the server generate entirely new worlds. If it cannot find the file name at the end of line 5 in the config file, it will instead make a new world.

Creating Multiple Terraria Worlds:

By using information from the section above, it's possible to have the server create multiple worlds, each with different settings if you wish (world size, difficulty, etc).

If you edit line 5, and change the filename to something different, it will cause the server to generate an entirely new world. The first world is titled world.wld, the second is world2.wld, and so on. If you change the auto-create worldname on line 26 of the config file, the game will instead rename it to your choosing.

When you run the server and stop it for the first time, the "worlds" folder will look like this example:

Terraria_changingworlds_worlds1

If you make the underlined changes to the serverconfig.txt file:

Terraria_changeworlds_create2ndworld

Then start and stop the server, your "worlds" folder will look like this example:

Terraria_changingworlds_worlds2

The files that end in .bak are only created when you stop the server, so if the server is still running, you will only see NewWorldTwo.wld

If you make the underlined changes below to the serverconfig.txt file, it will create a third. This time, the size of the world is being set to "large", and the difficulty is being set to "expert".

Terraria_changingworlds_world3

When you start the server, it will now create a large size, expert mode world called NewWorldThree.wld

Terraria_changingworlds_world3listing

Switching Between Multiple Worlds:

In the example above, there are now three worlds created in the "worlds" folder:

  • World.wld - The default one created when the game was first run

  • NewWorldTwo.wld - A size small, normal mode world

  • NewWolrdThree.wld - A size large, expert mode world

By editing the config file, like the example below, the server will load the 2nd world, NewWorldTwo.wld the next time the server starts

Terraria_changingworld_switchingworlds

If you notice, line 26 still says NewWorldThree, and the size is still set to 3, and the difficulty set to Expert. None of these settings will matter, since the server is directed to load the file NewWorldTwo.wld, which it does find in the "worlds" folder. Those settings are only used for new world creation, and since that file exists, it will load NewWorldTwo.wld instead of making a new world.

If you stop the server, and edit the config, you can have it load world.wld next, or NewWorldThree.wld. By changing line 5 of the config file, you can switch between worlds, as long as the filename already exists in the "worlds" folder.

Terraria Icon
Create a Terraria Server today!
Start Free Trial

Chat blocked!

Nodecraft is an ad-free website! Disable adblock if you have any questions.