Sejuhasz Posted May 15, 2015 Share Posted May 15, 2015 I'm making a food-based character, and I want him to start with an icepack. However, I discovered using the command below doesn't work with backpacks or icepacks: }local prefabs = {}local start_inv = { } How could I Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/ Share on other sites More sharing options...
grimmsdottir Posted May 15, 2015 Share Posted May 15, 2015 Pretty simple, simply replace local prefabs = {}local start_inv = { }with something like thislocal prefabs = { "icepack",}local start_inv = { "icepack",}and you should be good to go. Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/#findComment-637649 Share on other sites More sharing options...
Sejuhasz Posted May 15, 2015 Author Share Posted May 15, 2015 Pretty simple, simply replace local prefabs = {}local start_inv = { }with something like thislocal prefabs = { "icepack",}local start_inv = { "icepack",}and you should be good to go. This is what I have now:}local prefabs = {"backpack"}local start_inv = {"honeynuggets""backpack"}The honey nuggets are there as a control. This crashes the game, unfortunately. Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/#findComment-637656 Share on other sites More sharing options...
Sejuhasz Posted May 15, 2015 Author Share Posted May 15, 2015 UPDATE: So now I have this as my code, and nothing is showing up: Any ideas?local prefabs = { "icepack",}local start_inv = { "icepack",} Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/#findComment-637658 Share on other sites More sharing options...
grimmsdottir Posted May 15, 2015 Share Posted May 15, 2015 Where did you place this piece of code? local prefabs = { "icepack", } local start_inv = { "icepack", } It should go into yourmod/scripts/prefabs/yourchar.lua Also, if you want to add something like honey nuggets into your starting inventory, you also need to add it to the local prefabs block Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/#findComment-637674 Share on other sites More sharing options...
Sejuhasz Posted May 15, 2015 Author Share Posted May 15, 2015 Where did you place this piece of code? It should go into yourmod/scripts/prefabs/yourchar.lua Also, if you want to add something like honey nuggets into your starting inventory, you also need to add it to the local prefabs block This is in: Don't Starve Together Beta\mods\workshop-361202313\scripts\prefabs\Ward.lua My code is:local prefabs = { "icepack", "cookpot_blueprint", "icebox_blueprint",}local start_inv = { "icepack", "cookpot_blueprint", "icebox_blueprint",}The blueprints work. The Icepack does not. Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/#findComment-637678 Share on other sites More sharing options...
grimmsdottir Posted May 15, 2015 Share Posted May 15, 2015 Oh yeah, I think I know what is going on. If I recall correctly, backpacks of all kinds can not be placed in your inventory bar. if you were to pick one up, you will deequip whatever chest piece(or backpack if your are using that mod). As such, you can't spawn it in your inventory I think. I am not sure how to solve that. Try asking about. Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/#findComment-637696 Share on other sites More sharing options...
Mobbstar Posted May 15, 2015 Share Posted May 15, 2015 There's a mod that spawns you with a backpack. See how it does it. Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/#findComment-637715 Share on other sites More sharing options...
Seiai Posted May 15, 2015 Share Posted May 15, 2015 u also have to return the startinginventory at the bottom, look at other characters that have a startinginventory. Link to comment https://forums.kleientertainment.com/forums/topic/53987-how-can-i-make-a-character-start-with-a-backpackicepack/#findComment-637737 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