tModLoader Official tModLoader Help Thread

I just updated my TModloader to v0.10.0.2. However, I am unable to host a server. It get stuck at the "Starting Server..." page.

I tried a old world and a newly created world, but I could not host any of them.

Any help would be greatly appreciated.

Additional Info : Im using Mac

Is there any solutions? Been looking all over for it and cant find any
 
IMG_0657.JPG
Help please.

Trying to install Terraria Overhaul.
[doublepost=1502685149,1502684742][/doublepost]Nvm.
Installed on the second time.
 
If you are on mac or linux you may need to fix the line endings of the tModLoaderServer script. Google how to fix line endings from windows to unix

Which line do i fix? I don't really quite understand the articles that google gave me when i searched for "how to fix line endings from windows to unix"
 
Windows 7,x32,4GB RAM,500 GB memory/
After break about half of year,i ll again try to play some modes again and being f***king shocked.
I was play Tremor+Thorium+Enemy Prefixes+Nightmares Unleashed and there is no problems,crashs or smth else.I can only remember some problems with generaiting large map and nothing more.But now,there is a billion problems.
I cant normal generate a Medium(!) map,90% of launches always errors or crashs.Always out of memory but i m off all apps,while trying to launch this game.Only way to play is host by my friend,but w8 for him not so exicting.I rly dont understand why now i cant normally play with Thorium+Nightmares,than not so long time ago it was ez with 4 modes on large map with 2GB ram.I'm asking for help,what i must change on my PC to play without unstopable errors?
P.S Beforehand,maybe someone will find it difficult to get a grasp of my mistakes in dat text,sry for that(RUS)
 
Last edited:
So I fixed everything, then I re-enabled the Spirit mod and I get this every time I try to load any of my worlds except for a very specific one that works for some reason

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.DoDraw(GameTime gameTime)

Any ideas why only one world loads?
 
I'm trying to make some cross-mod content, how would I go about calling the file that is needed for a projectile? I've tried setting up the if statements, but can't figure out what it is that I have to do to call that certain file. Thanks in advance.
 
I'm trying to make some cross-mod content, how would I go about calling the file that is needed for a projectile? I've tried setting up the if statements, but can't figure out what it is that I have to do to call that certain file. Thanks in advance.
Did you read the cross content guide?
 
Yeah I've tried to read through the call section, but I'm not sure how to go about calling a certain file, and I should also note I'm pretty new to modding and programming. I'm also trying to figure out how to have a weak referenced item that can only be loaded if it's corresponding mod is loaded so that the mod is lenient and doesn't require those mods to run. I know that that is the point of weak references, but I'm not sure on how to make it work for items.
 
Yeah I've tried to read through the call section, but I'm not sure how to go about calling a certain file, and I should also note I'm pretty new to modding and programming. I'm also trying to figure out how to have a weak referenced item that can only be loaded if it's corresponding mod is loaded so that the mod is lenient and doesn't require those mods to run. I know that that is the point of weak references, but I'm not sure on how to make it work for items.
come to discord.
 
Anyone know how to make a custom resource bar. Similar to how Thorium has the inspiration bar for Bard class?
 
Make sure you're actually deriving from ModItem.
It should already be doing that... Anyway, here's my code, maybe you can find something

using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Collections.Generic;
namespace TheFlashMod.Items.Armor
{
public class TheFlashHelmet : ModItem
{
public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Head);
return true;
}

public override void SetDefaults()
{
item.name = "The Flash Helmet";
item.width = 18;
item.height = 18;
item.toolTip = "The CW Flash Helmet!";
item.toolTip2 = "20% movement speed.";
item.tooltip3 = "5% melee speed.";
item.value = 10000;
item.rare = 8;
item.defense = 10;
}
/*
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == mod.ItemType("The Flash Breastplate") && legs.type == mod.ItemType("The Flash Leggings");
}
*/

public override void UpdateArmorSet(Player player)
{
player.setBonus = "Run, Barry, Run!";
player.speedBoost *= 0.25f;
player.ShadowTail = True;
}

public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.AddIngredient(null, "Wood", 1);
r.AddTile(TileID.WorkBenches);
r.SetResult(this);
r.AddRecipe();
}
}
}
 
using Terraria;
using Terraria.ModLoader;

namespace Guraimod.Items
{
public class AnnDogBuff : ModBuff
{
public override void SetDefaults()
{
Main.buffName[Type] = "Dog";
Main.buffTip[Type] = "This is a Cool Pet";
Main.buffNoTimeDisplay[Type] = true;
Main.vanityPet[Type] = true;
}

public override void Update(Player player, ref int buffIndex)
{
player.buffTime[buffIndex] = 18000;
player.GetModPlayer<MyPlayer>(mod).Pet = true;
bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("PetName")] <= 0;
if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(player.position.X + (float)(player.width / 2), player.position.Y + (float)(player.height / 2), 0f, 0f, mod.ProjectileType("PetName"), 0, 0f, player.whoAmI, 0f, 0f);
}
}
}
}
:\Users\admin\Documents\My Games\Terraria\ModLoader\Mod Sources\Guraimod\Items\AnnDogBuff.cs(13,18) : error CS0117: (i translete it from poland) In element „Terraria.Main” no definition „buffName”.
 
It should already be doing that... Anyway, here's my code, maybe you can find something

using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Collections.Generic;
namespace TheFlashMod.Items.Armor
{
public class TheFlashHelmet : ModItem
{
public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Head);
return true;
}

public override void SetDefaults()
{
item.name = "The Flash Helmet";
item.width = 18;
item.height = 18;
item.toolTip = "The CW Flash Helmet!";
item.toolTip2 = "20% movement speed.";
item.tooltip3 = "5% melee speed.";
item.value = 10000;
item.rare = 8;
item.defense = 10;
}
/*
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == mod.ItemType("The Flash Breastplate") && legs.type == mod.ItemType("The Flash Leggings");
}
*/

public override void UpdateArmorSet(Player player)
{
player.setBonus = "Run, Barry, Run!";
player.speedBoost *= 0.25f;
player.ShadowTail = True;
}

public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.AddIngredient(null, "Wood", 1);
r.AddTile(TileID.WorkBenches);
r.SetResult(this);
r.AddRecipe();
}
}
}
You cannot set names and tooltips in SetDefaults (anymore). Check ExampleMod to see how to do that.

Apart from player.ShadowTail = True (true shouldn't be with a capital; C# is case sensitive), at a glance I don't see anything that shouldn't work (assuming you actually defined ShadowTail in your ModPlayer class).
using Terraria;
using Terraria.ModLoader;

namespace Guraimod.Items
{
public class AnnDogBuff : ModBuff
{
public override void SetDefaults()
{
Main.buffName[Type] = "Dog";
Main.buffTip[Type] = "This is a Cool Pet";
Main.buffNoTimeDisplay[Type] = true;
Main.vanityPet[Type] = true;
}

public override void Update(Player player, ref int buffIndex)
{
player.buffTime[buffIndex] = 18000;
player.GetModPlayer<MyPlayer>(mod).Pet = true;
bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("PetName")] <= 0;
if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(player.position.X + (float)(player.width / 2), player.position.Y + (float)(player.height / 2), 0f, 0f, mod.ProjectileType("PetName"), 0, 0f, player.whoAmI, 0f, 0f);
}
}
}
}
:\Users\admin\Documents\My Games\Terraria\ModLoader\Mod Sources\Guraimod\Items\AnnDogBuff.cs(13,18) : error CS0117: (i translete it from poland) In element „Terraria.Main” no definition „buffName”.
Same issue, you can't use buffName and buffTip anymore.

See here how to implement that.
 
can you help me? I cant build a mod source without this popping up

Could not find file 'C:\Program Files\Steam\steamapps\common\Terraria\ModCompile\tModLoaderMac.exe'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Terraria.ModLoader.ModCompile.GetTerrariaReferences(String tempDir, Boolean forWindows)
at Terraria.ModLoader.ModCompile.CompileMod(BuildingMod mod, List`1 refMods, Boolean forWindows, Byte[]& dll, Byte[]& pdb)
at Terraria.ModLoader.ModCompile.Build(BuildingMod mod, IBuildStatus status)
at Terraria.ModLoader.ModCompile.Build(String modFolder, IBuildStatus status)
at Terraria.ModLoader.ModLoader.<>c.<BuildMod>b__65_0(Object _)
 
can you help me? I cant build a mod source without this popping up

Could not find file 'C:\Program Files\Steam\steamapps\common\Terraria\ModCompile\tModLoaderMac.exe'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Terraria.ModLoader.ModCompile.GetTerrariaReferences(String tempDir, Boolean forWindows)
at Terraria.ModLoader.ModCompile.CompileMod(BuildingMod mod, List`1 refMods, Boolean forWindows, Byte[]& dll, Byte[]& pdb)
at Terraria.ModLoader.ModCompile.Build(BuildingMod mod, IBuildStatus status)
at Terraria.ModLoader.ModCompile.Build(String modFolder, IBuildStatus status)
at Terraria.ModLoader.ModLoader.<>c.<BuildMod>b__65_0(Object _)
You didn't install correctly. You skipped that folder.
 
Well, I have an issue where my custom worm despawns or parts of him, if he goes too far of screen, also where in the curseword you change the space between the segments of the worm. Sorry i'm kinda still newbie...
 
Hey I'm new to modding in terraria and I'm trying to go about animating a ModItem in the inventory, I know how to do it with projectiles, is there a similar system with items and if so what are the commands. If there is no similar system how would I go about using the draw in inventory and world commands to change from one texture to another?
 
Back
Top Bottom