Standalone [1.3] tModLoader - A Modding API

On my tmodloader server, no mobs spawn on the surface. I know its not one of the mods, because it happens when all of them are disabled too. It does not happen on single player. Events don't even work. Please help!
I am still having this issue and have not gotten help. Does anybody know what to do?
 
Is it now possible to make modded servers on linux headless?
Should be. I think you'll need to take the tmodloaderserver.exe and replace the Terraria.exe with it, then launch the standalone as normal.
 
Quick question; I've been getting random crashes lately in the newest version of tModLoader.

I know that Thorium is not currently updated for the newest version of tModLoader, but I've been playing a character in an earlier version of tModLoader that ran Thorium just fine, before moving onto the latest version that can't yet run Thorium, resulting in missing items.

Are the crashes being caused by the fact that the character I'm using has had contact with now-unusable items that were only usable in an earlier tModLoader version, and should I make a fresh character that will only come across items in the mods that are loaded and working (ergo a character who was first made in a 0.8.3.4/1.3.3.2 version)?

EDIT: I should also mention that I've also been getting frame drops on my old-world chara, as well; upon making a brand new one and using that, the frames are just fine.
 
Last edited:
Realizes latest update breaks Thorium. Starts singing...

 
Mods and tools aren't official Re-Logic products, they are fan projects. As you point out, this 'pre-release' coordination is unlikely to happen, since there are a large number of people who say they have a mod and would want to be included, and that number would likely increase just so people could gain early access.

The issue is, giving sourcecode to be easily available could cause other issues to coordinate a release.
Re-Logic cant just add mod support because of how easy it is to make malicious content without any form of control.

basically the way i see it, maybe in the future it might be possible for the developers of tmodloader to get access, but then it's a fairness thing. Where do you guys draw the line?

TL: DR BE PATIENT <3
 
Serious question here, and I don't know how this would come off. I'm not a coder, I'm just inquisitive. Is it possible, in the current scope of tModLoader, to replace the following server features that tShock has with a mod.

1. Server Stored Characters.
2. Last Known Location Teleportation after leaving a server or a single player game for that matter.
3. Death Chests (For Medium Core) or the ability to limit what drops in Medium Core.

I've already seen that HERO's Mod does a lot of things tShock did well, but I'm just curious if more is possible. I have an idea of how an API works, are there hooks in place to make these things possible, or would there need to be a collaboration at this point (which is unlikely)?

Edit: I just realized that only one of those is ACTUALLY a server only feature.
 
Serious question here, and I don't know how this would come off. I'm not a coder, I'm just inquisitive. Is it possible, in the current scope of tModLoader, to replace the following server features that tShock has with a mod.

1. Server Stored Characters.
2. Last Known Location Teleportation after leaving a server or a single player game for that matter.
3. Death Chests (For Medium Core) or the ability to limit what drops in Medium Core.

I've already seen that HERO's Mod does a lot of things tShock did well, but I'm just curious if more is possible. I have an idea of how an API works, are there hooks in place to make these things possible, or would there need to be a collaboration at this point (which is unlikely)?

Edit: I just realized that only one of those is ACTUALLY a server only feature.
Should all be totally possible.
 
@jopojelly

Now we can only hope someone will do it, at least the Server Stored Characters, that system is a beautiful thing. I'm surprised we haven't seen a death-chest or some kind of "Make mediumcore bearable" mod yet, I really want to add some challenge to Terraria without having to pull my hair completely out every time I die. Anyways thanks for the assistance I will forward that positive information/attitude toward the person that might actually make it happen... maybe.
 
I am still having this issue and have not gotten help. Does anybody know what to do?
Is it possible to run from one side of the map to the other on a server? I know it may sound like a silly question, but it may help with solving your problem.
 
I was just wondering, does the same mods still work after the game and tModLoader are updated? Or does every mod become unusable after every update?
 
@samufinland

It depends, in a perfect world Re-Degit never updates anything and only ADDS new content, however this world is not perfect. Anytime a hook that a mod uses is changed in the vanilla game, you'll have to wait till tModLoader updates that hook and then wait for the mod to work with the new update. Sometimes Mods will pass through untouched, as we saw with a lot of mods this time, however when something like fishing is changed (from what I'm understanding the problem this time around) you'll have a few mods that have to fix all their fishing content (i.e. Thorium).

Sorry that was a roller-coaster of a bad explanation, but I'm pretty sure I explained it right.
 
I have a question? When mods start adding post moon lord content and you have multiple mods that will do that, how would tmodloader handle post moon lord game modes? because i feel like if a few add biomes to the world after moon lord wouldnt that cause issues like over crowding the world with biomes? or will there possibly be a config setting to turn off or select the mod that gets to have the post moon lord game mode?
 
@jermeister6

From what I could understand from your post, you're worried about overcrowding of biomes so limit it. As a player you should limit mods that do things like that to one or two, if you are a dev you should consider looking into Alternate Dimensions (I believe this is already possible but I can't say how, I think there is a post about it). The future of modding is starting to get real interesting though with all these options, and tModLoader just keeps getting better.

Side Note: There are also some mods and stuff that allow for Super Large worlds, again you'd have to look into that yourself but it is possible to have even larger worlds with more area to infect with all those biomes.
 
Browse Mods on the main menu locks up my computer now. Was fine yesterday, no idea what changed. Reinstalled both the game and tmod but no go.
 
When I click on the mod browser, the game freezes. It worked yesterday, but not today. It doesn't even give me an error message.
 
When I click on the mod browser, the game freezes. It worked yesterday, but not today. It doesn't even give me an error message.
Woo I'm not the only one. Got confused, thought I was reading my post lol
 
Also atleast some modded consumables that give loot(like the Mini Meterites from imkSushi's mod and the Jewel Casket and Black Jewel Casket from Legend of Terraria 3) don't get consumed when used. I know for sure that the Mini Meteorite got consumed before 1.3.3.

The music boxes don't work properly. They eighter turn into another music box item that goes back into my inventory or it turn into a banner(that also goes into my inventory).
 
Last edited:
I'm not sue if this is the right place to ask (I'm using the TmodLoader opensource dev tool to modofy the game,so...), but is there a simple solution to this or do I have to rewrite the entire static void Smashaltar if I want to:

Make the oretierx's both values if possible, so smashing an altar generates both types of hardmode ore.

This is the original code:
Code:
public static void SmashAltar(int i, int j)
        {
            if (Main.netMode == 1)
            {
                return;
            }
            if (!Main.hardMode)
            {
                return;
            }
            if (WorldGen.noTileActions)
            {
                return;
            }
            if (WorldGen.gen)
            {
                return;
            }
            int num = WorldGen.altarCount % 3;
            int num2 = WorldGen.altarCount / 3 + 1;
            float num3 = (float)(Main.maxTilesX / 4200);
            int num4 = 1 - num;
            num3 = num3 * 310f - (float)(85 * num);
            num3 *= 0.85f;
            num3 /= (float)num2;
            if (num == 0)
            {
                if (WorldGen.oreTier1 == -1)
                {
                    WorldGen.oreTier1 = 107;
                    if (WorldGen.genRand.Next(2) == 0)
                    {
                        WorldGen.oreTier1 = 221;
                    }
                }
                int num5 = 12;
                if (WorldGen.oreTier1 == 221)
                {
                    num5 += 9;
                    num3 *= 0.9f;
                }
                if (Main.netMode == 0)
                {
                    Main.NewText(Lang.misc[num5], 50, 255, 130, false);
                }
                else if (Main.netMode == 2)
                {
                    NetMessage.SendData(25, -1, -1, Lang.misc[num5], 255, 50f, 255f, 130f, 0, 0, 0);
                }
                num = WorldGen.oreTier1;
                num3 *= 1.05f;
            }
            else if (num == 1)
            {
                if (WorldGen.oreTier2 == -1)
                {
                    WorldGen.oreTier2 = 108;
                    if (WorldGen.genRand.Next(2) == 0)
                    {
                        WorldGen.oreTier2 = 222;
                    }
                }
                int num6 = 13;
                if (WorldGen.oreTier2 == 222)
                {
                    num6 += 9;
                    num3 *= 0.9f;
                }
                if (Main.netMode == 0)
                {
                    Main.NewText(Lang.misc[num6], 50, 255, 130, false);
                }
                else if (Main.netMode == 2)
                {
                    NetMessage.SendData(25, -1, -1, Lang.misc[num6], 255, 50f, 255f, 130f, 0, 0, 0);
                }
                num = WorldGen.oreTier2;
            }
            else
            {
                if (WorldGen.oreTier3 == -1)
                {
                    WorldGen.oreTier3 = 111;
                    if (WorldGen.genRand.Next(2) == 0)
                    {
                        WorldGen.oreTier3 = 223;
                    }
                }
                int num7 = 14;
                if (WorldGen.oreTier3 == 223)
                {
                    num7 += 9;
                    num3 *= 0.9f;
                }
                if (Main.netMode == 0)
                {
                    Main.NewText(Lang.misc[num7], 50, 255, 130, false);
                }
                else if (Main.netMode == 2)
                {
                    NetMessage.SendData(25, -1, -1, Lang.misc[num7], 255, 50f, 255f, 130f, 0, 0, 0);
                }
                num = WorldGen.oreTier3;
            }
            int num8 = 0;
            while ((float)num8 < num3)
            {
                int i2 = WorldGen.genRand.Next(100, Main.maxTilesX - 100);
                double num9 = Main.worldSurface;
                if (num == 108 || num == 222)
                {
                    num9 = Main.rockLayer;
                }
                if (num == 111 || num == 223)
                {
                    num9 = (Main.rockLayer + Main.rockLayer + (double)Main.maxTilesY) / 3.0;
                }
                int j2 = WorldGen.genRand.Next((int)num9, Main.maxTilesY - 150);
                WorldGen.OreRunner(i2, j2, (double)WorldGen.genRand.Next(5, 9 + num4), WorldGen.genRand.Next(5, 9 + num4), (ushort)num);
                num8++;
            }
            int num10 = WorldGen.genRand.Next(3);
            int num11 = 0;
            while (num10 != 2 && num11++ < 1000)
            {
                int num12 = WorldGen.genRand.Next(100, Main.maxTilesX - 100);
                int num13 = WorldGen.genRand.Next((int)Main.rockLayer + 50, Main.maxTilesY - 300);
                if (Main.tile[num12, num13].active() && Main.tile[num12, num13].type == 1)
                {
                    if (num10 == 0)
                    {
                        if (WorldGen.crimson)
                        {
                            Main.tile[num12, num13].type = 203;
                        }
                        else
                        {
                            Main.tile[num12, num13].type = 25;
                        }
                    }
                    else
                    {
                        Main.tile[num12, num13].type = 117;
                    }
                    if (Main.netMode == 2)
                    {
                        NetMessage.SendTileSquare(-1, num12, num13, 1);
                        break;
                    }
                    break;
                }
            }
            if (Main.netMode != 1)
            {
                int num14 = Main.rand.Next(2) + 1;
                for (int k = 0; k < num14; k++)
                {
                    NPC.SpawnOnPlayer((int)Player.FindClosest(new Vector2((float)(i * 16), (float)(j * 16)), 16, 16), 82);
                }
            }
            WorldGen.altarCount++;
            AchievementsHelper.NotifyProgressionEvent(6);
        }

And this is what I attempted to do (with next to no programming experience):

Code:
public static void SmashAltar(int i, int j)
        {
            if (Main.netMode == 1)
            {
                return;
            }
            if (!Main.hardMode)
            {
                return;
            }
            if (WorldGen.noTileActions)
            {
                return;
            }
            if (WorldGen.gen)
            {
                return;
            }
            int num = WorldGen.altarCount % 3;
            int num2 = WorldGen.altarCount / 3 + 1;
            float num3 = (float)(Main.maxTilesX / 4200);
            int num4 = 1 - num;
            num3 = num3 * 310f - (float)(85 * num);
            num3 *= 0.85f;
            num3 /= (float)num2;
            if (num == 0)
            {
                if (WorldGen.oreTier1 == -1)
                {
                    WorldGen.oreTier1 = 107 && 221;
                }
                int num5 = 12;
                if (WorldGen.oreTier1 == 221 && 107)
                {
                    num5 += 9;
                    num3 *= 0.9f;
                }
                if (Main.netMode == 0)
                {
                    Main.NewText(Lang.misc[num5], 50, 255, 130, false);
                }
                else if (Main.netMode == 2)
                {
                    NetMessage.SendData(25, -1, -1, Lang.misc[num5], 255, 50f, 255f, 130f, 0, 0, 0);
                }
                num = WorldGen.oreTier1;
                num3 *= 1.05f;
            }
            else if (num == 1)
            {
                if (WorldGen.oreTier2 == -1)
                {
                    WorldGen.oreTier2 = 108 && 222;
                }
                int num6 = 13;
                if (WorldGen.oreTier2 == 222 && 108)
                {
                    num6 += 9;
                    num3 *= 0.9f;
                }
                if (Main.netMode == 0)
                {
                    Main.NewText(Lang.misc[num6], 50, 255, 130, false);
                }
                else if (Main.netMode == 2)
                {
                    NetMessage.SendData(25, -1, -1, Lang.misc[num6], 255, 50f, 255f, 130f, 0, 0, 0);
                }
                num = WorldGen.oreTier2;
            }
            else
            {
                if (WorldGen.oreTier3 == -1)
                {
                    WorldGen.oreTier3 = 111 && 223;
                }
                int num7 = 14;
                if (WorldGen.oreTier3 == 223 && 111)
                {
                    num7 += 9;
                    num3 *= 0.9f;
                }
                if (Main.netMode == 0)
                {
                    Main.NewText(Lang.misc[num7], 50, 255, 130, false);
                }
                else if (Main.netMode == 2)
                {
                    NetMessage.SendData(25, -1, -1, Lang.misc[num7], 255, 50f, 255f, 130f, 0, 0, 0);
                }
                num = WorldGen.oreTier3;
            }
            int num8 = 0;
            while ((float)num8 < num3)
            {
                int i2 = WorldGen.genRand.Next(100, Main.maxTilesX - 100);
                double num9 = Main.worldSurface;
                if (num == 108 && 222)
                {
                    num9 = Main.rockLayer;
                }
                if (num == 111 && 223)
                {
                    num9 = (Main.rockLayer + Main.rockLayer + (double)Main.maxTilesY) / 3.0;
                }
                int j2 = WorldGen.genRand.Next((int)num9, Main.maxTilesY - 150);
                WorldGen.OreRunner(i2, j2, (double)WorldGen.genRand.Next(5, 9 + num4), WorldGen.genRand.Next(5, 9 + num4), (ushort)num);
                num8++;
            }
            int num10 = WorldGen.genRand.Next(3);
            int num11 = 0;
            while (num10 != 2 && num11++ < 1000)
            {
                int num12 = WorldGen.genRand.Next(100, Main.maxTilesX - 100);
                int num13 = WorldGen.genRand.Next((int)Main.rockLayer + 50, Main.maxTilesY - 300);
                if (Main.tile[num12, num13].active() && Main.tile[num12, num13].type == 1)
                {
                    if (num10 == 0)
                    {
                        if (WorldGen.crimson)
                        {
                            Main.tile[num12, num13].type = 203;
                        }
                        else
                        {
                            Main.tile[num12, num13].type = 25;
                        }
                    }
                    else
                    {
                        Main.tile[num12, num13].type = 117;
                    }
                    if (Main.netMode == 2)
                    {
                        NetMessage.SendTileSquare(-1, num12, num13, 1);
                        break;
                    }
                    break;
                }
            }
            if (Main.netMode != 1)
            {
                int num14 = Main.rand.Next(2) + 1;
                for (int k = 0; k < num14; k++)
                {
                    NPC.SpawnOnPlayer((int)Player.FindClosest(new Vector2((float)(i * 16), (float)(j * 16)), 16, 16), 82);
                }
            }
            WorldGen.altarCount++;
            AchievementsHelper.NotifyProgressionEvent(6);
        }

Apparently, a bool or int can't be two values, and I'm trying to work around that. I'm thinking that (I may sound like an utter moron to experienced programmers here, as I'm guessing) if I change it from int/bool to something that CAN have more than one value it may work, but that may not exist altogether...

Again, not asking you guys to rewrite the entire thing for me. If the solution is simple I'd appreciate it (and learn from it), but if it's more complex just tell me and I'll study it myself or ask on an actual programming forum.
 
Mod Browser Crashes Terraria.
 
Back
Top Bottom