Skip to content

Basic tModLoader Usage FAQ

direwolf420 edited this page Jan 8, 2021 · 45 revisions
Clone this wiki locally

Note on Piracy

If you pirated Terraria, we can't help you. tModLoader won't work. Please don't bother us by asking how to get it to work.

System.Threading.SynchronizationLockException


Solution. Disable BitDefender or disable the Safe Files feature of Bit Defender. Some more info has been collected here.

System.IO.IOException: Cannot create a file when that file already exists.


Solution. Delete the logs folder. If it comes back, you can try renaming the ModLoader folder to ModLoaderOld or completely reinstalling Terraria.

Enabling mods freezes the game/Setting controls doesn't work properly.

This is most likely related to your antivirus blocking access to the ModLoader folder. See the below issue for the process (but do this with the folder instead of the exe)

Disk Write Error

If you try to install tModLoader through Steam and it gives you a message with "Disk Write Error" in it, it is usually caused by Avast. Disable it temporarily and install tModLoader.

System.UnauthorizedAccessException: Access to the path is denied.

This issue can be caused by your antivirus or windows security settings. If you're using Windows Security (formerly Windows Defender) and are getting this error, then you will need to add tModLoader.exe to your whitelist, for further instructions on how to do this continue reading below.

(If you follow the directions below and still can't solve the issue, a last resort is to tell tModLoader to save to the install directory instead. You can do this by creating a savehere.txt file in the install directory.)

Right-Click and open security dashboard.
Right-Click Windows Security in your system tray and select "View Security Dashboard"

Select "Virus & Threat protection"
Left-Click "Virus & threat Protection"


From there, Left-Click "Manage settings" under "Virus & threat protection settings"

Scroll down.
Scroll down until you find the "Controlled folder access" section, and then left-click "Manage Controlled folder access"


Left-Click "Allow an app through controlled folder access"



Left-Click "Add an allowed app", and select "Recently blocked apps"


Scroll through the list until you find "tModLoader.exe", and click the + and then close, after this you're done! (If you cannot find "tModLoader.exe" on your list, then continue with the below steps)

Extra Step 1
Back in the "Add allowed app" selection, left-click "Browse all apps"

Extra Step 2
Navigate to wherever you installed your tModLoader (refer to video linked below on how to find an installation directory through Steam if you don't know how to do this) and double-click or select and left-click then open "tModloader.exe" this will add the file to your whitelist. Done!

How to find a game install location on Steam
Use the process shown in the above linked video to find your tModLoader install location, the gif is showing how to do this for Terraria, but you will need to do the same process except with tModLoader on Steam (you must have it installed first).

Load Mod

"Failed to resolve assembly: 'Terraria, Version=1.3.5.1, Culture=neutral, PublicKeyToken=null'"

This seems to happen when users rename the tModLoader exe to something other than Terraria.exe. Rename it back to Terraria.exe and it should still work.

"A Mod is crashing when I try to open tModLoader"

Open up the tModLoader save directory and delete the offending .tmod file: %UserProfile%\Documents\My Games\Terraria\ModLoader\Mods (Windows)

Begin cannot be called again until End has been successfully called

(Also applies to "Cannot access a disposed object" errors)

This error is an error usually caused by an unhandled error in a mod. This makes it hard for users to know which mod is broken. Much of the time this error will only happen after reloading mods (improperly unloaded Texture2D references), but it can happen due to other errors (for example, dividing by zero.) As a user of mods, it can be hard to figure out which mod is causing the issue. To determine the broken mod, follow these steps: (If you are on a version prior to 0.11: In Settings->tModLoader Settings, make sure "Always log exceptions" is true. After that, reload mods. After that, enter the game and proceed to play until the error happens again. When this happens, open %UserProfile%\Documents\My Games\Terraria\ModLoader\Logs\Logs.txt and look at the file.) If you are on version 0.11+, open %UserProfile%\Documents\My Games\Terraria\ModLoader\Logs\client.log and look at the file. Scroll down to the very bottom and you should hopefully see this error as the last entry. Right above that is hopefully another error. Look for the name of any mod you are using in this 2nd to last error message. If you find one, that is likely the mod causing the error. If in doubt, ask in #support on the tModLoader discord. As a last resort, use the flowchart.

OutOfMemoryException

This error means that tModLoader does not have enough RAM to load all the mods that you are trying to load. Large mods that add lots of items are the main culprit. You may have to cut down on the number of large mods you are trying to load at the same time. You can also try loading Small or Medium worlds instead of Large. Another possibility is that you have other large programs running. If you can close them, do so. Press Ctrl+Shift+Escape to bring up the Task Manager. In the Task Manager's Processes tab, look for processes that take up a large amount of memory. Anything taking more than 100,000 K is a good candidate. Also make sure that you are on 64 bit Windows and that you actually have more than 4 GB of RAM.

Do note that there is also an alternative 64-bit version of TML that was made to solve this specific issue. Though any issue related to it must be reported to them and not the TML Team.

Technical Explanation: On Windows, Terraria is a 32 bit process, meaning it can only use up to 4GB of Ram. It also has a bit less than that due to the .Net framework overhead, limiting the amount of Ram it can use even further. Note that the so-called "4GB" patch is already applied, do not tell people to apply it, it does nothing. Also, if you are on 32 bit Windows, there isn't much you can do.

Viewing Mods that use a lot of Memory: If you are curious which mods are using your limited Ram, you can enable the "Show Mod Memory Estimates" option in Settings->tModLoader Settings. After enabling the setting, you will have to exit to the main menu and then close and reopen the game for the setting to take effect. Visit the Mods menu, make sure you enable and reload the mods you are curious about, and you should now see colorful graph at the top that shows how much memory each mod is using. Use this information to disable mods that take too much ram compared to how much you enjoy the content.

Players/Worlds

"HELP, all my players and worlds are gone!"

tModLoader saves are kept separate from vanilla Terraria saves. You can copy back and forth between save locations, but be aware that you will lose Modded Tile and Items if you use tModloader worlds/characters in vanilla. Solutions: Copy from %UserProfile%\Documents\My Games\Terraria to %UserProfile%\Documents\My Games\Terraria\ModLoader (Windows). For example, copy .wld files in \Terraria\Worlds to \Terraria\ModLoader\Worlds, and the same for the .plr files in Players folders. For players you'll also want to grab the folder with the same name as well, since those are the maps.

You may notice that your vanilla player or world isn't in that folder, or maybe only .bak files are in that folder. This means that you have put that player or world onto the cloud. There are 2 ways to get them into tModLoader. The first option is to open vanilla Terraria and simply click the "Move off cloud" button and then follow the above instructions. The second option is to copy the files from the local copy of cloud files steam keeps around and place them in their respective ModLoader folder (%UserProfile%\Documents\My Games\Terraria\ModLoader). These are located in: C:\Program Files (x86)\Steam\userdata\[some number here]\105600\remote

"Cloud storage limit reached, unable to move to cloud"

tModLoader shares the cloud storage space with Terraria (about 150 MB of it). Exceeding this limit on Terraria + tModLoader combined will make you unable to move players and worlds to the cloud until sufficient storage is available. Easiest way is to "un-cloud" your vanilla Terraria worlds, they take up the most space. You can check how much storage is used in Steam: Right click "tModLoader" -> "Properties" -> "Updates", at the bottom it says the amount of available storage. In the rare case where you used tModLoader cloud storage feature before steam release (0.11.7), you won't be able to get rid of these "orphaned" files the normal way. Try this method: Video, Terraria App ID is 105600.

Mod Browser

"Mod Browser Offline", "I can't download mods"

If you are on Mac or Linux, the Mod Browser doesn't work yet.
Otherwise, the Mod Browser is out of bandwidth. Visit Mod Homepages for alternate download. DO NOT post in the forums asking when the Mod Browser will be back, it's annoying and useless. Most Mods are found here: Terraria Community Forums Web-based Mod Browser for Mac/Linux users: Mod Browser

Flowchart

Sometimes a mod is causing issues, but you can't tell which mod is the problem. Use this flowchart to diagnose and determine the bad mod:

Old Issues

The following files were missing and could not be installed:.....


Solution: You didn't unzip the files prior to installation. Don't know how to unzip, or don't have software for it? -> Try 7-Zip. It's free and open source, like tModLoader.

System.DllNotFoundException: Unable to load DLL'CSteamworks'.....


Solution: You didn't run the installer, or you are trying to run tModLoader from somewhere other than the Steam Terraria Install directory. Or, you have the GOG version and you downloaded the wrong file. If you pirated Terraria, you can't use tModLoader.

System.EntryPointNotFoundException: Unable to find an entry point named 'Init' in DLL 'CSteamworks'.


Solution: You tried to launch tModLoader 0.10+ with Terraria 1.3.4.4 or earlier files. Please use Steam to Verify game integrity (so that your Terraria is updated to 1.3.5+) and then reinstall the latest tModLoader. Video of how to verify game integrity

System.EntryPointNotFoundException: Unable to find an entry point named 'InitSafe' in DLL 'CSteamworks'.


Solution: Same as above. (Don't try to install other things such as other stand alone mods.)

Host and Play: The system cannot find the file specified


Simply put, you didn't follow the install instructions. Check the install directory, usually "C:\Program Files (x86)\Steam\steamapps\common\Terraria" (NOT "C:\Documents\My Games\Terraria\ModLoader"!), and make sure that tModLoaderServer.exe has been copied into the folder. If not, take the file from the tModLoader zip file and place it there.