tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
someone plz answer!
After a (super quick as I'm busy) code scan, looks like there's no 'super easy' easy way to do it.
However here's a less easy one..

Make a global ModTileType, in it use the PreKill hook, check if the above tile is of your tile's type, and if so return false. (otherwise return true so you can still break tiles normally)
 
After a (super quick as I'm busy) code scan, looks like there's no 'super easy' easy way to do it.
However here's a less easy one..

Make a global ModTileType, in it use the PreKill hook, check if the above tile is of your tile's type, and if so return false. (otherwise return true so you can still break tiles normally)
like this?
Code:
public override bool PreKill(int x, int y, bool fail, bool effectsOnly, bool noItem)
        {
            return Main.tile[x, y - 1].type != TileDef.byName["BriansMod:BeaconAltarTile"];
        }
 
Without it the game is gonna crash if you'll try to hit a block high up in space.
i'm hitting blocks at the highest possible point, no crashes...

P.S: i added a few checks so it doesn't also make part of the tile itself unbreakable... now it works just like demon altars! Thanks Yoraiz0r!
 
I'm very new to making mods and I wand to see the innards of masterpieces of mods, but they're all in .tAPI form... Could I decompress these somehow?
 
Without it the game is gonna crash if you'll try to hit a block high up in space.
That's true, but you don't even see the highest block anyway. There are 16 or so blocks you'll never see on each side of the world. Not sure if it's actually 16, but there are some.
Still, I'd still probably use the check, just in case.
 
I hope this isn't a big waste of time to answer this, But how could I run a tAPI server exactly? I have port 7777 forwarded successfully, and when I try to open the dedicated server thing It just crashes. The server does.
 
I have an issue where my mod's .CS files never take effect! Ever! Even example ones!
bottom is important:
This works
WoFCaller.json
Code:
{
  "displayName": "WoFCaller",
  "code": "YOURMODFOLDERNAMEHERE.Items.WoFCaller",
  "size": [20,20],
  "maxStack": 1,
  "value": [0,0,10,0],
  "texture": "Items/Pistol",
  "rare": 3,
  "useStyle": 4,
  "useAnimation": 45,
  "useTime": 45,
  "summon": true,
  "consumable": true,
  "tooltip": "Calls the Wall of Flesh",

  "recipes":
  [{
  "items": { "Ash Block": 300 },
  "tiles": [ "Work Bench" ],
  "creates": 1
  }]
}
WoFCaller.cs
Code:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using TAPI;
using Terraria;

namespace YOURMODFOLDERNAMEHERE.Items
{
    public class WoFCaller : ModItem
    {
  public override bool? UseItem(Player player)
  {
   Main.NewText("Callin' Wall of Flesh");
   NPC.SpawnWOF(player.position);
   return true;
  }
}
}
Replace YOURMODFOLDERNAMEHERE in both files with your ... mod folder name in ..\tAPI\Mods\Sources\
also your internalName in ModInfo should be same as that folder's name.
 
I just updated to r15 using the fixed download, but my tAPI Builder crashes every time I attempt to launch it. I installed r15 in the same directory and the actual tAPI itself runs fine. Am I missing something? Love tAPI though, thanks for continually working on it.
 
I just updated to r15 using the fixed download, but my tAPI Builder crashes every time I attempt to launch it. I installed r15 in the same directory and the actual tAPI itself runs fine. Am I missing something? Love tAPI though, thanks for continually working on it.
Try cutting out My Games\Terraria\tAPI\Mods\Sources folder and see if it works.
 
Status
Not open for further replies.
Back
Top Bottom