tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
Hi, I just registered to report a crash for which I couldn't copy-paste the log unfortunately--I don't know if my system is setup incorrectly to be able to grab the text log, but Windows won't let me copy it before it complains:

Terraria crash2.png


I get this error when my friend tries to join on our local LAN. The same thing happens with r13a.
I can join my own game without the error occurring as player #1, but as soon as he hops on to become #2, he crashes.

He can join first successfully if the server is empty (as #1) but as soon as I join, he crashes with the above again. I don't ever crash this way.

This happens on a brand new world (Large size, Medium has the same problem). Didn't try Small.

I redownloaded and reinstalled Terraria and tAPI r13/r14 (from the IRC channel) a couple times to be sure.

A crash also occurs when we try to use Host & Play, but I never see the "Click to copy" window so I can't say if it's the same thing.

The only mods we're running are:
_ShockahBase r3.tapi
Enhanced Tooltip r2.tapi
Inventory Tweaks r2.tapi

Thanks for letting me know if we should try something else...!
 
Are the worlds and players from vanilla Terraria and unmodded tAPI worlds and players interchangeable? I can't seem to access the vanilla ones from the tAPI version.
 
Are the worlds and players from vanilla Terraria and unmodded tAPI worlds and players interchangeable? I can't seem to access the vanilla ones from the tAPI version.

It's probably in it's own folder, to ensure compatibility and to offer convenience.
 
How I can create a "Developer-like" armor? So my armor will inflict debuffs if other player will try to wear it.
 
To begin with, you can't - developers have their own separate EXE files which DON'T inflict the debuffs. You can only mimic it.
 
With respect, if you're new to tAPI and C# making events and biomes is way beyond you at the moment.
Well i wouldn't say "new" i have worked with java(which by what ive seen is very close to C#) and either way i would like to know.
 
Hey guys, does anyone know how to fix a problem where the items are not showing up In the client?
I downloaded the example mod, and that works fine, But my test item doesn't. Any suggestions?
 
In the source folder, the fie path looks like this :
My games/ Terraria/Tapi/ Mods/Sources/ Mod/ Item/ and my .json file is there alongside my picture
You need to name the folder "Items", without the quotation marks. All folders in the mod folder are plural
 
So, when programming in C# how does one specify damage or other things like that? I have no idea.
That depends on the context.
The base damage of an Item is <item>.damage, that of an NPC is <npc>.damage, etc.
The 'damage' parameter in the DamageX hooks is the base damage (which can be modified).
In DealtX hooks the 'damage' parameter is the actual applied damage.
 
>.>

...round 5: Is this right?

I'm currently testing:

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using TAPI;
using Terraria;
using BaseMod;

namespace OmnirsNosPak.Projectiles
{
public class OmnirsEnemySpellArmageddon : ModProjectile
{

#region AI
public override void AI()
{

projectile.frameCounter++;

if (projectile.frameCounter > 3)
{
//Main.NewText("Testframe.", 175, 75, 255);
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame >= 8)
{
projectile.Kill();
projectile.frame = 0;
return;

}
}
public override void Kill()
{
this.projectile.active = false;
Main.NewText("Kill.", 175, 75, 255);
}
}
#endregion
}

Edit: Arkhalis has helped me with some of the issues, so I've been editing this post.
 
Last edited:
Sometimes tAPI crashes, my world is saved... but my player character is completely deleted and I have to use the backup. It happens rarely and I can't replicate it consistently, but it does happen. Just a heads up.
 
Does anyone have a sample sprite sheet for normal leg armor? The one in the template mod doesn't help much since it is of a robe bottom.

Also, I am unable to get a multi-projectile weapon to work properly. Or do I just need to add a recipe in the C#? I'm still confused on whether the C# and JSON work together or not on one item...
 
Status
Not open for further replies.
Back
Top Bottom