Jump to content

modding starting items


Recommended Posts

I've never done any modding before, and I want to make my GFs character start with 3 berry bushes, 3 saplings, and 3 grass tufts. It seems easy enough, but how do I know the names of these items in the code and how to I add multiple of the same item?

 

-- Custom starting items
local start_inv = {
"berrybush", "sapling",  "grasstuft",
"berrybush", "sapling",  "grasstuft",
"berrybush", "sapling",  "grasstuft"
}
 
May work, but it certainly isn't efficient.
 
Also, if I edit her modded character now, will it impact other save files in any way?
Link to comment
Share on other sites

  • Developer
May work, but it certainly isn't efficient.

 

 

As far as I know, it's the only way to do it, you could put it in order, though, like
"berrybush", "berry bush", "berry bush",
"sapling", "sapling", "sapling",
etc...
 

 

Also, if I edit her modded character now, will it impact other save files in any way?
Probably not.
 
-- Credit for answers, Fidooop.
Link to comment
Share on other sites

@iLiberate, you could run a loop like the following:

local starting_items ={ berries = 3, cutgrass = 3, twigs = 3 }local start_inv = { }for k, v in pairs(starting_items) do   for i = 0, v do      table.insert(start_inv, k)   endend 

You would then use start_inv in your file return call.

 

Link to comment
Share on other sites

@iLiberate, you could run a loop like the following:

local starting_items ={ berries = 3, cutgrass = 3, twigs = 3 }local start_inv = { }for k, v in pairs(starting_items) do   for i = 0, v do      table.insert(start_inv, k)   endend 

You would then use start_inv in your file return call.

Thank you! But I don't want berries, cutgrass and twigs. I want the plantable berrybush, grass, and saplings and they aren't working.

Link to comment
Share on other sites

@iLiberate, then you are using the right prefabs....the prefabs you should be using are as followed:

 

dug_berrybush

dug_berrybush2

dug_grass

dug_sapling 

@Kzisor

local start_inv = 

{
-- Custom starting items
"poop", 
"dug_berrybush", 
"dug_berrybush2", 
"dug_grass", 
"dug_sapling", 
"tallbirdegg", 
"wall_moonrock_item", 
"backpack",
}
 
Still not working, no crash but no items either.
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...