Drok
Spazmatism
Hi,
How would i make a vanilla tile drop a custom item and how would i make a spear. I have looked around on the interent for tutorials but i found nothing. I also looked at other's mods all i found was a spear code that only works in one direction. Please Help.
EDIT: For example i believe your MBase.cs should look like this:
If you need more help just ask.
How would i make a vanilla tile drop a custom item and how would i make a spear. I have looked around on the interent for tutorials but i found nothing. I also looked at other's mods all i found was a spear code that only works in one direction. Please Help.
Not sure if anyone answered this for you but i believe its C# and i believe it should go into the OnLoad method in the base C# file.Thanks.
EDIT: Since I don't know what language this code is used, I have no idea how to implement a crafting recipe. (I've tried .cs/.json and obviously none of those worked.)
EDIT: For example i believe your MBase.cs should look like this:
Code:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using TAPI;
namespace TUnleashed //The Name on you mod.
{
public class MBase : TAPI.ModBase //MBase can be any name
{
public override void OnLoad() {
Recipe r = new Recipe();
r.createItem.SetDefaults("<item name>");
r.createItem.stack = <output stack>;
r.requiredItem.Add(new Item());
r.requiredItem[0].SetDefaults("<item name>");
r.requiredItem[0].stack = <required stack>;
r.requiredItem.Add(new Item());
r.requiredItem[1].SetDefaults("<item name>");
r.requiredItem[1].stack = <required stack>;
// etc
r.AddToGame();
}
public override void OnUnload() { }
public override void OnAllModsLoaded()
{
}
}
}
If you need more help just ask.
Last edited: