tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
There is a crafting bug that puts in an extra blank space in the crafting menu that is free to craft, and doesn't show up in your inventory. When you craft it, it says 'Vanilla:'. PLEASE DO NOT FIX THIS!!!! I LOVE CRAFTING VANILLA!!
Im Allergic. I Havent Found This Glitch Meh Self Doh
 
How do I make a hook that works by damaging an enemy with a certain type of projectile (like a magic, melee and such?)
 
When I try to install tAPI, it says "c:\program files\steam\steamapps\common\Terraria already exists. Would you like to install to that folder anyway?".

I click "Yes", "Next", then "Install". It show me an error message saying "The selected directory is not a valid Terraria directory. Please go back and choose the right folder.".

What is wrong?
 
When I try to install tAPI, it says "c:\program files\steam\steamapps\common\Terraria already exists. Would you like to install to that folder anyway?".

I click "Yes", "Next", then "Install". It show me an error message saying "The selected directory is not a valid Terraria directory. Please go back and choose the right folder.".

What is wrong?

Check the file path to make sure it doesn't read "\Terraria\Terraria". Occasionally it will put in that extra Terraria at the end.
 
Check the file path to make sure it doesn't read "\Terraria\Terraria". Occasionally it will put in that extra Terraria at the end.
I already did, I tried a whole lot of other things too but I don't know how to create a viable file path.

Does it help if I told you that I recently uninstalled r14? I am just trying to get up-to-date by installying r15.
 
I already did, I tried a whole lot of other things too but I don't know how to create a viable file path.

Does it help if I told you that I recently uninstalled r14? I am just trying to get up-to-date by installing r15.
Hmmm... It could be that it needs a file in there called Terraria.exe. If there's no Terraria.exe file, but instead a file called TerrariaOriginalBackup.exe, try renaming that to terraria.exe. (this is assuming that you don't have game launcher installed)

If that doesn't work, try verifying the integrity your games cache through Steam.
 
Well, finally worked out how to create a player-controlled tool/weapon.

My youngest son (8yo Aspi) wanted ''A Rainbow Tool'' that was weapon, axe, pick that fired rainbows. Quickly discovered that adding ''shoot'' to an item overrode it's ability to mine/chop/hammer so set off on a crusade to overcome this shortcoming (a pleasant side effect is that the mansion no longer needs to be rebuilt after every unexpected Boss visit.)

The code below will cause the 'tool' functions of an item to only be enabled when the Alt key is pressed.

Hopefully this will be useful to more than just me

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

using TAPI;
using Terraria;

namespace MyWeaponTool.Items
{
  public class MyWeaponTool : ModItem
  {
     // First off create a few variables to remember the original item settings
     private int myShoot;
     private float myShootSpeed;
     private int myPick;
     private int myAxe;
     private int myHammer;

  public override void Initialize()
  {
       // As the item is created / initialised read its abilities for use later
       myPick = this.item.pick;
       myAxe = this.item.axe;
       myHammer = this.item.hammer;
       myShoot = this.item.shoot;
       myShootSpeed = this.item.shootSpeed;
  }

  public override void PreItemCheck(Player p)
  {
    if (KState.Special.Alt.Down())
    {
         // If the player has the Alt key pressed then we enable the various tool functions...
         this.item.pick = myPick;
         this.item.axe = myAxe;
         this.item.hammer = myHammer;
         // ... and disable any shooting function
         this.item.shoot = 0;
         this.item.shootSpeed = 0;
    }
    else
    {
         // If not then they probably want the combat abilitiess so disable tools...
         this.item.pick = 0;
         this.item.axe = 0;
         this.item.hammer = 0;
         // ... and enable the items ability to shoot things.
         this.item.shoot = myShoot;
         this.item.shootSpeed = myShootSpeed;
    }
  }

    public override void PostItemCheck(Player p)
    {
       // After the item has done what is asked of it, put it back to its json defaults
       this.item.pick = myPick;
       this.item.axe = myAxe;
       this.item.hammer = myHammer;
       this.item.shoot = myShoot;
       this.item.shootSpeed = myShootSpeed;
    }
  }
}
 
Last edited:
Not sure if this was reported already (Probably), but you can't create new worlds.
The "Create World" option isn't there.
 
Hmmm... It could be that it needs a file in there called Terraria.exe. If there's no Terraria.exe file, but instead a file called TerrariaOriginalBackup.exe, try renaming that to terraria.exe. (this is assuming that you don't have game launcher installed)

If that doesn't work, try verifying the integrity your games cache through Steam.
It worked after I verified the game cache. Thanks a lot!
 
Hi,i have a problem with the tapi server.When i starting the server under the game,it donsen't working,only show me the screen with starting server.
And if i try to open the tapi server.exe,this is the resultat:
65482581c3c6dc6f0788e4942f018593.png

What can i do?
I'm ussing windows 8.1 and sorry if i have mystakes in my english.It's nort very well
 
Hi, I am having a problem loading tAPI builder. I try to run the program and as soon as I click it, an error message says: "tAPI Builder has stopped working" and "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.".

What is wrong?
 
How would I go about having a buff decrease the speed of someone similar to the slow and chilled effects? Currently I have this
Code:
public override void Effects(Player player, int index)
        {
            player.moveSpeed = 0.5f;
        }
        public override void Effects(NPC npc, int index)
        {
            npc.velocity.Y = 0.5f;
            npc.velocity.X = 0.5f;
        }
And it doesn't work because they SET the speed, not lower them. I tried using "-=" and "+=" to no avail. "-=" Made the controls backwards and make me incredibly fast, and "+=" did that effect the NPC's and didn't do anything to my player.[/code]
 
How would I go about having a buff decrease the speed of someone similar to the slow and chilled effects? Currently I have this
Code:
public override void Effects(Player player, int index)
        {
            player.moveSpeed = 0.5f;
        }
        public override void Effects(NPC npc, int index)
        {
            npc.velocity.Y = 0.5f;
            npc.velocity.X = 0.5f;
        }
And it doesn't work because they SET the speed, not lower them. I tried using "-=" and "+=" to no avail. "-=" Made the controls backwards and make me incredibly fast, and "+=" did that effect the NPC's and didn't do anything to my player.[/code]
Try using:
Code:
player.moveSpeed *= 0.5f;
The star ( * ) multiplies it. So it's multiplying the player's move speed by 0.5.

Edit: By the way, you can do the same thing with the NPC's velocity.
 
Try using:
Code:
player.moveSpeed *= 0.5f;
The star ( * ) multiplies it. So it's multiplying the player's move speed by 0.5.

Edit: By the way, you can do the same thing with the NPC's velocity.
It works fine for the player, but it does odd effects for NPC's. For example, if it is given to the Queen Bee during her charge, it will stop her entirely even after the debuff is gone. Also, I'm currently doing this
Code:
        public override void ArmorSetBonus(Player p)
        {
            p.setBonus = "12% increased movement speed";
            p.moveSpeed *= 1.12f;
        }
for a set bonus to increase movement speed in one of my armor sets, is this correct?
 
It works fine for the player, but it does odd effects for NPC's. For example, if it is given to the Queen Bee during her charge, it will stop her entirely even after the debuff is gone. Also, I'm currently doing this
Code:
        public override void ArmorSetBonus(Player p)
        {
            p.setBonus = "12% increased movement speed";
            p.moveSpeed *= 1.12f;
        }
for a set bonus to increase movement speed in one of my armor sets, is this correct?
One of the many reasons I made my Ice debuff ineffective against bosses...

For player speed increase, I use something along the lines of:
Code:
p.moveSpeed += 0.12f;
I hope this works for you, as it did for me.
 
How would I go about making a banner? I've made a few tiles before, but I've always ended up getting them wrong and copying them off of a different mod. But, there isn't a a mod (as far as I know) that currently adds any banners.
 
Hi,i have a problem with the tapi server.When i starting the server under the game,it donsen't working,only show me the screen with starting server.

Check your .exe file and make sure it says tAPI.exe and not TerrariaOriginalBackup.exe
 
pls help !!
I have the newest gamelauncher version installed
I have tAPI r15 installed
My terraria version is 1.2.4.1
I have Grox's base mod v1.0.5
and I have OmnirsNOSpack v1.0.3.10
I have them both enabled and I've tried reloading them at least 5 times
I still cannot seem to get the omnir mod to work (when i start a world, its just vanilla terraria)
There are no videos or forums for this troubleshooting
 
Status
Not open for further replies.
Back
Top Bottom