Standalone [1.3] tModLoader - A Modding API

That missing and new mods feature will be very useful. That reminds me, on the Discord server announcements channel on 9/29/17, there was a feature to show memory usage of mods. Is that still coming?
That feature would sometimes crash, and it had limited accuracy. The new update should reduce memory usage anyway, so it should be fine for now.

Running Terraria on Linux, the new version of tModloader is crashing while trying to load my mods. I'm not seeing a way to download the previous version so I can downgrade and unfortunately I don't still seem to have a copy.

Edit: I did eventually get it to work but it took three tries. The first two it crashed while initializing mods but on a different mod both times.
A few mods will have issues loading, as we changed some code. hopefully they'll update soon.
 
I use two mod packs to easily switch between two different playthroughs. Last night, after installing the update, I changed up my main mod pack a little bit, but when I press the "save enabled as new mod pack" button, it actually saves 7 random mods into the mod pack that shouldn't be there because they aren't enabled. It says they are missing, even though they are in my mods folder.
I.E. this mod pack should have 29 mods in it, but every time I try to save it - it saves as a 36-mod pack, with 7 "missing" but that shouldn't be missing.

Anyway, I don't *think* it's too big a deal, since only the mods I want to use in the pack are enabled anyway - but I'm just pointing it out because there is definitely some weirdness.
 
Note to all modders for new release:

A small mistake is in the latest release for ModPrefix.Category
You are supposed to set the value in SetDefaults(), but the setter is marked internal. For now, you can set it with reflection like so:
Code:
        public override void SetDefaults()
        {
            this.GetType().GetProperty("Category")?.SetValue(this, PrefixCategory.Custom, null);
        }

In future releases, you will need to override the setter: (the property has a setter only)
Code:
        // change your category this way
        public override PrefixCategory Category { get { return PrefixCategory.Custom; } }

We are also aware of various issues with prefixes and work on fixing them.
 
If I install the new update, do I have to update all other mods to their latest versions as well, or can I keep them the way they are with the new TML update? I don't want to update the mod loader and then suddenly see multiple mods not being compatible :D
(I'm currently at version 0.10.1.1)
 
Disclaimer: I know no one other than me is responsible for this, but we can always ask for help, right?

A while ago I messed up a bit in my files in Terraria.

No worries just reinstalled Terraria and Tmodloader.
All the files were in the right place, and I could load Terraria, download and enable mods, but there is one problem,
all my mods, players, and worlds from Modded Terraria are not saved/showing up in the ModLoader file under Documents/MyGames/Terraria, the whole ModLoader file isn't there. So while I can play Terraria, many mods don't show up on the mod browser (e.g. Newest Version Calamity), meaning I would have to manually put them in my mod folder, but that can't be found.

Any ideas where my Terraria data could be saved (because it mysteriously is)?
Capture.PNG
Capture2.PNG

Anything wrong with these?
 
Disclaimer: I know no one other than me is responsible for this, but we can always ask for help, right?

A while ago I messed up a bit in my files in Terraria.

No worries just reinstalled Terraria and Tmodloader.
All the files were in the right place, and I could load Terraria, download and enable mods, but there is one problem,
all my mods, players, and worlds from Modded Terraria are not saved/showing up in the ModLoader file under Documents/MyGames/Terraria, the whole ModLoader file isn't there. So while I can play Terraria, many mods don't show up on the mod browser (e.g. Newest Version Calamity), meaning I would have to manually put them in my mod folder, but that can't be found.

Any ideas where my Terraria data could be saved (because it mysteriously is)?
View attachment 194201 View attachment 194202
Anything wrong with these?
Did you try the open mods folder button in the mods menu? Are you using any special shortcuts/command line parameters somehow?
 
Object reference not set to an instance of an object.
at ThrowingClass.ThrowingTweaks.SetDefaults(Item item) in c:\Users\Michael Srouji\Documents\My Games\Terraria\ModLoader\Mod Sources\ThrowingClass\ThrowingTweaks.cs:line 123
at Terraria.ModLoader.ItemLoader.SetDefaults(Item item, Boolean createModItem)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
Long time no see. After about a year I decided to pick up modding Terraria again, take that old WIP mod out of the unknown depths of my folders and continue going. And so, as I've noticed lots of changes have been done with tModLoader. I managed to fix multiple errors already, but now I'm quite confused.

item.name and item.toolTip give me an error every time I try to load them. Awkward, that some items seem to load properly with these (since before there were some errors with them, now there are none). I looked into the ExampleMod, and there doesn't seem to be any way of defining in-game item name. About the toolTip, I'm assuming that it now has to be defined in SetStaticDefaults()?
 
So this current version. It seems like every time I start terraria with the current version of tModLoader installed, terraria quits unexpectedly when mods are initalizing. It took about one second for the initialization to start and then that happens. I went into my library and removed all of the mods. Now I fear the same process would happen again, but I wasn't having any trouble with the previous version.
 
Hello. I installed tModLoader and when I open the game I get an error message stating:


An unexpected error has occurred.
at Microsoft.Xna.Framework.Graphics.Texture2D..ctor(GraphicsDevice graphicsDevice, Stream stream, Int32 width, Int32 height, XnaImageOperation operation)
at Terraria.ModLoader.Default.ModLoaderMod.ReadTexture(String file)
at Terraria.ModLoader.Default.ModLoaderMod.LoadTextures()
at Terraria.ModLoader.Default.ModLoaderMod.Load()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)


My vanilla Terraria works just fine. Idk what to do I've tried uninstalling the game and mod, and uninstalling and reinstalling Microsoft Xna FW.
 
Encountering a CTD bug in Arch Linux. Details follow:
OS: Arch Linux (up to date as of 17 Feb. 2018)
Steam version: Steam-Native (up to date as of 17 Feb. 2018)
tModLoader version 0.10.1.1
Graphics card: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/560] (rev cf)

Shell output during crash (excluding output before crash happens):
Code:
Game removed: AppID 105600 "", ProcID 26151
No cached sticky mapping in ActivateActionSet.

Edit: I thought I added this last night, but apparently not.

Action taken: Attempted to host a multiplayer game. Single player works fine, vanilla Terraria works fine, no mods enabled = same problem.
 
Last edited:
Long time no see. After about a year I decided to pick up modding Terraria again, take that old WIP mod out of the unknown depths of my folders and continue going. And so, as I've noticed lots of changes have been done with tModLoader. I managed to fix multiple errors already, but now I'm quite confused.

item.name and item.toolTip give me an error every time I try to load them. Awkward, that some items seem to load properly with these (since before there were some errors with them, now there are none). I looked into the ExampleMod, and there doesn't seem to be any way of defining in-game item name. About the toolTip, I'm assuming that it now has to be defined in SetStaticDefaults()?
Yes, there was several changes that happened when Terraria updated to 1.5.3. Have a look through the migration guide to see what you need to fix.
 
Back
Top Bottom