Jump to content

Lower chances of generating prefabs


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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

×
  • Create New...