tModLoader Official tModLoader Help Thread

Now it says this:
image.jpg
 
No, Windows. On a Dell PC.
[doublepost=1502381570,1502381546][/doublepost]Same notice pops up, just finished booting it up to that point.
 
No, Windows. On a Dell PC.
[doublepost=1502381570,1502381546][/doublepost]Same notice pops up, just finished booting it up to that point.
do as i say
1. reinstall your terraria files
2. once installed rename the default terraria.exe in the terraria files to somthing lile ???
3. transfer all the tmod files inside the .zim into the terraria files
4. start terraria up once its done
[doublepost=1502381931][/doublepost]also download the windows version
https://forums.terraria.org/index.php?threads/1-3-tmodloader-a-modding-api.23726/
 
So I delete all the files and reinstall them via the integrity verification?
[doublepost=1502382066,1502382028][/doublepost]I have installed the windows addition.
 
So I delete all the files and reinstall them via the integrity verification?
[doublepost=1502382066,1502382028][/doublepost]I have installed the windows addition.
yes basicly
thats what i did and my tmodloader works fine
and btw i have 5 different versions of tmod loader installed
 
Huh.
[doublepost=1502382507,1502382378][/doublepost]I deleted my files, and validated them, and it says they were all successfully validated despite none of them being there.
[doublepost=1502382913][/doublepost]
do as i say
1. reinstall your terraria files
2. once installed rename the default terraria.exe in the terraria files to somthing lile ???
3. transfer all the tmod files inside the .zim into the terraria files
4. start terraria up once its done
[doublepost=1502381931][/doublepost]also download the windows version
https://forums.terraria.org/index.php?threads/1-3-tmodloader-a-modding-api.23726/
Also, I can't find this default Terraria.exe.
 
Hey, I have a problem. So I have terraria worlds and characters on my PC and I copied them on my other PC. I launched Terraria with tmodloader but the worlds aren't there, but the characters are.
 
Thank god, it worked. The players and worlds and mods didn't transfer though. Guess it's a good time to start fresh!
 
there's a mod that is making me unable to buy things from the Town NPC's, does anybody know witch out of the following mods, is making this happen: Fargo, alchemistNPC, calamity, imksushi or reduced grinding. Pls help
 
I need help: I have a spear, that whenever I use it, the projectile stays in place, but the rotation and everything else is correct.

Does anyone else know what I am doing wrong?
It would also help if I could just have the spear projectile's code.
Thank you in advance!

Code:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;

namespace LegendOfMutater.Projectiles.Spear
{
    public class PermafrostProj : ModProjectile
    {
        public override void SetDefaults()
        {
            projectile.width = 60;
            projectile.height = 60;
            projectile.aiStyle = 19;
            projectile.friendly = true;
            projectile.tileCollide = false;
            projectile.melee = true;
            projectile.penetrate = -1;
            projectile.ownerHitCheck = true;
            projectile.hide = true;
        }
       
        public float movementFactor
        {
            get { return projectile.ai[0]; }
            set { projectile.ai[0] = 10; }
        }
        public override void AI()
        {
            Player projOwner = Main.player[projectile.owner];
            Vector2 ownerMountedCenter = projOwner.RotatedRelativePoint(projOwner.MountedCenter, true);
            projectile.direction = projOwner.direction;
            projOwner.heldProj = projectile.whoAmI;
            projOwner.itemTime = projOwner.itemAnimation;
            projectile.position.X = ownerMountedCenter.X - (float)(projectile.width / 2);
            projectile.position.Y = ownerMountedCenter.Y - (float)(projectile.height / 2);
            if (!projOwner.frozen)
            {
                if (movementFactor == 0f)
                {
                    movementFactor = 3f;
                    projectile.netUpdate = true;
                }
                if (projOwner.itemAnimation < projOwner.itemAnimationMax / 3)
                {
                    movementFactor -= 2.4f;
                }
                else
                {
                    movementFactor += 2.1f;
                }
            }
            projectile.position += projectile.velocity * movementFactor;
            if (projOwner.itemAnimation == 0)
            {
                projectile.Kill();
            }
            projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + MathHelper.ToRadians(135f);
            if (projectile.spriteDirection == -1)
            {
                projectile.rotation -= MathHelper.ToRadians(90f);
            }
           
        }
    }
}
 
I need help: I have a spear, that whenever I use it, the projectile stays in place, but the rotation and everything else is correct.

Does anyone else know what I am doing wrong?
It would also help if I could just have the spear projectile's code.
Thank you in advance!

Code:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;

namespace LegendOfMutater.Projectiles.Spear
{
    public class PermafrostProj : ModProjectile
    {
        public override void SetDefaults()
        {
            projectile.width = 60;
            projectile.height = 60;
            projectile.aiStyle = 19;
            projectile.friendly = true;
            projectile.tileCollide = false;
            projectile.melee = true;
            projectile.penetrate = -1;
            projectile.ownerHitCheck = true;
            projectile.hide = true;
        }
      
        public float movementFactor
        {
            get { return projectile.ai[0]; }
            set { projectile.ai[0] = 10; }
        }
        public override void AI()
        {
            Player projOwner = Main.player[projectile.owner];
            Vector2 ownerMountedCenter = projOwner.RotatedRelativePoint(projOwner.MountedCenter, true);
            projectile.direction = projOwner.direction;
            projOwner.heldProj = projectile.whoAmI;
            projOwner.itemTime = projOwner.itemAnimation;
            projectile.position.X = ownerMountedCenter.X - (float)(projectile.width / 2);
            projectile.position.Y = ownerMountedCenter.Y - (float)(projectile.height / 2);
            if (!projOwner.frozen)
            {
                if (movementFactor == 0f)
                {
                    movementFactor = 3f;
                    projectile.netUpdate = true;
                }
                if (projOwner.itemAnimation < projOwner.itemAnimationMax / 3)
                {
                    movementFactor -= 2.4f;
                }
                else
                {
                    movementFactor += 2.1f;
                }
            }
            projectile.position += projectile.velocity * movementFactor;
            if (projOwner.itemAnimation == 0)
            {
                projectile.Kill();
            }
            projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + MathHelper.ToRadians(135f);
            if (projectile.spriteDirection == -1)
            {
                projectile.rotation -= MathHelper.ToRadians(90f);
            }
          
        }
    }
}
I'm afraid I don't have the vanilla spear AI at hand right now, but I do think I can help you here.
You have got these two lines somewhere near the top of you projectile AI:
Code:
projectile.position.X = ownerMountedCenter.X - (float)(projectile.width / 2);
projectile.position.Y = ownerMountedCenter.Y - (float)(projectile.height / 2);
After that you update the position with the velocity of the projectile, as you should.
These two lines, however, are called every frame, so if your projectile has moved on one frame, it will reset its position on the next.
You might want to only call those lines when the projectile has just spawned, either in SetDefaults (which I don't recommend) or in the AI, where you check if it's the first frame like so:
Code:
if(projectile.ai[1] == 0)
{    
    projectile.position.X = ownerMountedCenter.X - (float)(projectile.width / 2);
    projectile.position.Y = ownerMountedCenter.Y - (float)(projectile.height / 2);
    projectile.ai[1] = 1;
}
Hope this helps.
 
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
 
When going about updating a mod, do we just republish it or do we just rebuild it?
EDIT: I figured it out
 
Last edited:
I keep getting this error every time I start-up.

Field not found: 'Terraria.Item.toolTip'.
at ExampleMod.Items.BorealWoodFence.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 keep getting this error every time I start-up.

Field not found: 'Terraria.Item.toolTip'.
at ExampleMod.Items.BorealWoodFence.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)
You will probably want to remove the line where you assing item.toolTip and instead use the following functionality:
Code:
public override void SetStaticDefaults()
{
    Tooltip.SetDefault("This is my item's tooltip.");
}

Edit: Nevermind, read the question wrong.
 
Last edited:
I keep getting this error every time I start-up.

Field not found: 'Terraria.Item.toolTip'.
at ExampleMod.Items.BorealWoodFence.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)
You have an outdated mod enabled, delete it.
 
Back
Top Bottom