Reapermen
Terrarian
First of all, You will need tModLoader. Second of all, You will need Visual Studio.
I recommend "Visual Studio 2019!!!"
Now, The time you have been wanting to do! It is time to code the Mod!
1. Mod Sources [Main Menu]
2. Create Mod [Mod Sources Page]
3. Start The Basics!
ModName: MyMod [No Spaces]
Display Name: My Mod
Author: ExampleAuthor [No Spaces]
BasicSword: ExampleSword [No Spaces] (Also Optional)
4. Coding
Here is the starting part directory is "Documents\My Games\terraria\modloader\Mod Sources\MyMod\Items" if you did not do basic sword create the folder "Items" make sure the beginning is "Capitalized!!!"
Here is the beginning part of the code!
You Just Made A Sword! Good Job!!!
I recommend "Visual Studio 2019!!!"
Now, The time you have been wanting to do! It is time to code the Mod!
1. Mod Sources [Main Menu]
2. Create Mod [Mod Sources Page]
3. Start The Basics!
ModName: MyMod [No Spaces]
Display Name: My Mod
Author: ExampleAuthor [No Spaces]
BasicSword: ExampleSword [No Spaces] (Also Optional)
4. Coding
Here is the starting part directory is "Documents\My Games\terraria\modloader\Mod Sources\MyMod\Items" if you did not do basic sword create the folder "Items" make sure the beginning is "Capitalized!!!"
Here is the beginning part of the code!
C#:
using Terraria.ID;
using Terraria.ModLoader;
namespace MyMod.Items
{
public class ExampleSword : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("A ToolTip");
}
public override void SetDefaults()
{
item.damage = 40;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 5;
item.value = 10000;
item.rare = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.StoneBlock, 1);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
} //This is from namespace that means this ends the code fully!!!
You Just Made A Sword! Good Job!!!