Faerendipitous Posted October 26, 2016 Share Posted October 26, 2016 Hello! I'm working on my first custom character mod and would like to start her off with a cauldron - more or less a reskinned crockpot that she could carry in her inventory, set it down, and use it. I'm aiming for this cauldron to also be able to cook 'potions' that replenish health or sanity, depending on the recipe. Problem is, I'm very new to modding and I don't know much about code, but I can't seem to find any good and thorough tutorials on how to create custom starter items. I've already found the code from Warly's crock pot but I'm not exactly sure what to do with it from here, or what other portions of code would need to be added to the mod's .lua files in order to make everything work. Does anyone know how I might go about doing this? I'd like for her to have some unique gameplay to her, even if she is just an oc mod. Link to comment https://forums.kleientertainment.com/forums/topic/71159-custom-starter-item/ Share on other sites More sharing options...
Maris Posted October 27, 2016 Share Posted October 27, 2016 It's not easy. It might take me few hours to find a solution and test it. (I know lua well enough) I'll pass. Link to comment https://forums.kleientertainment.com/forums/topic/71159-custom-starter-item/#findComment-829844 Share on other sites More sharing options...
Serpens Posted October 27, 2016 Share Posted October 27, 2016 I never made a character, but isn't it possible to do it like the game characters do it? eg in waxwell.lua (=maxwell), there is written: local start_inv = { "waxwelljournal", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", } -- ... return MakePlayerCharacter("waxwell", prefabs, assets, common_postinit, master_postinit, start_inv) Link to comment https://forums.kleientertainment.com/forums/topic/71159-custom-starter-item/#findComment-829878 Share on other sites More sharing options...
Arlesienne Posted October 27, 2016 Share Posted October 27, 2016 6 hours ago, Serpens said: I never made a character, but isn't it possible to do it like the game characters do it? eg in waxwell.lua (=maxwell), there is written: local start_inv = { "waxwelljournal", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", } -- ... return MakePlayerCharacter("waxwell", prefabs, assets, common_postinit, master_postinit, start_inv) I think it should work, I mean mods which, say, add nightmare armour to Maxwell's starting inventory (played on @Mickmane's server with it on), alter these lines I marked with bold. The issue may be that the portable cookpot isn't in the code of DST by default. So @faerendipitous would have to contact the authors of a successful port and ask if they could help out with this part. The one I use on both ANR and the live branch is this one. Link to comment https://forums.kleientertainment.com/forums/topic/71159-custom-starter-item/#findComment-829945 Share on other sites More sharing options...
Serpens Posted October 27, 2016 Share Posted October 27, 2016 (edited) 5 hours ago, Arlesienne said: The issue may be that the portable cookpot isn't in the code of DST by default. From what I read so far, I think it should be enough to add the new prefab into the "prefabs" table, that is returned with MakePlayerCharacter. If that also does not help, add the asstes of your new prefabs to the assets table. And if that also does not help, I have no clue Edited October 27, 2016 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/71159-custom-starter-item/#findComment-830006 Share on other sites More sharing options...
halfrose Posted October 27, 2016 Share Posted October 27, 2016 Look at the portable crockpot mod from the workshop or if you have shipwrecked, go into its game files and see how it is done, there might be some need of changes here and there, but nothing that fatal. also there are mods that makes structures able to be carried into the inventory, you can look at them as examples too. Link to comment https://forums.kleientertainment.com/forums/topic/71159-custom-starter-item/#findComment-830085 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