kongkim Posted August 24, 2015 Share Posted August 24, 2015 Hi im new to PZ and the modding Are still trying to learn how it all works and have a hard time with some of it. Right now im trying to make a test mod and is working with the .lua distributions file to get the test item out in the world. It looks like this: 2 .lua files in the folder (Zomboid\mods\testitem\media\lua\server\items) spawntestitem.luatable.insert(SuburbsDistributions["all"]["inventorymale"].items, "custom.testitem");table.insert(SuburbsDistributions["all"]["inventorymale"].items, 1);table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "custom.testitem");table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 2); loadtestitem.luaIcon = {}; function Icon.loadTexture()getTexture("Item_spiffothefighter.png");end Events.OnGameBoot.Add(Icon.loadTexture); 1: is the code right? And can i add all the code to one lua file?2: Is the folder destination right?3: How do i control drop chance? Hope someone can help Is really looking forward to build 33 Link to comment Share on other sites More sharing options...
kongkim Posted August 24, 2015 Author Share Posted August 24, 2015 Ok got most of it to work But if i make it all as one file nothing spawn. Also the 2 in here is the spawn rate right? table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 2); But it is 2% or 20%? so if i what a spawn % of 100% and one of 5% then type what? Link to comment Share on other sites More sharing options...
kinyoshi Posted November 20, 2015 Share Posted November 20, 2015 it is 2%.. 0.5 would be .5%. at least that's how it seems to work for me . 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