Jump to content

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
https://forums.kleientertainment.com/forums/topic/55968-modding-starting-items/
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.
Edited by ImDaMisterL

@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.

 

@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.

@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.
Edited by iLiberate

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...