• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

Standalone [1.3] tModLoader - A Modding API

Fargowilta

The Destroyer
This is code for an npc to spawn and it works, but whenever I leave the world and come back he's gone again. soooo any ideas

Code:
public override bool CanTownNPCSpawn(int numTownNPCs, int money)
        {
            for (int k = 0; k < 255; k++)
            {
                Player player = Main.player[k];
                if (player.active)
                {
                    for (int j = 0; j < player.inventory.Length; j++)
                    {
                        if (player.inventory[j].type == mod.ItemType("woodtoken"))
                        {
                            return true;
                        }
                    }
                }
            }
            return false;
        }
 

Joost8910

Dungeon Spirit
I can't update my mod onto the mod browser, the game just freezes for a bit and then I get this error:
The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at Terraria.ModLoader.IO.UploadFile.UploadFiles(String address, IEnumerable`1 files, NameValueCollection values)
at Terraria.ModLoader.UI.UIModSourceItem.Publish(UIMouseEvent evt, UIElement listeningElement)
Someone please help... :(
 

jopojelly

Retinazer
tModLoader
This is code for an npc to spawn and it works, but whenever I leave the world and come back he's gone again. soooo any ideas

Code:
public override bool CanTownNPCSpawn(int numTownNPCs, int money)
        {
            for (int k = 0; k < 255; k++)
            {
                Player player = Main.player[k];
                if (player.active)
                {
                    for (int j = 0; j < player.inventory.Length; j++)
                    {
                        if (player.inventory[j].type == mod.ItemType("woodtoken"))
                        {
                            return true;
                        }
                    }
                }
            }
            return false;
        }
Make sure the autoload name and npc.name are the same. See example person.
 

SamTerarrium

Official Terrarian
how do I fix this?
8/21/2016 1:50:23 PM
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'RenderTarget2D'.
at Microsoft.Xna.Framework.Helpers.CheckDisposed(Object obj, IntPtr pComPtr)
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.SetRenderTargets(RenderTargetBinding* pBindings, Int32 renderTargetCount)
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.SetRenderTarget(RenderTarget2D renderTarget)
at Terraria.Main.woodColorCheck(Int32 t, Int32 c)
at Terraria.Main.lookForColorTiles()
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.LaunchGame(String[] args)

9/19/2016 4:25:57 PM
System.NullReferenceException: Object reference not set to an instance of an object.
at Terraria.ModLoader.ItemLoader.SetMatch(Int32 armorSlot, Int32 type, Boolean male, Int32& equipSlot, Boolean& robes)
at Terraria.Player.SetMatch(Int32 armorslot, Int32 type, Boolean male, Boolean& somethingSpecial)
at Terraria.Player.PlayerFrame()
at Terraria.Main.DrawMenu(GameTime gameTime)
at Terraria.Main.do_Draw(GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.LaunchGame(String[] args)

10/2/2016 8:41:19 PM
Remove the vanilla Terraria and extract the tMod Terraria and it should work and fix the XNA Framework so it can now fix
 

KirbyMaster500

Skeletron Prime
Ummmm, I did that thing to bypass the vanilla update (reinstalling tmodloader and reverting it back to 1.3.2) and now I'm not sure if vanilla will revert back. Anybody know how?
 

IDFC

Skeletron Prime
Ummmm, I did that thing to bypass the vanilla update (reinstalling tmodloader and reverting it back to 1.3.2) and now I'm not sure if vanilla will revert back. Anybody know how?
Simple Solution: Convince Bluemagic123 to update tmodloader to 1.3.3.3
 

Koopahunter197

Spazmatism
alright, so I'm getting this error:
Code:
c:\Users\(No need to see)\Documents\My Games\Terraria\ModLoader\Mod Sources\Anomaly\NPCs\AnomalyHarpy.cs(32,37) : error CS1061: 'Terraria.Player' does not contain a definition for 'ZoneSkyHeight' and no extension method 'ZoneSkyHeight' accepting a first argument of type 'Terraria.Player' could be found (are you missing a using directive or an assembly reference?)
so here is the code:

Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Anomaly.NPCs
{
    public class AnomalyHarpy : ModNPC
    {
        public override void SetDefaults()
        {
            npc.name = "AnomalyHarpy";
            npc.displayName = "Anomaly Harpy";
            npc.width = 98;
            npc.height = 82;
            npc.damage = 10;
            npc.defense = 10;
            npc.lifeMax = 200;
            npc.soundHit = 1;
            npc.soundKilled = 1;
            npc.value = 60f;
            npc.knockBackResist = 0.5f;
            npc.aiStyle = 44;
            Main.npcFrameCount[npc.type] = 4;
            aiType = NPCID.Harpy;  //npc behavior
            animationType = NPCID.Harpy;
        }
       
        public override float CanSpawn(NPCSpawnInfo spawnInfo)
        {
            Tile tile = Main.tile[spawnInfo.spawnTileX, spawnInfo.spawnTileY];
            return spawnInfo.player.ZoneSkyHeight ? 0.5f : 0f;
        }
        public override void NPCLoot()  //Npc drop
        {
            if (Main.rand.Next(100) == 0)
            {
                Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("ItemName"), 2); //Item spawn
            }

        }
    }
}
Still a work-in-progress, but can anyone help?
 

LenIAM

Official Terrarian
i try to downgrade terraria so that i can play with tmodloader , i did everything right , extract everything to steam app terraria folder , but when i wanna play , it shows my character gone ? i did try copying my player & world folder to the modloader folder in my games , but it still doesnt work , my vanilla terraria works fine tho, please help since it only a minor update , i dont think its necesarry to update to 1.3.3
 

nickyaramos

Terrarian
Any chance you have an update release date for 1.3.3.3? When I logged on and found that the mods turned off on its own, I found that my Terraria updated to 1.3.3.3.
 

Danew Dr

Plantera
I'm not sure if this has anything to do with 1.3.3.3, put my tmod worlds are not loading. I tried making a new world, it didn't work. I tried re-installing tmodloader, it didn't work. I tried creating a new world with the re-installed tmodloader, it didn't work. Unless this is because of 1.3.3.3, does anyone know how to fix this?
 
Did you install TML correctly?
Also if your having that issues I would uninstall Terraria, and delete all files within the core folder in the steamapps folder[basicly he terraria folder]
Then reinstall game, install TML but rename the exe that comes with TML to something other than what it is by default.
And try again.
 

Danew Dr

Plantera
Did you install TML correctly?
Also if your having that issues I would uninstall Terraria, and delete all files within the core folder in the steamapps folder[basicly he terraria folder]
Then reinstall game, install TML but rename the exe that comes with TML to something other than what it is by default.
And try again.
I'll try it. although, modloader had been working fine for months beforehand.
 
Top Bottom