• 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 Mod Creation Tools

Status
Not open for further replies.

PoroCYon

Terrarian
The Mod Creation Tools is made to make tAPI mods easier to make.
(not as, check some checkboxes and let some JSON/C# code get generated, but provide some methods to easily add UI content, change existing content by code, easy networking, etc)

Downloads:
The source can be viewed here.

External tools (MCT Tools.exe):
  • Mod compiler (can compile from multiple languages (not at once), from MSBuild or from managed assemblies) (100%)
  • Mod decompiler (100%)
The MCT Tools can be invoked using the 'MCT' command in CMD. Use the '/?' argument to display all available arguments.

In library:
  • Extended UI Controls (Menu) (100%)
  • UI Controls (Ingame) (100%)
  • Load content by code (both items/... or assets) (100%)
  • Default vanilla data (20%)
  • Vanilla IDs as enums (50%) Discontinued because 1.2.4 includes them (as constants)
  • Sending/Receiving NetMessages as managed objects (100%)
  • A Synced PRNG (100%)
  • XML Documentation (for IntelliSense) (95% - missing for Vanilla IDs)
  • Trigger (and stop) invasions, events, etc. (100%)
  • Easy UI control/Entity/modable object creation (100%)
  • And other things (NaN%)
Other:
  • Visual Studio Project templates (100%)
  • Environment variables: (100%)
    • %tapimoddir% (Documents\My Games\Terraria\tAPI\Mods)
    • %tapimodsrcdir% (%tapimoddir%\Sources)
    • %tapimodoutdir% (%tapimoddir%\Unsorted)
    • %tapibindir% (Steam install directory\SteamApps\Common\Terraria)
    • %mctdir% (Documents\My Games\Terraria\tAPI\MCT)
  • Edit & Continue in Visual Studio - you have to pass some command-line arguments to tAPI (100:dryadsad:
Code:
"%tapibindir%\tAPI.exe" -debug "<internalname>" "C:\Path\To\Assembly.dll
Request features by posting them to this thread! (or fork the repo, add it, and create a pull request)
Edit & Continue does not always work with constructors of global types (ModBase, ModInterface, ModWorld, ...) and ModBase.OnLoad.
Report bugs by posting them to this thread! (or open an issue on the repo)
 

Flashkirby99

Skeletron
I downloaded the installer and ran it with the following:
  • Install .pdb files
  • Don't Deploy F# Compiler
  • Microsoft Visual Studio 2012 Express for Windows Desktop
The files are in the right place (I'm guessing) but it puts "PoroCYon.MCT.tapi" in the Unsorted folder. Moving to local and launching tAPI causes it to not respond. I don't have any mods installed yet, and I am running Windows 7.
Code:
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.1.7601.2.1.0.256.1
  Locale ID:    2057
  Additional Information 1:    0a9e
  Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:    0a9e
  Additional Information 4:    0a9e372d3b4ad19135b953a78882e789
PS: tAPI does launch fine on its own when the .tapi file is left in the unsorted folder, so I can only assume the problem is around there?
 

jordan

Skeletron
Hey Poro, just wanted to let you know that the update tracker seems a little broken, I'm using latest version yet it still wants me to update :p
 

PoroCYon

Terrarian
I downloaded the installer and ran it with the following:
  • Install .pdb files
  • Don't Deploy F# Compiler
  • Microsoft Visual Studio 2012 Express for Windows Desktop
The files are in the right place (I'm guessing) but it puts "PoroCYon.MCT.tapi" in the Unsorted folder. Moving to local and launching tAPI causes it to not respond. I don't have any mods installed yet, and I am running Windows 7.
-snip-
I'm not much with the error, can you attach the Visual Studio debugger to Terraria, go to Debug -> Exceptions..., then check the 'Common Language Runtime Exceptions' checkbox. (This should track the exception so you can get the stack trace for me).
Also, the .tapi file is not used anymore, I updated the installer for r11 (if you redownload it, everything should be fine).

EDIT: the error occured in tAPI itself, not in the MCT...
Hey Poro, just wanted to let you know that the update tracker seems a little broken, I'm using latest version yet it still wants me to update :p
Try to update once more, the problem should be fixed now.
I need to know any language of programmation to use this and create a mod?
yes, C# (or any other .NET language).
 
Last edited:

Kyle TheCreator

Terrarian
I totally know what's wrong because you gave me all the information I need to fix the bug.
</sarcasm>
I can't read your mind, give me at least a stack trace.
I installed the MC and it was usually to Local folder, but when I open the game, the game crash and the following message appear "tAPI stopped to work" and ask me to close it
 

Attachments

PoroCYon

Terrarian
I installed the MC and it was usually to Local folder, but when I open the game, the game crash and the following message appear "tAPI stopped to work" and ask me to close it
This really does help.</sarcasm>
I can't fix the problem if I don't have anything else besides this.
 

Kyle TheCreator

Terrarian
Well, I don't know any other information to give to you. The tAPI is r11, I downloaded the last version of MCT and before it ask to update, but now just close. I don't know why :(
When I remove the MCT the game goes back to normal
 

Toidiedud

Terrarian
I have done some testing as to what causes the crash. So far i have resulted from crashing only from having the .tapi file from MCT being moved/copied into the local folder.
However, i have done a fresh install of Terraria wiping everything from the folder. When the game launches it has a message at the top reading "NO DEBUGGER ATTACHED" to which i am then prompted to install the new version despite my current and my new being the exact same. I have downloaded MCT again after Poro's post but at this moment it still seems that the MCT is failing. If you press "Don't update" you can continue like the normal tAPI but no matter how you try to load the ICM it does not appear in game. So far that is what i have found, sorry there are no error codes that i can share but i will be willing to take screenshots if needed.

Edit- And yes Kyle, i believe it should.
 
Status
Not open for further replies.
Top Bottom