• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.

daupper

Terrarian
Great! Finally a nice and clean 1.2.4.1 release. So.. how exactly would I update? Do I have to uninstall r10 or does it replace the necessary files? What about the mods? Will they have to be recoded?
Also, I'd just love to see all the added things in detail. Is there a changelog, that displays more than "TCF Release"? I know Shockah posted a summary over at terariaonline, but still. Not really detailed. (for example, "tons of new hooks". I'd love to know which ones exactly)
 

zadum4ivii

Official Terrarian
You still need a class declaration, so it's fine, as it contains the name.

Code:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using TAPI;
using Terraria;
namespace Z2
{
  public class MPlayer : ModPlayer
  {
  public virtual void OnInventoryReset(bool mediumcoreRespawn)
  {
  if (!mediumcoreRespawn)
  {
  player.statLifeMax = 100;
  player.statManaMax = 0;
  }
  int slot = 3;
  player.inventory[slot].SetDefaults("Z2:Crystal");
  player.inventory[slot++].Prefix(-1);
  }
  }
}
Not working... I am creating a character and he doesn't have this item...
 

Shockah

Grandson of The Wizard
You don't have to uninstall r10, you can just install over.
The thing is, writing such a changelog would take us a whole day, due to the fact it was basically rewritten from scratch. It will be faster if you decompile tAPI.

@zadum4ivii: Oops. Replace "virtual" with "override". Sorry

EDIT: So much stuff going on, I can't keep up, and I'm still at work lol
 

daupper

Terrarian
You don't have to uninstall r10, you can just install over.
The thing is, writing such a changelog would take us a whole day, due to the fact it was basically rewritten from scratch. It will be faster if you decompile tAPI.

@zadum4ivii: Oops. Replace "virtual" with "override". Sorry

EDIT: So much stuff going on, I can't keep up, and I'm still at work lol
Sorry. I did not want to get you in a hurry or anything. I installed it now and it works perfectly fine, even without game launcher. Testing my older mods now.
 

Shockah

Grandson of The Wizard
Sorry. I did not want to get you in a hurry or anything. I installed it now and it works perfectly fine, even without game launcher. Testing my older mods now.
Yep, I made the Game Launcher optional just 2 days ago, 2-3 hours before the planned release date! :p
 

zadum4ivii

Official Terrarian
You don't have to uninstall r10, you can just install over.
The thing is, writing such a changelog would take us a whole day, due to the fact it was basically rewritten from scratch. It will be faster if you decompile tAPI.

@zadum4ivii: Oops. Replace "virtual" with "override". Sorry

EDIT: So much stuff going on, I can't keep up, and I'm still at work lol
Everything works! Thank you again!
Good luck in working ;)
 

Yoraiz0r

Lead Developer
Re-Logic
Great! Finally a nice and clean 1.2.4.1 release. So.. how exactly would I update? Do I have to uninstall r10 or does it replace the necessary files? What about the mods? Will they have to be recoded?
Also, I'd just love to see all the added things in detail. Is there a changelog, that displays more than "TCF Release"? I know Shockah posted a summary over at terariaonline, but still. Not really detailed. (for example, "tons of new hooks". I'd love to know which ones exactly)
You don't have to uninstall r10, you can just install over.
The thing is, writing such a changelog would take us a whole day, due to the fact it was basically rewritten from scratch. It will be faster if you decompile tAPI.

@zadum4ivii: Oops. Replace "virtual" with "override". Sorry

EDIT: So much stuff going on, I can't keep up, and I'm still at work lol
As Shockah says, documentation takes us a ton of time! However, if you use visual studio of any version, just adding tAPI.exe as a reference will let you open all of its classes and see all of the hooks we have now.

Also, if you hadn't yet, check the first post's "documentation" section, http://tapi.axxim.net/docs/?mode=hooks&doc=modplayer for example , contains all the hooks and a brief summary of what they are capable of doing!

We prefer avoiding checking what we added vs what we re-added in r10 , further versions will contain detailed changelogs (e.g. from r11 to r12) but the difference between r10 and r11 is "too big".

(also... I've been trying to make video tutorials of modding for the past hour... way more complicated than I figured it would be ;-; had to re-take 3 times already)

Edit: Regarding upgrading from r10, check this.
Reserved (primarily for adding text when the first post runs out of space)

For now I am using this to fill in a miniature status report
tAPI r11 has a ton of improvements over tAPI's previous releases, there's a bunch of new hooks and quality of life improvements to certain codes / variables.
However, all of tAPI's r10 mods will break when you install r11.

If upgrading from r10 please backup your mods to a different directory delete the 'documents/My Games/Terraria/tAPI' folder entirely.

We will be posting tutorials throughout the week as we make them and we keep on filling the docs section, apologies that we have no readily available tutorials already but documentation takes a lot of time!
 
Last edited:

daupper

Terrarian
Thanks, Yorai! I backed up my mods and set up Visual Studio now. I removed any constructors and the mod builds fine, but when I try to load it, I get a NullReferenceException. I don't know why. Looks like it can't handle some file path.
Oh, by the way sorry for the german stuff in the exception, lol.
TAPI.Mods+LoadException: rillaifMods.tapi: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei TAPI.Mod.<Load>b__0(BinBuffer bb)
bei TAPI.Mods.HandleTapiModFile(FPath path, Action`1 action)
bei TAPI.Mods.HandleModFile(FPath path, Action`1 action)
bei TAPI.Mod.Load()
bei TAPI.Mods.Load()
bei TAPI.Mods.Load()
 

zadum4ivii

Official Terrarian
Any r11 cheat menu mods?[DOUBLEPOST=1413295423][/DOUBLEPOST]And is it possible to make the "On player look" for an accessory?
 

Yoraiz0r

Lead Developer
Re-Logic
No, no, no, something like this. Sorry if you didn't understand me, i am Russian.
Ah, you can definitely do that, no code required at all either.
In the item's json file, you can fill a line pointing to what accessory it is and what spritesheet to use, for example
Code:
"textureBalloon": "Items/Balloon Accessory",
will make your item show "Mod/Items/Balloon Accessory.png" when equipped.
 

zadum4ivii

Official Terrarian
Ah, you can definitely do that, no code required at all either.
In the item's json file, you can fill a line pointing to what accessory it is and what spritesheet to use, for example
Code:
"textureBalloon": "Items/Balloon Accessory",
will make your item show "Mod/Items/Balloon Accessory.png" when equipped.
Thanks! Will try it later)
 

Shockah

Grandson of The Wizard
Thanks, Yorai! I backed up my mods and set up Visual Studio now. I removed any constructors and the mod builds fine, but when I try to load it, I get a NullReferenceException. I don't know why. Looks like it can't handle some file path.
Oh, by the way sorry for the german stuff in the exception, lol.
It's too generic of an exception. Could you possibly upload the whole mod?

Any r11 cheat menu mods?
If all goes well, I'll have mine ready today.
 
Status
Not open for further replies.
Top Bottom