tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
Start a game then, after selecting your player, on the World Select you choose <Import Vanilla>

Game will then display a list of worlds it has found in the vanilla Worlds folder (i.e. My Games/Terraria/Worlds) and you can choose one of those.

That World is now loaded, converted and saved (to My Games/Terraria/tAPI/Worlds) and you return to the World selector again (with the imported map listed.)

nm
 
Last edited:
I just got this error in the builder:
System.UnauthorizedAccessException: Access to the path 'C:\Users\user\Documents\My Games\Terraria\tAPI\Mods\Local\Jenosis.dll' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at FluentPath.FPath.Delete() in d:\Repo\git\tAPI\tAPI\FluentPath\FPath.cs:line 524
at TAPI.ModCompile.Compile(FPath sourceDir, FPath outputFile, Action`1 ActionProgress) in d:\Repo\git\tAPI\tAPI\tAPI\Mod\ModCompile.cs:line 252
at tAPI_Builder.MainWindow.<>c__DisplayClass8.<BtnBuild_Click>b__0()
any ideas on what might be causing it?

edit: wait what. a .dll file got created for my mod?? since when?
 
Last edited:
Is anyone else using r15 crashing very commonly using summons? seems to be a very common thing for me lately. Just started Terraria today and I have already crashed 7 times on the first monster I kill with my summoned hornets.
 
Strange. ..try reinstalling and downloading a new installer?
I tried. I also tried verifying Terrarias files beforehand.

See. It works and half/works. When it all installs. And I launch Terraria. The custom client comes up and everything. But when I click the tAPI.exe shortcut on my desktop. It can't find it.

I looked in the /common/ folder and the closest thing I could find was 'tAPI.pdb'. So I tried changing the .pdb to .exe but it came up with the 'T'his app cannot run on your PC.' stuff again.

The server seems to work. (Comes up with a command line thing that stops working probably cause I didn't have the game open.)
But the 'tAPI Builder' seems to be broken as well. It has an icon and doesn't give an error message. But doesn't do anything.

So by the looks of it. I can use mods but can't make them :<
 
...But now it doesn't even open.
Well, I'm not much help as tAPI support, all I can say is reinstall Terraria or if you have it on Steam, verify integrity of the game cache. After that reinstall tAPI r15 and then go to where your installation folder or if you have steam, go to your steamapps, commons, terraria folder and change Terraria.exe to tAPI.exe. And then you can probably make your own shortcut rather than have the installer do it for you.
 
Well, I'm not much help as tAPI support, all I can say is reinstall Terraria or if you have it on Steam, verify integrity of the game cache. After that reinstall tAPI r15 and then go to where your installation folder or if you have steam, go to your steamapps, commons, terraria folder and change Terraria.exe to tAPI.exe. And then you can probably make your own shortcut rather than have the installer do it for you.
I am so sorry. To you and everyone else. I did not read close enough and thought it was a drag-and-drop type jobby. Or something that brought up a window to make the mods with.

I was terribly wrong.

Thanks for everyone who tried to help xD I know. I'm stupid xD
 
Now. I'm new to c# but I had a question.

If I were, say, to make a new color of wire. What would I need to do to make it? I have the textures all ready.
 
This happens when I try to join a server. No mods installed. Singleplayer works fine. Any ideas?

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at TAPI.BinBuffer.ReadBytes(System.Int32 count)
at TAPI.BinBuffer.ReadString()
at Terraria.MessageBuffer.GetData(System.Int32 start, System.Int32 length)
at Terraria.NetMessage.CheckBytes(System.Int32 i = 256)
at Terraria.Netplay.ClientLoop(System.Object threadContext)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object state)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

I've been having this EXACT same problem, and I know for a fact it isn't a ram issue. I have 8GB of ram in this PC. It typically crashes when I still have 2.5 GB of ram left so I know for sure I'm not out of ram, far from it. Even my video card has a dedicated 3GB of video ram. When the server is loaded up, with mods (oh and by the way, 1 mod at 7kb in size or 20 mods, this error still happens) it takes 1.2-2GB of ram under load.

My best guess is java itself is the issue, but I have no experience in this stuff, so it's a pure guess. I'm running the latest version of java (Version 8 build 31) (Build 1.8.0_31-b13)

Hopefully someone can help me with this as it's very frustrating knowing I have a PC that can run most of the latest games at the best settings, but it can't handle this game.

I'm headed to bed at the moment, so I'll check in on this in the morning in hopes of some help.

*Edit*

I forgot to mention, this error only seems to occur when I try to join my own server or if I join my cousins server. (he gets the error then) My cousin can't seem to connect to me at all and I know port forwarding isn't an issue as this router auto port forwards and I have no issues with vanilla Terraria.
 
I've been having this EXACT same problem, and I know for a fact it isn't a ram issue. I have 8GB of ram in this PC. It typically crashes when I still have 2.5 GB of ram left so I know for sure I'm not out of ram, far from it. Even my video card has a dedicated 3GB of video ram. When the server is loaded up, with mods (oh and by the way, 1 mod at 7kb in size or 20 mods, this error still happens) it takes 1.2-2GB of ram under load.

My best guess is java itself is the issue, but I have no experience in this stuff, so it's a pure guess. I'm running the latest version of java (Version 8 build 31) (Build 1.8.0_31-b13)

Hopefully someone can help me with this as it's very frustrating knowing I have a PC that can run most of the latest games at the best settings, but it can't handle this game.

I'm headed to bed at the moment, so I'll check in on this in the morning in hopes of some help.

*Edit*

I forgot to mention, this error only seems to occur when I try to join my own server or if I join my cousins server. (he gets the error then) My cousin can't seem to connect to me at all and I know port forwarding isn't an issue as this router auto port forwards and I have no issues with vanilla Terraria.
What? Java? Terraria runs on C#. If it were Java, it would have thrown an OutOfMemoryError, not an exception.
 
OK, new to tAPI but OK at C#. Having difficulty finding all the hooks that are available so this is what I'm trying to do:

On a pickaxe/axe/weapon item only enable the tool functions whilst LeftAlt is pressed (tired of destroying my house when a boss randomly spawns within)

so....

if (KState.Special.Alt.Down())
{
// disable shoot functions if L-Alt down
// and add "pick": 100, "axe": 100
}
else
{
// add "shoot":
// remove "pick": and "axe":
}

1) Is this possible?
2) Where would I put it?

TIA, Glyn.

Well, decompiled tAPI and in Terraria Item.cs we have:

public int pick;
public int axe;
public int shoot;
public float shootSpeed;

So tried

private override UseItem(Player player)
{
this.item.pick = 100;
this.item.axe = 100;
this.item.shoot = 0;
this.item.shootSpeed = 0f;
}

But that didn't disable the item's "shoot" ability & enable the pick/axe to work.

1) is the object "this.item"?
2) if not in "UseItem" where should this code go?

Cheers, Glyn.
 
I've been having this EXACT same problem, and I know for a fact it isn't a ram issue. I have 8GB of ram in this PC. It typically crashes when I still have 2.5 GB of ram left so I know for sure I'm not out of ram, far from it. Even my video card has a dedicated 3GB of video ram. When the server is loaded up, with mods (oh and by the way, 1 mod at 7kb in size or 20 mods, this error still happens) it takes 1.2-2GB of ram under load.

My best guess is java itself is the issue, but I have no experience in this stuff, so it's a pure guess. I'm running the latest version of java (Version 8 build 31) (Build 1.8.0_31-b13)

Hopefully someone can help me with this as it's very frustrating knowing I have a PC that can run most of the latest games at the best settings, but it can't handle this game.

I'm headed to bed at the moment, so I'll check in on this in the morning in hopes of some help.

*Edit*

I forgot to mention, this error only seems to occur when I try to join my own server or if I join my cousins server. (he gets the error then) My cousin can't seem to connect to me at all and I know port forwarding isn't an issue as this router auto port forwards and I have no issues with vanilla Terraria.
http://forums.terraria.org/index.php?threads/possible-bigger-worlds.16572/#post-476414
I hope that clears it up.

tl;dr: Sorry, can't do much.
 
What? Java? Terraria runs on C#. If it were Java, it would have thrown an OutOfMemoryError, not an exception.

I did say I didn't know much about this stuff didn't I?


Well that sucks. Big world, small world, it doesn't matter, I get the same problem. I have no issues at all with Vanilla Terraria with the biggest world. I have to imagine if someone with a PC worse than mine can make and join their own world, I should be able to with a better PC using tapi as well.

As my example goes before. My cousin can make the biggest world and join his own world on the tapi server no problem, but I can't join his. I can make my own large world just fine, (biggest, smallest, it doesn't matter) but I can't join it. The error pops up when I try to join, so I don't see why any world size would be an issue with that for me, but not my cousin who has less ram than I do, he's using the same mods as me, and.

This is the error I get with mods on upon trying to join a new world:
http://imgur.com/Y7qosfo

This is the error I get with no mods when trying to join a new world:
http://imgur.com/LzU9ztY
 
I did say I didn't know much about this stuff didn't I?



Well that sucks. Big world, small world, it doesn't matter, I get the same problem. I have no issues at all with Vanilla Terraria with the biggest world. I have to imagine if someone with a PC worse than mine can make and join their own world, I should be able to with a better PC using tapi as well.

As my example goes before. My cousin can make the biggest world and join his own world on the tapi server no problem, but I can't join his. I can make my own large world just fine, (biggest, smallest, it doesn't matter) but I can't join it. The error pops up when I try to join, so I don't see why any world size would be an issue with that for me, but not my cousin who has less ram than I do, he's using the same mods as me, and.

This is the error I get with mods on upon trying to join a new world:
http://imgur.com/Y7qosfo

This is the error I get with no mods when trying to join a new world:
http://imgur.com/LzU9ztY

Found a solution to my own problem. My character seems to have been bugged, causing the memory error. I made a new one and can log in fine. Wish I would have thought of that sooner as, looking back, it seems so obvious that the problem had to be character related. (seeing as the server kept crashing when my character tried logging in)

At least now I know there is a solution to the problem. Hope it helps anyone else having this specific issue as well.
 
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!!
 
Status
Not open for further replies.
Back
Top Bottom