• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • 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.
  • Begin your search for Journey's End information here and here. Please report bugs and issues for Journey's End here.
  • For issues you find with the Mobile 1.4 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

Standalone [1.3] tModLoader - A Modding API

Iroh The Dragon

Terrarian
I probably have missed something,

Code:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;
using Microsoft.Xna.Framework;
using Terraria.Enums;
using Terraria.DataStructures;

namespace DarkArmorReforged.Tiles
{
    public class FurnaceMod : ModTile
    {
        public override void SetDefaults()
        {
            Main.tileSolidTop[Type] = false;
            Main.tileFrameImportant[Type] = true;
            Main.tileNoAttach[Type] = true;
            Main.tileLavaDeath[Type] = true;
            TileObjectData.newTile.Width = 4; // Set the width of the tile, 4 in this case.
            TileObjectData.newTile.Height = 3; // Set the height of the tile, 4 in this case.

            // Set the origin of this tile. This is used when displaying the tile preview.
            // Since all Terraria objects are placed from their botom left perspective, we set the Y parameter of the Point to 3.
            TileObjectData.newTile.Origin = new Point16(0, 3);

            // The following will only allow this tile to be placed on a solid surface all along the way of this tile.
            TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
            TileObjectData.newTile.UsesCustomCanPlace = true; // We do use a custom can place.
            TileObjectData.newTile.LavaDeath = true; // Optional, guess that speaks for itself.
            TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; // Since our tile is 4 pieces high, we need to define 4 values here.
            TileObjectData.newTile.CoordinateWidth = 16; // The width of each of the tile pieces (default is 16).
            TileObjectData.newTile.CoordinatePadding = 2; // The padding of each tile piece on the tilesheet.
            TileObjectData.addTile(Type);
            AddMapEntry(new Color(255, 255, 255), "FurnaceMod");
            adjTiles = new int[] { TileID.Anvils };
            AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
        }

        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            Item.NewItem(i * 16, j * 16, 48, 48, mod.ItemType("FurnaceMod"));
        }
    }
}
 

Eldrazi

Eater of Worlds
I probably have missed something,

Code:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;
using Microsoft.Xna.Framework;
using Terraria.Enums;
using Terraria.DataStructures;

namespace DarkArmorReforged.Tiles
{
    public class FurnaceMod : ModTile
    {
        public override void SetDefaults()
        {
            Main.tileSolidTop[Type] = false;
            Main.tileFrameImportant[Type] = true;
            Main.tileNoAttach[Type] = true;
            Main.tileLavaDeath[Type] = true;
            TileObjectData.newTile.Width = 4; // Set the width of the tile, 4 in this case.
            TileObjectData.newTile.Height = 3; // Set the height of the tile, 4 in this case.

            // Set the origin of this tile. This is used when displaying the tile preview.
            // Since all Terraria objects are placed from their botom left perspective, we set the Y parameter of the Point to 3.
            TileObjectData.newTile.Origin = new Point16(0, 3);

            // The following will only allow this tile to be placed on a solid surface all along the way of this tile.
            TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
            TileObjectData.newTile.UsesCustomCanPlace = true; // We do use a custom can place.
            TileObjectData.newTile.LavaDeath = true; // Optional, guess that speaks for itself.
            TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; // Since our tile is 4 pieces high, we need to define 4 values here.
            TileObjectData.newTile.CoordinateWidth = 16; // The width of each of the tile pieces (default is 16).
            TileObjectData.newTile.CoordinatePadding = 2; // The padding of each tile piece on the tilesheet.
            TileObjectData.addTile(Type);
            AddMapEntry(new Color(255, 255, 255), "FurnaceMod");
            adjTiles = new int[] { TileID.Anvils };
            AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
        }

        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            Item.NewItem(i * 16, j * 16, 48, 48, mod.ItemType("FurnaceMod"));
        }
    }
}
Hmm, only things I see is the origin. That should be
Code:
TileObjectData.newTile.Origin = new Point16(0, 2); // Since the height has been changed.
And you may want to change your KillMultiTile function:
Code:
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
    Item.NewItem(i * 16, j * 16, 64, 48, mod.ItemType("FurnaceMod"));
}
 

Iroh The Dragon

Terrarian
So basically i can place both furnaces now. Although when they are both down near each other i can craft the bars i want. But when there away from each other or theres only one of them. I cant craft. I want to be able to craft at the two different stations in different areas and craft some of the same items.
 

Sin Costan

Eye of Cthulhu
So basically i can place both furnaces now. Although when they are both down near each other i can craft the bars i want. But when there away from each other or theres only one of them. I cant craft. I want to be able to craft at the two different stations in different areas and craft some of the same items.
So basically i can place both furnaces now. Although when they are both down near each other i can craft the bars i want. But when there away from each other or theres only one of them. I cant craft. I want to be able to craft at the two different stations in different areas and craft some of the same items.
You probably want to separate the two required tiles into two different recipes because you probably have the recipe require both tiles.
 

red3dred

Terrarian
So, hello modders, i am in no place to ask this, but i've tried some modded gameplay, and the current server support seems.... non-existent to say the least.

Is it supposed to only be hostable, but not joinable? (It literally just crashes as soon as someone joins via Steam. Even without mods)

Other than that, hey, this is working great so far! The only problems i ever found were generation bugs, which, even though rare, still happen in Vanilla game. Sorry to put a random "ETA on server" like comment, but i assumed that "some" server support meant someone could join.

Cheers @bluemagic123, and modders, your work makes this game not only last much longer on our hearts, but also makes our free time greatly more enjoyable!
 

Endershot355

Steampunker
The :red:

Index was outside the bounds of the array.
at Terraria.World.Generation.StructureMap.CanPlace(Rectangle area, Boolean[] validTiles, Int32 padding)
at Terraria.GameContent.Biomes.CorruptionPitBiome.Place(Point origin, StructureMap structures)
at Terraria.WorldGen.<>c__DisplayClass93.<generateWorld>b__5e(GenerationProgress progress)
at Terraria.GameContent.Generation.PassLegacy.Apply(GenerationProgress progress)
at Terraria.World.Generation.WorldGenerator.GenerateWorld(GenerationProgress progress)
at Terraria.WorldGen.generateWorld(Int32 seed, GenerationProgress customProgressObject)
at Terraria.WorldGen.do_worldGenCallBack(Object threadContext)
at Terraria.WorldGen.worldGenCallBack(Object threadContext)

Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using System.Collections.Generic;
using Terraria.World.Generation;
using Terraria.GameContent.Generation;

namespace Enderuim.Tiles   
    {
        public class EnderuimOreGen : ModWorld
        {
            public override void ModifyWorldGenTasks(List<GenPass> tasks, ref float totalWeight)
        {
            int ShiniesIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Buried Chests"));

            tasks.Insert(ShiniesIndex + 1, new PassLegacy("Crazy Ore", delegate (GenerationProgress progress){;
            {
                progress.Message = "Growing Enderuim Crystals...";

                for (int k = 0; k < (int)((double)(Main.maxTilesX * Main.maxTilesY) * 6E-05); k++)
                {
                    WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int)WorldGen.worldSurfaceLow, Main.maxTilesY), (double)WorldGen.genRand.Next(20, 20), WorldGen.genRand.Next(20, 20), mod.TileType("EnderuimOre"), false, 0f, 0f, false, true);
                }
            };
        }));
    }
}}
 

Kazzymodus

Moderator
Staff member
Moderator
The :red:

Index was outside the bounds of the array.
at Terraria.World.Generation.StructureMap.CanPlace(Rectangle area, Boolean[] validTiles, Int32 padding)
at Terraria.GameContent.Biomes.CorruptionPitBiome.Place(Point origin, StructureMap structures)
at Terraria.WorldGen.<>c__DisplayClass93.<generateWorld>b__5e(GenerationProgress progress)
at Terraria.GameContent.Generation.PassLegacy.Apply(GenerationProgress progress)
at Terraria.World.Generation.WorldGenerator.GenerateWorld(GenerationProgress progress)
at Terraria.WorldGen.generateWorld(Int32 seed, GenerationProgress customProgressObject)
at Terraria.WorldGen.do_worldGenCallBack(Object threadContext)
at Terraria.WorldGen.worldGenCallBack(Object threadContext)

Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using System.Collections.Generic;
using Terraria.World.Generation;
using Terraria.GameContent.Generation;

namespace Enderuim.Tiles
    {
        public class EnderuimOreGen : ModWorld
        {
            public override void ModifyWorldGenTasks(List<GenPass> tasks, ref float totalWeight)
        {
            int ShiniesIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Buried Chests"));

            tasks.Insert(ShiniesIndex + 1, new PassLegacy("Crazy Ore", delegate (GenerationProgress progress){;
            {
                progress.Message = "Growing Enderuim Crystals...";

                for (int k = 0; k < (int)((double)(Main.maxTilesX * Main.maxTilesY) * 6E-05); k++)
                {
                    WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int)WorldGen.worldSurfaceLow, Main.maxTilesY), (double)WorldGen.genRand.Next(20, 20), WorldGen.genRand.Next(20, 20), mod.TileType("EnderuimOre"), false, 0f, 0f, false, true);
                }
            };
        }));
    }
}}
If I were to hazard a guess, you're trying to create too much Enderium Ore. Try lowering the arguments in WorldGen.genRand.Next that say 20.

Also, if both parameters of a Random.Next function are the same value, it will return that value. Not much point in using Random.Next in such a case.
 

Endershot355

Steampunker
The only issue is is that i cannot find my ore now
[DOUBLEPOST=1457478547,1457478272][/DOUBLEPOST]Wrong question: how do I make it so only one pickaxe can mine it (modded)?
 

jopojelly

Retinazer
tModLoader
The :red:

Index was outside the bounds of the array.
at Terraria.World.Generation.StructureMap.CanPlace(Rectangle area, Boolean[] validTiles, Int32 padding)
at Terraria.GameContent.Biomes.CorruptionPitBiome.Place(Point origin, StructureMap structures)
at Terraria.WorldGen.<>c__DisplayClass93.<generateWorld>b__5e(GenerationProgress progress)
at Terraria.GameContent.Generation.PassLegacy.Apply(GenerationProgress progress)
at Terraria.World.Generation.WorldGenerator.GenerateWorld(GenerationProgress progress)
at Terraria.WorldGen.generateWorld(Int32 seed, GenerationProgress customProgressObject)
at Terraria.WorldGen.do_worldGenCallBack(Object threadContext)
at Terraria.WorldGen.worldGenCallBack(Object threadContext)

Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using System.Collections.Generic;
using Terraria.World.Generation;
using Terraria.GameContent.Generation;

namespace Enderuim.Tiles  
    {
        public class EnderuimOreGen : ModWorld
        {
            public override void ModifyWorldGenTasks(List<GenPass> tasks, ref float totalWeight)
        {
            int ShiniesIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Buried Chests"));

            tasks.Insert(ShiniesIndex + 1, new PassLegacy("Crazy Ore", delegate (GenerationProgress progress){;
            {
                progress.Message = "Growing Enderuim Crystals...";

                for (int k = 0; k < (int)((double)(Main.maxTilesX * Main.maxTilesY) * 6E-05); k++)
                {
                    WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int)WorldGen.worldSurfaceLow, Main.maxTilesY), (double)WorldGen.genRand.Next(20, 20), WorldGen.genRand.Next(20, 20), mod.TileType("EnderuimOre"), false, 0f, 0f, false, true);
                }
            };
        }));
    }
}}
Ok, I forgot about that too. for now, after "Micro Biomes" should work.
 
ok so i have been using this to play the tremor mod remastered and it was working fine until my computer forced me to update to windows 10 and now it always crashes when i load my large worlds with this error:

Exception of type 'System.OutOfMemoryException' was thrown.
at Terraria.UI.Chat.ChatLine..ctor()
at Terraria.Main.DrawMenu(GameTime gameTime)
at Terraria.Main.do_Draw(GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime)

Edit: forgot to mention that it only crashes when its a large world and it crashes when i try to create large worlds too but i can play on my small worlds just fine
 

Exerlin

Terrarian
I've been playing the Thorium mod with a friend, and chests seem to not register when you use the loot all button. Not that big of an issue, but can still be troublesome.

Edit: Deposit all does a similar glitch, but it gets rid of all the items instead. Learned that the hard way :(
 
Last edited:
So how would I go about making an NPC say something special the first time you talk to them? Like how the bound NPC's work? Would I need to make a bool variable to be triggered to false when talking to the npc to disallow further access to that dialogue? Would that variable stay false even after reloading the world?
 

jopojelly

Retinazer
tModLoader
So how would I go about making an NPC say something special the first time you talk to them? Like how the bound NPC's work? Would I need to make a bool variable to be triggered to false when talking to the npc to disallow further access to that dialogue? Would that variable stay false even after reloading the world?
Vanilla npc have separate choices if they are homeless, so just check npc.homeless in GetChat to return the "you saved me" dialogue.
[DOUBLEPOST=1457497193,1457497174][/DOUBLEPOST]
I've been playing the Thorium mod with a friend, and chests seem to not register when you use the loot all button. Not that big of an issue, but can still be troublesome.

Edit: Deposit all does a similar glitch, but it gets rid of all the items instead. Learned that the hard way :(
We know, it's fixed in the next release.
[DOUBLEPOST=1457497556][/DOUBLEPOST]
Also... This isnt really a question, but do you ever plan to make a tutorial on segmented NPCS?
Maybe I could.
Wrong question: how do I make it so only one pickaxe can mine it (modded)?
I'm not sure you can. You can try CanKillTile and check the inventory of the player to see if they are using the item

https://github.com/bluemagic123/tMo...-cankilltileint-i-int-j-ref-bool-blockdamaged
 
Top Bottom