• PC NEWS: 1.4.2.3 update is out! More info here. Report bugs here
  • CONSOLE 1.4 NEWS: The current plan is to have Terraria: Journey's End out for Xbox and PlayStation in Q3 2021 (Jul-Sep). Switch will follow shortly afterwards. More info here. Stay up to date with console news here
  • MOBILE NEWS: Stay up to date with the latest mobile news here. Report mobile bugs here

tModLoader Official tModLoader Help Thread

Talus

The Destroyer
Hello, I am in dire need of help, for the past months, I have installed, uninstalled and attempted to fix this tmodloader error. One day, as soon as I was about to compile my mod, this appeared:
Screen Shot 2021-04-10 at 9.28.25 AM.png

I thought that this was innocent enough and downloaded the file. I exited terraria and went back in only to see this error:
Screen Shot 2021-04-10 at 9.29.54 AM.png

This error is unfixable without deleting every boss in my mod. pls help me!
 

plasmawario

Terrarian
Hello, i'm looking for some help for creating my own prefix modifiers for weapons and accessories. i know that there is a modifier called "Deadly" that has different stats depending on which class it's applied to. I'm looking to get a similar thing applied to a custom modifier, but i'd like to use different stats for all types of items. My first thought was to use different scripts for each modifier class type, but that failed because the game apparently doesn't allow 2 of the same modifier name types to exist, despite Deadly existing for both melee and ranged weapons in the vanilla game. (This part has been solved) Additionally, i'd like to know how to add accessory modifiers, because the SetStats class doesn't list any accessory prefix values for me to edit. Thanks in advance! (i already have working code for a custom prefix that works for the main classes, but not accessories)
 
Last edited:
Hey all, I want to make a bomb that will heal players if they are in the explosion zone, I'm new to modding & c# so I don't know how can I do it. Can anyone help me? (If there is a tutorial for this, I'd gladly check it out too)
hastebin here is my code
 

Talus

The Destroyer
make the bomb cause a healing Debuff for 60 milliseconds, the Debuff should give the player health += number, I forget the variables
 

Will-Banksy

Skeletron Prime
Hey all, I want to make a bomb that will heal players if they are in the explosion zone, I'm new to modding & c# so I don't know how can I do it. Can anyone help me? (If there is a tutorial for this, I'd gladly check it out too)
hastebin here is my code
In the code for when the bomb explodes, loop through Main.player and see if any of the players are within some radius of the centre of the projectile, if they are then
C#:
player.statLife += healAmount; // Gives Health
player.HealEffect(healAmount, true); // Healing effect
 

Kyolo

Steampunker
Hello, when I tried to rebuild my mod under Linux via tModLoader I got this error :
Code:
Value cannot be null.
Parameter name: document
System.ArgumentNullException: Value cannot be null.
Parameter name: document
  at Mono.Cecil.Cil.SequencePoint..ctor (Int32 offset, Document document) [0x00009] in data-0x7fc992019010
  at Mono.Cecil.SignatureReader.ReadSequencePoints (Document document) [0x000f9] in data-0x7fc992019010
  at Mono.Cecil.MetadataReader.ReadSequencePoints (MethodDefinition method) [0x0004e] in data-0x7fc992019010
  at Mono.Cecil.Cil.PortablePdbReader.ReadSequencePoints (MethodDebugInformation method_info) [0x00000] in data-0x7fc992019010
  at Mono.Cecil.Cil.PortablePdbReader.Read (MethodDefinition method) [0x00007] in data-0x7fc992019010
  at Mono.Cecil.ImmediateModuleReader.ReadMethodsSymbols (TypeDefinition type, ISymbolReader symbol_reader) [0x0003d] in data-0x7fc992019010
  at Mono.Cecil.ImmediateModuleReader.ReadTypesSymbols (Collection[T] types, ISymbolReader symbol_reader) [0x00029] in data-0x7fc992019010
  at Mono.Cecil.ImmediateModuleReader.ReadTypesSymbols (Collection[T] types, ISymbolReader symbol_reader) [0x0001b] in data-0x7fc992019010
  at Mono.Cecil.ImmediateModuleReader.ReadSymbols (ModuleDefinition module) [0x00010] in data-0x7fc992019010
  at Mono.Cecil.ModuleWriter.Write (ModuleDefinition module, Disposable[T] stream, WriterParameters parameters) [0x00039] in data-0x7fc992019010
  at Mono.Cecil.ModuleWriter.WriteModule (ModuleDefinition module, Disposable[T] stream, WriterParameters parameters) [0x00002] in data-0x7fc992019010
  at Mono.Cecil.ModuleDefinition.Write (String fileName, WriterParameters parameters) [0x00017] in data-0x7fc992019010
  at Mono.Cecil.AssemblyDefinition.Write (String fileName, WriterParameters parameters) [0x00000] in data-0x7fc992019010
  at Terraria.ModLoader.Core.ModCompile.BuildModForPlatform (BuildingMod mod, Boolean xna) [0x0025d] in tModLoader.exe
  at Terraria.ModLoader.Core.ModCompile.Build (BuildingMod mod) [0x000d0] in tModLoader.exe
  at Terraria.ModLoader.Core.ModCompile.Build (String modFolder) [0x00008] in tModLoader.exe
  at Terraria.ModLoader.UI.UIBuildMod+<>c__DisplayClass5_0.<Build>b__0 (ModCompile mc) [0x00000] in tModLoader.exe
  at Terraria.ModLoader.UI.UIBuildMod.BuildMod (Action[T] buildAction, Boolean reload) [0x0003a] in tModLoader.exe

It appears to be the same error Talus has a few post before

Does anyone know what could have created this ? (full log is joined)
 

Attachments

  • tmodloader_error.log
    7.8 KB · Views: 27
Last edited:

Gonf

Terrarian
I'm new to coding with C# and I'm trying to have the player receive like accessory effects when holding an item, but I get an error "CS0106: The modifier 'virtual' is not valid for this item."

C#:
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;


namespace TestMod.Items
{
    public class DemonSword : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("DemonSword"); // By default, capitalization in classnames will add spaces to the display name. You can customize the display name here by uncommenting this line.
            Tooltip.SetDefault("Sword made from the core of hell.");
        }

        public override void SetDefaults()
        {
            item.damage = 5000;
            item.melee = true;
            item.width = 400;
            item.height = 400;
            item.useTime = 2;
            item.useAnimation = 10;
            item.useStyle = 1;
            item.knockBack = 600;
            item.value = 10000;
            item.rare = 2;
            item.UseSound = SoundID.Item1;
            item.autoReuse = true;
            item.shoot = 187;
            item.shoot = 188;
            item.shoot = 15;
            item.shootSpeed = 20f;
        }

        virtual void Terraria.ModLoader.ModItem.HoldItem(Player player)
        {
            
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock, 1);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

It's only a simple weapon for now so I can get familiarized with coding.
Also, if someone can tell me where I can find all the things accessories can give like flight and lava walking or something that'd be appreciated too thx.
 

Gonf

Terrarian
In the documentation, HoldItem is in the public member functions list.
That mean you should use :
C#:
public virtual void HoldItem(Player p) {
    // Do stuff here
}
Thanks, it works! I originally tried putting public before virtual before and it gave me the same error, but it seems using only HoldItem instead of the whole Terraria.ModLoader.ModItem.HoldItem works.
 

SciFiGuy102

Terrarian
Hi there, sorry to bother you at this hour (though it probably does not matter much). I am new to coding in C#, and I would like to know the best way to make homing projectiles. I have already made a custom item that shoots the projectiles, but I would like to make them home in on enemies. Any suggestions?
 

ExistedDim4

Terrarian
I'm new to modding and I want to create a Mount that will function like the UFO from vanilla game(float in the air). I tried "usesHover" but it seems that I need to use something else to make it work like it should.

Here's what I currently have as defaults of my mount:

C#:
            mountData.spawnDust = mod.DustType("WindMountDust");
            mountData.buff = mod.BuffType("WindMountBuff");
            mountData.heightBoost = 20;
            mountData.runSpeed = 5f;
            mountData.jumpSpeed = 5f;
            mountData.usesHover = true;
            mountData.emitsLight = true;
            mountData.acceleration = 1f;
            mountData.totalFrames = 1;
 

Dragon230

Terrarian
Hi there, sorry to bother you at this hour (though it probably does not matter much). I am new to coding in C#, and I would like to know the best way to make homing projectiles. I have already made a custom item that shoots the projectiles, but I would like to make them home in on enemies. Any suggestions?
Try this thread, it should have every thing you need to know.
 

Joshua8201

Terrarian
Hi, I have 2 problems that I need help on:
When I use the weapon while facing right, it looks normal. But when I face left, the projectile is not in the correct position. How do I fix this?
1620213323743.png
< Looks normal
1620213369822.png
< Too close to the player
CSS:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.IO;
using Terraria;
using Terraria.Enums;
using Terraria.GameContent.Shaders;
using Terraria.Graphics.Effects;
using Terraria.ID;
using Terraria.DataStructures;
using Terraria.ModLoader;
using JoshuaMod.Items.Weapons;
using JoshuaMod.Projectiles;
using JoshuaMod.Projectiles.Weapons;
using JoshuaMod.Projectiles.Weapons.RiftWeaver;

namespace JoshuaMod.Projectiles.Weapons.RiftWeaver
{
    public class RiftHoldout : ModProjectile
    {
        private const int NumAnimationFrames = 6;

        // This controls how many individual beams are fired by the Prism.
        public const int NumBeams = 8;

        // This value controls how many frames it takes for the Prism to reach "max charge". 60 frames = 1 second.
        public const float MaxCharge = 80f;

        // This value controls how many frames it takes for the beams to begin dealing damage. Before then they can't hit anything.
        public const float DamageStart = 5f;

        // This value controls how sluggish the Prism turns while being used. Vanilla Last Prism is 0.08f.
        // Higher values make the Prism turn faster.
        private const float AimResponsiveness = 0.25f;

        // This value controls how frequently the Prism emits sound once it's firing.
        private const int SoundInterval = 20;

        // These values place caps on the mana consumption rate of the Prism.
        // When first used, the Prism consumes mana once every MaxManaConsumptionDelay frames.
        // Every time mana is consumed, the pace becomes one frame faster, meaning mana consumption smoothly increases.
        // When capped out, the Prism consumes mana once every MinManaConsumptionDelay frames.
        private const float MaxManaConsumptionDelay = 15f;
        private const float MinManaConsumptionDelay = 5f;

        // This property encloses the internal AI variable projectile.ai[0]. It makes the code easier to read.
        private float FrameCounter
        {
            get => projectile.ai[0];
            set => projectile.ai[0] = value;
        }

        // This property encloses the internal AI variable projectile.ai[1].
        private float NextManaFrame
        {
            get => projectile.ai[1];
            set => projectile.ai[1] = value;
        }

        // This property encloses the internal AI variable projectile.localAI[0].
        // localAI is not automatically synced over the network, but that does not cause any problems in this case.
        private float ManaConsumptionRate
        {
            get => projectile.localAI[0];
            set => projectile.localAI[0] = value;
        }

        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Rift Laser");
            Main.projFrames[projectile.type] = NumAnimationFrames;

            // Signals to Terraria that this projectile requires a unique identifier beyond its index in the projectile array.
            // This prevents the issue with the vanilla Last Prism where the beams are invisible in multiplayer.
            ProjectileID.Sets.NeedsUUID[projectile.type] = true;
        }

        public override void SetDefaults()
        {
            // Use CloneDefaults to clone all basic projectile statistics from the vanilla Last Prism.
            projectile.CloneDefaults(ProjectileID.LastPrism);
            projectile.scale = 0.8f;
        }

        public override void AI()
        {
            Player player = Main.player[projectile.owner];
            Vector2 rrp = player.RotatedRelativePoint(player.MountedCenter, true);

            // Update the Prism's damage every frame so that it is dynamically affected by Mana Sickness.
            UpdateDamageForManaSickness(player);

            // Update the frame counter.
            FrameCounter += 1f;

            // Update projectile visuals and sound.
            UpdateAnimation();
            PlaySounds();

            // Update the Prism's position in the world and relevant variables of the player holding it.
            UpdatePlayerVisuals(player, rrp);

            // Update the Prism's behavior: project beams on frame 1, consume mana, and despawn if out of mana.
            if (projectile.owner == Main.myPlayer)
            {
                // Slightly re-aim the Prism every frame so that it gradually sweeps to point towards the mouse.
                UpdateAim(rrp, player.HeldItem.shootSpeed);

                // player.CheckMana returns true if the mana cost can be paid. Since the second argument is true, the mana is actually consumed.
                // If mana shouldn't consumed this frame, the || operator short-circuits its evaluation player.CheckMana never executes.
                bool manaIsAvailable = !ShouldConsumeMana() || player.CheckMana(player.HeldItem.mana, true, false);

                // The Prism immediately stops functioning if the player is Cursed (player.noItems) or "Crowd Controlled", e.g. the Frozen debuff.
                // player.channel indicates whether the player is still holding down the mouse button to use the item.
                bool stillInUse = player.channel && manaIsAvailable && !player.noItems && !player.CCed;

                // Spawn in the Prism's lasers on the first frame if the player is capable of using the item.
                if (stillInUse && FrameCounter == 1f)
                {
                    FireBeams();
                }

                // If the Prism cannot continue to be used, then destroy it immediately.
                else if (!stillInUse)
                {
                    projectile.Kill();
                }
            }

            // This ensures that the Prism never times out while in use.
            projectile.timeLeft = 2;
        }

        private void UpdateDamageForManaSickness(Player player)
        {
            float ownerCurrentMagicDamage = player.allDamage + (player.magicDamage - 1f);
            projectile.damage = (int)(player.HeldItem.damage * ownerCurrentMagicDamage);
        }

        private void UpdateAnimation()
        {
            projectile.frameCounter++;

            // As the Prism charges up and focuses the beams, its animation plays faster.
            int framesPerAnimationUpdate = FrameCounter >= MaxCharge ? 2 : FrameCounter >= (MaxCharge * 0.66f) ? 3 : 4;

            // If necessary, change which specific frame of the animation is displayed.
            if (projectile.frameCounter >= framesPerAnimationUpdate)
            {
                projectile.frameCounter = 0;
                if (++projectile.frame >= NumAnimationFrames)
                {
                    projectile.frame = 0;
                }
            }
        }

        private void PlaySounds()
        {
            // The Prism makes sound intermittently while in use, using the vanilla projectile variable soundDelay.
            if (projectile.soundDelay <= 0)
            {
                projectile.soundDelay = SoundInterval;

                // On the very first frame, the sound playing is skipped. This way it doesn't overlap the starting hiss sound.
                if (FrameCounter > 1f)
                {
                    Main.PlaySound(SoundID.Item15, projectile.position);
                }
            }
        }

        private void UpdatePlayerVisuals(Player player, Vector2 playerHandPos)
        {
            // Place the Prism directly into the player's hand at all times.
            projectile.Center = playerHandPos;
            // The beams emit from the tip of the Prism, not the side. As such, rotate the sprite by pi/2 (90 degrees).
            projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
            projectile.spriteDirection = projectile.direction;

            // The Prism is a holdout projectile, so change the player's variables to reflect that.
            // Constantly resetting player.itemTime and player.itemAnimation prevents the player from switching items or doing anything else.
            player.ChangeDir(projectile.direction);
            player.heldProj = projectile.whoAmI;
            player.itemTime = 2;
            player.itemAnimation = 2;

            // If you do not multiply by projectile.direction, the player's hand will point the wrong direction while facing left.
            player.itemRotation = (projectile.velocity * projectile.direction).ToRotation();
        }

        private bool ShouldConsumeMana()
        {
            // If the mana consumption timer hasn't been initialized yet, initialize it and consume mana on frame 1.
            if (ManaConsumptionRate == 0f)
            {
                NextManaFrame = ManaConsumptionRate = MaxManaConsumptionDelay;
                return true;
            }

            // Should mana be consumed this frame?
            bool consume = FrameCounter == NextManaFrame;

            // If mana is being consumed this frame, update the rate of mana consumption and write down the next frame mana will be consumed.
            if (consume)
            {
                // MathHelper.Clamp(X,A,B) guarantees that A <= X <= B. If X is outside the range, it will be set to A or B accordingly.
                ManaConsumptionRate = MathHelper.Clamp(ManaConsumptionRate - 1f, MinManaConsumptionDelay, MaxManaConsumptionDelay);
                NextManaFrame += ManaConsumptionRate;
            }
            return consume;
        }

        private void UpdateAim(Vector2 source, float speed)
        {
            // Get the player's current aiming direction as a normalized vector.
            Vector2 aim = Vector2.Normalize(Main.MouseWorld - source);
            if (aim.HasNaNs())
            {
                aim = -Vector2.UnitY;
            }

            // Change a portion of the Prism's current velocity so that it points to the mouse. This gives smooth movement over time.
            aim = Vector2.Normalize(Vector2.Lerp(Vector2.Normalize(projectile.velocity), aim, AimResponsiveness));
            aim *= speed;

            if (aim != projectile.velocity)
            {
                projectile.netUpdate = true;
            }
            projectile.velocity = aim;
        }

        private void FireBeams()
        {
            // If for some reason the beam velocity can't be correctly normalized, set it to a default value.
            Vector2 beamVelocity = Vector2.Normalize(projectile.velocity);
            if (beamVelocity.HasNaNs())
            {
                beamVelocity = -Vector2.UnitY;
            }

            // This UUID will be the same between all players in multiplayer, ensuring that the beams are properly anchored on the Prism on everyone's screen.
            int uuid = Projectile.GetByUUID(projectile.owner, projectile.whoAmI);

            int damage = projectile.damage;
            float knockback = projectile.knockBack;
            for (int b = 0; b < NumBeams; ++b)
            {
                Projectile.NewProjectile(projectile.Center, beamVelocity, ModContent.ProjectileType<RiftLaser>(), damage, knockback, projectile.owner, b, uuid);
            }

            // After creating the beams, mark the Prism as having an important network event. This will make Terraria sync its data to other players ASAP.
            projectile.netUpdate = true;
        }
    }
}
I tried copying the ExampleAnimatedPierce projectile from ExampleMod, but it's not working properly. It just shows the entire spritesheet instead of each individual frame when the projectile is fired. The projectile also rotates around the player, which seems to work fine.
1620213597205.png

There's 13 images in the spritesheet.
CSS:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.IO;
using Terraria;
using Terraria.Enums;
using Terraria.GameContent.Shaders;
using Terraria.Graphics.Effects;
using Terraria.ID;
using Terraria.DataStructures;
using Terraria.ModLoader;
using JoshuaMod.Items.Weapons;
using JoshuaMod.Projectiles.Weapons;
using JoshuaMod.Projectiles.Weapons.IceGlyph;


namespace JoshuaMod.Projectiles.Weapons.IceGlyph
{
    public class IceGlyphShards : ModProjectile
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Ice Shards");    //The weapon's name when shown in-game.
            Main.projFrames[projectile.type] = 13;
        }

        public override void SetDefaults()
        {
            projectile.width = 144;
            projectile.height = 144;
            projectile.penetrate = -1;
            projectile.scale = 2f;
            projectile.alpha = 255;
            projectile.ignoreWater = true;
            projectile.magic = true;
            projectile.friendly = true;
            projectile.tileCollide = false;
            projectile.usesLocalNPCImmunity = true;
            projectile.localNPCHitCooldown = 1;
        }

        public override void AI()
        {
            //How the projectile works.
            Player player = Main.player[projectile.owner];
            float num = 1.57079637f;
            Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true);

            if (Main.myPlayer == projectile.owner)
            {
                if (!player.channel || player.noItems || player.CCed)
                {
                    projectile.Kill();
                }
            }

            Lighting.AddLight(projectile.Center, 0.1f, 0.1f, 0.1f); //This is the Projectile's light color (RGB).

            projectile.Center = player.MountedCenter;
            projectile.position.X += player.width / 2 * projectile.direction; //This is the Projectile's Width Sprite Direction.
            projectile.spriteDirection = projectile.direction;
            projectile.rotation -= 0.025f * projectile.direction; //This is the Projectile's Spinning/Rotation Speed
            if (projectile.rotation > MathHelper.TwoPi)
            {
                projectile.rotation -= MathHelper.TwoPi;
            }
            else if (projectile.rotation < 0)
            {
                projectile.rotation += MathHelper.TwoPi;
            }
            player.heldProj = projectile.whoAmI;
            player.itemTime = 2;
            player.itemAnimation = 2;

            //Factors for calculations
            double deg = (double)projectile.ai[1]; //The degrees, you can multiply projectile.ai[1] to make it orbit faster, may be choppy depending on the value
            double rad = deg * (Math.PI / 180); //Convert degrees to radians
            double dist = 1; //Distance away from the player

            /*Position the projectile based on where the player is, the Sin/Cos of the angle times the /
            /distance for the desired distance away from the player minus the projectile's width   /
            /and height divided by two so the center of the projectile is at the right place.     */
            projectile.position.X = player.Center.X - (int)(Math.Sin(rad) * dist) - projectile.width / 2;
            projectile.position.Y = player.Center.Y - (int)(Math.Cos(rad) * dist) - projectile.height / 2;

            //Increase the counter/angle in degrees by 1 point, you can change the rate here too, but the orbit may look choppy depending on the value
            projectile.ai[1] += 1f;

            if (projectile.alpha > 0)
            {
                projectile.alpha -= 5; // Decrease alpha, increasing visibility.
            }

            if (++projectile.frameCounter >= 4) // Loop through the 13 animation frames, spending 4 ticks on each.
            {
                projectile.frameCounter = 0;
                projectile.frame = ++projectile.frame % Main.projFrames[projectile.type];
            }
        }

        public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
        {
            Texture2D texture = Main.projectileTexture[projectile.type];
            spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, new Vector2(texture.Width / 2, texture.Height / 2), projectile.scale, projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f);
            return false;
        }
      
        public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
        {
            target.immune[projectile.owner] = 6;
        }
    }
}
Any help would be appreciated. :)
 
I'm getting the error "cannot convert 'short' to 'Terraria.item'. in line 35
may i have soem guidance in this trying time

Code:
C#:
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;

namespace Xnightslayer99sveryspecialownmod.Items.Armor
{
    
    [AutoloadEquip(EquipType.Body)]
    public class pog_tuxedo_jacket : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Pog tuxedo jacket");
            Tooltip.SetDefault("Full set bonus: Pog: sets your max hp to 750 and makes you deal the 16 bit integer limit% more damage.");
        }
        public override bool IsArmorSet(Item head, Item body, Item legs)
        {
            return body.type == ModContent.ItemType<pog_tuxedo_jacket>() && legs.type == ModContent.ItemType<pog_tuxedo_oxfords>();
        }

        public override void UpdateArmorSet(Player player)
        {
            player.setBonus = "Pog: Sets your hp to 750 and makes you deal the 16 bit integer limit% more damage";
            player.allDamage += 32767f;
            player.statLifeMax += 750;
            player.maxMinions += 32767;
            player.lifeRegen += 32767;
            player.manaCost = 0f;
            player.manaRegen += 32767;
            player.ammoBox = true;
            player.waterWalk = true;
            player.lavaImmune = true;
            player.ammoPotion = true;
            player.ammoCost80 = true;
            player.HasAmmo(ItemID.ChlorophyteBullet, true);
        }
        public override void UpdateEquip(Player player)
        {
            player.meleeCrit += 300;
            player.statManaMax += 500;

        }
        public override void SetDefaults()
        {
            item.rare = -12;
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock, 500);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
(this is just overpowerd stuff for fun)
 

lilou724

Steampunker
Hello, I am in dire need of help, for the past months, I have installed, uninstalled and attempted to fix this tmodloader error. One day, as soon as I was about to compile my mod, this appeared: View attachment 316038
I thought that this was innocent enough and downloaded the file. I exited terraria and went back in only to see this error:
View attachment 316039
This error is unfixable without deleting every boss in my mod. pls help me!
hey, I'm facing this exact same issue when trying to compile ExampleMod. I was wondering if you found a solution ?
If not I'll let you know if I find something
 
Top Bottom