iLiberate Posted July 7, 2015 Share Posted July 7, 2015 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 itemslocal 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 More sharing options...
Developer ImDaMisterL Posted July 7, 2015 Developer Share Posted July 7, 2015 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 More sharing options...
Kzisor Posted July 8, 2015 Share Posted July 8, 2015 @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 More sharing options...
HTShin Posted July 8, 2015 Share Posted July 8, 2015 you can refer mod herehttp://steamcommunity.com/sharedfiles/filedetails/?id=465111683&searchtext= Link to comment Share on other sites More sharing options...
iLiberate Posted July 8, 2015 Author Share Posted July 8, 2015 @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 More sharing options...
Kzisor Posted July 8, 2015 Share Posted July 8, 2015 @iLiberate, then you are using the right prefabs....the prefabs you should be using are as followed: dug_berrybushdug_berrybush2dug_grassdug_sapling Link to comment Share on other sites More sharing options...
iLiberate Posted July 8, 2015 Author Share Posted July 8, 2015 Awesome! Thank you Link to comment Share on other sites More sharing options...
iLiberate Posted July 8, 2015 Author Share Posted July 8, 2015 @iLiberate, then you are using the right prefabs....the prefabs you should be using are as followed: dug_berrybushdug_berrybush2dug_grassdug_sapling @Kzisorlocal 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 More sharing options...
iLiberate Posted July 8, 2015 Author Share Posted July 8, 2015 It works now! Thank you so much everybody! Link to comment Share on other sites More sharing options...
PrinceKawaii Posted July 24, 2015 Share Posted July 24, 2015 What did you do to make it work? 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.