1. For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
    Dismiss Notice
  2. For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.
    Dismiss Notice
  3. TCF will be undergoing a scheduled software and server upgrade on September 26, 2019 beginning at 9:00AM GMT. TCF may be unavailable for an extended period after this time. More information can be found here. We apologize in advance for any inconvenience this may cause, we will try to keep the downtime short.

tAPI [Discontinued] tAPI - A Mod To Make Mods

Discussion in 'Released' started by Yoraiz0r, Oct 14, 2014.

Thread Status:
Not open for further replies.
Thread was lock by: Tunnel King
Reason: discontinued prior to 1.3 release
Lock date: 20:26 04-08-2016
  1. Azu

    Azu Retinazer

    Yeah, i figured that out and deleted it. thanks anyways!
     
  2. Chasing Specters

    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
         }]
    }
     
  3. blushiemagic

    blushiemagic Retinazer

    If you mean its recipe won't show up, you need to replace "recipe" with "recipes".
     
  4. Chasing Specters

    Chasing Specters Spazmatism

    Thanks, i'll have my mod out eventually...
    If the spaghetti boss works...
     
  5. Xman

    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?
     
  6. Chasing Specters

    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.
     
  7. Sin Costan

    Sin Costan Eye of Cthulhu

    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.
     
  8. Chasing Specters

    Chasing Specters Spazmatism

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

    EDIT: Uhh... Where is the WIP page?
     
    Last edited: Apr 11, 2015
  9. GiantEnemyDinosaurPrime

    GiantEnemyDinosaurPrime Skeletron Prime

    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();


    }

    }
    }
     
  10. Chasing Specters

    Chasing Specters Spazmatism

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

    blushiemagic Retinazer

    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.
     
    Xman likes this.
  12. 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
    }
     
  13. blushiemagic

    blushiemagic Retinazer

    The problem is in your item file, on this line specifically:
    "value": [0,1,,0],
    You left out a number from the value.
     
  14. Thanks!
     
  15. Hines57

    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?
     
  16. MarioKart7z

    MarioKart7z Plantera

    gonna be fixed in r15.
     
  17. Hines57

    Hines57 Terrarian

    Thank you I thought I Broke Terraria ..lol

    Could one of the moderators merge my reply
    sorry
     
  18. Luna_Steambath

    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
     
  19. Pumpking

    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: Apr 12, 2015
  20. GiantEnemyDinosaurPrime

    GiantEnemyDinosaurPrime Skeletron Prime

    Anybody know how to get gores working in r14? I need some for one of my projectiles.
     
Thread Status:
Not open for further replies.