MarioKart7z
Plantera
you're modifying item.toolTip twice. use item.toolTip2 for the second tooltipI wanted to add a new kind of boots, but my game is crashing, and I made probably huge mistakes in my code
Code:using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terranova; using Terranova.Items; namespace Terranova.Items { public class FiresparkBoots : ModItem { public override bool Autoload(ref string name, ref string texture, ref EquipType? equip) { equip = EquipType.Shoes; return true; } public override void SetDefaults() { item.name = "Firespark Boots"; item.width = 32; item.height = 32; item.accessory = true; item.rare = 8; item.toolTip = "Allows flight, super fast running, extra mobility on ice and provides the ability to walk on liquids"; item.toolTip = "12% increased movement speed and grants immunity to fire blocks and 7 seconds of immunity to lava"; item.value = 400000; item.shoeSlot = 9; } public override void UpdateAccessory(Player player) { player.moveSpeed *= 0.12f; player.iceSkate = true; player.waterWalk = true; player.waterWalk2 = true; player.lavaTime = 7; player.fireWalk = true; player.rocketBoots = 5; player.maxRunSpeed *= 0.12f; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.FrostsparkBoots, 1); recipe.AddIngredient(ItemID.LavaWaders, 1); recipe.AddTile(TileID.TinkerersWorkbench); recipe.SetResult(mod.ItemType("FiresparkBoots")); recipe.AddRecipe(); } } }
also, what Gorateon said
It seems fine to me.
Only thing I notice is:
recipe.SetResult(mod.ItemType("FiresparkBoots"));
You can just replace
'mod.ItemType("FiresparkBoots")'
for:
'this'
Are you sure texture name is correct and in the same folder? Since you're not overriding it..
[DOUBLEPOST=1438514024,1438513893][/DOUBLEPOST]If it still crashes try replacing UpdateAccessory(Player player) with UpdateEquip(Player player)