tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
ModNPC and ModProjectile classes (which you use for your custom NPCs & Projectiles respectively) have a hook called AI() (public override void AI()) , you can use it to make them do whatever it is you want them to do.

As for controlling simulating the effect of a blizzard staff , merely pick a point above the player , and shoot a projectile straight at that player from that point, blizzard staff does 4 shots per use if I recall correctly.
(if you mean the dust it uses , you'd use Dust.NewDust(arguments) to make your desired dust appear)

what i meant was how to get it to shoot down from above me to where i clicked. it always seems to go too far to the left/right. And can you give me an example of how the ModNPC/ModProjectile class would look i am new to tapi and c#. Also how do you make default enemies to drop custom items?
 
Last edited:
the compressed one yes (the one with a red terraria tree icon)
it looks like i simply can't upload this... a error appear on the screen when i try:
The following error occurred
The uploaded file does not have an allowed extension.

mon premier mod.tapi
 
it looks like i simply can't upload this... a error appear on the screen when i try:
The following error occurred
The uploaded file does not have an allowed extension.

mon premier mod.tapi
I have asked the mods to allow .tapi files as they are just a renamed zip file. Support for that "should" be allowed now. If not, you will likely just have to zip up your .tapi file in to a new .zip file to attach it. Give it another try please.
 
well this is working now thx

EDIT: the thing who's working is just the uploading of the tAPI guys i still lost with tAPI and i want to start making mod with a solid base so pls continue to help me
 

Attachments

  • mon premier mod.tapi
    2.6 KB · Views: 134
Last edited:
R5 code (I suppose TheHuckleberryWill's code) does work for R11, the only conflict I have received from transfer from old code to R11 was the
holy removal of constructors from CS files
but pickaxes dont need CS files, so his tutorial should be working for you

Here is my .json code. I can't find anything wrong with it : ( pls halp m8s
Code:
{
    "displayName": "Severe Slasher",
    "texture": "Item/severeslasher",
    "size": [70, 70],
    "maxStack": 1,
    "value": [0, 20, 40, 1],
    "rare": 10,
    "tooltip": "This is part of a Whole...",
    "useStyle": 1,
    "useAnimation": 45,
    "useTime": 45,
    "damage": 99,
    "knockback": 8,
    "useSound": 1,
    "autoReuse": true,
    "useTurn": true,
    "melee": true,
    "recipes": [{
        "items": { "Lead Bar": 1 },
        "tiles": [ "Anvil" ],
        "creates": 1
    }]
}
 
Here is my .json code. I can't find anything wrong with it : ( pls halp m8s
Code:
{
    "displayName": "Severe Slasher",
    "texture": "Item/severeslasher",
    "size": [70, 70],
    "maxStack": 1,
    "value": [0, 20, 40, 1],
    "rare": 10,
    "tooltip": "This is part of a Whole...",
    "useStyle": 1,
    "useAnimation": 45,
    "useTime": 45,
    "damage": 99,
    "knockback": 8,
    "useSound": 1,
    "autoReuse": true,
    "useTurn": true,
    "melee": true,
    "recipes": [{
        "items": { "Lead Bar": 1 },
        "tiles": [ "Anvil" ],
        "creates": 1
    }]
}
Well that's strange, I put it through JSONlint and it passed... can I see the error report?
 
well this is working now thx

EDIT: the thing who's working is just the uploading of the tAPI guys i still lost with tAPI and i want to start making mod with a solid base so pls continue to help me
i guess you have hidden fileendings because there is no json file in your tapi, i guess it appears like "marteauEnBeton.json" on your hdd but it is "marteauEnBeton.json.txt" with .txt being hidden on your system, not sure why it would crash tho
 
i guess you have hidden fileendings because there is no json file in your tapi, i guess it appears like "marteauEnBeton.json" on your hdd but it is "marteauEnBeton.json.txt" with .txt being hidden on your system, not sure why it would crash tho

thanks m8 ill try that
 
Domain wolf inside your mod you should have a folder called items this is where your item related things go ( .png, .cs, .jsons) if you do not have one create one and put all item related things there you cant have them anywhere else. if you named it item make it plural to items
 
You might not be able to craft it because the folder it is in is called "Item". If it is, change it to "Items".

Here's my error:
totalcrap.PNG

i dont know if you can see that though :/
 
Status
Not open for further replies.
Back
Top Bottom