Mod Loading Problem [SOLVED]

Luxarion

Spazmatism
In both of my mods (as in I made them), whenever I try to load it it crashes my game, this didn't happen before and on my 2nd mod only started happening once I added items, but in the first one started after I made 3 items. Does anyone know a fix?

How to fix: Basically, I had folders inside of items to organize it better, and in some of the lines, it said that the item was located in Items and not the specific folder inside Items, so it couldn't load, just add the name of the folder its in after Example.Items.Melee, do the same thing when making recipes with modded items.
 
Last edited:
What errors are you getting? Can you post your logs?
Im not getting any errors, it just says my game isn't responding.
Edit: found the logs,
Code:
[12:58:37] [.NET ThreadPool Worker/ERROR] [Terraria]: Failed to load asset: "Items\ExampleSword"
ReLogic.Content.AssetLoadException: Asset could not be found: "Items\ExampleSword"
   at ReLogic.Content.AssetRepository.LoadAssetWithPotentialAsync[T](Asset`1 asset, AssetRequestMode mode) in D:\a\tModLoader\tModLoader\src\tModLoader\ReLogic\Content\AssetRepository.cs:line 262

Its now saying this, I deleted the Example Sword and fixed another problem I found through the logs but now it still crashes and says this.
Code:
[13:14:08] [.NET ThreadPool Worker/ERROR] [Terraria]: Failed to load asset: "Items\BladeOfTheBone"
ReLogic.Content.AssetLoadException: Asset could not be found: "Items\BladeOfTheBone"
   at ReLogic.Content.AssetRepository.LoadAssetWithPotentialAsync[T](Asset`1 asset, AssetRequestMode mode) in D:\a\tModLoader\tModLoader\src\tModLoader\ReLogic\Content\AssetRepository.cs:line 262
 
Last edited:
Is the BladeOfTheBone a sword you are creating in your mod?
If so, can you post the code of the sword, as well as a screenshot of the folder it's in? Make sure to show the full folder path in the screenshot.

Basically, the game can't find your image, so something is off between the namespace and folder path / file name.
 
Is the BladeOfTheBone a sword you are creating in your mod?
If so, can you post the code of the sword, as well as a screenshot of the folder it's in? Make sure to show the full folder path in the screenshot.

Basically, the game can't find your image, so something is off between the namespace and folder path / file name.
This is the code of the sword,
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace LuxMod.Items
{
    public class BladeOfTheBone : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Blade of the Bone"); // 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("You feel something inside of the sword, theres definitely something more to this thing.");
        }

        public override void SetDefaults()
        {
            Item.damage = 36;
            Item.DamageType = DamageClass.Melee;
            Item.width = 80;
            Item.height = 80;
            Item.useTime = 15;
            Item.useAnimation = 15;
            Item.useStyle = 1;
            Item.knockBack = 8;
            Item.value = 200000;
            Item.rare = 2;
            Item.UseSound = SoundID.Item1;
            Item.autoReuse = true;
        }

        public override void AddRecipes()
        {
            Recipe recipe = CreateRecipe();
            recipe.AddIngredient(ItemID.Bone, 35);
            recipe.AddIngredient(ItemID.Obsidian, 35);
            recipe.AddTile(TileID.Anvils);
            recipe.Register();
        }
    }
}
And here is the image,
1656528990925.png


I THINK I FIGURED IT OUT
 
Back
Top Bottom