tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
i'm just wondering if there is a way to convert tAPI worlds into vanilla?
is this possible?
Technically it's possible, but we have no plans to support this. Especially with mods that create custom tiles, biomes, etc. It's just not something we plan on doing, especially now that the team is so short on time. Sorry~
 
Hi, I was planning to play online with a friend and I ran into an issue.
I can start the dedicated server and join it fine, but upon opening a chest (which contained cooked fish, an umbrella, a christmas pudding, 3 climbing claws, 1 shoe spike, 3 panic necklaces, a shackle, and a guide voodoo doll. All the accessories except the shackle and one panic necklace had prefixes.), I crash to desktop. I can open the chest fine in singleplayer. Also I don't see how it could cause an error, but the chest was renamed to "Accessories".
Even after disabling all the mods I had enabled it gave me the same error and crashed to desktop. It seems like the server itself is fine, but the client is the one having an issue.
Here is the error from the log files:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at TAPI.BinBufferByte.ReadByte()
at TAPI.BinBuffer.ReadBytes(System.Int32 count)
at TAPI.BinBuffer.ReadString()
at Terraria.Item.ReadCustomData(TAPI.BinBuffer bb, System.Boolean byName = True)
at Terraria.Item.Read(TAPI.BinBuffer bb, System.Boolean byName = True)
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()
 
ok,I managed to install it(I just made a new steam account),but how do I install mods?

whenever I install a mod,I get this error
System.IO.FileLoadException: Could not load file or assembly 'Ionic.Zip.Reduced, Version=1.9.1.9000, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at TAPI.Mods.HandleTapiModFile(FluentPath.FPath path, System.Action`1[[TAPI.BinBuffer, tAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] action)
at TAPI.Mods.HandleModFile(FluentPath.FPath path, System.Action`1[[TAPI.BinBuffer, tAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] action)
at TAPI.Mod.LoadModInfoAndIcon()
at TAPI.Mods.RefreshModList(System.Boolean dependencies = False)
at TAPI.Menu.<CreateMenus>b__138()
at TAPI.Menu.MoveTo(System.String page, System.Boolean silent = False)
at TAPI.MenuButton.<.ctor>b__3()
at TAPI.MenuPage.Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch SP)
at TAPI.Menu.DrawMenu()
at Terraria.Main.Draw(Microsoft.Xna.Framework.GameTime gameTime)
 
Last edited:
ok,I managed to install it(I just made a new steam account),but how do I install mods?

whenever I install a mod,I get this error
System.IO.FileLoadException: Could not load file or assembly 'Ionic.Zip.Reduced, Version=1.9.1.9000, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at TAPI.Mods.HandleTapiModFile(FluentPath.FPath path, System.Action`1[[TAPI.BinBuffer, tAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] action)
at TAPI.Mods.HandleModFile(FluentPath.FPath path, System.Action`1[[TAPI.BinBuffer, tAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] action)
at TAPI.Mod.LoadModInfoAndIcon()
at TAPI.Mods.RefreshModList(System.Boolean dependencies = False)
at TAPI.Menu.<CreateMenus>b__138()
at TAPI.Menu.MoveTo(System.String page, System.Boolean silent = False)
at TAPI.MenuButton.<.ctor>b__3()
at TAPI.MenuPage.Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch SP)
at TAPI.Menu.DrawMenu()
at Terraria.Main.Draw(Microsoft.Xna.Framework.GameTime gameTime)
Have you actually launched tAPI at least once? It needs to create the directories to install the mod to
 
@CptBlackBird, it seems tAPI can't find one of required libraries. If you are launching tAPI yourself (through link or directly) check that current directory is set to location of tAPI.exe and there is Ionic.Zip.Reduced.dll in same directory as tAPI.exe.

By the way, Arkhalis, why tAPI uses external library for zip files, considering that .Net has built-in zip codec? Ok, nevermind, found answer, ZipFile only from 4.5.
 
Last edited:
When I had mods causing errors I also had to create a new world, because in the old world it would still crash when I disabled the mods. Weird stuff.
 
okay,I deleted it,re-installed it,opened it once and I pressed the "open mod directory"
[DOUBLEPOST=1419031331][/DOUBLEPOST]
So, you removing mods from "Mods/local" folder and it lauches normally, you put any into and it starts to give error above?

yes
 
I saw grealm look for left and right clicks somewhere. That's probably the 'where'

Thanks. I looked at GRealm and Grox does something...a bit more advanced than what I was looking for, I think. :p An excellent reference if I decide to try something more grand in the future, though.

Toss this in your MBase.cs
Code:
public static Keys pick_a_key;

public override void OptionChanged(Option option)
{
if (option.name == "pick a key") pick_a_key = (Keys)option.Value;
}
then you can just check if MBase.pick_a_key.Down(); or you could make a method for it even....

Thank you for your help, Arkhalis, I did just this. Didn't make a method though, since I'm only checking for the keypress once. Used a bool that I set equal to MBase.pick_a_key.Pressed() (to continue your example). And I used Pressed() rather than Down() since this isn't an event I want firing continuously if the player holds the button down--from my reading of the decompiled source, that seems to be the difference between those two methods. Please correct me if I'm wrong.

On a similar point, I used
Code:
if (!API.KeyboardInputFocused() && Main.localPlayer.talkNPC == -1)
{
    my_bool = MBase.pick_a_key.Pressed();
    //etc...
}

Note the API method rather than Main.chatMode check (another thing I pulled from the source before I saw your response). Is this an equivalent check, or would Main.chatMode be better to check for here?

Thanks again! I actually managed to get the code to compile with far fewer compiler errors being thrown my way than I was expecting! And when I pressed the keys and things happened correctly without the game crashing or my computer exploding, I nearly fainted. I called that version beta 0.holycrapitworks.1. Anyway, I think it may be time to make a thread for this here mod.
 
@CptBlackBird i think you have another dotnetzip library of different version somewhere in system. tAPI tries to load it, but version of library not matching with version referenced in tAPI assembly, hence the error. Try to search for "Ionic.Zip.Reduced" in system drive to see, if any other than from tAPI distribution is here.

And also, check version of that library in Terraria folder, it has to be 1.9.1.9000.
 
I installed tAPI but I can't play multiplayer, even with all the mods unloaded. This error pops up every time:
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()
 
@CptBlackBird i think you have another dotnetzip library of different version somewhere in system. tAPI tries to load it, but version of library not matching with version referenced in tAPI assembly, hence the error. Try to search for "Ionic.Zip.Reduced" in system drive to see, if any other than from tAPI distribution is here.

And also, check version of that library in Terraria folder, it has to be 1.9.1.9000.


I have 3 of that file,and it's only 1.9.1.8
 
Status
Not open for further replies.
Back
Top Bottom