Jump to content

Need help with custom biome.


Recommended Posts

So, to start off, I have never tried modifying worlds generation, now I want to add a custom biome.
I saw some tutorials on the forum and I looked through some mods that add new biomes. Unfortunately, for some reason, I can't add anything to my biome. This is my room, task and level code:

AddRoom("TestRoom", {
	colour={ r = 1, g = 0, b = 0, a = 0 },
	value = GROUND.CAVE,
	tags = {"ExitPiece", "Chester_Eyebone"},
	contents = {
		distributeprecent = 0.5,
		distributeprefabs = {
			grass = 1,
		}
	}
})

AddTask("TestTask", {
	locks = LOCKS.NONE,
	keys_given = { KEYS.TIER1 }, --                                    They are not in the same file, I just added them here for easier reading
	room_choices = {
		["TestRoom"] = 7,
	},
	room_bg = GROUND.GRASS,
	background_room = "TestRoom",
	colour = { r = 1,g = 0,b = 0,a = 0 },
})

local function LevelPreInit1(level)
		if level.location ~= "forest" then
			return
		end
		table.insert(level.tasks, "TestTask")
	end
	
AddLevelPreInitAny(LevelPreInit1)

 

After creating a world and revealing the map, I can see my biome but it's completely empty, there's no grass. I've been trying to fix this for 3 hours or more now, sadly, with no progress.

Edited by IThatGuyI
  • Like 1
Link to comment
Share on other sites

1 hour ago, thomas4846 said:

just letting yknow you probably won' get a proper reply on this because world gen is like running backwords

Well, I've seen some mods that add new biomes, like: Cherry Forest, Myth Characters, Magic Biomes.
Ok, the last one actually crashes the game, but it did work at some point. I've made my biome based on these mods and yet there's still this problem, with nothing in the biome.

There are people that know how to do world gen and probably know how to solve this issue. I would be forever grateful if they could share their knowledge.

  • Like 1
Link to comment
Share on other sites

Ok, I just realised what's wrong. There's a typo...

AddRoom("TestRoom", {
	colour={ r = 1, g = 0, b = 0, a = 0 },
	value = GROUND.CAVE,
	tags = {"ExitPiece", "Chester_Eyebone"},
	contents = {
		distributeprecent = 0.5, -- distributePREcent, should be distributePERcent
		distributeprefabs = {
			grass = 1,
		}
	}
})

 

Well... That was a dumb error.

Edited by IThatGuyI
  • Like 1
Link to comment
Share on other sites

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
 Share

×
  • Create New...