1. 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.
    Dismiss Notice

tAPI Mod Creation Tools

Discussion in 'Released' started by PoroCYon, Sep 29, 2014.

Thread Status:
Not open for further replies.
Thread was lock by: Jeckel
Reason: Locked at Thread Creator request.
Lock date: 00:51 05-08-2016
  1. PoroCYon

    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)

    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%)
    • 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:
    "%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)
  2. Darkercloud

    Darkercloud Terrarian

    Are you guys not bringing tapi over to these forums?
  3. PoroCYon

    PoroCYon Terrarian

    We'll do that when r11 is finished. (which will be soon...)
    Protean_Entity likes this.
  4. Just want to be sure, but r11 will be compatible with right?
  5. PoroCYon

    PoroCYon Terrarian

    Indeed, see my screenshot in one of the latest comments on my ICM thread.
    notjustinbailey, Omnir and OzanPlayz like this.
  6. MarioKart7z

    MarioKart7z Plantera

    BUG: the installer puts the .tapi file in Unsorted and not in Local
  7. PoroCYon

    PoroCYon Terrarian

    Whoops, I'll fix this later today.

    EDIT: fixed.
    Last edited: Oct 15, 2014
  8. Flashkirby99

    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.
    Problem signature:
      Problem Event Name:    CLR20r3
      Problem Signature 01:    tapi.exe
      Problem Signature 02:
      Problem Signature 03:    543c72aa
      Problem Signature 04:    tAPI
      Problem Signature 05:
      Problem Signature 06:    543c72aa
      Problem Signature 07:    8d5
      Problem Signature 08:    11
      Problem Signature 09:    System.NullReferenceException
      OS Version:    6.1.7601.
      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?
  9. jordan

    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
  10. DryCryCrystal

    DryCryCrystal Plantera

    same here!
  11. Kyle TheCreator

    Kyle TheCreator Terrarian

    Same here
  12. Kyle TheCreator

    Kyle TheCreator Terrarian

    I need to know any language of programmation to use this and create a mod?
  13. PoroCYon

    PoroCYon Terrarian

    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...
    Try to update once more, the problem should be fixed now.
    yes, C# (or any other .NET language).
    Last edited: Oct 16, 2014
  14. Kyle TheCreator

    Kyle TheCreator Terrarian

    When I open the game with the MCT the game crash and close.
  15. PoroCYon

    PoroCYon Terrarian

    I totally know what's wrong because you gave me all the information I need to fix the bug.
    I can't read your mind, give me at least a stack trace.
  16. Kyle TheCreator

    Kyle TheCreator 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

    Attached Files:

  17. PoroCYon

    PoroCYon Terrarian

    This really does help.</sarcasm>
    I can't fix the problem if I don't have anything else besides this.
  18. Kyle TheCreator

    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
  19. Kyle TheCreator

    Kyle TheCreator Terrarian

    When I open the MCT Tools.exe, it just close. Should happen anything?
  20. Toidiedud

    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.
Thread Status:
Not open for further replies.