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 [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. GiantEnemyDinosaurPrime

    GiantEnemyDinosaurPrime Skeletron Prime

    Got this error trying to build mod, any suggestions?

    Terraria 1.2.4.1, tAPI Builder r11

    ========================================
    Building mod Dinosauria

    Validating Jsons...
    Validating ModInfo.json
    Compiling code...
    BabyDinosaurNPC.cs (32,77)
    'Dinosauria.NPCs.BabyDinosaurNPC.SetChatButtonAction(string[], int)': no suitable method found to override
    public override Action SetChatButtonAction(string[] buttons, int buttonIndex)
    ^

    Failed to build Dinosauria.

    ========================================

    Built 0 mods.
     
  2. Cryshal

    Cryshal Terrarian

    Hey guys, I just looked at tAPI after about two months and I'm really happy with what you've done and extremely happy to see either the documentation has been updated or you added new features. It's a really great tool you've built for the community to use.

    P.S. It would be amazing if you focused on the documentation for a while since they are apparently not close to being done or fully accurate.
     
  3. Arkhayla

    Arkhayla Terrarian


    I already answered this on the previous page:

     
    Nopezal likes this.
  4. bad_news

    bad_news Golem

    Is there a way to allow items/accessories to grant a status immunity? I looked through the documentation, but nothing I found seems to be it.
     
  5. GiantEnemyDinosaurPrime

    GiantEnemyDinosaurPrime Skeletron Prime

    Terraria 1.2.4.1, tAPI Builder r11

    ========================================
    Building mod Dinosauria

    Validating Jsons...
    Compiling code...
    BabyDinosaurNPC.cs (9,73)
    Invalid token '{' in class, struct, or interface member declaration
    {
    ^
    BabyDinosaurNPC.cs (21,74)
    Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)
    buttons[0] = "Shop";
    ^
    BabyDinosaurNPC.cs (24,74)
    Invalid token '=' in class, struct, or interface member declaration
    buttons[0] = "Shop";
    ^
    BabyDinosaurNPC.cs (21,75)
    Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)
    buttons[1] = "Health";
    ^
    BabyDinosaurNPC.cs (24,75)
    Invalid token '=' in class, struct, or interface member declaration
    buttons[1] = "Health";
    ^
    BabyDinosaurNPC.cs (25,77)
    Expected class, delegate, enum, interface, or struct
    public override void SetChatButtons(ref string[] buttons) { }
    ^
    BabyDinosaurNPC.cs (56,77)
    Identifier expected
    public override void SetChatButtons(ref string[] buttons) { }
    ^
    BabyDinosaurNPC.cs (58,77)
    Expected class, delegate, enum, interface, or struct
    public override void SetChatButtons(ref string[] buttons) { }
    ^
    BabyDinosaurNPC.cs (63,87)
    Expected class, delegate, enum, interface, or struct
    Player player = Main.player[Main.myPlayer];
    ^
    BabyDinosaurNPC.cs (13,104)
    Type or namespace definition, or end-of-file expected
    }
    ^
    BabyDinosaurNPC.cs (13,105)
    A namespace cannot directly contain members such as fields or methods
    return null;
    ^
    BabyDinosaurNPC.cs (9,106)
    Type or namespace definition, or end-of-file expected
    }
    ^
    Failed to build Dinosauria.

    ========================================

    Built 0 mods.
    Also now the tAPI packer is screwed up, anybody have a tAPI packer for r11?
     
  6. Arkhayla

    Arkhayla Terrarian

    tAPI packer has been sunset (out moded? obsoleted? eclipsed?... it's dead jim!)... use tAPI Builder, should have been installed with tAPI
     
    ShadowTiger likes this.
  7. Yoraiz0r

    Yoraiz0r Lead Developer Re-Logic

    You will indeed not find this in the documentation, its a feature you can use without requiring tAPI specifically.
    Players have a field called 'buffImmune' which is an array of booleans (true/false), in an item's or a buff's method, you can set
    Code:
    player.buffImmune[buffType] = true; //you can get the buffType by using BuffDefs.ByName["modName:buff name"]
    
    to make the player immune to that buff.
     
  8. SolaR

    SolaR Golem

    how do you uninstall it? I want to play vanilla terraria but it always opens tapi even through the steam client
     
  9. TheUnrealMegashark

    TheUnrealMegashark Official Terrarian

    Well, instead of uninstalling it you could always install GameLauncher and use that, or you could navigate to your Terraria steam folder and swap out the names for terraria.exe and your terraria original.exe (or whatever the latter is called, can't recall exactly atm). The reason it does that is because steam always looks for the file terraria.exe in that specific directory and runs it.

    If you still wish to uninstall it, it should be under your control panel->uninstall programs.
     
  10. Yoraiz0r

    Yoraiz0r Lead Developer Re-Logic

    Simply clearing local game content on steam / verify cache should work as well, rest assured that this does nothing to your terraria saves.
     
  11. Bullseye55

    Bullseye55 Brain of Cthulhu

    Just want to submit a bug report here. Tested with Main.NewText.

    public override bool CanSpawn(int x, int y, int type, Player p)

    This hook doesn't seem to be triggering when it should, or at all. I have not seen any of my custom NPCs spawn naturally since the R11 pre-release to me. Using updated code for R11.

    Can anyone else confirm this on their side?
     
  12. GiantEnemyDinosaurPrime

    GiantEnemyDinosaurPrime Skeletron Prime

    Well, can you help me with the error?
     
  13. Ridley

    Ridley Terrarian

    Bug:
    The current r10 link under download archives is actually r11. (the direct download link is okay)

    I didn't see this anywhere in the thread via forum search.
     
    Arkhayla likes this.
  14. Arkhayla

    Arkhayla Terrarian

    Yesterday we found a bug where mod settings are not being saved properly. For now, you can change a mod's settings, click back, then play single player with the changed settings but if you leave the game or go back in to mod settings they are NOT saved. This means you also have no way of using your edited settings in multi player.

    This issue will be resolved in r12, but for now there is no way around it. Our apologies for any inconvenience!

    Please keep reporting those bugs! We would like to squash as many as we can for the r12 release.

    Thanks everyone, keep up the good work and keep those mods coming!

    I'll look in to this Bullseye55, thanks for pointing it out. I'll reply later with my findings or you can ask for an update in the IRC :)

    Thanks, we'll double check the links

    That's actually... a LOT of errors - You should join the IRC channel (linked in OP) and ask for help there, going through all of those on here is a bit tedious. On a side note, it should tell you exactly where to find the error right in that log. If you are unfamiliar with C#, here is a great tutorial http://rbwhitaker.wikidot.com/xna-tutorials.

    If I am mistaken, and you are familiar with C#, please stop by the IRC channel and let us help you in real time.
     
    Last edited: Oct 17, 2014
  15. berberborscing

    berberborscing Skeletron Prime

    Was creating a custom buff, here is the CS:
    [​IMG]
    And here is the issue:
    [​IMG]
    Any help?
     
  16. PoroCYon

    PoroCYon Terrarian

    Your method has two method bodies (the { and } thingies).
    (I'd like to rage Linus Torvalds-style here...)
     
    TheUnrealMegashark and Arkhayla like this.
  17. Everest

    Everest Mechanic

    Remove the "{}" after "(Player p)", you only need one body.
     
    Arkhayla likes this.
  18. berberborscing

    berberborscing Skeletron Prime

    Now I've got another issue after i removed the {}:
    [​IMG]
     
  19. Everest

    Everest Mechanic

    That means that there is no "Effects" method that takes a Player as an argument, but there is an Effects method that takes a Player and[/i an int.

    Just add an argument for an int to that Effects method.
     
  20. berberborscing

    berberborscing Skeletron Prime

    Thank you for your help, it's working now! :D
     
Thread Status:
Not open for further replies.