tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
Is there a way to track npc deaths globally ? I mean for example in Global ModNPC class. It would be ideal if i can check if something died then check how much max hp it had and than spawn a drop if it was strong enough(for ex Max hp was >200)


Edit:
Also any way to ignore player input ?
Mean for example if im in mine custom menu and click something player swings his sword which is annoying -.-
 
Last edited:
that did not help at all.
Well what do you expect from me? To code for you ? :p

Code:
   public override void ModifyDrawLayerList(List<PlayerLayer> list)
        {
            foreach (PlayerLayer p in list)
            {
                p.visible = false;
            }
            base.ModifyDrawLayerList(list);
        }
here is how you turn off player sprite
it goes into ModPlayer class
 
>>> 17:20:45 <<<
System.NullReferenceException: Object reference not set to an instance of an object.
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 Terraria.Main.<UpdateReal>b__8()
at System.Threading.ThreadHelper.ThreadStart_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.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state)
at System.Threading.ThreadHelper.ThreadStart()
 
Nopey Dopey doesn't work.If someone could send me a json for a working gun and custom projectile i could see what's my problem.
 
Hello

I'm not sure why, but between some time late last night and today, trying to join a server on a single character causes the server to crash. Using new characters seems to be fine, and my sister who plays on the same server with me has no issues either.

I'm not sure if there is anywhere specific in the folder I'm supposed to be looking for a crash report, but Event Viewer has two errors associated with each crash:

Under the "Source" tab of Event Viewer, it states .NET Runtime.
Code:
Application: tAPI Server.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IndexOutOfRangeException
Stack:
   at TAPI.BinBufferByte.ReadByte()
   at TAPI.BinBuffer.ReadBytes(Int32)
   at TAPI.BinBuffer.ReadString()
   at Terraria.Item.ReadCustomData(TAPI.BinBuffer, Boolean)
   at Terraria.Item.Read(TAPI.BinBuffer, Boolean)
   at Terraria.MessageBuffer.GetData(Int32, Int32)
   at Terraria.NetMessage.CheckBytes(Int32)
   at Terraria.Netplay.ServerLoop(System.Object)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Under the "Source" tab of Event Viewer, it states "Application Event"
Code:
Faulting application name: tAPI Server.exe, version: 1.0.0.0, time stamp: 0x5536825e
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18869, time stamp: 0x556363bc
Exception code: 0xe0434352
Fault offset: 0x0000c42d
Faulting process id: 0x1fa8
Faulting application start time: 0x01d0a895ac5eead9
Faulting application path: E:\Programs\Steam\SteamApps\common\Terraria\tAPI Server.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: ee674345-1496-11e5-851f-d05099038342

Thanks =)
 
Can someone please tell me where to find a tutorial on mimics?
i haven't tried this myself but i think this should work, if you give your mob a mimic AI (25) and at at the top of the walking animation sprite sheet have a sprite that looks like a chest (or whatever you want your mimic to look like)
 
Status
Not open for further replies.
Back
Top Bottom