Jump to content

How can I make a character start with a Backpack/Icepack?


Recommended Posts

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

Pretty simple, simply replace 

local prefabs = {}local start_inv = { }

with something like this

local 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

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

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

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

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.

×
  • Create New...