• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.

Chasing Specters

Spazmatism
Okay, I fixed my last problem but I ran in to another.
My mod appears to be functioning properly, but my sword, the Vortex Blade, won't show up in game. :redspin:

Code:
{
     "displayName": "Vortex Blade",
     "texture": "Items/vortexblade",
     "size": [26, 26],
     "maxStack": 1,
     "value": [0, 10, 5, 50],
     "rare": 5,
     "tooltip": "You feel dark inside.",
     "useStyle": 1,
     "useAnimation": 12,
     "useTime": 12,
     "damage": 52,
     "knockback": 2,
     "useSound": 1,
     "autoReuse": true,
     "useTurn": true,
     "melee": true,
     "recipe":[{
         "items": { "Wood": 1 },
         "tiles": [ "Work Bench" ],
         "creates": 1
     }]
}
 

blushiemagic

Retinazer
tModLoader
Okay, I fixed my last problem but I ran in to another.
My mod appears to be functioning properly, but my sword, the Vortex Blade, won't show up in game. :redspin:

Code:
{
     "displayName": "Vortex Blade",
     "texture": "Items/vortexblade",
     "size": [26, 26],
     "maxStack": 1,
     "value": [0, 10, 5, 50],
     "rare": 5,
     "tooltip": "You feel dark inside.",
     "useStyle": 1,
     "useAnimation": 12,
     "useTime": 12,
     "damage": 52,
     "knockback": 2,
     "useSound": 1,
     "autoReuse": true,
     "useTurn": true,
     "melee": true,
     "recipe":[{
         "items": { "Wood": 1 },
         "tiles": [ "Work Bench" ],
         "creates": 1
     }]
}
If you mean its recipe won't show up, you need to replace "recipe" with "recipes".
 

Xman

Skeletron Prime
Quick question:
I want my item to float in the air like Soul of Light and Soul of Night. I know it has something to do with UpdateItem(int i) but I can't get it to work. Does someone know how to make an item float in the air?
 

Chasing Specters

Spazmatism
Two questions,
1. How do I fix this now? (I'm gonna get really annoying aren't I?)
Code:
{
     "displayName": "Shadow Core",
     "texture": "Items/shadowcore",
     "size": [19, 19],
     "maxStack": 99,
     "value": [0, 0, 30, 32]
     "tooltip": "Bring six to an altar",
    
     "recipes":
     [{
         "items": { "Dirt Block": 1 }
         "tiles": [ "Work Bench" ],
         "creates": 6
     }]
}

Error-
========================================
Building mod Crimson's Reverium Mod

Validating Jsons...
ShadowCore.json: Invalid JSON file.
Invalid token '"' in input string
Failed to build Crimson's Reverium Mod.

========================================

Built 0 mods.

2. How would I make a page on this site to publicly announce my mod?

Thank you anyone who could answer one or both questions.
 

Sin Costan

Eye of Cthulhu
Two questions,
1. How do I fix this now? (I'm gonna get really annoying aren't I?)
Code:
{
     "displayName": "Shadow Core",
     "texture": "Items/shadowcore",
     "size": [19, 19],
     "maxStack": 99,
     "value": [0, 0, 30, 32]
     "tooltip": "Bring six to an altar",
   
     "recipes":
     [{
         "items": { "Dirt Block": 1 }
         "tiles": [ "Work Bench" ],
         "creates": 6
     }]
}

Error-
========================================
Building mod Crimson's Reverium Mod

Validating Jsons...
ShadowCore.json: Invalid JSON file.
Invalid token '"' in input string
Failed to build Crimson's Reverium Mod.

========================================

Built 0 mods.

2. How would I make a page on this site to publicly announce my mod?

Thank you anyone who could answer one or both questions.

1. You forgot a comma after your items' line in the recipes. And you forgot a comma after the line for Value. Also you really don't need texture if you have your texture file for the item already the same as your item file.

2. You can Create a thread by clicking Create a New Thread. You should probably post your idea within the Work in Progress page.
 

Chasing Specters

Spazmatism
1. You forgot a comma after your items' line in the recipes. And you forgot a comma after the line for Value. Also you really don't need texture if you have your texture file for the item already the same as your item file.

2. You can Create a thread by clicking Create a New Thread. You should probably post your idea within the Work in Progress page.

Thanks so much there. I'll be at the WIP page.

EDIT: Uhh... Where is the WIP page?
 
Last edited:
I'm having this weird problem where none of my mod's crafting recipes show up and when they do (by making them craftable from nothing using MBase.cs) they show up as a error item with the name " Dinosauria: *insert item here* " Anybody else have this problem?

.jsons and .cs files. the mod is for 1.2.4 btw.
{
"displayName": "Tripoon",
"maxStack": 1,
"size": [48, 34],
"value": [0, 8, 80, 8],
"rare": 5,
"tooltip": ["Fires 3 Harpoon projectiles at once!"],
"useStyle": 5,
"useAnimation": 50,
"useTime": 29,
"damage": 25,
"knockback": 6,
"useSound": 10,
"autoReuse": true,
"ranged": true,
"noMelee": true,
"shoot": 23,
"shootSpeed": 9,

"recipes":
[{
"items": { "Wood": 2 },
"tiles": [ "Work Bench" ],
"creates": 1
}]

}
using Terraria;
using System;
using System.Diagnostics;
using Microsoft.Xna.Framework;

using TAPI;

namespace Dinosauria.Items
{
public class Tripoon : ModItem
{
public override bool PreShoot(Player player, Vector2 ShootPos, Vector2 ShootVelocity, int projType, int Damage, float knockback) //This code is performed before the player shoots the weapon. Copy these parameters exactly if you want it to work.
{
int ShotAmt = 3; //Amount of projectiles fired from the weapon. If you want to make a slightly inaccurate machine gun type of weapon, set this to 1
int spread = 0; //The angle of random spread.
float spreadMult = 0.20f; //Multiplier for bullet spread, set it higher and it will make for some outrageous spread.
for (int i = 0; i < ShotAmt; i++)
{
float vX = ShootVelocity.X + (float)Main.rand.Next(-spread, spread + 1) * spreadMult;
float vY = ShootVelocity.Y + (float)Main.rand.Next(-spread, spread + 1) * spreadMult;

Projectile.NewProjectile(ShootPos.X, ShootPos.Y, vX, vY, projType, Damage, knockback, Main.myPlayer);
}
return false;
}
}
}
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Dinosauria.World;

using TAPI;
using Terraria;

namespace Dinosauria
{
public class Dinosauria : TAPI.ModBase
{

public Dinosauria() : base() { self = this; }

public static Dinosauria self = null;

public override void OnLoad()
{

addRecipes();
}
public void addRecipes()
{
Recipe.newRecipe.createItem.SetDefaults("Slime Staff");
Recipe.newRecipe.createItem.stack = 1;
Recipe.newRecipe.requiredItem.Add(new Item());
Recipe.newRecipe.requiredItem[0].SetDefaults("Wood");
Recipe.newRecipe.requiredItem[0].stack = 30;
Recipe.newRecipe.requiredItem.Add(new Item());
Recipe.newRecipe.requiredItem[1].SetDefaults("Gel");
Recipe.newRecipe.requiredItem[1].stack = 30;
Recipe.newRecipe.requiredTile.Add(18);
Recipe.AddRecipe();

Recipe.newRecipe.createItem.SetDefaults("Bone Pickaxe");
Recipe.newRecipe.createItem.stack = 1;
Recipe.newRecipe.requiredItem.Add(new Item());
Recipe.newRecipe.requiredItem[0].SetDefaults("Bone");
Recipe.newRecipe.requiredItem[0].stack = 24;
Recipe.newRecipe.requiredItem.Add(new Item());
Recipe.newRecipe.requiredItem[1].SetDefaults("Wood");
Recipe.newRecipe.requiredItem[1].stack = 4;
Recipe.newRecipe.requiredTile.Add(18);
Recipe.AddRecipe();


}

}
}
 

Chasing Specters

Spazmatism
Quick question:
I want my item to float in the air like Soul of Light and Soul of Night. I know it has something to do with UpdateItem(int i) but I can't get it to work. Does someone know how to make an item float in the air?

Actually, for my Souls of Purity, Darkness, Disruption, Corruption, Crimson, and Blight, i'll need his too.
 

blushiemagic

Retinazer
tModLoader
Quick question:
I want my item to float in the air like Soul of Light and Soul of Night. I know it has something to do with UpdateItem(int i) but I can't get it to work. Does someone know how to make an item float in the air?

Actually, for my Souls of Purity, Darkness, Disruption, Corruption, Crimson, and Blight, i'll need his too.
I assume you need to override this method in ModItem:
Code:
public virtual void MidUpdate(ref float gravity, ref float maxVelocity)
Since the gravity variable is passed by reference, any changes made to it will be reflected in the code that called the method.
 
Something is wrong with one of these and I cant tell what.
{
"displayName": "Magic Shuriken",
"size": [22,22],
"maxStack": 1,
"value": [0,1,,0],
"rare": 3,
"tooltip": ["'A Magical Returning Shuriken'"],
"useStyle": 1,
"useAnimation": 14,
"useTime": 14,
"damage": 17,
"knockback": 5,
"useSound": 43,
"noMelee": true,
"magic": true,
"shoot": "MageMod:Magic Shuriken",
"shootSpeed": 9,
"mana": 2,
"autoReuse":false
}
{
"displayName": "Magic Shuriken",
"size": [22, 22],
"aiStyle": 2,
"timeLeft": 900,
"friendly": true,
"hostile": false,
"tileCollide": true,
"damage": 17,
"magic": true
}
 

blushiemagic

Retinazer
tModLoader
Something is wrong with one of these and I cant tell what.
{
"displayName": "Magic Shuriken",
"size": [22,22],
"maxStack": 1,
"value": [0,1,,0],
"rare": 3,
"tooltip": ["'A Magical Returning Shuriken'"],
"useStyle": 1,
"useAnimation": 14,
"useTime": 14,
"damage": 17,
"knockback": 5,
"useSound": 43,
"noMelee": true,
"magic": true,
"shoot": "MageMod:Magic Shuriken",
"shootSpeed": 9,
"mana": 2,
"autoReuse":false
}
{
"displayName": "Magic Shuriken",
"size": [22, 22],
"aiStyle": 2,
"timeLeft": 900,
"friendly": true,
"hostile": false,
"tileCollide": true,
"damage": 17,
"magic": true
}
The problem is in your item file, on this line specifically:
"value": [0,1,,0],
You left out a number from the value.
 

Hines57

Terrarian
Dose anyone know why the wood planks when turned into stairs going up and to the right, they seem to glitch upside down?
 

Luna_Steambath

Skeletron
Hello! Here I have again a question appeared. Is it possible to do interactive tile? For instance, when you click the right mouse button on it was applied buff? I will be glad if you help. :D
 

Pumpking

Official Terrarian
I want to make an NPC orbit (go in circles) around a player. How would I go about doing that?
 
Last edited:
Status
Not open for further replies.
Top Bottom