Mayli-Song Posted January 6, 2017 Share Posted January 6, 2017 I'm making a a pair of self character for DST and in their unique traits I'd like them to have custom items. I don't know where to start looking for code to rip or how to make my own, so any help is appreciated Item #1 - Music Box 1 gold nugget, 1 cut stone, 2 silk Equipable, nonflamable, durability of 600 seconds, +10 sanity/min while equipped. Craftable and useable only by Character A Item #2 - Lighter It's functionally identical to Willow's lighter but it needs to be specific to Character A Item #3 - Drawings 1 papyrus, 10 petals, 1 black feather Non-equipable, flamable. Upon creation restores 50 sanity, no real use after that other than fire fuel. Craftable only by Character B So yeah if anyone can help it would be greatly appreciated Link to comment Share on other sites More sharing options...
Lumina Posted January 6, 2017 Share Posted January 6, 2017 The best way to start is to look at game files and see how classic items works. If you want an item to be specific to a character you usually need to add a tag to your character, and after that, you need to tell the game that only character with the tag could make the item. If you look at games files, in data/scripts/recipes.lua you'll see Recipe("lighter", {Ingredient("rope", 1), Ingredient("goldnugget", 1), Ingredient("petals", 3)}, RECIPETABS.LIGHT, TECH.NONE, nil, nil, nil, nil, "pyromaniac") So what you need is for example Recipe("customlighter", {Ingredient("rope", 1), Ingredient("goldnugget", 1), Ingredient("petals", 3)}, RECIPETABS.LIGHT, TECH.NONE, nil, nil, nil, nil, "characterA") This will make the recipe exclusive to character with "characterA" tag. I'm not sure how you must do if you want only one character using it, so you must search in the files i guess. 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