Volgera Posted May 26, 2015 Share Posted May 26, 2015 hey, I'm looking to lower the chances of certain prefabs to spawn in the world. I know that I can alter prefabs in modmain using AddPrefabPostInit, but I have no clue how to set custom generating chances on prefabs. For example, I'd want my mod to generate less rocks (rock_flintless prefab) in the world by default (with the option to configure the generating rate in the mod configurations window). Is there a possibility to create a different generating chance table for a prefab that doesn't come from the mod itself? I have a slight idea how I could code it, I just have no idea where to put the code (modmain or modinfo probably) Link to comment https://forums.kleientertainment.com/forums/topic/54431-lower-chances-of-generating-prefabs/ Share on other sites More sharing options...
Volgera Posted May 26, 2015 Author Share Posted May 26, 2015 I was also wondering whether I can completely REMOVE a prefab from generating in the world by default? Link to comment https://forums.kleientertainment.com/forums/topic/54431-lower-chances-of-generating-prefabs/#findComment-640735 Share on other sites More sharing options...
Mobbstar Posted May 26, 2015 Share Posted May 26, 2015 (edited) You should look into making a wordgenmain.lua A basic example is the new IRB, which generates silver ore. Advanced examples are Steam Biome (new biomes with unique stuff), U&A (new level) and HitD (many levels, just too many). Whilst I don't know anyone who would have done that before (me included), I don't see why you shouldn't be able to search through existing data and remove bits. EDIT: links Edited May 26, 2015 by Mobbstar Link to comment https://forums.kleientertainment.com/forums/topic/54431-lower-chances-of-generating-prefabs/#findComment-640739 Share on other sites More sharing options...
Volgera Posted May 26, 2015 Author Share Posted May 26, 2015 all right, I'll have a look, thanks! Link to comment https://forums.kleientertainment.com/forums/topic/54431-lower-chances-of-generating-prefabs/#findComment-640750 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