I have GlowingMushroomShirt.png, GlowingMushroomShirtArms.png, GlowingMushroomShirtFemaleBody.png and GlowingMushroomShirtBody.png, and it satrted crashing after i tried loading the mod, windows said it had stopped working and closed it and it's been doing that every time i open tmodloader.
Hm, it's hard to tell what's happening. Can you upload your mod's folder? I can try to place some stuff in my code to see where things might be going wrong.
I'm trying to figure out how I can get the item that's currently in the player's hand. Which method do I override? I know I have everything set up and working, so it's more of a general modding question
I'm trying to figure out how I can get the item that's currently in the player's hand. Which method do I override? I know I have everything set up and working, so it's more of a general modding question
If you override the HoldItem method, then the ModItem whose method is getting called is the held item. You can also use player.selectedItem to get the index in player.inventory of the item that is in the player's hand.
But the ModItem approach would only work if it's an item I added right? Not with vanilla items? SelectedItem() looks good, is there a way I can use the index to get the name of the item? That's my final goal. I simply need my mod to output the name of currently held item to a stream I'll implement later
[DOUBLEPOST=1437546329,1437546020][/DOUBLEPOST]I see that I can probably use something like Terraria.Player.inventory[Player.SelectedItem()]?
I just need this to be called every time the player switches to a different item. Or am I doing this all wrong?
Ok, so i had been trying to implement a new accessory, but i think that was causing problems on its own, i just rewrote 90% of my code and have come back to the same error of the namespace not being found. here are the three .cs pages im using.
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using WyvernCore.Items;
namespace WyvernCore {
public class WyvernCore : Mod
{
public override void SetModInfo(out string name, ref string version, ref string author)
{
name = "WyvernStuff";
version = "v0.0.0.1";
author = "WyvernHunter";
}
public override void Load()
{
SetGlobalItem(new WyvernCoreItem());
AddItem("FeatherBlade", new FeatherBlade(), "WyvernCore/Items/FeatherBlade");
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.DirtBlock);
recipe.SetResult(null, "FeatherBlade");
recipe.AddRecipe();
}
}
}
using System;
using Terraria.ID;
using Terraria.ModLoader;
namespace WyvernCore {
public static class RecipeHelper
{
public static void AddEquipmentRecipes(Mod mod)
{
ModRecipe recipe = new ModRecipe(mod);
}
}
}
using System;
using Terraria;
using Terraria.ModLoader;
The FeatherBlade.png is located in the Items folder with FeatherBlade.cs and the Items Folder is in the WyvernCore folder, that is all i have. Thank you for your patience.
Well IDK how to code, don't know what kind of software I need, can't trust 70% of the internet because of scams, hacks, Trojans, and other stuff and I can't install nor download stuff for an entire week (4 more days until I can) because of internet issues of exeeding 400gb of internet usage. Also don't forget the fact that I don't know where to start on making a mod, so yeah.
Would it be possible to request an example item for ranged/magic weapons? Or at least something that fires projectiles?
I've never used C# before but I wanna try getting into Terraria modding. All the guides/tutorials I could find on that are for json.
Would it be possible to request an example item for ranged/magic weapons? Or at least something that fires projectiles?
I've never used C# before but I wanna try getting into Terraria modding. All the guides/tutorials I could find on that are for json.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.