You would use Main if the property/field you are accessing is part of the Main class. Terraria is pretty organized, but Main has a lot of random things. Basically you need to be using Visual Studio to be productive.In the code, in what context would you use main. For Example,
public override void SetDefaults()
{
projectile.name = "GlowyThing";
projectile.width = 40;
projectile.height = 40;
main.projFrames[projectile.type] = 8;
projectile.timeLeft = 180;
projectile.penetrate = 8;
projectile.friendly = true;
projectile.hostile = false;
projectile.tileCollide = false;;
projectile.ignoreWater = true;
projectile.ranged = true;
projectile.aiStyle = 25;
}
Nofor the new modloader update 9.2.2 requires that all mods need to be updated for 9.2.2?
because i dont want update modloader because the typical message of this version was for the 9.2.1 and mod has been disasbled.
Ok then, thank you.
Shouting that you've found a bug without any other information isn't of any use to us.![]()
I think I found a "bug".![]()
you could have looked at the change log :/for the new modloader update 9.2.2 requires that all mods need to be updated for 9.2.2?
because i dont want update modloader because the typical message of this version was for the 9.2.1 and mod has been disasbled.
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Trelamium.Items.AEarlyPHM.Slime
{
public class SlimeHelm : ModItem
{
public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Head);
return true;
}
public override void SetDefaults()
{
item.name = "Slime Helmet";
item.width = 22;
item.height = 16;
item.toolTip = "Your hair is sticky";
item.value = Item.sellPrice(0, 0, 0, 18);
item.defense = 1;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == mod.ItemType("AncientChest") && legs.type == mod.ItemType("AncientLegs"); //put your Breastplate name and Leggings name
}
public override void UpdateArmorSet(Player player)
{
player.setBonus = "Green slimes are friendly";
player.npcTypeNoAggro[1] = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.WoodBreastplate);
recipe.AddIngredient(ItemID.Gel, 30);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
The Mod Browser doesn't seem to work for me on the current version, not sure if it's just me though, anyone else having issues?
You probably have a namespace called Trelamium.Item somewhere in your code, causing confusing for the compiler since Item is also in Terraria. Go through your files and check your namespacesI got it to work for 1 armor set, AFTER i put it in a folder called "Armor" does this mean all my armor needs to go in the "Armor" folder? if it is then i have alot of work to do...![]()
its still doing it....You probably have a namespace called Trelamium.Item somewhere in your code, causing confusing for the compiler since Item is also in Terraria. Go through your files and check your namespaces
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Trelamium;
using Trelamium.Items;
using Trelamium.Items.Armor;
namespace Trelamium.Items.Armor
{
public class AlluminumHelm : ModItem
{
public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Head);
return true;
}
public override void SetDefaults()
{
item.name = "Aluminum Visor";
item.width = 24;
item.height = 22;
item.toolTip = "7% Increased Ranged Damage.";
item.value = 10000;
item.rare = 4;
item.defense = 6;
}
public override bool IsArmorSet(Item head, Item body, Item legs) //It thinks this is a namespace
{
return body.type == mod.ItemType("AlluminumChest") && legs.type == mod.ItemType("AlluminumBoots");
}
public override void UpdateArmorSet(Player player)
{
player.setBonus = "Faster than the speed of Light.....ing, and immumity to Eletric debuffs."; // the armor set bonus
player.moveSpeed += 6f;
player.rangedDamage += 0.07f;
}
public override void AddRecipes() //How to craft this item
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(null, ("AlluminumBar"), 8);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}