Standalone [1.3] tModLoader - A Modding API

im getting this problem with my gun. all I know is that the problem is with the part that changes where the gun is held.


c:\Users\kikbu.LAPTOP-5C5IBULI\Documents\My Games\Terraria\ModLoader\Mod Sources\OTRccm\Items\Weapons\Mac10.cs(41,25) : error CS0246: The type or namespace name 'Vector2' could not be found (are you missing a using directive or an assembly reference?)

I don't have a clue what this one is.

c:\Users\kikbu.LAPTOP-5C5IBULI\Documents\My Games\Terraria\ModLoader\Mod Sources\OTRccm\Items\Weapons\Mac10.cs(46,42) : error CS0246: The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?)
using Microsoft.Xna.Framework;
 
before tModloader installation my terraria is v1.3.5.3 , but after tModloader installed my terraria become v1.3.5.2. its that normal ?
 
I don't think a broken soundcard has anything to do with getting help with installing mods. But here's a tutorial anyway. There are two ways to install mods, either through the mod browser of manually downloading it from the forums. In this case i will assume the latter and I will assume you have installed TModloader.

In order to install the mod make sure you have unzipped the zip file and have a file with a .tmod extension at the end.
Then what you want to do is navigate to this directory 'C:\Users\{Your User}\Documents\My Games\Terraria\ModLoader\Mods' then drop the .tmod file into that folder and launch terraria.
 
Last edited:
simple click on the mods tab in your main menu and there should be a button that has 'enable' on it next to the disabled mod. Click on that button to enable the mod and click 'reload mods' at the bottom
 
Untitled.jpg

[doublepost=1530095656,1530095542][/doublepost]gonna try downgrading the calamity
 
Hey just wondering...where do I add my new recipe into my mod? Do I add it into the .cs file or one of the others? Also, if it is the .cs file, How and where do I add it in? I am using Visual Studio Community 2017. Also, how do I change the appearance of an Item I've created? (Lol sry I have so many questions)
 
Last edited:
Hey just wondering...where do I add my new recipe into my mod? Do I add it into the .cs file or one of the others? Also, if it is the .cs file, How and where do I add it in? I am using Visual Studio Community 2017. Also, how do I change the appearance of an Item I've created? (Lol sry I have so many questions)

To add a recipe to your item, go into the item that you want to add the recipe to and append this code and making sure that you have appended it inside of the class brackets.
Code:
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID, int);
recipe.SetResult(ItemID, int);
recipe.AddRecipe();
}
If you are creating more than one recipe then do this
Code:
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID, int);
recipe.SetResult(ItemID, int);
recipe.AddRecipe();

recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID, int);
recipe.SetResult(ItemID, int);
recipe.AddRecipe();
  }

However if you are not adding a mod item, go to your main cs file and do the same thing except of this
Code:
 new ModRecipe(mod)
do this
Code:
 new ModRecipe(this)

To change the appearance of the item you have created just get an image editor that allows transparancy such as gimp, or Paint.NET and edit the image that came with your mod skeleton or create an image with the dimensions of 40x40. To add the image just name the image exactly the same as the class name and place it in the same folder as that cs file or else it will not locate image
 
Last edited:
To add a recipe to your item, go into the item that you want to add the recipe to and append this code and making sure that you have appended it inside of the class brackets.
Code:
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID, int);
recipe.SetResult(ItemID, int);
recipe.AddRecipe();
}
If you are creating more than one recipe then do this
Code:
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID, int);
recipe.SetResult(ItemID, int);
recipe.AddRecipe();

recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID, int);
recipe.SetResult(ItemID, int);
recipe.AddRecipe();
  }

However if you are not adding a mod item, go to your main cs file and do the same thing except of this
Code:
 new ModRecipe(mod)
do this
Code:
 new ModRecipe(this)

To change the appearance of the item you have created just get an image editor that allows transparancy such as gimp, or Paint.NET and edit the image that came with your mod skeleton or create an image with the dimensions of 40x40. To add the image just name the image exactly the same as the class name and place it in the same folder as that cs file or else it will not locate image

Thank you so much. I've been looking everywhere to find out where to add it and couldn't find anything. This is very much appreciated.
 
hey guys i got a problem while coding a hood named King's Hood it says :
Error CS0103 : the name "thrownVelocity" does not exist in the current contest
here is my coding :
Code:
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace FatalityMod.Items.Armor
{
    [AutoloadEquip(EquipType.Head)]
    public class KingHood : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("King's Hood");
            Tooltip.SetDefault("'This Hood Is So Sticky'");
        }

        public override void SetDefaults()
        {
            item.width = 18;
            item.height = 18;
            item.value = 10000;
            item.rare = 2;
            item.defense = 4;
        }

        public override bool IsArmorSet(Item head, Item body, Item legs)
        {
            return body.type == mod.ItemType("KingBreastplate") && legs.type == mod.ItemType("KingLeggings");
        }

        public override void UpdateEquip(Player player)
        {
            thrownVelocity += 0.15f;
            meleeSpeed += 0.15f;
        }
        public override void UpdateArmorSet(Player player)
        {
            player.setBonus = "'Jump Like A Slime'";
            autoJump = true;
            jumpSpeedBoost += 2.4f;
            extraFall += 15;
            jumpBoost = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "SwampSoul", 5);
            recipe.AddIngredient(null, "KingMedal", 1);
            recipe.AddIngredient(ItemID.NinjaHood);
            recipe.AddTile(TileID.Solidifier);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
 
Back
Top Bottom