DragonMage156 Posted January 4, 2017 Share Posted January 4, 2017 Would anyone like to help me with this new mod idea I've got? If not, teach me how to mod items? Link to comment Share on other sites More sharing options...
Mobbstar Posted January 4, 2017 Share Posted January 4, 2017 (edited) Items 101: An item is, like a rock, tree or creature, a "prefab" (pre-fabricated entity). To make one for yourself, you should start by copying a similiar one from "data/scripts/prefabs/" to "yourmod/scripts/prefabs/", where you can rename the lua file and then edit it. When editing a prefab file, make sure to change the name at the very end of the file. Other than that, there's no general advice to give. Load the file from "yourmod/modmain.lua" by adding it to the "Prefabs" list. To make the item craftable, use "AddRecipe()". e.g.: AddRecipe("youritem", { Ingredient("goldnugget",1), Ingredient("cutgrass",3), }, GLOBAL.RECIPETABS.SCIENCE, GLOBAL.TECH.SCIENCE_ONE, nil, nil, nil, --a bunch of stuff you can leave blank 1, --number of crafted items nil, "images/inventoryimages/youritem.xml", "youritem.tex",) Edited January 4, 2017 by Mobbstar extended Link to comment Share on other sites More sharing options...
Developer ImDaMisterL Posted January 4, 2017 Developer Share Posted January 4, 2017 Moved to the Mods & Tools section Gl with the mod! Link to comment Share on other sites More sharing options...
Neu7ral Posted January 4, 2017 Share Posted January 4, 2017 What idea? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now