tAPI [Discontinued] tAPI - A Mod To Make Mods

Discussion in 'Released' started by Yoraiz0r, Oct 14, 2014.

Thread Status:
Not open for further replies.
Thread was lock by: Tunnel King
Reason: discontinued prior to 1.3 release
Lock date: 20:26 04-08-2016
  1. IOMVaati

    IOMVaati Terrarian

    So in otherwords.

    Theres no way for anyone who has updated and the mod that is needed for many more mods is currently unusable due to it simply not ever going to be updated and there is as far as i know there is no way to downgrade my terraria version.
     
  2. MiraiMai

    MiraiMai Terrarian

    There are ways to downgrade, which if you read through this thread you would see what people have said about this, but it's illegal and against the rules of this forum. If you want to use it, you will unfortunately have to figure it out yourself, there is nothing we can do.
     
  3. LegoTerrarian

    LegoTerrarian Terrarian

    I've Been Having The Same Problem As Danger808

    Please Help...
    And I've done everything as instructed...
     
  4. pajrc

    pajrc Official Terrarian

    I don't understand how to USE tAPI. I installed the server, builder and regular thing. It told me to install Game Launcher, which I did. What do I do from here?????
     
  5. MarioKart7z

    MarioKart7z Plantera

    1. Forget about it and use tModLoader instead
    2. ???
    3. Profit.
     
    Jofairden and Fastmapler like this.
  6. cambalam98

    cambalam98 Terrarian

    Can anyone help?
    I can't get the game to launch.

    "Microsoft.Xna.Framework.Content.ContentLoadException: Error loading "Images\CraftButton". File not found. at ContentManager.OpenStream(String assetName) at ContentManager.ReadAsset(String assetName, Action`1 recordDisposableObject) at ContentManager.Load(String assetName) at Main.LoadContent() at Game.Initialize() at Main.Initialize() at Game.RunGame(Boolean useBlockingRun) at Program.Main(String[] args) at Program.Main(String[] args) System.IO.FileNotFoundException: Error loading "Content\Images\CraftButton.xnb". File not found. at TitleContainer.OpenStream(String name) at ContentManager.OpenStream(String assetName)"

    I get this message every time i try
     
  7. MarioKart7z

    MarioKart7z Plantera

     
  8. DragonSoulSong

    DragonSoulSong Terrarian

    Okay....real talk guys....

    TAPI simply does not work for Terraria version 1.3+, nor will it ever.

    I know everyone wants to keep using tAPI for mods, so do I, but the reality is that that cannot currently be done with Terraria 1.3+ and can only easily be done for 1.2.4.1 once Game Launcher eventually, hopefully, updates.
     
    Last edited: Sep 10, 2015
  9. LegoTerrarian

    LegoTerrarian Terrarian

    ok then ill continue playing vanilla...
     
  10. Yoraiz0r

    Yoraiz0r Lead Developer Re-Logic

    Hello everyone, apologies for the long streak of silence.

    I've updated the first post of the thread to finally include r16's changelog, and numerous notes that tAPI does not run on 1.3 nor will it ever, and links to some of the APIs that are capable of modding 1.3. (tModLoader, Prism)
    However, we are not locking down the thread just yet, there's still people who mod 1.2.4.1 while waiting for both mentioned APIs to become stable.

    I hope you will all have a great weekend and happy modding, whichever API you end up using!
     
  11. Mortlock

    Mortlock Eye of Cthulhu

    Whenever i try to play mods, (omnirs nostalgia pack and necro mod) ti comes up with an error message and i cant play. what do i do?
    P.S I'm using a saved version of Terraria 1.2.4.1.
     
  12. MiraiMai

    MiraiMai Terrarian

    It is impossible to help without said error message. Though honestly, if it's just Omnir's mods you're using, I would suggest giving him the errors as the problem is most likely in them. If he never rebuilt his mods for R16 though, it's likely you just need to rebuild them yourself.
     
  13. Mortlock

    Mortlock Eye of Cthulhu

    I've already been there. He said 2 check here. Here is the errors copy and pasted from the thread:

    When I open the game i get this:
    >>> Singleplayer: 22:19:02 <<<
    TAPI.Mods+LoadException: OmnirsNosPak.tapi: System.TypeLoadException: Could not load type 'TAPI.ModBuff' from assembly 'tAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
    at System.Reflection.Assembly.GetType(String name)
    at TAPI.ModJsonHandler.HandleBuff(ModBase modBase, JsonData j, String fname) in x:\tAPI Core\tAPI\Mod\ModJsonHandler.cs:line 1447
    at TAPI.ModJsonHandler.Handle(ModBase modBase) in x:\tAPI Core\tAPI\Mod\ModJsonHandler.cs:line 59
    at TAPI.Mod.<Load>b__0(BinBuffer bb) in x:\tAPI Core\tAPI\Mod\Mod.cs:line 276
    at TAPI.Mods.HandleTapiModFile(FPath path, Action`1 action) in x:\tAPI Core\tAPI\Mod\Mods.cs:line 449
    at TAPI.Mods.HandleModFile(FPath path, Action`1 action) in x:\tAPI Core\tAPI\Mod\Mods.cs:line 427
    at TAPI.Mod.Load() in x:\tAPI Core\tAPI\Mod\Mod.cs:line 107
    at TAPI.Mods.Load() in x:\tAPI Core\tAPI\Mod\Mods.cs:line 539
    at Mods.Load()

    Mods used:
    OmnirsNosPak (Omnirs Nostalgia Pack 1.0.4.3 by Omnir)
    BaseMod (Grox The Great's BaseMod 1.0.5 by Grox The Great)

    And when I try to play i get this:
    >>> Singleplayer: 22:17:17 <<<
    System.NullReferenceException: Object reference not set to an instance of an object.
    at TileDef.GetCodeHandler(Int32 type)
    at TileDef.GetCodeHandler(Int32 x, Int32 y, Boolean wallCode = False)
    at Lighting.PreRenderPhase()
    at Lighting.LightTiles(Int32 firstX, Int32 lastX, Int32 firstY, Int32 lastY)
    at Main.Draw(GameTime gameTime)

    Mods used:
    OmnirsNosPak (Omnirs Nostalgia Pack 1.0.4.3 by Omnir)
    BaseMod (Grox The Great's BaseMod 1.0.5 by Grox The Great)
     
  14. MiraiMai

    MiraiMai Terrarian

    The second error is caused by the first one.

    Like I said, I'm pretty sure the issue is that you need to rebuild the mod. Follow the instructions on the following link (help I gave somebody with a similar problem) and it should work.
    http://forums.terraria.org/index.php?threads/tapi-a-mod-to-make-mods.3203/page-228#post-689344
     
  15. Mortlock

    Mortlock Eye of Cthulhu

    Thx, I'm uber tired right now, so I dont understand, but I'll go to sleep and when I wake up, I'll try to do it. I'll let u know if it works. :)
     
  16. Lemurboy072

    Lemurboy072 Terrarian

    Well that is great, stuck with an unmodded 1.3 now.
     
    Mortlock and Mr.Hishprung [PL] like this.
  17. citron6946

    citron6946 Terrarian

    Hi , i have a problem with accesory. I got this error when i try to build the mod:

    For non-static field, method, or property Mod.MPlayer.lifesteal is required object reference.
    MPlayer.lifesteal = true;


    Code for Modplayer:
    using System;
    using System.Diagnostics;
    using System.Collections.Generic;
    using System.Text;
    using Microsoft.Xna.Framework;

    using TAPI;
    using Terraria;

    namespace Mod
    {
    public class MPlayer : ModPlayer
    {
    public bool lifesteal;

    public override void PreUpdate()
    {
    lifesteal = false;
    }
    public override void DealtNPC(NPC NPCvictim, int hitDir, int damage, float knockback, bool crit)
    {
    DealtDamage(damage);
    }
    public override void DealtPVP(Player plvictim, int hitDir, int damage, bool crit)
    {
    DealtDamage(damage);
    }
    public override void DealtNPC(Projectile projectile, NPC NPCvictim, int hitDir, int damage, float knockback, bool crit)
    {
    DealtDamage(damage);
    }
    public override void DealtPVP(Projectile projectile, Player plvictim, int hitDir, int damage, bool crit)
    {
    DealtDamage(damage);
    }
    private void DealtDamage(int damage)
    {
    if (lifesteal)
    {
    player.statLife += (int)(damage * 0.05f);
    {
    if (((int)(damage * 0.05f)) > 0)
    {
    player.HealEffect((int)(damage * 0.05f));
    }
    }
    }
    }
    }
    }


    Accesory code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.Xna.Framework;
    using System.Diagnostics;

    using TAPI;
    using Terraria;

    namespace Mod.Items
    {
    public class VampireTeeths : ModItem
    {

    public override void Effects(Player player)

    {
    MPlayer.lifesteal = true;
    }
    }
    }

    Does anyone know how to fix it?
     
  18. Eldrazi

    Eldrazi Eater of Worlds

    In your accessory you try to access the (not static) lifesteal variable of the MPlayer class. This is not possible without a reference to the MPlayer class. Quick way to fix this is to change your lifesteal variable to the following:
    Code:
    public static bool lifesteal;
    
    By making it static, other scripts can access this variable no probs. It might pose some other errors when not used correctly though, so my advice: don't use 'static' unless it's really necessary.

    Quick EDIT:
    Just for future reference (even though I'm not actively modding with tAPI) is it possible to cast the Player class as a ModPlayer, or doesn't the ModPlayer inherit from the Player class (which I can totally understand).
     
  19. citron6946

    citron6946 Terrarian

    Thanks it worked!:D
     
  20. jackinbox101

    jackinbox101 Terrarian

    discontinued ? well that sad i want to play 1.3
     
Thread Status:
Not open for further replies.