Jump to content

Creating Blueprints for Custom Items


Recommended Posts

I'm implementing some new items in my mod, and using AddRecipe() in modmain.lua in order to add the recipes. My intention is to have these recipes be TECH.LOST and must require crafting blueprints in order to unlock them. I can't seem to figure out how to give modded items blueprints, however.

I was messing around with trying to create craftable blueprints of already existing items, and I can't get that to work either. Looking at other mods, it seems that all you need to do is "(prefabname)_blueprint" to create a blueprint, but I can only get it to work with "rare" blueprints like the endtable.

For example, the following code should add a recipe to my custom recipe tab that creates a blueprint for a darksword:

AddRecipe("nightsword_blueprint",
            {GLOBAL.Ingredient(GLOBAL.CHARACTER_INGREDIENT.SANITY, 5) },
            invention_tab,
            TECH.NONE,
            nil, nil, nil, nil, "madscientist", "images/inventoryimages.xml", "blueprint.tex")

Yet, even though the recipe shows up, upon crafting it nothing happens and my character simply says "I can't do that." Replacing "nightsword" with "endtable" rewards an endtable blueprint just fine.

Edited by Ziro2k
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...