Standalone [1.3] tModLoader - A Modding API

Hi 2 all! I have a problem.
I wanted to make a little mod that add 3 items to game that are some modded items from another mod. I extract that mod, found items I need, open rhem with Notepad++, edit some values and description strings, then copy craft recipe from original and edit it to make those items craft not ony by original recipe but also craft from original item to edited and also add reverse recipe, and then save them with new names. Then I edited some mod description files and delete all unnecessary files that are nod modified. But when I tried to compile them into a mod, Terraria Mod Compiler got this: error CS1704: Сборка с простым именем "MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null уже импортирована. Рекомендуется удалить одну из ссылок или разрешить параллельный вызов компонентов. (on English: An assembly with the same simple name "MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" has already been imported. Try removing one of the references or sign them to enable side-by-side.) What this error means and how to fix it and make my little mod? I have 0 experience in programming.
Edited items (from HyperTerraria mod) added to post.
PS. And sorry if my English was bad.
There's a file called 'MP3Sharp.dll' in Terraria's install directory left over from an earlier version. Delete the MP3Sharp file and it should work hopefully.
 
There's a file called 'MP3Sharp.dll' in Terraria's install directory left over from an earlier version. Delete the MP3Sharp file and it should work hopefully.
Thanks, I already delete this file and now mod compiled properly. The problem now is that it does not working. That three edited items works just the same like original and have the same description.
 
How do you use vanilla dust particles? I made a sword and i want it to use vanilla dust.
Code:
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            if (Main.rand.Next(3) == 0)
            {
                int dust = Dust.Id(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, mod.DustType("6"));
            }
        }

        public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
        {
            target.AddBuff(BuffID.OnFire, 50);
        }
    }
}
 
Last edited:
What's code for making my sword having chance to shoot two projectiles at once? I know code for making my weapon shoot muliple projectiles at once but I want to know code for making it shoot one projectile and chance to shoot two projectiles. Like 1 in 5 swings sword will shoot extra projectile.
 
Last edited:
What's code for making my sword having chance to shoot two projectiles at once? I know code for making my weapon shoot muliple projectiles at once but I want to know code for making it shoot one projectile and chance to shoot two projectiles. Like 1 in 5 swings sword will shoot extra projectile.
ExampleGun has a vampire knives type example at the bottom.
[doublepost=1481406267,1481406175][/doublepost]
then how would I put the buff into the NearbyEffects hook?
public override void NearbyEffects(int i, int j, bool closer)
{
if (closer)
{
Player player = Main.LocalPlayer;
player.AddBuff(Terraria.ID.BuffID.Ichor, 5);
}
}
 
ExampleGun has a vampire knives type example at the bottom.
[doublepost=1481406267,1481406175][/doublepost]
public override void NearbyEffects(int i, int j, bool closer)
{
if (closer)
{
Player player = Main.LocalPlayer;
player.AddBuff(Terraria.ID.BuffID.Ichor, 5);
}
}
And for a Custom Buff, would i just replace Terraria.ID.BuffID.Ichor with "BuffName"?
 
Back
Top Bottom