tAPI [Discontinued] tAPI - A Mod To Make Mods

Status
Not open for further replies.
Just upload the Sources folder in this case, I hope we can find the issue and help you out.

What mods are you trying to put in there? R10 mods are not compatible with R11.
Here it is. Also the .png in one are missing since I did not put them in there yet. But "Wooden Spear" should build properly, unless its something wrong with my install...
 

Attachments

  • Sources.zip
    7.4 KB · Views: 135
Here it is. Also the .png in one are missing since I did not put them in there yet. But "Wooden Spear" should build properly, unless its something wrong with my install...
*cringe* Thank you for this.

So I ran a debug of the builder with your Wooden Spear mod, the issue resulted from the lack of cs files.

  • Hopefully fixed issue where some users require an empty .cs file for mods to compile
^ this apparently did more damage than fixing things.

We can't update the tAPI links atm since some of us are asleep ( 5:35AM for myself >.>; ) but for now I can offer a temporary fix.
Just create an empty cs file (feel free to name it empty.cs) in your mod folder and compilation should work.

Sorry for the trouble!

(fixed it , fix will be available in the next release)
 
Last edited:
As for recipes involving mod items, how would that be done with multiple items from mods?

JSON side that is.
When you wish to reference mod items, you simply need to include the mod's name in the item name followed by a ":" mark.
For example "MyMod:That Item" , "ThatMod:Another Item" , and so on.
 
When you wish to reference mod items, you simply need to include the mod's name in the item name followed by a ":" mark.
For example "MyMod:That Item" , "ThatMod:Another Item" , and so on.
So the items in quotes are separated by commas? I just am trying to have an item crafted from four other items that are also included in the mod.
 
So the items in quotes are separated by commas? I just am trying to have an item crafted from four other items that are also included in the mod.
Code:
  "recipes":
   [{
     "items": { "InternalName:SomeItem": 5, "InternalName:AwesomeItem": 2, "Dirt Block": 1 },
     "tiles": [ "Mythril Anvil" ],
     "creates": 1
   }]

This I took from one of my mods, it shows the proper format for multiple items. The only difference between mod items and normal items is you should include the internal name of your mod before it. (in the example above, that is Grealm)
 
sigh, I got another problem, completely different now.
I have made a basic item mod using huckleberrywills tut, word for word, complied perfectly, shows up in the mod list, I enabled it, nothing crashes, game plays perfectly but I can't craft it, so I got the templates from here, changed no code other than flavor text and images... loaded the mod, reloaded everything, everything works again, yet once again I cannot craft it, even though it has crafting code

The code I used for one of the items along with an image and the complied mod (the mod contains a hood and pants all with the same crafting recipe).. either im doing something wrong, the code is out or my computer/tAPI hates me haha
Code:
{
    "displayName": "Assassin Robe",
    "size": [34,34],
    "maxStack": 1,
    "value": [0,0,10,0],
    "rare": 8,   
    "tooltip": "'The great robe of an Assassin.'",
    "defense": 80,
    "armorBody": true,
    "hasHands": true,
    "setName": "Assassin",

    "recipes":
    [{
        "items": { "Dirt Block": 1 }, 
        "tiles": [ "Work Bench" ], 
        "creates": 1   
    }]   
}
Thanks in advance for any help :)
 

Attachments

  • AssassinRobe.png
    AssassinRobe.png
    630 bytes · Views: 119
  • AssassinRobeBody.png
    AssassinRobeBody.png
    4.3 KB · Views: 140
  • AssassinRobeArms.png
    AssassinRobeArms.png
    2.3 KB · Views: 132
  • Rosenblack.tapi
    20.6 KB · Views: 120
sigh, I got another problem, completely different now.
I have made a basic item mod using huckleberrywills tut, word for word, complied perfectly, shows up in the mod list, I enabled it, nothing crashes, game plays perfectly but I can't craft it, so I got the templates from here, changed no code other than flavor text and images... loaded the mod, reloaded everything, everything works again, yet once again I cannot craft it, even though it has crafting code

The code I used for one of the items along with an image and the complied mod (the mod contains a hood and pants all with the same crafting recipe).. either im doing something wrong, the code is out or my computer/tAPI hates me haha
Code:
{
    "displayName": "Assassin Robe",
    "size": [34,34],
    "maxStack": 1,
    "value": [0,0,10,0],
    "rare": 8, 
    "tooltip": "'The great robe of an Assassin.'",
    "defense": 80,
    "armorBody": true,
    "hasHands": true,
    "setName": "Assassin",

    "recipes":
    [{
        "items": { "Dirt Block": 1 },
        "tiles": [ "Work Bench" ],
        "creates": 1 
    }] 
}
Thanks in advance for any help :)
Change the name of the folder from Armor to Items

Actually there's more: For one there is no AssassinRobe/AssassinPants/AssassinHood json files. Names for the items are messed up, change them; AssassinRobe_Body, AssassinRobe_Arms, AssassinPants_Legs, AssassinHood_Head

Your AssassinRobe.cs's namespace is templatemod, change the class to your item's name as well
 
Just upload the Sources folder in this case, I hope we can find the issue and help you out.

What mods are you trying to put in there? R10 mods are not compatible with R11.
im using mods that are compatible ;-; any mods i put in crash it.
 
sigh, I got another problem, completely different now.
I have made a basic item mod using huckleberrywills tut, word for word, complied perfectly, shows up in the mod list, I enabled it, nothing crashes, game plays perfectly but I can't craft it, so I got the templates from here, changed no code other than flavor text and images... loaded the mod, reloaded everything, everything works again, yet once again I cannot craft it, even though it has crafting code

The code I used for one of the items along with an image and the complied mod (the mod contains a hood and pants all with the same crafting recipe).. either im doing something wrong, the code is out or my computer/tAPI hates me haha
Code:
{
    "displayName": "Assassin Robe",
    "size": [34,34],
    "maxStack": 1,
    "value": [0,0,10,0],
    "rare": 8,  
    "tooltip": "'The great robe of an Assassin.'",
    "defense": 80,
    "armorBody": true,
    "hasHands": true,
    "setName": "Assassin",

    "recipes":
    [{
        "items": { "Dirt Block": 1 },
        "tiles": [ "Work Bench" ],
        "creates": 1  
    }]  
}
Thanks in advance for any help :)
NEVERMIND MY LAST POST THAT JUST GOT DELETED BECAUSE OF MAGIC

Forgot you can actually check the sources straight from a tapi file because I'm lazy like that.

Long story short, every item goes into the mod's "Items" folder, you can then create an "Armors" subfolder in the previously mentioned folder for the sake of order, but it's completelly optional as it will compile everything that's in the Items folder in any case. Also what you setted up in the cs file is actually not a cs code but rather a json and it should go under the .json format.
 
NEVERMIND MY LAST POST THAT JUST GOT DELETED BECAUSE OF MAGIC

Forgot you can actually check the sources straight from a tapi file because I'm lazy like that.

Long story short, every item goes into the mod's "Items" folder, you can then create an "Armors" subfolder in the previously mentioned folder for the sake of order, but it's completelly optional as it will compile everything that's in the Items folder in any case. Also what you setted up in the cs file is actually not a cs code but rather a json and it should go under the .json format.
ninja'd by me;) Yorai definitely needs to get onto those voice tuts in which he uses comical uses to narrate, please yorai, I need dis
 
NEVERMIND MY LAST POST THAT JUST GOT DELETED BECAUSE OF MAGIC

Forgot you can actually check the sources straight from a tapi file because I'm lazy like that.

Long story short, every item goes into the mod's "Items" folder, you can then create an "Armors" subfolder in the previously mentioned folder for the sake of order, but it's completelly optional as it will compile everything that's in the Items folder in any case. Also what you setted up in the cs file is actually not a cs code but rather a json and it should go under the .json format.

Thanks for the help :) , I just deleted that cs file since i didn't need it and it was from the example, was just curious about what i could learn from it, renamed folders correctly and what not, then got a butt-tonne of errors, lucky they were easy fixes though haha.

Hopefully now I can mod without errors and if i can't, maybe I can fix them XD

Thanks again :D
 
Is there any reason that my torches now require an item from my mod...

Also got my item to craft now. Thanks for the help guys.
 
Earlier today (roughly 8 hours ago) the links were updated, you will no longer require the empty cs file to compile your mod.
 
What is the code for the right spawning custom mob in a biome?[DOUBLEPOST=1414077144][/DOUBLEPOST]Yoraiz0r maybe you can add something like "biomeSpawn": Forest in .json file for easy mob spawning?
 
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?
Can some one please help?
 
Can someone help me with my code. I am trying to create a new sword for the game but whenever i do tAPI Builder just won't build the mod, it always says:
"Validating Jsons...
TheFabledSword.json: Invalid JSON file.
Invalid token ':' in input string
Failed to build That mod."

Here is the code for my sword:
{
"displayName": "The Fabled Sword",
"texture": "Item/Fabled Sword",
"size": [64, 64],
"maxStack": 1,
"value": [1, 50, 0, 0],
"rare": 7,
"tooltip": "The ancient sword, a powerful long lost sword",
"useStyle": 1,
"useAnimation": 25,
"useTime": 25,
"damage": 142,
"knockback": 5,
"useSound": 1,
"autoReuse": false,
"useTurn": true,
"melee": true,
"recipes": [{
"items": [ "Pink Ice Block": 50 ],
"tiles": [ "Work bench" ],
"creates": 1,
}]
}
Can someone please help, i have never really done any modding before so i don't really know what to do, i only got this far by watching a Youtube video.
 
Can someone help me with my code. I am trying to create a new sword for the game but whenever i do tAPI Builder just won't build the mod, it always says:
"Validating Jsons...
TheFabledSword.json: Invalid JSON file.
Invalid token ':' in input string
Failed to build That mod."

Here is the code for my sword:
{
"displayName": "The Fabled Sword",
"texture": "Item/Fabled Sword",
"size": [64, 64],
"maxStack": 1,
"value": [1, 50, 0, 0],
"rare": 7,
"tooltip": "The ancient sword, a powerful long lost sword",
"useStyle": 1,
"useAnimation": 25,
"useTime": 25,
"damage": 142,
"knockback": 5,
"useSound": 1,
"autoReuse": false,
"useTurn": true,
"melee": true,
"recipes": [{
"items": [ "Pink Ice Block": 50 ],
"tiles": [ "Work bench" ],
"creates": 1,
}]
}
Can someone please help, i have never really done any modding before so i don't really know what to do, i only got this far by watching a Youtube video.

You have a ":" some where you shouldn't although I can't find it.
 
Status
Not open for further replies.
Back
Top Bottom