HiKoNe
Steampunker
Terraria Recipes and Items
v0.1.4.0, Terraria 1.3.5.3
tModLoader v0.11.7.7
Client Side Only
Download on Mod Browser
- advanced viewing items and recipes
Check Key Bindings for settings key:
- Use "R" on Item to view Recipe.
- Use "U" on Item to view Usage.
Check Mod Settings for Info Display:
- View ID on Item.
- View Mod Name on Item.
1. Added new Buttons
-TRaIItems: Open/Close items grid.
-TRaIConfig: Open configs for you.
2. Items Grid and Search
Search for Items:
-Use NAME for search item name.
-Use @MODNAME for search mod.
-Use #TOOLTIP for search tooltip.
-Use $CLASSES for search classes weapon. ($magic, $throwing, $summon, $ranged, $melee)
-Use %NUMBER for search damage. (%1, %>1, %<1)
-Use &. (and)
-Use |. (or)
3. Recipe view
For view Recipe:
-Use "R" on Item.
-Use Left Mouse Button on Item.
-Use Shift + "U" on Item.
For view Usage:
-Use "U" on Item.
-Use Right Mouse Button on Item.
-Use Shift + "R" on Item.
-TRaIItems: Open/Close items grid.
-TRaIConfig: Open configs for you.
2. Items Grid and Search
Search for Items:
-Use NAME for search item name.
-Use @MODNAME for search mod.
-Use #TOOLTIP for search tooltip.
-Use $CLASSES for search classes weapon. ($magic, $throwing, $summon, $ranged, $melee)
-Use %NUMBER for search damage. (%1, %>1, %<1)
-Use &. (and)
-Use |. (or)
3. Recipe view
For view Recipe:
-Use "R" on Item.
-Use Left Mouse Button on Item.
-Use Shift + "U" on Item.
For view Usage:
-Use "U" on Item.
-Use Right Mouse Button on Item.
-Use Shift + "R" on Item.
You can Add your Recipe in this mod from Another Mod.
Use this code (When your recipe is already added):
Call in:
You can check my Source Code.
Or this Example code:
Use this code (When your recipe is already added):
C#:
Mod trai = ModLoader.GetMod("TRaI");
if (trai != null)
{
//From Label
trai.Call(
"AddLabel_" + string, //Mod Name
string, //Hover Item Name
Texture2D, //Item Texture
int //Tile ID
);
//From Recipe
trai.Call(
"AddRecipe_" + string, //Mod Name
int, //Recipe Count
Rectangle[], //ITEM: X, Y - Position
Item[], //ITEM: Item
bool[], //ITEM: If Item is Output
float[], //ITEM: Chance (1f = 100%)
float[], //ITEM: Scale
Texture2D[], //ITEM: Background Texture (null for Terraria Background)
Rectangle[], //STRING: X, Y - Position
string[], //STRING: String
float[], //STRING: Scale
Rectangle[], //TEXTURE: X, Y - Position
Texture2D[], //TEXTURE: Texture
int[], //Recipe Tile IDs
int //Recipe Height
);
}
C#:
//In MOD Class
//or
public override void PostAddRecipes()
//or
public override void AddRecipes()
//or
public override void PostSetupContent()
Or this Example code:
C#:
public override void AddRecipes()
{
Mod trai = ModLoader.GetMod("TRaI");
if (trai != null)
{
/*
* {0} - String (AddLabel_MODNAME)
* {1} - String (Name)
* {2} - Texture (Texture)
* {3} - Ints[] (Tiles)
*/
var item = new Item();
for (int j = 0; j < ItemLoader.ItemCount; j++)
{
item.SetDefaults(j);
if (item.createTile == MaceratorRecipes.tile[0])
{
trai.Call(
"AddLabel_" + Name, //{0}
item.HoverName, //{1}
Main.itemTexture[item.type], //{2}
MaceratorRecipes.tile[0] //{3}
);
break;
}
}
/*
* {0} - String (AddRecipe_MODNAME)
* {1} - Int (Count Recipes)
* {2}{3}{4}{5}{6}{7} - Rectangles[], Items[], Bools[], Floats[], Floats[], Textures[] (Items)
* {8}{9}{10} - Rectangles[], Strings[], Floats[] (Strings)
* {11}{12} - Rectangles[], Textures[] (Textures)
* {13} - Ints[] (Required Tiles)
* {14} - Int (Height Recipe)
*/
for (int i = 0; i < MaceratorRecipes.numRecipes; i++)
{
var r = MaceratorRecipes.maceratorRecipes[i];
var itemsRect = new List<Rectangle>() { new Rectangle(0, 0, 0, 0) };
var items = new List<Item>() { r.itemInput };
var bools = new List<bool>() { false };
var floats = new List<float>() { 1f };
var scale = new List<float>() { 0.67f };
var texture = new List<Texture2D>() { null };
var stringsRect = new List<Rectangle>() {
new Rectangle(10, 52, 0, 0),
new Rectangle(10, 72, 0, 0),
new Rectangle(10, 92, 0, 0)
};
var strings = new List<string>() {
"Energy total: " + r.energyUsage * r.craftTime + " IE",
"Enrgy consume: " + r.energyUsage + " IE/sec",
"Craft time: " + r.craftTime + " sec"
};
var scales = new List<float>() {
1f,
1f,
1f
};
var size = 52 * 0.67f;
for (int j = 0; j < r.itemOutput.Length; j++)
{
itemsRect.Add(new Rectangle((int)size + 5 + (int)(size * j), 0, 0, 0));
items.Add(r.itemOutput[j]);
bools.Add(true);
floats.Add(r.outputChance[j]);
scale.Add(0.67f);
texture.Add(null);
}
trai.Call(
"AddRecipe_" + Name, //{0}
MaceratorRecipes.numRecipes, //{1}
itemsRect.ToArray(), //{2}
items.ToArray(), //{3}
bools.ToArray(), //{4}
floats.ToArray(), //{5}
scale.ToArray(), //{6}
texture.ToArray(), //{7}
stringsRect.ToArray(), //{8}
strings.ToArray(), //{9}
scales.ToArray(), //{10}
null, //{11}
null, //{12}
MaceratorRecipes.tile.ToArray(), //{13}
118 //{14}
);
}
}
}
v0.1:
-Mod Started!
v0.1.0.1:
-Added Site.
v0.1.2.0:
-Added GitHub.
-Added Icon.
v0.1.3.0
-Added Mod Integration.
-Added Description for Recipes.
-Fixed code.
v0.1.4.0
-Changed to Client Side only mod.
-Fixed server disabling mod.
-Mod Started!
v0.1.0.1:
-Added Site.
v0.1.2.0:
-Added GitHub.
-Added Icon.
v0.1.3.0
-Added Mod Integration.
-Added Description for Recipes.
-Fixed code.
v0.1.4.0
-Changed to Client Side only mod.
-Fixed server disabling mod.
Last edited: