Zannypants
Terrarian
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.
Woo I'm not the only one. Got confused, thought I was reading my post lolWhen I click on the mod browser, the game freezes. It worked yesterday, but not today. It doesn't even give me an error message.
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);
}
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);
}
Well for me it just takes awhile for it to launch.Mod Browser Crashes Terraria.
That mod needs an update it looks like.This came up in a blue box right as Settling Liquids hit 100% in game
Method not found: 'System.String Terraria.Lang.deathMsg(Int32, Int32, Int32, Int32)'.
at LiquidsPlus.MPlayer.PreUpdate()
at Terraria.ModLoader.PlayerHooks.PreUpdate(Player player)
at Terraria.Player.Update(Int32 i)
at Terraria.WorldGen.do_playWorldCallBack(Object threadContext)
at Terraria.WorldGen.playWorldCallBack(Object threadContext)
It's busy since: new tmodloader, new updates. Try back later or see if the mod is hosted on it's respective thread.The mod browser won't work for me and I'm not sure why.
Hey JopoJelly, The problem was the liquids + mod.The mod browser won't work for me and I'm not sure why.
Yes, I canIs 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.
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace NewMod.NPCs
{
class ModGlobalNPC : GlobalNPC
{
public override void NPCLoot(NPC npc)
{
if (npc.type == NPCID.GreenSlime)
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("AwesomeItem"));
}
}
}
}
Yep, negative npcids aren't "real". In this case, you can check "if(npc.netID == NPCID.GreenSlime)" and it should work.Is this a bug or something I have missed...
Code:using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace NewMod.NPCs { class ModGlobalNPC : GlobalNPC { public override void NPCLoot(NPC npc) { if (npc.type == NPCID.GreenSlime) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("AwesomeItem")); } } } }
This should drop the AwesomeItem 100% of the time off the mobs I choose, but anytime I use a NPCID that is negative (like GreenSlime is '-3') it will not drop off that npc but will drop off any positive NPCID mob such as BlueSlime (which is '1').
Awesome, that worked, thanks jopojelly.Yep, negative npcids aren't "real". In this case, you can check "if(npc.netID == NPCID.GreenSlime)" and it should work.
if (npc.type == NPCID.GreenSlime || npc.type == NPCID.BlueSlime)