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 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 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 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 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 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 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 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 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 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.