Standalone [1.3] tModLoader - A Modding API

using Terraria.ID;
using Terraria.ModLoader;

namespace Excalifighters.Items.Weapons
{
public class Powerstar: ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Powerstar");
Tooltip.SetDefault("This sword was forged to defeat the legendary Eye of Cthulhu.");
}
public override void SetDefaults()
{
item.damage = 40;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 14;
item.useAnimation = 14;
item.useStyle = 1;
item.knockBack = 3;
item.value = 1000;
item.rare = 1;
item.UseSound = SoundID.Item1;
item.autoReuse = false;
item.shoot = mod.ProjectileType ("Powerstar_projectile");
item.shootSpeed = 8f;
}

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

I can't figure out what is wrong help please
 

Attachments

  • PowerStar.cs
    990 bytes · Views: 262
using Terraria.ID;
using Terraria.ModLoader;

namespace Excalifighters.Items.Weapons
{
public class Powerstar: ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Powerstar");
Tooltip.SetDefault("This sword was forged to defeat the legendary Eye of Cthulhu.");
}
public override void SetDefaults()
{
item.damage = 40;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 14;
item.useAnimation = 14;
item.useStyle = 1;
item.knockBack = 3;
item.value = 1000;
item.rare = 1;
item.UseSound = SoundID.Item1;
item.autoReuse = false;
item.shoot = mod.ProjectileType ("Powerstar_projectile");
item.shootSpeed = 8f;
}

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

I can't figure out what is wrong help please
You have to tell us what the error you are getting is.
 
Just wanted to say, awesome job with the mod loader! For me at least, there have been very noticeable improvements in loading times and way less crashes. Good work!
 
Failed to resolve assembly: 'Terraria, Version=1.3.5.1, Culture=neutral, PublicKeyToken=null'
bij Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
bij Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
bij Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
bij Mono.Cecil.TypeReference.Resolve()
bij Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
bij Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
bij Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue(TypeReference type)
bij Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
bij Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArrayArgument(ArrayType type)
bij Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument(TypeReference type)
bij Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments(CustomAttribute attribute, Collection`1 parameters)
bij Mono.Cecil.MetadataReader.ReadCustomAttributeSignature(CustomAttribute attribute)
bij Mono.Cecil.CustomAttribute.<Resolve>b__34_0(CustomAttribute attribute, MetadataReader reader)
bij Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
bij Mono.Cecil.CustomAttribute.Resolve()
bij Mono.Cecil.CustomAttribute.get_ConstructorArguments()
bij Mono.Cecil.ImmediateModuleReader.ReadCustomAttributes(ICustomAttributeProvider provider)
bij Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
bij Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
bij Mono.Cecil.ImmediateModuleReader.ReadModule(ModuleDefinition module)
bij Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
bij Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters)
bij Terraria.ModLoader.AssemblyManager.LoadedMod.EncapsulateReferences(Byte[] code)
bij Terraria.ModLoader.AssemblyManager.LoadedMod.LoadAssemblies()
bij Terraria.ModLoader.AssemblyManager.InstantiateMods(List`1 modsToLoad)



I reinstalled terraria and tmod also deleted everything in my mods folder still getting this error
[doublepost=1512316172,1512315806][/doublepost]Tried everything as far as i know deleted all of the tmod files everywhere and installed it manually still not working anyone else have the same error with fargo's alchemist and Calamity?
[doublepost=1512316274][/doublepost]Went full berserker mode when deleting all tmod files even had to re set my resolution etc yet it still doesnt work....
 
Hey can someone help me? i have a problem with making worlds ;(. when i first got tmod it made worlds fine but now it crashes when its generating world data.
(i also have 32 bit so maybe that's whats causing it)
 
I'm having a problem. I just updated Tmodloader to the most recent update, and now there's an error of
"Access denied 0x5" appearing and deletes the Terraria app. Anybody know how to fix this?
 
help I had an amazing calamity world and now every time I try to enter it all it says is:
Index was outside the bounds of the array.
at Terraria.Player.Spawn()
at Terraria.WorldGen.do_playWorldCallBack(Object threadContext)
at Terraria.WorldGen.playWorldCallBack(Object threadContext)

plz help
 
What does the "Extract" button do? It appears under the Mods, and when I clicked, some text flew by fast, but nothing visibly appeared to happen.
 
I'm playing with a bunch of mods, and when i open plantera's treasure bag, it doesn't consume the bag and it only gives me modded items, none of the vanilla drops except the axe.
 
Back
Top Bottom