Standalone [1.3] tModLoader - A Modding API

Error happens when I click the button for installing, then first i clicked open file but after i did that again it opened...idk
You mean installing a mod, right? Did you read the error message in the window there?
 
You mean installing a mod, right? Did you read the error message in the window there?
first error after trying to install mod was about heavy load on server or something, second error was cannot find file specified, then it opened the folder with Runtime Error file which showed the same error: "cannot find file specified"
 
I want when hit by a projectile at the enemy, it appeared the dust. When I use this code nothing happens
Code:
        public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
        {
            int a = Dust.NewDust(new Vector2(target.position.X, target.position.Y + 2f), target.width, target.height, 21, target.velocity.X * 0.2f, target.velocity.Y * 0.2f, 100, default(Color), 2f);
            Main.dust[a].noGravity = true;
            Main.dust[a].velocity *= 0.3f;
            Dust b = Main.dust[a];
            b.velocity.X = b.velocity.X - target.velocity.X * 0.2f;
        }
 
Last edited:
And about ray/stream projectiles, projectile moves too fast for dust that's why holes are forming
 
Quick and fast question, is there any way to hide an NPC's health bar? Specifically, I need this to prevent a worm NPC from showing the (usually wrong) hp of its single parts. Vanilla worms seem to use a bool called "dontCountMe", but setting it to true didn't seem to do anything.
 
Hey whenever I try to download a mod it says "The mod browser server is currently under heavy load. Try again later."
Can I do anything to fix this or do I just have to wait?
 
Hello Please help me
Code:
    public override void UpdateEquip(Player player)
     {
       player.moveSpeed += 0.05f;
     }
How do i get to know all of the player. stats like there it is player.moveSpeed
 
Mod browser appears to be under heavy load, looks like I'll have to learn how to update mods manually for the time being.
 
Mod browser appears to be under heavy load, looks like I'll have to learn how to update mods manually for the time being.
Hopefully thats get Better
On some Places Summer Holidays just Started,i think thats why the servers overloaded C:
 
umm anyone can give me direct links for cheat sheet & creative mode mod - the commander (whatever it is)?
 
Quick and fast question, is there any way to hide an NPC's health bar? Specifically, I need this to prevent a worm NPC from showing the (usually wrong) hp of its single parts. Vanilla worms seem to use a bool called "dontCountMe", but setting it to true didn't seem to do anything.
Hm, it looks like health bars are terribly hardcoded into the game. I'll have to add a hook for that in the next update.

Hello Please help me
Code:
    public override void UpdateEquip(Player player)
     {
       player.moveSpeed += 0.05f;
     }
How do i get to know all of the player. stats like there it is player.moveSpeed
Unfortunately, the only way is to decompile Terraria then look at Player.cs.
 
Hm, it looks like health bars are terribly hardcoded into the game. I'll have to add a hook for that in the next update.


Unfortunately, the only way is to decompile Terraria then look at Player.cs.

or just Using Visual Studio autocomplete
 
Can anyone help me add more than one craft group. I can't seem to figure out how to add more.

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

namespace ExampleMod
{
    public class ExampleMod : Mod
    {
        public ExampleMod()
        {
            Properties = new ModProperties()
            {
                Autoload = true,
                AutoloadGores = true,
                AutoloadSounds = true
            };
        }

        public override void AddRecipeGroups()
        {
            RecipeGroup group = new RecipeGroup(() => Lang.misc[37] + " " + GetItem("ExampleItem").item.name, new int[]
            {
                ItemType("ExampleItem"),
                ItemType("EquipMaterial"),
                ItemType("BossItem")
            });
            RecipeGroup.RegisterGroup("ExampleMod:ExampleItem", group);
        }
    }
}
 
What is going on with the tmodloader mod browser? The server has been down for hours and is annoying me.
 
So My mod browser is under heavy load
what does it means?
does that means youre working on the mod browser?
 
Hm, it looks like health bars are terribly hardcoded into the game. I'll have to add a hook for that in the next update.


Unfortunately, the only way is to decompile Terraria then look at Player.cs.
oh could you upload Player.cs somewhere on your github?
 
What is going on with the tmodloader mod browser? The server has been down for hours and is annoying me.
So My mod browser is under heavy load
what does it means?
does that means youre working on the mod browser?
That means the daily bandwidth limit it has was reached. I'm investigating the cause of the sudden jump in downloads.
oh could you upload Player.cs somewhere on your github?
No, we can't. Not allowed
 
So My mod browser is under heavy load
what does it means?
does that means youre working on the mod browser?
The Download Server for Tmodloader is overloaded with People that trys to download mods
 
I'm having an issue with some experimental code.
I have a body armor item based off of ExampleMod. What I want it to do is copy the color of the player's skin color.
However, after adding in this code, any accessories worn around the body area stop being drawn.
Code:
public override void DrawArmorColor(Player drawPlayer, float shadow, ref Color color, ref int glowMask, ref Color glowMaskColor)
{
    PlayerDrawInfo info = new PlayerDrawInfo();

    color = info.bodyColor;
}
The armor's color is set correctly, but as said above, all accessories around the body area (shield, balloon, etc) stop drawing. The accessories appear again as soon as I take the armor off.

Additionally, the Shield of Cthulhu does not draw on dash, and neither does the afterimage effect.
 
Last edited:
I'm having an issue with some experimental code.
I have a body armor item based off of ExampleMod. What I want it to do is copy the color of the player's skin color.
However, after adding in this code, any accessories worn around the body area stop being drawn.
Code:
public override void DrawArmorColor(Player drawPlayer, float shadow, ref Color color, ref int glowMask, ref Color glowMaskColor)
{
    PlayerDrawInfo info = new PlayerDrawInfo();
    PlayerLayer.Body.layer.Invoke(info);

    color = info.bodyColor;
}
The armor's color is set correctly, but as said above, all accessories around the body area (shield, balloon, etc) stop drawing. The accessories appear again as soon as I take the armor off.

Additionally, the Shield of Cthulhu does not draw on dash, and neither does the afterimage effect.
That sounds like an exception is being thrown. Surround with try catch and log the exception.
 
Back
Top Bottom