tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
Hi,
As i am still quite new to tapi and C# i would like to know how to make events(both triggered by items like the frost moon, and based on date), have tiles drop new items(i have asked this before but i dont believe i got an answer), and how do i make biomes(in this case its going to be another replacement for the corruption and the hallowed)?

Thanks,
Drok
 
Hi,
As i am still quite new to tapi and C# i would like to know how to make events(both triggered by items like the frost moon, and based on date), have tiles drop new items(i have asked this before but i dont believe i got an answer), and how do i make biomes(in this case its going to be another replacement for the corruption and the hallowed)?

Thanks,
Drok

With respect, if you're new to tAPI and C# making events and biomes is way beyond you at the moment.
 
Trying to get a projectile to impact a debuff when hitting an enemy, this happened:
Code:
CakeGun.cs  (30,12)
  'berberborscing.Items.CakeGun.DamageNPC(Terraria.Projectile, Terraria.NPC, int, ref int, ref bool, ref float)': no suitable method found to override
  public override void DamageNPC(Projectile projectile, NPC npc, int hitDir, ref int damage, ref bool crit, ref float critMult)
  ^
 
Trying to get a projectile to impact a debuff when hitting an enemy, this happened:
Code:
CakeGun.cs  (30,12)
  'berberborscing.Items.CakeGun.DamageNPC(Terraria.Projectile, Terraria.NPC, int, ref int, ref bool, ref float)': no suitable method found to override
  public override void DamageNPC(Projectile projectile, NPC npc, int hitDir, ref int damage, ref bool crit, ref float critMult)
  ^
Whenever this happens, it means that the compiler can't find a method to override that corresponds with your method. What this means is that something in the method is wrong. You may be missing a parameter or something.

I'd suggest you get visual studio. It has an autocomplete thing that always gives you the correct method with the correct parameters.

EDIT: sorry, I think the method you're looking for is
public override void DamageNPC(Projectile projectile, int hitDir, ref int damage, ref float knockback, ref bool crit, ref float critMult)
 
Last edited:
Whenever this happens, it means that the compiler can't find a method to override that corresponds with your method. What this means is that something in the method is wrong. You may be missing a parameter or something.

I'd suggest you get visual studio. It has an autocomplete thing that always gives you the correct method with the correct parameters.
My computer doesn't support Visual Studio (Vista) :(
 
Just a question, how does one create a projectile that changes on impact with a block, and how would you get it to change again if it hit air again? Don't know since the documentation is not quite complete yet.
 
Just a question, how does one create a projectile that changes on impact with a block, and how would you get it to change again if it hit air again? Don't know since the documentation is not quite complete yet.
You could use public override void PostKill() and then spawn a new proj that does whatever you want?
 
My computer doesn't support Visual Studio (Vista) :(

OMG, what? You're not even using windows 7 yet?

There's seriously no version of Visual Studio that works on Vista?

I'm not sure how you could code seriously without it. In VS, there's an object browser that let's you look at all the methods and member variables, etc, inside Terraria.exe, tAPI.exe, etc. It's a lifesaver. So, you can look up "DamageNPC and see all of the various methods that exist with that name, their arguments, parent class, etc.
 
When you run from a flash drive got this error at the time worked Kaspersky Anti-Virus:
System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.Move(String sourceFileName, String destFileName)
at Terraria.Main.LoadPlayers()
at TAPI.Menu.<CreateMenus>b__9f()
at TAPI.Menu.MoveTo(String page, Boolean silent)
at TAPI.Menu.<>c__DisplayClass225.<CreateMenus>b__1e()
at TAPI.MenuPage.Draw(SpriteBatch SP)
at TAPI.Menu.DrawMenu()
at Terraria.Main.Draw(GameTime gameTime)
Before this game took off with an error. Character ceased determined game.
Sorry for my bad english.
 
Last edited:
At the risk of sounding like a total noob, I have no idea how to install mods. I downloaded the "example" mod thing you gave me, but I'm at a loss as to where exactly to put it. I tried the mod section, but it's not showing up in the "mods" section of the game menu.
 
At the risk of sounding like a total noob, I have no idea how to install mods. I downloaded the "example" mod thing you gave me, but I'm at a loss as to where exactly to put it. I tried the mod section, but it's not showing up in the "mods" section of the game menu.
If you've installed tAPI it should have associated .tapi and .tapimod files with the tAPI program to allow you to easily install mods made by other people, however this is not the case with the template mod.
That one is a mod's source folder, which has to be 'built' before you can play with it.
The process of doing it is pretty simplistic however... here's a miniature step-by-step guide...
  1. Open tAPI & enter the mods menu
  2. On top left corner, you'll find a button saying 'Open Mod Builder' , click it.
  3. The program that opens up is the tAPI builder which you use to build mods, at the bottom left you can find a button called 'Sources', click it.
  4. The folder that opens up is the tAPI mod sources directory, here you put mod source folders so you can build them , such as the template mod's "TemplateMod" folder. (extract the folder to this location, so you'll have a folder called sources/TemplateMod)
  5. Once the above is done, go back to the tAPI builder and click 'Refresh Mod List'.
  6. The TemplateMod should now appear in the top left list in the tAPI buider , double click it and you now have the mod in playable condition.
  7. back in tAPI (the game) reload your mod list, and template mod should appear disabled , enable it and reload mods , and you're good to go.
If you have any further questions feel free to ask.
 
I followed your steps and it worked perfectly. Thank you very much! Now for other things. I had a look at compatible mods for TApi, and it listed a mod called Ingame Cheat Menu. I placed the mod in every folder inside the mod directory, and it didn't show, so I decided to try the mod builder, and it doesn't seem to work either. Is this mod no longer compatible, or am I doing something wrong?
 
I followed your steps and it worked perfectly. Thank you very much! Now for other things. I had a look at compatible mods for TApi, and it listed a mod called Ingame Cheat Menu. I placed the mod in every folder inside the mod directory, and it didn't show, so I decided to try the mod builder, and it doesn't seem to work either. Is this mod no longer compatible, or am I doing something wrong?

You put it in local folder. If I am not wrong, you should download his MCT for his mod to work.
 
Yeah, it requires PoroCYon's MCT.
If you want plain tAPI mods you can use my cheat menu instead (which is said to be better than his anyway, but I'm not to say that).
 
Status
Not open for further replies.
Back
Top Bottom