Standalone [1.3] tModLoader - A Modding API

I may have found a very bizarre bug... Might be due to a faulty installation on my part, but when I attempt to pick up Terraria 1.3.2.1 items, my character is frozen in place and cant react. The item does not go into my inventory either. Is anyone else experiencing this little bug?
 
So, in tAPI I was using a modified version of Shokah's Inventory tweaks which used the PreItemSlotLeftClick hook. Is there some equivalent to this already in tModLoader, or is it planned for the future?
 
Okay, how to create Giant Mushroom-tile?
It's something that requires more programming skills than most other things.

When do you think tmodloader will let mac users host? its so laggy when I host, I need my friend to host ._.
Wait, so you're actually able to host on a Mac?

got some questions:

-how to make a custom biome
(nothing in ExampleMod)

-how do i make my Javelins make dust that looks like a material (wood, iron, gold) when it hits stuff??
when i use the one from my Swordbeam projectile and i change the ID, it will still be transparent and create light.
pls halp ;-; this made me rage the last few days
The ExampleMod actually has a full custom biome, complete with water color and trees. You'll want to look in ExamplePlayer, ExampleWorld, Tiles, Backgrounds, and Waters.

I may have found a very bizarre bug... Might be due to a faulty installation on my part, but when I attempt to pick up Terraria 1.3.2.1 items, my character is frozen in place and cant react. The item does not go into my inventory either. Is anyone else experiencing this little bug?
I have managed to duplicate this bug, but it seems like it's actually a problem with CheatSheet.

weeeeeeell i found a bug on sort inventory and chest when i click the button the mod item disapperar
I can confirm this bug, and it has now been fixed for the next update.
 
It's been a good while since I've used tModLoader, and I see that a lot of features have been added, which is nice! Unfortunately, loading back up my old mod, I'm not surprised I'm having problems, as I started working on it just before 0.7 was released. I am now having issues with override errors - CS0115 - for my accessories. Here's some example code that's giving me errors.

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\Alicorn.cs(23,24) : error CS0115: 'SvardMod.Items.Alicorn.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\ArcaneGlove.cs(22,24) : error CS0115: 'SvardMod.Items.ArcaneGlove.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\BouncyBoots.cs(23,24) : error CS0115: 'SvardMod.Items.BouncyBoots.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\EruptionBoots.cs(23,24) : error CS0115: 'SvardMod.Items.EruptionBoots.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\FrozenShield.cs(30,24) : error CS0115: 'SvardMod.Items.FrozenShield.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\HolyShield.cs(30,24) : error CS0115: 'SvardMod.Items.HolyShield.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\MagicCarpet.cs(22,24) : error CS0115: 'SvardMod.Items.MagicCarpet.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\ManaShell.cs(23,24) : error CS0115: 'SvardMod.Items.ManaShell.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\PanickingAnklet.cs(23,24) : error CS0115: 'SvardMod.Items.PanickingAnklet.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\PanickingWindScarf.cs(23,24) : error CS0115: 'SvardMod.Items.PanickingWindScarf.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\SaberToothNecklace.cs(22,24) : error CS0115: 'SvardMod.Items.SaberToothNecklace.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\SevenStarBracelet.cs(23,24) : error CS0115: 'SvardMod.Items.SevenStarBracelet.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\SevenStarCuffs.cs(23,24) : error CS0115: 'SvardMod.Items.SevenStarCuffs.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\SkyFallBoots.cs(23,24) : error CS0115: 'SvardMod.Items.SkyFallBoots.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\SorcererFlower.cs(23,24) : error CS0115: 'SvardMod.Items.SorcererFlower.UpdateAccessory(Terraria.Player)': no suitable method found to override

c:\Users\Kadesh\Documents\My Games\Terraria\ModLoader\Mod Sources\SvardMod\Items\SorcererStone.cs(22,24) : error CS0115: 'SvardMod.Items.SorcererStone.UpdateAccessory(Terraria.Player)': no suitable method found to override

Looking at the latest revision of the ExampleMod, I see that using player overrides using UpdateAccessory is still a thing, so I'm not sure if I'm now missing a component?

Code:
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace SvardMod.Items
{
   public class HolyShield : ModItem
   {
     public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
     {
       equips.Add(EquipType.Shield);
       return true;
     }

     public override void SetDefaults()
     {
       item.name = "Holy Shield";
       item.width = 24;
       item.height = 30;
       item.toolTip = "Grants immunity to fire blocks, knockback and most debuffs";
       item.toolTip2 = "Increases length of invincibility after taking damage";
       item.value = 100000;
       item.rare = 8;
       item.accessory = true;
       item.defense = 6;
     }

     public override void UpdateAccessory(Player player) // <-- I seem to get the error when attempting an override on Terraria.Player here.
     {
       player.buffImmune[46] = true;
       player.noKnockback = true;
       player.fireWalk = true;
       player.buffImmune[33] = true;
       player.buffImmune[36] = true;
       player.buffImmune[30] = true;
       player.buffImmune[20] = true;
       player.buffImmune[32] = true;
       player.buffImmune[31] = true;
       player.buffImmune[35] = true;
       player.buffImmune[23] = true;
       player.buffImmune[22] = true;
       player.longInvince = true;
     }

     public override void AddRecipes()
     {
       ModRecipe recipe = new ModRecipe(mod);
       recipe.AddIngredient(ItemID.AnkhShield);
       recipe.AddIngredient(ItemID.CrossNecklace);
       recipe.AddTile(114);
       recipe.SetResult(this);
       recipe.AddRecipe();
     }
   }
}
 
Last edited:
QUESTION. If i update tmodloader, will the mods i have installed currently be uninstalled, and will my characters or worlds dissapear?

Edit: yeah i'm kind of new to tmodloader -_-
 
Making a mod is impossible. There is no such thing as "Open Sources", I need a folder called "YourSword" to play Terraria and and when I made Terraria deleted.
 
The update times are extremely long, I've been updating the Tremor mod for 20-ish minutes and its not even 1/20th of the way done updating, it used to update pretty quick but now it seems ill have to wait extremely long just to update my favorite mod. All mods do this as well, even some with little content. Please help.
 
It's been a good while since I've used tModLoader, and I see that a lot of features have been added, which is nice! Unfortunately, loading back up my old mod, I'm not surprised I'm having problems, as I started working on it just before 0.7 was released. I am now having issues with override errors - CS0115 - for my accessories. Here's some example code that's giving me errors.



Looking at the latest revision of the ExampleMod, I see that using player overrides using UpdateAccessory is still a thing, so I'm not sure if I'm now missing a component?

Code:
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace SvardMod.Items
{
   public class HolyShield : ModItem
   {
     public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
     {
       equips.Add(EquipType.Shield);
       return true;
     }

     public override void SetDefaults()
     {
       item.name = "Holy Shield";
       item.width = 24;
       item.height = 30;
       item.toolTip = "Grants immunity to fire blocks, knockback and most debuffs";
       item.toolTip2 = "Increases length of invincibility after taking damage";
       item.value = 100000;
       item.rare = 8;
       item.accessory = true;
       item.defense = 6;
     }

     public override void UpdateAccessory(Player player) // <-- I seem to get the error when attempting an override on Terraria.Player here.
     {
       player.buffImmune[46] = true;
       player.noKnockback = true;
       player.fireWalk = true;
       player.buffImmune[33] = true;
       player.buffImmune[36] = true;
       player.buffImmune[30] = true;
       player.buffImmune[20] = true;
       player.buffImmune[32] = true;
       player.buffImmune[31] = true;
       player.buffImmune[35] = true;
       player.buffImmune[23] = true;
       player.buffImmune[22] = true;
       player.longInvince = true;
     }

     public override void AddRecipes()
     {
       ModRecipe recipe = new ModRecipe(mod);
       recipe.AddIngredient(ItemID.AnkhShield);
       recipe.AddIngredient(ItemID.CrossNecklace);
       recipe.AddTile(114);
       recipe.SetResult(this);
       recipe.AddRecipe();
     }
   }
}
UpdateAccessory now has an extra "bool hideVisual" parameter.

QUESTION. If i update tmodloader, will the mods i have installed currently be uninstalled, and will my characters or worlds dissapear?

Edit: yeah i'm kind of new to tmodloader -_-
Your mods won't be uninstalled, but for this particular update, any mod that uses the ModNPC.Autoload hook will need to update in order to use them. Your characters and worlds will stay, just like how they stay in vanilla when Terraria itself updates.

The update times are extremely long, I've been updating the Tremor mod for 20-ish minutes and its not even 1/20th of the way done updating, it used to update pretty quick but now it seems ill have to wait extremely long just to update my favorite mod. All mods do this as well, even some with little content. Please help.
Tremor is a pretty large mod, plus the mod browser seems to be under very heavy load today. Another option is to download the mods from their forum pages.
 
So when using a 3rd party dedicated server we just add: " modpath=/Mods/ " to our config? assuming we make a folder called Mods in the main directory we have access to via whatever crontrol panel, or would we need the full directory path with drive letter?
 
i have an error:
error.CS1704: An assembly with the same simple name 'MP3Sharp, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=null has already been imported. Try to removing one of the references or sign them to enable side-by-side
 
i have an error:
error.CS1704: An assembly with the same simple name 'MP3Sharp, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=null has already been imported. Try to removing one of the references or sign them to enable side-by-side
Delete the MP3Sharp.dll file in your Terraria Steam folder.
 
but it says that that mp3sharp is not found
however i dont delete it, i just cut it for this error,but i delete it completely
now it works thanks :D
 
Last edited:
Back
Top Bottom