Ok so, since the format has been slightly changed in the way things are loaded, my items wont show up as recipes. I've been trying to make them show up for a bit now, Here's the code, any insight would be greatly appreciated.
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using WyvernCore.Items;
using WyvernCore.NPCs;
using WyvernCore.Items.Armor;
namespace WyvernCore {
public class WyvernCore : Mod
{
public override void SetModInfo(out string name, ref ModProperties properties)
{
name = "WyvernCore";
properties.Version = "v1.2.3";
properties.Author = "WyvernHunter";
properties.Autoload = true;
}
public override void Load()
{
AddItem("FeatherBlade", new FeatherBlade();
//AddItem("CloudBar", new CloudBar(), "WyvernCore/Items/CloudBar");
//AddItem("WyvernScale", new WyvernScale(), "WyvernCore/Items/WyvernScale");
//AddItem("SkyBlade", new SkyBlade(), "WyvernCore/Items/SkyBlade");
//AddItem("WyvernScaleMailBreastPlate"), new WyvernScaleMail(), "WyvernCore/Items/Armor/");
Ok so, since the format has been slightly changed in the way things are loaded, my items wont show up as recipes. I've been trying to make them show up for a bit now, Here's the code, any insight would be greatly appreciated.
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using WyvernCore.Items;
using WyvernCore.NPCs;
using WyvernCore.Items.Armor;
namespace WyvernCore {
public class WyvernCore : Mod
{
public override void SetModInfo(out string name, ref ModProperties properties)
{
name = "WyvernCore";
properties.Version = "v1.2.3";
properties.Author = "WyvernHunter";
properties.Autoload = true;
}
public override void Load()
{
AddItem("FeatherBlade", new FeatherBlade();
//AddItem("CloudBar", new CloudBar(), "WyvernCore/Items/CloudBar");
//AddItem("WyvernScale", new WyvernScale(), "WyvernCore/Items/WyvernScale");
//AddItem("SkyBlade", new SkyBlade(), "WyvernCore/Items/SkyBlade");
//AddItem("WyvernScaleMailBreastPlate"), new WyvernScaleMail(), "WyvernCore/Items/Armor/");
First of all, properties.Version and properties.Author no longer exist; you put them in build.txt instead (see the example mod for an example).
Next of all, this line: AddItem("FeatherBlade", new FeatherBlade();
is complete. My guess is that your mod just isn't building.
First of all, properties.Version and properties.Author no longer exist; you put them in build.txt instead (see the example mod for an example).
Next of all, this line: AddItem("FeatherBlade", new FeatherBlade();
is complete. My guess is that your mod just isn't building.
Progress has been made, ive cleaned up mostly everything(hopefully) but im getting an odd error with AddItem
c:\Users\Lisa\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(21,3) : error CS1501: No overload for method 'AddItem' takes 2 arguments
c:\Users\Lisa\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(22,3) : error CS1501: No overload for method 'AddItem' takes 2 arguments
c:\Users\Lisa\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(23,3) : error CS1501: No overload for method 'AddItem' takes 2 arguments
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using WyvernCore.Items;
using WyvernCore.Items.Armor;
using WyvernCore.NPCs;
namespace WyvernCore {
public class WyvernCore : Mod
{
public override void SetModInfo(out string name, ref ModProperties properties)
{
name = "WyvernCore";
properties.Autoload = true;
}
public override void Load()
{
AddItem("FeatherBlade", new FeatherBlade());
AddItem("CloudBar", new CloudBar());
AddItem("WyvernScaleMailBreastPlate", new WyvernScaleMailBreastPlate());
//AddItem("WyvernScale", new WyvernScale()
//AddItem("SkyBlade", new SkyBlade()
Progress has been made, ive cleaned up mostly everything(hopefully) but im getting an odd error with AddItem
c:\Users\Lisa\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(21,3) : error CS1501: No overload for method 'AddItem' takes 2 arguments
c:\Users\Lisa\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(22,3) : error CS1501: No overload for method 'AddItem' takes 2 arguments
c:\Users\Lisa\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(23,3) : error CS1501: No overload for method 'AddItem' takes 2 arguments
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using WyvernCore.Items;
using WyvernCore.Items.Armor;
using WyvernCore.NPCs;
namespace WyvernCore {
public class WyvernCore : Mod
{
public override void SetModInfo(out string name, ref ModProperties properties)
{
name = "WyvernCore";
properties.Autoload = true;
}
public override void Load()
{
AddItem("FeatherBlade", new FeatherBlade());
AddItem("CloudBar", new CloudBar());
AddItem("WyvernScaleMailBreastPlate", new WyvernScaleMailBreastPlate());
//AddItem("WyvernScale", new WyvernScale()
//AddItem("SkyBlade", new SkyBlade()
So....what else would i do? i assumed my items were not appearing as recipes because they werent being added. I believe i have done the recipe adding part correct, so what else is preventing the recipes?
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
So....what else would i do? i assumed my items were not appearing as recipes because they werent being added. I believe i have done the recipe adding part correct, so what else is preventing the recipes?
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
There are no errors right now, im ingame holding dirt and wood seeing if i can craft the sword, and i can't. so no errors, the only errors that i have gotten so far have been involved with the including the recipe helper in WyvernCore, but that doesn't affect recipes that are loaded in from the items does it? *There are no errors when i comment out the AddItem lines and keep autoload set to true*
I've got no idea what's happening, since the Example Mod recipes all work perfectly fine. Can I see the code for your mod and items files again? (And preferably indented.)
I've got no idea what's happening, since the Example Mod recipes all work perfectly fine. Can I see the code for your mod and items files again? (And preferably indented.)
I've got no idea what's happening, since the Example Mod recipes all work perfectly fine. Can I see the code for your mod and items files again? (And preferably indented.)
Sure, would that be using the Code BB thing instead? The AddRecipes part is being weird so its commented out, and i commented out all the AddItems since AutoLoad is set to True.
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using WyvernCore.Items;
using WyvernCore.Items.Armor;
using WyvernCore.NPCs;
namespace WyvernCore {
public class WyvernCore : Mod
{
public override void SetModInfo(out string name, ref ModProperties properties)
{
name = "WyvernCore";
properties.Autoload = true;
}
public override void Load()
{
//AddItem("FeatherBlade", new FeatherBlade());
//AddItem("CloudBar", new CloudBar());
//AddItem("WyvernScaleMailBreastPlate", new WyvernScaleMailBreastPlate());
//AddItem("WyvernScale", new WyvernScale()
//AddItem("SkyBlade", new SkyBlade()
}
/* public override void AddRecipes();
{
RecipeHelper.AddVanillaRecipes(this);
} */
}
}
Code:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace WyvernCore.Items {
public class FeatherBlade : ModItem
{
public override void SetDefaults()
{
item.name = "Feathery Blade";
item.damage = 42;
item.melee = true;
item.width = 40;
item.height = 40;
item.toolTip = "Doesn't seem very sharp...";
item.useTime = 18;
item.useAnimation = 18;
item.useStyle = 1;
item.knockBack = 8;
item.value = 20000;
item.rare = 2;
item.useSound = 1;
item.autoReuse = true;
}
public override void AddRecipes() {
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock,2);
//recipe.AddIngredient(ItemID.Feather,15);
//recipe.AddIngredient(ItemID.GiantHarpyFeather);
recipe.SetResult(this);
//recipe.AddTile(134);
recipe.AddRecipe();
}
}
}
Code:
using System;
using Terraria.ID;
using Terraria.ModLoader;
namespace WyvernCore {
public static class RecipeHelper
{
public static void AddVanillaRecipes(Mod mod)
{
ModRecipe recipe = new ModRecipe(mod);
}
}
}
Sure, would that be using the Code BB thing instead? The AddRecipes part is being weird so its commented out, and i commented out all the AddItems since AutoLoad is set to True.
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using WyvernCore.Items;
using WyvernCore.Items.Armor;
using WyvernCore.NPCs;
namespace WyvernCore {
public class WyvernCore : Mod
{
public override void SetModInfo(out string name, ref ModProperties properties)
{
name = "WyvernCore";
properties.Autoload = true;
}
public override void Load()
{
//AddItem("FeatherBlade", new FeatherBlade());
//AddItem("CloudBar", new CloudBar());
//AddItem("WyvernScaleMailBreastPlate", new WyvernScaleMailBreastPlate());
//AddItem("WyvernScale", new WyvernScale()
//AddItem("SkyBlade", new SkyBlade()
}
/* public override void AddRecipes();
{
RecipeHelper.AddVanillaRecipes(this);
} */
}
}
Code:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace WyvernCore.Items {
public class FeatherBlade : ModItem
{
public override void SetDefaults()
{
item.name = "Feathery Blade";
item.damage = 42;
item.melee = true;
item.width = 40;
item.height = 40;
item.toolTip = "Doesn't seem very sharp...";
item.useTime = 18;
item.useAnimation = 18;
item.useStyle = 1;
item.knockBack = 8;
item.value = 20000;
item.rare = 2;
item.useSound = 1;
item.autoReuse = true;
}
public override void AddRecipes() {
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock,2);
//recipe.AddIngredient(ItemID.Feather,15);
//recipe.AddIngredient(ItemID.GiantHarpyFeather);
recipe.SetResult(this);
//recipe.AddTile(134);
recipe.AddRecipe();
}
}
}
Code:
using System;
using Terraria.ID;
using Terraria.ModLoader;
namespace WyvernCore {
public static class RecipeHelper
{
public static void AddVanillaRecipes(Mod mod)
{
ModRecipe recipe = new ModRecipe(mod);
}
}
}
Alright, it's time to diagnose the problem. At the end of SetDefaults, add ErrorLogger.Log("test"); and at the end of your item's AddRecipes add ErrorLogger.Log("test2");
Then after you rebuild then reload your mod, check the Logs file and tell me what you see.
Alright, it's time to diagnose the problem. At the end of SetDefaults, add ErrorLogger.Log("test"); and at the end of your item's AddRecipes add ErrorLogger.Log("test2");
Then after you rebuild then reload your mod, check the Logs file and tell me what you see.
Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.BinaryReader.ReadBytes(Int32 count)
at Terraria.ModLoader.ModLoader.LoadMod(String modFile)
at Terraria.ModLoader.ModLoader.LoadMods()
and here's the compile errors from when i un-comment the AddRecipe piece in WyvernCore
c:\Users\\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(32,5) : error CS1519: Invalid token '{' in class, struct, or interface member declaration
c:\Users\\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(33,32) : error CS1519: Invalid token '(' in class, struct, or interface member declaration
c:\Users\\Documents\My Games\Terraria\ModLoader\Mod Sources\WyvernCore\WyvernCore.cs(36,1) : error CS1022: Type or namespace definition, or end-of-file expected
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.