ChilledHobo Posted May 27, 2015 Share Posted May 27, 2015 I am currently working on a mod that adds a new item (a book) with a custom sprite and I don't know how to distribute the item in the world. I would like it to spawn in shelves and book cases but I don't know how to. So can you kind people help me out with how to distribute the item in the world? I know I have to make a .lua script in the sever folder and that's about it, I don't actually know the code to use. So if you all could help me out and provide a code or point me to a code that would help a lot. Thanks for your time! Also here the new item I created in case you need that. module NewJunkMod{ item BlueBook { Weight = 0.5, Type = Literature, UnhappyChange = -40, DisplayName = Blue Book, StressChange = -40, Icon = blue_book.png, BoredomChange = -50, }} Link to comment Share on other sites More sharing options...
Svarog Posted May 27, 2015 Share Posted May 27, 2015 http://theindiestone.com/forums/index.php/topic/14420-item-distribution/I hope it helps.But if you need specific code for the item of yours. here require 'Items/SuburbsDistributions'table.insert(SuburbsDistributions["all"]["shelves"].items, "NewJunkMod.BlueBook");table.insert(SuburbsDistributions["all"]["shelves"].items, 3); Link to comment Share on other sites More sharing options...
ChilledHobo Posted May 27, 2015 Author Share Posted May 27, 2015 Ah thank you so much, but might I ask you where you found the Suburbs Distributions lines? Are they in the game as .lua files? Link to comment Share on other sites More sharing options...
Svarog Posted May 27, 2015 Share Posted May 27, 2015 The answer is there in that post too the SuburbsDistribution.lua is located in the game's install directory media\lua\server\Items what that code does is basically insert some code into it. Link to comment Share on other sites More sharing options...
ChilledHobo Posted May 27, 2015 Author Share Posted May 27, 2015 Great and thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now