0

I am creating a mod for terraria with json files and have encountered that my jsons cannot find other items or tiles.

here is an item I made:

{
"displayName" : "Unknown Refined Crystal",
"texture" : "Items/refinedCrystal",
"size" : [ 32, 32 ],
"maxStack" : 99,
"value" : [ 0, 5, 0, 0 ],
"tooltip" : "A pure crystal with many crafting recipes",

"recipes": 
[{
        "items": { "Unknown Crystal Shard": 10 },
        "tiles": [ "Work Bench" ],
        "creates": 1
}]
}

The item used for crafting, the "Unknown Crystal Shard" is the name of my other item. When I reload the mods, I get this:

TAPI.Mods+LoadException: No item "Unknown Crystal Shard" found for recipe of  
item "Flaciea:refinedCrystal"
at TAPI.RecipeResolver.Resolve()
at TAPI.ResolverQueue.ResolveAll()
at TAPI.Mods.Load()

Do I need to use internal names, or import the items? If so, how...

Thanks!

GraniteBear
  • 31
  • 2
  • 7

3 Answers3

0
{
"displayName" : "Unknown Refined Crystal",
"texture" : "Items/refinedCrystal",
"size" : [ 32, 32 ],
"maxStack" : 99,
"value" : [ 0, 5, 0, 0 ],
"tooltip" : "A pure crystal with many crafting recipes",

"recipes": 
[{
    "items": { "{Internalmodname}:Unknown Crystal Shard": 10 },
    "tiles": [ "Work Bench" ],
    "creates": 1
}]
}
willy
  • 1
0

As for me, I just wrote the file name of the json part of the ingridient. If "Unknown Crystal Shard" .json file is named unknowncrystalshard, I copy it to the recipe instead of the "Unknown Crystal Shard". That's a display name. --------- More details - you write "displayName", but also there are "internalName", which difines the codename of that item and can be used in the moments like that.

0
"internalName":"unknownCrystalShard",

in the .json is the best approach, for anyone with the same question

GraniteBear
  • 31
  • 2
  • 7