tModLoader Official tModLoader Help Thread

I can't load my mods - Tmodloader gives me this error:
z3yr98O.png

z3yr98O

but there's nothing in my Mods folder. I don't know what the problem is
 
I'm pretty terrible at this, but how would I go about adding a starcloak like effect to this item. You know where when you take damage stars rain form the sky.


using Terraria;
using Terraria.ID;

using Terraria.ModLoader;



namespace Hypaxi.Items

{

public class AtmosphereEnchantment : ModItem

{

public override void SetDefaults()

{
item.width = 30;

item.height = 34;

item.value = 10000;

item.rare = 2;

item.accessory = true;
}


public override void AddRecipes()

{

ModRecipe recipe = new ModRecipe(mod);

recipe.AddIngredient(ItemID.DirtBlock, 1);

recipe.AddTile(TileID.WorkBenches);

recipe.SetResult(this);

recipe.AddRecipe();

}

public override void UpdateAccessory(Player player, bool hideVisual)
{
player.noFallDmg = true;
player.canRocket = true;
player.rocketTime = 1200;
player.rocketBoots = 1;
}
}

}
 
I have a problem I've tried everything to fix, and I thought to check here. None of the music for any mods seems to be working for me. It's all being replaced by a piece from vanilla. The glacier biome from Calamity just plays the default snow biome, The Reach biome just plays the overworld theme. I've tried disabling all but one mod, I've tried reinstalling Tmodloader. Nothing is working.

One more thing: For some reason, they DO work while I'm dead. That is, if I die in a modded area, it'll start playing the music it's supposed to as normal. It quits again as soon as I respawn.
 
I have a problem I've tried everything to fix, and I thought to check here. None of the music for any mods seems to be working for me. It's all being replaced by a piece from vanilla. The glacier biome from Calamity just plays the default snow biome, The Reach biome just plays the overworld theme. I've tried disabling all but one mod, I've tried reinstalling Tmodloader. Nothing is working.

One more thing: For some reason, they DO work while I'm dead. That is, if I die in a modded area, it'll start playing the music it's supposed to as normal. It quits again as soon as I respawn.
A modlist would help greatly.
 
Hello there.
I have several questions.

First of all, I am trying to make a consumable item, just like mana stars or crystal hearts (so it can only be used while in hand).
I want this item to poison all enemies on screen (add debuff to them) and disappear from my inventory. What do I start with?

Second question is which of these item tooltips should I use and what's the difference between them? (see the screenshot)

Thanks.

Image 001.png
 
I'm trying to create an accessory that combines the effects of the Charm of Myths and the Celestial Shell, but whenever I try to build the mod. I get this issue, and I can't figure out what's wrong.
Screenshot (6).png
This is my code:
Code:
using Terraria.ID;
using Terraria.ModLoader;

namespace ScorpiusMOD.Items
{
    public class BandofMyths : ModItem
    {

        public override void SetDefaults()
        {
            item.name = "Band of Myths";
            item.toolTip = "Grants a minor buff to all stats, shortened potion cooldown, turns the user into a werewolve at night and a merfolk underwater";
            item.width = 10;
            item.height = 14;
            item.defense = 4;
            item.value = 10000;
            item.rare = 7;
            item.accessory = true;
        }

        public override void UpdateAccessory(Player player)
        {
            player.meleeCrit += 2;
            player.meleeDamage += 0.1f;
            player.meleeSpeed += 0.1f;
            player.rangedCrit += 2;
            player.rangedDamage += 0.1f;
            player.minionDamage += 0.1f;
            player.minionKnockback += 0.5f;
            player.magicCrit += 2;
            player.magicDamage += 0.1f;
            player.throwingCrit += 2;
            player.throwingDamage += 0.1f;
            player.miningSpeed += 0.15f;
            player.Werewolf = true;
            player.Merfolk = true;
            player.regeneration += 1.5f;
            player.reducedpotioncooldown = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.CharmofMyths, 1);
            recipe.AddIngredient(ItemID.CelestialShell, 1);
            recipe.AddTile(TileID.TinkerersWorkbench);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
 
I'm trying to create an accessory that combines the effects of the Charm of Myths and the Celestial Shell, but whenever I try to build the mod. I get this issue, and I can't figure out what's wrong.
This is my code:
Code:
using Terraria.ID;
using Terraria.ModLoader;

namespace ScorpiusMOD.Items
{
    public class BandofMyths : ModItem
    {

        public override void SetDefaults()
        {
            item.name = "Band of Myths";
            item.toolTip = "Grants a minor buff to all stats, shortened potion cooldown, turns the user into a werewolve at night and a merfolk underwater";
            item.width = 10;
            item.height = 14;
            item.defense = 4;
            item.value = 10000;
            item.rare = 7;
            item.accessory = true;
        }

        public override void UpdateAccessory(Player player)
        {
            player.meleeCrit += 2;
            player.meleeDamage += 0.1f;
            player.meleeSpeed += 0.1f;
            player.rangedCrit += 2;
            player.rangedDamage += 0.1f;
            player.minionDamage += 0.1f;
            player.minionKnockback += 0.5f;
            player.magicCrit += 2;
            player.magicDamage += 0.1f;
            player.throwingCrit += 2;
            player.throwingDamage += 0.1f;
            player.miningSpeed += 0.15f;
            player.Werewolf = true;
            player.Merfolk = true;
            player.regeneration += 1.5f;
            player.reducedpotioncooldown = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.CharmofMyths, 1);
            recipe.AddIngredient(ItemID.CelestialShell, 1);
            recipe.AddTile(TileID.TinkerersWorkbench);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

If you would like a fix, it would look a little like this:

Code:
using Terraria; /*Not sure if this is necessary, but I added it anyway*/
using Terraria.ID;
using Terraria.ModLoader;

namespace ScorpiusMOD.Items
{
    public class BandofMyths : ModItem
    {
        public override void SetStaticDefaults()
        {
        DisplayName.SetDefault("Band of Myths"); //This is how you do Item names and tooltips now
        Tooltip.SetDefault("Grants a minor buff to all stats, shortened potion cooldown, turns the user into a werewolve at night and a merfolk underwater"); //This is how you do Item names and tooltips now
        }
        public override void SetDefaults()
        {
            item.name = "Band of Myths"; //item.name and item.toolTip don't work on the newer versions, delete them.
            item.toolTip = "Grants a minor buff to all stats, shortened potion cooldown, turns the user into a werewolve at night and a merfolk underwater"; //item.name and item.toolTip don't work on the newer versions, delete them.
            item.width = 10;
            item.height = 14;
            item.defense = 4;
            item.value = 10000;
            item.rare = 7;
            item.accessory = true;
        }

        public override void UpdateAccessory(Player player)
        {
            player.meleeCrit += 2;
            player.meleeDamage += 0.1f;
            player.meleeSpeed += 0.1f;
            player.rangedCrit += 2;
            player.rangedDamage += 0.1f;
            player.minionDamage += 0.1f;
            player.minionKnockback += 0.5f;
            player.magicCrit += 2;
            player.magicDamage += 0.1f;
            player.throwingCrit += 2;
            player.throwingDamage += 0.1f;
            player.miningSpeed += 0.15f;
            player.Werewolf = true;
            player.Merfolk = true;
            player.regeneration += 1.5f;
            player.pStone = true; //Changed, I don't know why it's pStone not something that makes more sense
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.CharmofMyths);
            recipe.AddIngredient(ItemID.CelestialShell);
            recipe.AddTile(TileID.TinkerersWorkbench);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

Oh, and the revisions are marked with //'s and /**/'s
 
If you would like a fix, it would look a little like this:

Code:
using Terraria; /*Not sure if this is necessary, but I added it anyway*/
using Terraria.ID;
using Terraria.ModLoader;

namespace ScorpiusMOD.Items
{
    public class BandofMyths : ModItem
    {
        public override void SetStaticDefaults()
        {
        DisplayName.SetDefault("Band of Myths"); //This is how you do Item names and tooltips now
        Tooltip.SetDefault("Grants a minor buff to all stats, shortened potion cooldown, turns the user into a werewolve at night and a merfolk underwater"); //This is how you do Item names and tooltips now
        }
        public override void SetDefaults()
        {
            item.name = "Band of Myths"; //item.name and item.toolTip don't work on the newer versions, delete them.
            item.toolTip = "Grants a minor buff to all stats, shortened potion cooldown, turns the user into a werewolve at night and a merfolk underwater"; //item.name and item.toolTip don't work on the newer versions, delete them.
            item.width = 10;
            item.height = 14;
            item.defense = 4;
            item.value = 10000;
            item.rare = 7;
            item.accessory = true;
        }

        public override void UpdateAccessory(Player player)
        {
            player.meleeCrit += 2;
            player.meleeDamage += 0.1f;
            player.meleeSpeed += 0.1f;
            player.rangedCrit += 2;
            player.rangedDamage += 0.1f;
            player.minionDamage += 0.1f;
            player.minionKnockback += 0.5f;
            player.magicCrit += 2;
            player.magicDamage += 0.1f;
            player.throwingCrit += 2;
            player.throwingDamage += 0.1f;
            player.miningSpeed += 0.15f;
            player.Werewolf = true;
            player.Merfolk = true;
            player.regeneration += 1.5f;
            player.pStone = true; //Changed, I don't know why it's pStone not something that makes more sense
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.CharmofMyths);
            recipe.AddIngredient(ItemID.CelestialShell);
            recipe.AddTile(TileID.TinkerersWorkbench);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

Oh, and the revisions are marked with //'s and /**/'s

I think pStone stands for Philosopher's Stone. I made the changes but I'm still getting the same error when I build about 'Player' not being found.
 
Last edited:
Having some problem with dust, every time the dust spawns, it increases in size slowly, and after a few seconds it becomes unrealistically large. Here's what I mean:
Is there a way to fix this? Here's the code, which is from the Rainbow Rod projectile:
Code:
else if (this.type == 79)
                {
                    if (this.soundDelay == 0 && Math.Abs(this.velocity.X) + Math.Abs(this.velocity.Y) > 2f)
                    {
                        this.soundDelay = 10;
                        Main.PlaySound(SoundID.Item9, this.position);
                    }
                    int num3;
                    for (int num112 = 0; num112 < 1; num112 = num3 + 1)
                    {
                        int num113 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 66, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2.5f);
                        Dust dust = Main.dust[num113];
                        dust.velocity *= 0.1f;
                        dust = Main.dust[num113];
                        dust.velocity += this.velocity * 0.2f;
                        Main.dust[num113].position.X = this.position.X + (float)(this.width / 2) + 4f + (float)Main.rand.Next(-2, 3);
                        Main.dust[num113].position.Y = this.position.Y + (float)(this.height / 2) + (float)Main.rand.Next(-2, 3);
                        Main.dust[num113].noGravity = true;
                        num3 = num112;
                    }
                }
And here's mine, which only has the 11th line because the entire RR code won't work:
Code:
public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            if (Main.rand.Next(1) == 0) //(#) is the size(?) of the dust.
            {
                //Dust "66" (Rainbow Dust) is used.
                Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 66, 0f, 0f, 1, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB));
                //The size and concentration of the dust are pretty similar to each other, can't really tell the difference between the two.
            }
        }
Any way to fix this? My guess is that I'm using a projectile dust code on the melee hitbox code, but I'm not experienced with implementing dust on items, so I don't know.
Edit: Nevermind, fixed it. Turns out that Dust 66 was the problem, and that
Code:
new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB)
was the piece to make any dust rainbow. :)
At least I think so, anyway. -_-
 
Last edited:
Hello there.
I have several questions.

First of all, I am trying to make a consumable item, just like mana stars or crystal hearts (so it can only be used while in hand).
I want this item to poison all enemies on screen (add debuff to them) and disappear from my inventory. What do I start with?

Second question is which of these item tooltips should I use and what's the difference between them? (see the screenshot)

Thanks.

Use the Tooltip.SetDefault one for the tooltip.
 
i noticed the chat in-game frozen partially, (sorry bad english i am br like crowno but i am not too good in english) and i cant start goblin army, i tried in a end game world that i summoned events, i cant summon: goblin army, pirate invasion, frost legion, :hoppinjack::pumpking: moon and frost moon, i cant summon :bluslime: rain with the :bluslime: rain potion, the :indifferent: dont spawn, the :dryadindifferent: is frozen,:merchantindifferent: is stuck in a block, the dye trader dont give strange dye even with my inventory full of strange plants (that is legitimal, i aquired farming) and i cant break any blocks far away from spawn (like a 500 blocks area radius) the initial world spawnpoint, and the dungeon is glitched with invisible blocks.
what i can do? i will put the modpack to anyone view the mods and if the problem is a mod, tell me what mod are making this, this happened after i updated the modpack from 2 mods to over 20 mods, i hope you understand all this text. and is exert, not revengeance nor death, and i beaten :brain:. help me
 

Attachments

  • my mods.json
    1.2 KB · Views: 173
i noticed the chat in-game frozen partially, (sorry bad english i am br like crowno but i am not too good in english) and i cant start goblin army, i tried in a end game world that i summoned events, i cant summon: goblin army, pirate invasion, frost legion, :hoppinjack::pumpking: moon and frost moon, i cant summon :bluslime: rain with the :bluslime: rain potion, the :indifferent: dont spawn, the :dryadindifferent: is frozen,:merchantindifferent: is stuck in a block, the dye trader dont give strange dye even with my inventory full of strange plants (that is legitimal, i aquired farming) and i cant break any blocks far away from spawn (like a 500 blocks area radius) the initial world spawnpoint, and the dungeon is glitched with invisible blocks.
what i can do? i will put the modpack to anyone view the mods and if the problem is a mod, tell me what mod are making this, this happened after i updated the modpack from 2 mods to over 20 mods, i hope you understand all this text. and is exert, not revengeance nor death, and i beaten :brain:. help me
I've heard this be the fault of Tremor.
 
I've been having a problem with tModLoader. Every time I try to start Terraria with TML installed, the game process begins but crashes within a few seconds. My OS is Ubuntu 16.04, and it is up to date. My copy of Terraria is the Linux Steam version.
This is the most recent addition to my crash log. Any help is appreciated.
System.Threading.SynchronizationLockException: Object synchronization method was called from an unsynchronized block of code.
at Terraria.IO.Preferences.Save (System.Boolean createFile) [0x0014b] in <83091531a87a4648a4792d0079c7e16c>:0
at Terraria.Main.SaveSettings () [0x0056b] in <83091531a87a4648a4792d0079c7e16c>:0
at Terraria.Main.OpenSettings () [0x00cb8] in <83091531a87a4648a4792d0079c7e16c>:0
at Terraria.Main.ClientInitialize () [0x00096] in <83091531a87a4648a4792d0079c7e16c>:0
at Terraria.Main.Initialize () [0x064fb] in <83091531a87a4648a4792d0079c7e16c>:0
at Microsoft.Xna.Framework.Game.DoInitialize () [0x0000d] in <bc6b38abaaf04135afbd0534ec7f6b92>:0
at Microsoft.Xna.Framework.Game.Run () [0x0000e] in <bc6b38abaaf04135afbd0534ec7f6b92>:0
at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x000f6] in <83091531a87a4648a4792d0079c7e16c>:0
 
I have been having trouble with tmodloader When using the newest tmodloader everything works until the loading screen reaches setting up when that happens the game will stop working and force me to close it. Do you have any idea how to fix this issue? Can anyone help me with this cause I really want to use mods
Thanks
 
Back
Top Bottom