tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
I have a question for you coders out there. It is if my code is correct. It is not shooting my projectile from my weapon.
Code:
{
    "displayName": "Witch Hunter's Harvester",
    "size": [72,64],
    "maxStack": 1,
    "value": [40,30,25,0],
    "rare": 9,
    "tooltip": "'Used for harvesting the essence of witches'",
    "useStyle": 1,
    "useAnimation": 18,
    "useTime": 50,
    "damage": 113,
    "knockback": 9,
    "useSound": 1,
    "autoReuse": false,
    "useTurn": true,
    "melee":true,
    "shoot": "Rast:WitchHarvesterP",
    "shootSpeed": 55,
    "recipes":
    [{
        "items":{ "Dirt Block": 1},
        "tiles":[ "Work Bench" ],
        "creates": 1
    }]
}

And here is the projectile
Code:
{
    "displayName": "WitchHarvesterP",
    "size": [72, 64],
    "damage": 113,
    "aiStyle": 3,
    "timeLeft": 130,
    "friendly": true,
    "hostile": false,
    "tileCollide": false,
    "ranger": false,
    "noMelee": true

}

I have two projectile files. A png for it, and a .json for it. They are not in a projectile directory but putting them there hasn't worked. They are in a folder where the weapon is. Do I need another file, or is something wrong in the code? When I pack it it says successful. But when I use my weapon ingame it doesn't shoot the projectile
You need to put the projectile files in a folder named "Projectiles", not "Projectile" or "projectile".
Edit: Nvm, didn't see there was another page of posts, lol
 
I spent all day collecting the best mods I could find to play, and then tossing out the ones that were incompatible. I recently managed to find a list of mods that were stable enough to not crash on startup, and that list totals at 42 mods. But now im stumped and need help. I want to play with my friend who also has these mods, but the server seems to have.... an issue, when I try to run it.

"Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assemble 'tAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified at Terraria.ProgramServer.Main<String[] args>"

Anyone know how to fix or work around this? I tried Host and Play instead but it just sits at "starting server".
 
Hello everyone! I have one question ...
How I can use a WorldGen.TileRunner for tile generation in the world?

Tile json:
{
"displayName": "Light Crystal Altar",
"frameImportant": true,
"size": [3, 3],
"breaksByPick": true,
"frameWidth": 16,
"frameHeight": 16,
"sheetColumns": 3,
"sheetRows": 3,
"placementOrigin": [0, 1],
"placementConditions": "flatGround",
"solid": false,
"blocksLight": false,
"blocksSun": false,
"mergeDirt": false,
"table": false,
"glows": true,
"dust": 191,
"sound": 1,
"soundGroup": 21,
"mapHoverText": "Light Crystal Altar",
"ratePick": 0.25,
"directional": false,
"shines": true
}

I need generation of this tile in the world.
I have MWorld.cs and GenWorld.cs
GenWorld.cs :
==========
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TAPI;
using Terraria;

namespace BF
{
public class GenWorld : WorldGenTask
{
private readonly ModBase modBase;

public GenWorld(ModBase modBase) : base(modBase.mod.InternalName)
{
this.modBase = modBase;
}

public override void Generate()
{
try
{
//Руды
int Amount_Of_Spawns = (int)((40+(int)(Main.maxTilesX/5)) / 4);
for (int i = 0; i < Amount_Of_Spawns; i++) VulcaniteOre();

//Структуры

}
catch (Exception e)
{
ErrorHandling.Handle(e);
}
}

public void VulcaniteOre()
{
int LowX = 200;
int HighX = Main.maxTilesX-200;
int LowY = (int)Main.hellLayer;
int HighY = Main.maxTilesY-200;

int X = WorldGen.genRand.Next(LowX,HighX);
int Y = WorldGen.genRand.Next(LowY,HighY);

int OreMinimumSpread = 1;
int OreMaximumSpread = 7;

int OreMinimumFrequency = 1;
int OreMaximumFrequency = 7;

int OreSpread = WorldGen.genRand.Next(OreMinimumSpread,OreMaximumSpread+1);
int OreFrequency = WorldGen.genRand.Next(OreMinimumFrequency,OreMaximumFrequency+1);

WorldGen.OreRunner(X, Y, (double)OreSpread, OreFrequency, TileDef.byName["BF:tileVulcaniteOre"]);
}
}
}
==========

Please answer in simple terms. I am 14. I am from Ukraine and I do not know much English.

Google Translate :)
 
Last edited:
I spent all day collecting the best mods I could find to play, and then tossing out the ones that were incompatible. I recently managed to find a list of mods that were stable enough to not crash on startup, and that list totals at 42 mods. But now im stumped and need help. I want to play with my friend who also has these mods, but the server seems to have.... an issue, when I try to run it.

"Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assemble 'tAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified at Terraria.ProgramServer.Main<String[] args>"

Anyone know how to fix or work around this? I tried Host and Play instead but it just sits at "starting server".
Just because a mod is stable in single player doesn't mean it will work in multiplayer. Having just said that, the multiplayer in r15 seems less stable than earlier versions. Minecarts, for example, cause crashes in multiplayer for me even with no mods enabled.

Try disabling all mods then see if you still get the same errors in multiplayer.
 
I must have done something really bad... After trying to run tAPI while I had another game running, I was told I didn't have a video card to run it with.
Common for me, as trying to run two steam games at once usually triggers this. But now when I run tAPI, with no other games running, it sits there for a second then tells me "tAPI has stopped working". I'm not positive if the 'video card' thing is the cause of this, but they happened back to back. I've tried restarting my computer, reinstalling tAPI, reinstalling Game Launcher, but nothing has worked yet! If I could get some possible causes, that would be great!
Thank you for your time.
 
I must have done something really bad... After trying to run tAPI while I had another game running, I was told I didn't have a video card to run it with.
Common for me, as trying to run two steam games at once usually triggers this. But now when I run tAPI, with no other games running, it sits there for a second then tells me "tAPI has stopped working". I'm not positive if the 'video card' thing is the cause of this, but they happened back to back. I've tried restarting my computer, reinstalling tAPI, reinstalling Game Launcher, but nothing has worked yet! If I could get some possible causes, that would be great!
Thank you for your time.
Maybe your graphics card is dun goofed? Can you launch the game you had launched with tAPI beforehand? This is a strange case, if not I will try to replicate it...
 
Just because a mod is stable in single player doesn't mean it will work in multiplayer. Having just said that, the multiplayer in r15 seems less stable than earlier versions. Minecarts, for example, cause crashes in multiplayer for me even with no mods enabled.

Try disabling all mods then see if you still get the same errors in multiplayer.

I have done this. I get the same results every time.
Im no expert but I think its saying I dont even have a server. Every time I launch it i launch it using the tAPI Server.exe file that tAPI installs, and every time, regardless on if im using mods or not, when launched, the cmd window instantly turns white and displays the error message that I linked previously, and gives me no other options other then "failed to start, please exit."

What exactly am i suppost to do to start a server for modded terraria, if thats even possible?

Edit: I went back a few pages and noticed others had the same problem as me. All i had to do was copy the Terraria.exe and rename it to tAPI.exe. I also noticed that the builder works now as well. Someone give Neojin a cookie.[im broke]
 
Last edited:
Because I Am So Awesome I Made An A Single Accesory Do This
upload_2015-5-29_11-17-52.png
 
Status
Not open for further replies.
Back
Top Bottom