Standalone [1.3] tModLoader - A Modding API

idk where to report bugs for the loader so im just putting it here and idk if its just a prob with calamity or the tmodloader but i tryed to join a friend and i had calamity installed but every time i tryed to join it would uninstall calamity then freeze the game
 
idk where to report bugs for the loader so im just putting it here and idk if its just a prob with calamity or the tmodloader but i tryed to join a friend and i had calamity installed but every time i tryed to join it would uninstall calamity then freeze the game
Do you and your friend have the same mods installed? Have you made sure to reload your mods before trying to connect? I've experienced that the client will crash when attempting to connect to a server that has different mods installed.
 
Can anyone help me with my trophy, when I reload my mod it says That there is something wrong with AddMapEntry, here is my code:
Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace ChaosMod.Items.Trophys
{
    public class TombRavagerTrophy : ModTile
    {
        public override void SetDefaults()
        {
            Main.tileFrameImportant[Type] = true;
            Main.tileLavaDeath[Type] = true;
            TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall);
            TileObjectData.newTile.StyleHorizontal = true;
            TileObjectData.newTile.StyleWrapLimit = 42;
            TileObjectData.addTile(Type);         
            disableSmartCursor = true;
            AddMapEntry(new Color(120, 85, 60), "TombRavagerTrophy_Placed");
        }
        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            Item.NewItem(i * 16, j * 16, 32, 16, mod.ItemType("TombRavagerTrophy"));
        }
 
I do not know if this has been reported yet, but tmodloader won't download in any of my browsers, I have my antivirus disabled and still all it will download is 1mb and then it will say download failed.. Any solutions? (yes, i'm trying to download it from the github.. just to make that clear)
 
a mod that i installed via tmodloader keeps having an error and now i can`t play terraria because the mod wont work.
does anyone have a solution for this=
i`ve already tried reinstalling terraria and tmodloader.
 
My friend had the same problem with tmodloader, nothing he tried could change the problem with tmodloader
[doublepost=1518376984,1518376920][/doublepost]also, does anyone even notice when I post something, cause nobody is responding to my question about the trophy?
[doublepost=1518377053][/doublepost]
Can anyone help me with my trophy, when I reload my mod it says That there is something wrong with AddMapEntry, here is my code:
Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace ChaosMod.Items.Trophys
{
public class TombRavagerTrophy : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall);
TileObjectData.newTile.StyleHorizontal = true;
TileObjectData.newTile.StyleWrapLimit = 42;
TileObjectData.addTile(Type);
disableSmartCursor = true;
AddMapEntry(new Color(120, 85, 60), "TombRavagerTrophy_Placed");
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 32, 16, mod.ItemType("TombRavagerTrophy"));
}
 
My friend had the same problem with tmodloader, nothing he tried could change the problem with tmodloader
[doublepost=1518376984,1518376920][/doublepost]also, does anyone even notice when I post something, cause nobody is responding to my question about the trophy?
[doublepost=1518377053][/doublepost]
Look at how ExampleMod does AddMapEntry, it's not like that.
 
I got this a while ago and turned on some mods, but when I tried playing recently, I keep getting this message and then it proceeds to reload my mods and I can't turn it off. Is there any way to delete mods without using the game?

Field not found: 'Terraria.Item.toolTip'.
at CrystiliumMod.Items.Accessories.DiamondRing.SetDefaults(Item item)
at Terraria.ModLoader.ItemLoader.SetDefaults(Item item, Boolean createModItem)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
I got this a while ago and turned on some mods, but when I tried playing recently, I keep getting this message and then it proceeds to reload my mods and I can't turn it off. Is there any way to delete mods without using the game?

Field not found: 'Terraria.Item.toolTip'.
at CrystiliumMod.Items.Accessories.DiamondRing.SetDefaults(Item item)
at Terraria.ModLoader.ItemLoader.SetDefaults(Item item, Boolean createModItem)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
If you hold down shift before the game starts loading mods, it'll skip loading any mods. Then you can disable whatever mods are causing the issue.
 
hi this is my first time posting and usally i can figure out how to do most things myself tho i just got back from vacation and about half my mods stopped working with the 0.10.1.1 updated tModloader with the following error. can someone tell me how to fix this
 

Attachments

  • Loading Errors.txt
    2.1 KB · Views: 243
hi this is my first time posting and usally i can figure out how to do most things myself tho i just got back from vacation and about half my mods stopped working with the 0.10.1.1 updated tModloader with the following error. can someone tell me how to fix this
Rename the exe to "Terraria.exe"
 
I keep getting these errors that i cannot fix,

\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(62,26) : warning CS0114: 'Potato2.NPCs.Crystalzombie.OnHitPlayer(Terraria.Player, int, bool)' hides inherited member 'Terraria.ModLoader.ModNPC.OnHitPlayer(Terraria.Player, int, bool)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(34,3) : error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(34,3) : error CS0019: Operator '&&' cannot be applied to operands of type 'float' and 'bool'
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(65,51) : error CS1002: ; expected
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(65,54) : error CS1002: ; expected
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(65,54) : error CS1525: Invalid expression term ','
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(65,56) : error CS1002: ; expected

Code:
31
 public override float SpawnChance(NPCSpawnInfo spawnInfo)
 {
 SpawnCondition.OverworldNightMonster.Chance && Main.hardMode ? 0.35f : 0f;
 }

 public override void HitEffect(int hitDirection, double damage)
 {
 for (int i = 0; i < 10; i++)
 {
 int dustType = Main.rand.Next(97, 118);
 int dustIndex = Dust.NewDust(npc.position, npc.width, npc.height, dustType);
 Dust dust = Main.dust[dustIndex];
 dust.velocity.X = dust.velocity.X + Main.rand.Next(-50, 51) * 0.01f;
 dust.velocity.Y = dust.velocity.Y + Main.rand.Next(-50, 51) * 0.01f;
 dust.scale *= 1f + Main.rand.Next(-30, 31) * 0.01f;
 }
 }

 public override void NPCLoot()
 {

 {
 if (Main.rand.Next(1) == 0)
 {
 Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("pshard"), Main.rand.Next(1, 4));
 }
 }
 }

 public virtual void OnHitPlayer(Player target, int damage, bool crit)
 { if (Main.rand.Next(2) == 0)
 {
 player.AddBuff(mod.BuffType)("crystallized") 600, true;
 }
 }
 }
}
70
[doublepost=1518486914,1518486896][/doublepost]Please help
 
I keep getting these errors that i cannot fix,

\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(62,26) : warning CS0114: 'Potato2.NPCs.Crystalzombie.OnHitPlayer(Terraria.Player, int, bool)' hides inherited member 'Terraria.ModLoader.ModNPC.OnHitPlayer(Terraria.Player, int, bool)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(34,3) : error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(34,3) : error CS0019: Operator '&&' cannot be applied to operands of type 'float' and 'bool'
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(65,51) : error CS1002: ; expected
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(65,54) : error CS1002: ; expected
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(65,54) : error CS1525: Invalid expression term ','
\Documents\My Games\Terraria\ModLoader\Mod Sources\Potato2\NPCs\Crystalzombie.cs(65,56) : error CS1002: ; expected

Code:
31
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
SpawnCondition.OverworldNightMonster.Chance && Main.hardMode ? 0.35f : 0f;
}

public override void HitEffect(int hitDirection, double damage)
{
for (int i = 0; i < 10; i++)
{
int dustType = Main.rand.Next(97, 118);
int dustIndex = Dust.NewDust(npc.position, npc.width, npc.height, dustType);
Dust dust = Main.dust[dustIndex];
dust.velocity.X = dust.velocity.X + Main.rand.Next(-50, 51) * 0.01f;
dust.velocity.Y = dust.velocity.Y + Main.rand.Next(-50, 51) * 0.01f;
dust.scale *= 1f + Main.rand.Next(-30, 31) * 0.01f;
}
}

public override void NPCLoot()
{

{
if (Main.rand.Next(1) == 0)
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("pshard"), Main.rand.Next(1, 4));
}
}
}

public virtual void OnHitPlayer(Player target, int damage, bool crit)
{ if (Main.rand.Next(2) == 0)
{
player.AddBuff(mod.BuffType)("crystallized") 600, true;
}
}
}
}
70
[doublepost=1518486914,1518486896][/doublepost]Please help
These are all easily google-able programming syntax problems.

For example, it says you cant use && with bool and float, which makes sense, since
true && 1.34f
doesn't make sense.

The hides inherited thing is also a simple google away. You make a new method that hides the inherited method. You likely wanted to use override there.

Here:
player.AddBuff(mod.BuffType)("crystallized") 600, true;
you simply have the ) in the wrong place. () surround the parameters of methods, and both AddBuff and BuffType are methods.
 
Hi Jopojelly. I've been using some of your mods for quite some time and now I'm trying to start making my own (for now, just a simple furniture mod).
I'm starting by making the Red Dye placeable. I want it to be placed on tables AND on the ground, but I'm not being able to do that.
I can only enable it to be placed on one or the other.
This is my code:


using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Enums;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;

namespace RascalFurn.Tiles
{
public class RedDye : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1);
TileObjectData.newTile.Height = 2;
TileObjectData.newTile.CoordinateHeights = new int[]{ 16 , 16 };
Main.tileNoAttach[Type] = true;
TileObjectData.newTile.StyleHorizontal = true;
//TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleOnTable1x1);
TileObjectData.newTile.UsesCustomCanPlace = true;

TileObjectData.addTile(Type);


ModTranslation name = CreateMapEntryName();
name.SetDefault("Red Dye (Placeable)");
//AddMapEntry(new Color(200, 200, 200), name);
dustType = mod.DustType("Sparkle");
disableSmartCursor = true;

}

public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}

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


--------------------------------------------------------------------------------------------------------------------------------------------

With that code, I can place it on tables just fine. I also tried TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2):
I was able to place it on the ground, but no on tables with that.

What am I missing? Thanks!!!
 
Hi Jopojelly. I've been using some of your mods for quite some time and now I'm trying to start making my own (for now, just a simple furniture mod).
I'm starting by making the Red Dye placeable. I want it to be placed on tables AND on the ground, but I'm not being able to do that.
I can only enable it to be placed on one or the other.
This is my code:


using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Enums;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;

namespace RascalFurn.Tiles
{
public class RedDye : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1);
TileObjectData.newTile.Height = 2;
TileObjectData.newTile.CoordinateHeights = new int[]{ 16 , 16 };
Main.tileNoAttach[Type] = true;
TileObjectData.newTile.StyleHorizontal = true;
//TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleOnTable1x1);
TileObjectData.newTile.UsesCustomCanPlace = true;

TileObjectData.addTile(Type);


ModTranslation name = CreateMapEntryName();
name.SetDefault("Red Dye (Placeable)");
//AddMapEntry(new Color(200, 200, 200), name);
dustType = mod.DustType("Sparkle");
disableSmartCursor = true;

}

public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}

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


--------------------------------------------------------------------------------------------------------------------------------------------

With that code, I can place it on tables just fine. I also tried TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2):
I was able to place it on the ground, but no on tables with that.

What am I missing? Thanks!!!
You need something like
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
come to discord if you have more questions
 
v0.10.1.2
-Much faster mod loading speed. Rebuild mods with 0.10.1.2 to use
-Better memory utilization
-ModSide filtering on ModBrowser
-Last Used mods notification - Helps remind players which mods were used recently
-Fresh install Player and World migration instructions
-Fix Failed to resolve Terraria.exe error
-Fix MP joining error after reloading mods
-Fix Mono compilation error with System.Core
-Fix knockback modification bug
-Fix NoSync mod bug
-Fix modded banner kill counts not syncing
-Fix imgur behind firewall crash
-Fix an IndexOutOfBounds with GlobalNPC applying ModBuff
-Fix blockloot support for Bags
-Fix spaces in build.txt crash
-Fix Buying back from NPC value depreciation
-Fix empty AddMapEntry crash
-Fix throwing torches
-Allow Thrown weapon prefixes
-Simplified localization through .lang files
-ModTile - Outlines and Smart interact support
-Mod/GlobalItem.ChoosePrefix
-ModPrefix support
-Mod.UpdateMusic - New parameter for Music Priority.
-Mod/GlobalNPC.SpecialNPCLoot - Useful for worm style loot dropping
-Mod.UpdateUI - Should allow mods to fix some hotkey and UI bugs
-ExampleMod:
--SyncPlayer and ModifySunLightColor method examples
--ExampleMagicMirror and ExampleLifeFruit
-Translations
--Polish
--Portuguese
--Russian

Finally, another update. Custom prefixes are in!

Also, happy Single Awareness Day!
 
That missing and new mods feature will be very useful. That reminds me, on the Discord server announcements channel on 9/29/17, there was a feature to show memory usage of mods. Is that still coming?
 
Running Terraria on Linux, the new version of tModloader is crashing while trying to load my mods. I'm not seeing a way to download the previous version so I can downgrade and unfortunately I don't still seem to have a copy.

Edit: I did eventually get it to work but it took three tries. The first two it crashed while initializing mods but on a different mod both times.
 
Back
Top Bottom