tAPI Getting Started with Modding

Status
Not open for further replies.
Only problem, seems like "Sources" folder doesn't exist to tAPI Builder at all... This is my code for ModInfo.json:
{
"displayName" : "Ih8creeperz's First Mod!",
"author" : "Ih8creeperz",
"info" : "The Best Mod Ever!",
"internalName" : "EvansMod"
}
This is for my Suitcase file:
{
"displayName": "Suitcase",
"size": [32,32],
"maxStack": 10,
"value": [0, 0, 0, 10],
"rare": 0,
"tooltip": "'My First Item!'",

"recipes":
[{
"items": { "Dirt Block": 20 },
"tiles": [ "Work Bench" ],
"creates": 5
}]
}
Am I supposed to create a line for the .png? Here's the Suitcase texture:
cdZbkY4.png
Only the "Local" folder existed there.
tAPI is a weird thing...
 
Only problem, seems like "Sources" folder doesn't exist to tAPI Builder at all... This is my code for ModInfo.json:
{
"displayName" : "Ih8creeperz's First Mod!",
"author" : "Ih8creeperz",
"info" : "The Best Mod Ever!",
"internalName" : "EvansMod"
}
This is for my Suitcase file:
{
"displayName": "Suitcase",
"size": [32,32],
"maxStack": 10,
"value": [0, 0, 0, 10],
"rare": 0,
"tooltip": "'My First Item!'",

"recipes":
[{
"items": { "Dirt Block": 20 },
"tiles": [ "Work Bench" ],
"creates": 5
}]
}
Am I supposed to create a line for the .png? Here's the Suitcase texture:
cdZbkY4.png
Only the "Local" folder existed there.
tAPI is a weird thing...
Is your "Items" folder in your mod folder? Is your ModInfo.json in the Items folder?
 
Items folder is in mod folder, ModInfo.json is in the mod folder, but not the Items folder.
Good! But then, that's not the issue...
I think the issue is with tAPI not putting in all the correct directories...
I'd recommend a reinstall, and if that doesn't work, contact the tAPI thread.
 
This is all quite helpful. I'm happy to see you do this.
Do you think you could make a section on spears?
Spears aren't working in Terraria right now (You can try to pull it from the Template Mod attached to this post) But the spear has a projectile AI style (19 to be exact) that doesn't seem to work.
 

Attachments

  • TemplateMod.zip
    139.3 KB · Views: 171
Spears aren't working in Terraria right now (You can try to pull it from the Template Mod attached to this post) But the spear has a projectile AI style (19 to be exact) that doesn't seem to work.
Ah I see. I was in fact using the TemplateMod as a guideline for making a few items and in newer updates spears weren't working anymore for the Template Mod.
 
Okay I'm back, posted a message on the tAPI forums, a error-ish report about this. I have high hopes to fix it :/
 
i also wanted to make the slime staff craftable in my mod, but i said "screw it, giving it a recipe is way too mainstream, why not make it generate in wooden chests?"
 
The line of code for the custom recipe tile isn't working for me. Here's the code I'm using:
Recipe.newRecipe.createItem.SetDefaults(20, false); // 20 being a copper bar
Recipe.newRecipe.createItem.stack = 1;
Recipe.newRecipe.requiredItem.Add(new Item().SetDefaults(703, false)); //703 being a tin bar
Recipe.newRecipe.requiredItem[0].stack = 1;
Recipe.newRecipe.requiredItem.Add(new Item().SetDefaults( ItemDef.byName["okok111365:T1ArbitraryEssence"].type, false)); // mod Item, isn't throwing any errors of it's own
Recipe.newRecipe.requiredItem[1].stack = 1;
Recipe.newRecipe.requiredTile.Add(new Tile().SetDefaults( TileDef.byName["okok111365:TransmutationTable"].type, false)); // mod tile, isn't throwing any errors of it's own
Recipe.AddRecipe();
and it gives me this error:
T1.cs (58,21)
'Terraria.Tile' does not contain a definition for 'SetDefaults' and no extension method 'SetDefaults' accepting a first argument of type 'Terraria.Tile' could be found (are you missing a using directive or an assembly reference?)
Recipe.newRecipe.requiredTile.Add(new Tile().SetDefaults( TileDef.byName["okok111365:TransmutationTable"].type, false));
^
T1.cs (119,21)
'ushort' does not contain a definition for 'type' and no extension method 'type' accepting a first argument of type 'ushort' could be found (are you missing a using directive or an assembly reference?)
Recipe.newRecipe.requiredTile.Add(new Tile().SetDefaults( TileDef.byName["okok111365:TransmutationTable"].type, false));
Any idea what I'm doing wrong/how to fix? Aside from that, these tutorials are great and help out a massive amount! :D
 
Status
Not open for further replies.
Back
Top Bottom