• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Begin your search for Journey's End information here and here. Please report bugs and issues for Journey's End here.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

tModLoader Official tModLoader Help Thread

AHIBoy

Steampunker
How do you change the properties of a vanilla tile? For instance, make it produce light? And is it the same for fluids, like water or lava?
If you look up tile “bools” you can see that light is Shine, or Shine2, since I have not coded I do not know how to make it shine, but you could most likely find a tutorial or use example mod. I’m not sure if liquid is the same or different.
 

Eagle 361

Terrarian
I'm new to this world of mods, so someone could tell me how to put a glow effect on a weapon (sword, sickle, bow, etc.) and where to put it
 

terrarian10

Official Terrarian
I was able to make my tmodloader work and i also downloaded a few mods. But for some reason when im making a world with thorium mod enabled, it crashes. And when i initialize calamity mod, it also crashes. Maybe it was because of my 2gb ram, is there any good mod you can recommend that doesnt take much memory
Oh, and enable only one at a time (I eventually realized that) they don't work well together
 

goldenspolo

Terrarian
'sup guys
got a problem with terraria and tmodloader since 1.4 , the games dont launch and a there's a crash report.
I tried to uninstall then reinstall and now terraria don't launch at all and tmodloader keep crashing with this message :
1592848975261.png

I can share the logs folder if it can help too.
 

NameTaken

Skeletron
Would it be possible to make a weapon autoswing if i have a specific buff? for example, i want to make a buff that makes weapon 1 autoswing without making weapon 2 or 3 autoswing.

also how do i make the buff increase my melee damage and swing speed?
 
Last edited:

sparks08

Skeletron
How do I make it so an NPC inflicts a buff on me with a 1 in 3 chance?
Sure thing! :happy:

C#:
    public override void OnHitPlayer(Player player, int damage, bool crit) {
        if (Main.rand.NextBool(3)) {
                player.AddBuff(Buff, Number, true);
        }
    }
Replace 'Buff' with a Buff ID.
Replace 'Number' with how long you want your buff to last. 60 = 1 second.
The '3' in (Main.rand.NextBool(3)) makes it so it has a 1 in 3 chance for the NPC to inflict the buff of your choice.
You can get Buff IDs from here: Buff IDs - The Official Terraria Wiki
Alternatively, you can get Buff IDs from here: Vanilla Buff IDs - GitHub
 
Last edited:

sparks08

Skeletron
'sup guys
got a problem with terraria and tmodloader since 1.4 , the games dont launch and a there's a crash report.
I tried to uninstall then reinstall and now terraria don't launch at all and tmodloader keep crashing with this message :
View attachment 279984
I can share the logs folder if it can help too.
Try uninstalling and reinstalling Terraria one more time on steam.
Also, Tmodloader is now a dlc for Terraria.
After downloading Tmodloader, you will see both Terraria and Tmodloader as seperate games.
You're welcome! :D
 

sparks08

Skeletron
I'm new to this world of mods, so someone could tell me how to put a glow effect on a weapon (sword, sickle, bow, etc.) and where to put it
Try this:
C#:
        public override void AI() {
                    Player owner = Main.player[projectile.owner];
                    projectile.light = Number;
        }
Replace 'Number' with a number ranging from 0 to 1. Remember to put an 'f' at the end of the number so Tmodloader can recognize that the number is a float (decimal)
 
Last edited:

Eagle 361

Terrarian
Try this:
C#:
        public override void AI() {
                    Player owner = Main.player[projectile.owner];
                    projectile.light = Number;
        }
Replace 'Number' with a number ranging from 0 to 1. Remember to put an 'f' at the end of the number so Tmodloader can recognize that the number is a float (decimal)

well, he finds no replacement method
 

NameTaken

Skeletron
I'm pretty sure that that code is for a projectile, i'll try to figure out how to do it for a weapon, I think that you need to use dusts that produce light, kind of like night's edge or fiery greatsword.
 

sparks08

Skeletron
Whoops, sorry about that. I only know how projectiles produce light, not weapons. Like NameTaken said, try using dusts that produce light.
 

Eagle 361

Terrarian
I'm trying to implement a boss in the game, but for some reason, whenever he appears, he disappears immediately, I checked everything and I can't solve the problem (I'm new to mod, programming)


using System;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Private. NPCs
{

[AutoloadBossHead]
public class Private : ModNPC
{


public override void SetDefaults()
{
npc.aiStyle = 5;
npc.lifeMax = 7000;
npc.damage = 15;
npc.defense = 20;
npc.knockBackResist = 0.5f;
npc.width = 130;
npc.height = 264;
animationType = NPCID.DemonEye;
Main.npcFrameCount[npc.type] = 2;
npc.value = Item.buyPrice(0, 40, 75, 45);
npc.npcSlots = 1f;
npc.boss = true;
npc.lavaImmune = true;
npc.noGravity = true;
npc.noTileCollide = true;
npc.HitSound = SoundID.NPCHit9;
npc.DeathSound = SoundID.NPCDeath1;
npc.buffImmune[24] = true;
music = MusicID.Boss2;
npc.netAlways = true;
}
public override void BossLoot(ref string name, ref int potionType)
{
potionType = ItemID.LesserHealingPotion;
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Private"));
}
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
{
npc.lifeMax = (int)(npc.lifeMax * 0.700f * bossLifeScale);
npc.damage = (int)(npc.damage * 0.20f);
}
}
}
 

goldenspolo

Terrarian
Try uninstalling and reinstalling Terraria one more time on steam.
Also, Tmodloader is now a dlc for Terraria.
After downloading Tmodloader, you will see both Terraria and Tmodloader as seperate games.
You're welcome! :D
I know that tmodloader and terraria are not the same game, and this show up when i try to start tmodloader cause terraria litteraly don't start.
I just tried to reinstall both and now terraria crash instead of don't launch and nothing has change for tmod.
Here's the message for terraria:
1592913522362.png

I have the logs of tmodloader if necessary.
 

sparks08

Skeletron
I know that tmodloader and terraria are not the same game, and this show up when i try to start tmodloader cause terraria litteraly don't start.
I just tried to reinstall both and now terraria crash instead of don't launch and nothing has change for tmod.
Here's the message for terraria:
View attachment 280049
I have the logs of tmodloader if necessary.
I'm not sure if I can help as I am not an expert yet, but reading the top section, it seems like Terraria wants you to verify that the XNA Framework has been Installed. Again, I'm not 100% sure, but this is the best I can do to help at the moment.
 
Top Bottom