• 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.

tModLoader Official tModLoader Help Thread

Dacern

Terrarian
Hey, can someone please help me figure out why every time I start up tModLoader, my game crashes?
I've tested a bit, and it only happens when the game tries to load my mod, and if I comment these lines of code it works fine.
Basically, can someone please help me figure out the issue with this code and help me to get it working? Thanks.

public class EndlessLuminiteArrowQuiver : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("It's time for the REAL fun to begin now...");
}

public override void SetDefaults()
{
item.damage = 15;
item.ranged = true;
item.width = 8;
item.height = 8;
item.consumable = false;
item.knockBack = 3.5f;
item.shoot = 639;
item.shootSpeed = 3f;
item.ammo = AmmoID.Arrow;
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.EndlessQuiver, 1);
recipe.AddIngredient(ItemID.MoonlordArrow, 3996);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}

Yeah, I know, a lot of people have this idea, but I'm hoping to expand it further into stuff like endless ichor quiver, endless cursed dart case, endless crystal bullet pouch, etc.
 
Last edited:

GamingEinstein

Terrarian
So I'm trying to code this below...

public override void SetDefaults()
{

item.useTime = 5;
item.consumable = false;
item.noMelee = true;
item.useAnimation = 28;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Meowmere;

}

But Visual Studio is telling me that the "item.UseSound = SoundID.Meowmere;" is invalid because it "Cannot implicitly convert type 'int' to 'Terraria.Audio.LegacySoundStyle'. I also am using this same general code but for "item.UseSound = SoundID.Moonlord;"

Anyone got any ideas?
 

Dacern

Terrarian
So I'm trying to code this below...

public override void SetDefaults()
{

item.useTime = 5;
item.consumable = false;
item.noMelee = true;
item.useAnimation = 28;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Meowmere;

}

But Visual Studio is telling me that the "item.UseSound = SoundID.Meowmere;" is invalid because it "Cannot implicitly convert type 'int' to 'Terraria.Audio.LegacySoundStyle'. I also am using this same general code but for "item.UseSound = SoundID.Moonlord;"

Anyone got any ideas?
put in item.UseSound = SoundID.Item57;
that should work
 

Stardust9681

Terrarian
Hey, can someone please help me figure out why every time I start up tModLoader, my game crashes?
I've tested a bit, and it only happens when the game tries to load my mod, and if I comment these lines of code it works fine.
Basically, can someone please help me figure out the issue with this code and help me to get it working? Thanks.

public class EndlessLuminiteArrowQuiver : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("It's time for the REAL fun to begin now...");
}

public override void SetDefaults()
{
item.damage = 15;
item.ranged = true;
item.width = 8;
item.height = 8;
item.consumable = false;
item.knockBack = 3.5f;
item.shoot = 639;
item.shootSpeed = 3f;
item.ammo = AmmoID.Arrow;
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.EndlessQuiver, 1);
recipe.AddIngredient(ItemID.MoonlordArrow, 3996);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}

Yeah, I know, a lot of people have this idea, but I'm hoping to expand it further into stuff like endless ichor quiver, endless cursed dart case, endless crystal bullet pouch, etc.
Look at where your SetDefaults() ends. You need to close it after defaults, and override AddRecipes to add a new recipe, last I checked. Hope that helps.
 

Stardust9681

Terrarian
Does anybody know where I could find a guide to creating an “alternate dimension” if that’s possible? Thanks!
I don't think it's possible to make an alternate dimension, at least, not without some serious overriding of code and increasing world file size by a good amount. Unlike other games that use multiple worlds/dimensions in their "world", Terraria has one big map that covers the whole world. Sorry to disappoint.
 

Stardust9681

Terrarian
how would i put a message in chat? Like to make sure you know that the expert exclusive item you just used in normal mode didnt work. Or the opposite, to make sure you know it DID work.
I'm fairly certain you can just put in the following line on a conditional:
C#:
Main.NewText("<Your message here>", 255, 255, 33); //255, 255, and 33 are rgb colours.
 

Dacern

Terrarian
Look at where your SetDefaults() ends. You need to close it after defaults, and override AddRecipes to add a new recipe, last I checked. Hope that helps.
Oh my gosh, I just forgot this. Thank you very much.
That was a stupid mistake, but easy to fix at least.
public override void AddRecipes()
 

CandieOfficial

Terrarian
Okay so I've looked around for maybe an hour or two just trying to find a an XNB to WAV file converter, I want to get a pure source WAV file so I can do some audio remixing but I cant find any converter. Any help is appreciated, thanks in advance.

Also this is my first post here so please direct me where to ask or look if this isn't the right place.
 

Dacern

Terrarian
Okay so I've looked around for maybe an hour or two just trying to find a an XNB to WAV file converter, I want to get a pure source WAV file so I can do some audio remixing but I cant find any converter. Any help is appreciated, thanks in advance.

Also this is my first post here so please direct me where to ask or look if this isn't the right place.
Maybe put it into an audio editor? Something like soundtrap, and then export as a WAV file.
Not sure if it works, but it's the best help I can give.
 

Dacern

Terrarian
I'm sure there's tons of stuff here about it, but I can't seem to get my projectiles to rotate in the direction they're moving. If anyone can give me some raw code I can ctrl+C, ctrl+V into my current projectile code, I would be grateful.
Or even any help in general would be useful.
 

Piercepotato

Terrarian
I don't think it's possible to make an alternate dimension, at least, not without some serious overriding of code and increasing world file size by a good amount. Unlike other games that use multiple worlds/dimensions in their "world", Terraria has one big map that covers the whole world. Sorry to disappoint.
Whoops i replied to the wrong post XP
My response is the post above lol
 

HAMILHAM

Terrarian
my tmodloader wownt open it keeps saying I have ran out of memory I have uninstalled the mods and it still keeps saying that
 

xxajitatorxx

Terrarian
Ok so I'm having a bit of trouble with launching tmodloader. Everytime I try to launch the thing it keeps giving me an error message and says
..\Terraria\Terraria.exe is not the executable.
GOG installs must have the unmodified Terraria executable to function.
Can anyone help me out with this. I have no idea what to do.
 

NameTaken

Skeletron
How can I get if a boss killed you?
I am makung a mod that allows you to resummon a boss if you get killed by it.
I dont exactly know how, but i feel like not only would it probably be easier, but also work better if you just test if the player dies while a boss is alive.
 

E253MechaShadow

Terrarian
Here's a major problem I have.
I'm using the 64-bit branch of tModLoader and quite a number of mods:
"AAMod",
"AlchemistNPCLite",
"BossChecklist",
"CalamityMod",
"CalamityModMusic",
"CalamityRuTranslate",
"chadsfurni",
"Consolaria",
"ControlTrash",
"CosmeticVariety",
"CrystiliumMod",
"DictionaryOfPrefixes",
"Fargowiltas",
"FKBossHealthBar",
"OrchidMod",
"SacredTools",
"SmartDoors",
"StormDiversSuggestions",
"ThoriumMod",
"WeaponOut"
Most of the time when I try loading more content mods and starting the game, it functions very strangely:
- none of the NPCs can be talked to;
- pressing ESC doesn't access the inventory, the crafting menu or the game settings;
- but it does hold my character in place and makes him invincible, even in mid-air;
- collecting an item may cause it to multiply all over my inventory.

Everything else (except these VERY BASIC features) seems to work fine. Here are some of the mods that caused this:
Antiaris, Fargo's Souls, Calamity Vanities, AlchemistNPC Lite.
Sometimes it happens, sometimes doesn't.
 
Last edited:

Drachenkeks

Steampunker
Does anyone know how to make a chainsaw or jackhammer like tool?
I cant find anything about that in the tmodloader example mod ^^'
 
Top Bottom