SilverDarkBlade
Terrarian
haha thanks. would you guys mind if i posed a WIP of the code I'm using here and have one of you see if I'm at-least not screwing it up terribly?I didn't read closely enough, hence I edited it out.
Last edited:
haha thanks. would you guys mind if i posed a WIP of the code I'm using here and have one of you see if I'm at-least not screwing it up terribly?I didn't read closely enough, hence I edited it out.
Everyone else does But really, if you try it, you should be able to tell if you are doing it right because it will work.haha thanks. would you guys mind if i posed a WIP of the code I'm using here and have one of you see if I'm at-least not screwing it up terribly?
Hmmm..... do you have a x64 bit computer?I get an error when trying to open the modded Terraria.exe after patch
"C:\Users\User\Desktop\ModLoader v0.5\tModLoader\Terraria.exe is not a valid win32 application."
Yes.Hmmm..... do you have a x64 bit computer?
I get an error when trying to open the modded Terraria.exe after patch
"C:\Users\User\Desktop\ModLoader v0.5\tModLoader\Terraria.exe is not a valid win32 application."
Try and put the exe back in to "C:\Program Files (x86)\Steam\steamapps\common\Terraria"Yes.
Yeah later on when it reaches official release you will be able to use JSON so it will be more like it then, along with all those updates before that.Used it, it's awesome. There are a few things different from tAPI, so time to practise!
True, however one of the features im using is flesh knuckle's targeting thing and i cant test it aloneEveryone else does But really, if you try it, you should be able to tell if you are doing it right because it will work.
It didn't workTry and put the exe back in to "C:\Program Files (x86)\Steam\steamapps\common\Terraria"
Yeah so it would be ItemID.DirtBlock or whatever item you want.for the Item.ID in the crafting recipe I'm assuming its just taking the name of the item and removing any spaces. Am i correct?
Yeah so it would be ItemID.DirtBlock or whatever item you want.
In my experience, numerical works too.So say the paladin's sheild would it be PaladinsSheild ?
And while im on the topic how would you write the recipie.AddTile for the Tinker's Workshop
Would the numerical IDs be sufficient? or does Terraria/C# not like that?
In my experience, numerical works too.
Yeah, Although I prefer TileID and the sorts. If you use visual studio and just type "TileID." you'll automatically get a list of all available items. It's a matter of preference, though.So Numericals will work for item ID and the AddTile?
Yeah, Although I prefer TileID and the sorts. If you use visual studio and just type "TileID." you'll automatically get a list of all available items. It's a matter of preference, though.
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Tinkermore.Items {
public class TankShield : ModItem
{
public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Shield);
return true;
}
public override void SetDefaults()
{
item.name = "Tank Shield";
item.width = 24;
item.height = 28;
item.toolTip = "Absorbs 25% of damage done to players on your team when above 25% health";
item.toolTip2 = "Enemies are more likely to target you";
item.value = 65000;
item.rare = 8;
item.accessory = true;
item.defense = 12;
}
public override void UpdateAccessory(Player player)
{
player.noKnockback = true;
if ((double)player.statLife > (double)player.statLifeMax2 * 0.25)
{
if (i == Main.myPlayer)
{
player.paladinGive = true;
}
else if (player.miscCounter % 5 == 0)
{
int num3 = Main.myPlayer;
if (Main.player[num3].team == player.team && player.team != 0)
{
float single = player.position.X - Main.player[num3].position.X;
float y1 = player.position.Y - Main.player[num3].position.Y;
if ((float)Math.Sqrt((double)(single * single + y1 * y1)) < 800f)
{
Main.player[num3].AddBuff(43, 10, true);
}
}
}
}
{
Player player297 = player;
player297.aggro = player297.aggro + 400;
}
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(Terraria.ID.ItemID.938);
recipe.AddIngredient(Terraria.ID.ItemID.3016);
recipe.AddTile(398);
recipe.SetResult(this);
recipe.AddRecipe();
}
}}
I think you really should download it! It might take some time getting started and used to, but it's more than worth it and will save you a lot (like really, a lot) of time. That autocomplete thing I was telling you about will also pop up with any other thing you try to reference. Things like the player class or the Main class. Really handy!im using Notepad++ i shouuuuuuld download visual studio but im really lazy.
[DOUBLEPOST=1442681761,1442681673][/DOUBLEPOST]Anyway here is my code so far..... im about to test it for the first time. please point out any errors. i started coding in C# for the first time literally last night so there is bound to be something a bit wonky.
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Tinkermore.Items {
public class TankShield : ModItem
{
public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Shield);
return true;
}
public override void SetDefaults()
{
item.name = "Tank Shield";
item.width = 24;
item.height = 28;
item.toolTip = "Absorbs 25% of damage done to players on your team when above 25% health";
item.toolTip2 = "Enemies are more likely to target you";
item.value = 65000;
item.rare = 8;
item.accessory = true;
item.defense = 12;
}
public override void UpdateAccessory(Player player)
{
player.noKnockback = true;
if ((double)player.statLife > (double)player.statLifeMax2 * 0.25)
{
if (i == Main.myPlayer)
{
player.paladinGive = true;
}
else if (player.miscCounter % 5 == 0)
{
int num3 = Main.myPlayer;
if (Main.player[num3].team == player.team && player.team != 0)
{
float single = player.position.X - Main.player[num3].position.X;
float y1 = player.position.Y - Main.player[num3].position.Y;
if ((float)Math.Sqrt((double)(single * single + y1 * y1)) < 800f)
{
Main.player[num3].AddBuff(43, 10, true);
}
}
}
}
{
Player player297 = player;
player297.aggro = player297.aggro + 400;
}
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(Terraria.ID.ItemID.938);
recipe.AddIngredient(Terraria.ID.ItemID.3016);
recipe.AddTile(398);
recipe.SetResult(this);
recipe.AddRecipe();
}
}}
what error did u get now?It didn't work