Jump to content

Recommended Posts

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)

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 by Mobbstar

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