tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
I'm using Zoodletec's examples that he gave me a long while ago, and obviously there are now issues building the mod

this issue is:
public override bool CanSpawn(int x, int y, int type, Player spawnedOn)


The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?)
public override bool CanSpawn(int x, int y, int type, Player spawnedOn)
You might be missing a using directive for terraria, try putting this at the top-

using Terraria;
 
I'm using Zoodletec's examples that he gave me a long while ago, and obviously there are now issues building the mod

this issue is:
public override bool CanSpawn(int x, int y, int type, Player spawnedOn)


The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?)
public override bool CanSpawn(int x, int y, int type, Player spawnedOn)

You forgot to add the using declarations:

using Terraria;
using TAPI;
 
So I can't even open the builder for some reason, as this error appears
4lTbpAa.png

and this is in the extra stuff:
http://pastebin.com/NFRAwBmJ
 
I need help! When I create I new world with my mod enabled, it crashes after it starts to generate my ore. No error message just a crash. And this is tAPI r11

Code:
using System;
using System.Collections.Generic;
using System.Text;

using TAPI;
using Terraria;

namespace ToolsWeapons
{
    public class MWorld : ModWorld
    {
     

     


        public override void WorldGenModifyTaskList(List<WorldGenTask> list) //public override void WorldGenPostInit()
        {
            list.Add(new WorldGenTask.Action("ToolsWeapons:SuperHellstone", () =>
                {
                    Main.statusText = "Generating Super Hellstone";
                    int Amount_Of_Spawns = 12+(int)(Main.maxTilesY/5);
                    for(int i=0;i<Amount_Of_Spawns;i++)
                        AddOre();
                }
            ));
        }
 
     

        public void AddOre()
        {
        int LeftX = 100;
        int RightX = Main.maxTilesX-100;
        int TopY = (int) Main.hellLayer;
        int BottomY = Main.maxTilesY-50;

        int X = WorldGen.genRand.Next(LeftX,RightX);
        int Y = WorldGen.genRand.Next(TopY,BottomY);

        int OreMinimumSpread = 6;
        int OreMaximumSpread = 12;

        int OreMinimumFrequency = 6;
        int OreMaximumFrequency = 12;

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

            WorldGen.OreRunner(X, Y, (double)OreSpread, OreFrequency, TileDef.type["ToolsWeapons:SuperHellstone"]);
 
        }
    }
}
 
I have an issue today I opened the tapi builder and it did not open no errors at all it just did not open.
Also I tried opening the tapi server and it says "tapi server has stoped working" in a window like in boobsey's post

Edit:nevermind reinstalled it and it works flawlessly great job devs love the new tapi builder

Edit: Well this is a little late (alot actually) but I just realized that my last comment may sound sarcastic I apologize if the devs of tapi took it that way I actually mean it I like the new Gui as for the issue I encountered I understand it is still a beta and you guys are doing everything you can to resolve the issues so just know you work is appreciated
 
Last edited:
A bit late but congrats on making this happen!
You just made my day 1000 times better by seeing you here!

I have an issue today I opened the tapi builder and it did not open no errors at all it just did not open.
Also I tried opening the tapi server and it says "tapi server has stoped working" in a window like in boobsey's post

Edit:nevermind reinstalled it and it works flawlessly great job devs love the new tapi builder
I ran into this same problem when I first installed r11.
Install it again by, obviously, running the installer again. It fixes the problem.
Thanks for the report, will look into it 0.o
 
A bit late but congrats on making this happen!
You just made my day 1000 times better by seeing you here!
What he said, glad to see you over here with us Flashkirby99! Hope you enjoy the new API :D

Sorry if its a stupid question but what is TCF of what does it stand for?
Terraria Community Forums, where you currently are

I need help! When I create I new world with my mod enabled, it crashes after it starts to generate my ore. No error message just a crash. And this is tAPI r11

Johnson120, there is an easier way to accomplish your goal now, try using one of these to generate your ore instead. You only need one as they are overloads, so pick the one that works for your situation.

Code:
TAPI.Util.GenerateOre(string tileName, int deposits, Rectangle worldBounds, int minRadius, int maxRadius, int minSpread, int maxSpread)
TAPI.Util.GenerateOre(ushort type, int deposits, Rectangle worldBounds, int minRadius, int maxRadius, int minSpread, int maxSpread)
TAPI.Util.GenerateOre(string tileName, int deposits, int minX, int maxX, int minY, int maxY, int minRadius, int maxRadius, int minSpread, int maxSpread)
TAPI.Util.GenerateOre(ushort type, int deposits, int minX, int maxX, int minY, int maxY, int minRadius, int maxRadius, int minSpread, int maxSpread)

EDIT: I Made a mistake with the above code - FIXED
 
Last edited:
So, whenever I try to launch tAPI, the program crashes. The packer works just fine, it's only the tAPI program itself.

QJWekWm.png
In case anyone can make heads or tails of it, the "problem details" section from the error reporter is as follows:
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: tAPI.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 543c72aa
Problem Signature 04: tAPI
Problem Signature 05: 1.0.0.0
Problem Signature 06: 543c72aa
Problem Signature 07: 8d5
Problem Signature 08: 11
Problem Signature 09: System.NullReferenceException
OS Version: 6.3.9600.2.0.0.768.101
Locale ID: 4105
Additional Information 1: 5861
Additional Information 2: 5861822e1919d7c014bbb064c64908b2
Additional Information 3: d1d9
Additional Information 4: d1d94a13d3609d6b740644c12508f581
In case the image doesn't show from within the spoiler, the direct link is here: http://imgur.com/QJWekWm
 
So, whenever I try to launch tAPI, the program crashes. The packer works just fine, it's only the tAPI program itself.
Try deleting all your existing tAPI characters and worlds (back them up if you want to) - and also, try running it with 0 mods the first time. Tell me if you still have this issue.
 
Try deleting all your existing tAPI characters and worlds (back them up if you want to) - and also, try running it with 0 mods the first time. Tell me if you still have this issue.
Check, and check. I also ran it without mods and deleted the config.json file, in case that was the issue. It doesn't seem to have abated, however. Throws the same error.

edit- I'll also try deleting my Terraria folder, in case my old character files are an issue. I've still got a few from an old pre-tAPI mod.
edit2- That worked. Don't know why, but it did. Perhaps it was from some old .tapi mod files?
 
Last edited:
Try deleting all your existing tAPI characters and worlds (back them up if you want to) - and also, try running it with 0 mods the first time. Tell me if you still have this issue.
Don't forget Config.json - this file is also not compatible with r10 (at least when I ran it the first time with the internal build)

EDIT - nevermind, I got ninja'd
 
Check, and check. I also ran it without mods and deleted the config.json file, in case that was the issue. It doesn't seem to have abated, however. Throws the same error.

Have you tried reinstalling tAPI? - Also, what OS are you on just for data's sake.

Don't forget Config.json - this file is also not compatible with r10 (at least when I ran it the first time with the internal build)

EDIT - nevermind, I got ninja'd

lol, either way good call - Thanks PoroCYon!
 
Is there any documentation of townNPC hooks? Seems to be the only thing that won't compile now after getting rid of all my constructors.
error:
JiangshiSalesman.cs (32,128)
'Necro.NPCs.JiangshiSalesman.SetChatButtonAction(string[], int)': no suitable method found to override
public override Action SetChatButtonAction(string[] buttons, int buttonIndex)
 
Is there any documentation of townNPC hooks? Seems to be the only thing that won't compile now after getting rid of all my constructors.
error:
JiangshiSalesman.cs (32,128)
'Necro.NPCs.JiangshiSalesman.SetChatButtonAction(string[], int)': no suitable method found to override
public override Action SetChatButtonAction(string[] buttons, int buttonIndex)

These were changed for r11, this should help

Code:
public override void SetChatButtons(ref string[] buttons) { }
//NOTE: Changed how this works because the way it worked before (returning an Action) was idiotic as you can just run the code here,
//so the only reason I even had it was for shops. Changed it to a bool, much cleaner solution. :P
public override void OnChatButtonClicked(string[] buttons, int buttonIndex, ref bool openShop) { }
 
Have you tried reinstalling tAPI? - Also, what OS are you on just for data's sake.
For documentation's sake, I'm running Windows 8.1 with an AMD A8 chip with Radeon graphics. Not sure the exact GPU name; the A8 is an APU. As you can see in the previous edits, I fixed the issue by deleting RARing the old character and world data files, as well as the vanilla cfg file.
Thanks for the help, guys!
 
Status
Not open for further replies.
Back
Top Bottom