Jump to content

Creating a new biome


Recommended Posts

So I'm trying to make a new biome. I looked into the API examples (http://forums.kleientertainment.com/files/file/203-api-examples/) and other mods that added something like what I want (like steam biome) but didnt understand completely what I had to do. Note that rock_obsidian and rock_charcoal are mod prefabs, so is the BURNT_TURF (as opposed to GROUND.TURF_NAME, its just a constant number, so I placed it directly). Here is the part of the code that I added:

AddRoom("Scorched_Earth", {
	colour={r=.010,g=.010,b=.10,a=.50},
	value = BURNT_TURF,
	contents =  {
		distributepercent = 0.4,
		distributeprefabs = {
			rock_charcoal = 3.0,
			rock_obsidian = 1.5,
			knight_nightmare = 0.15,
			bishop_nightmare = 0.1,
			rook_nightmare = 0.05,
		}
	}
})

AddTask("AncientDragonLand", {
		locks={LOCKS.FOREST},
		keys_given=KEYS.NONE,
		room_choices={
			["Scorched_Earth"] = 3 + math.random(1,2), 
		}, 
		room_bg=VOLCANO_TURF,
		background_room="BGWilds",
		colour={r=1,g=0,b=0.6,a=1},
	})

GLOBAL.require("map/level")
local LEVELTYPE = GLOBAL.LEVELTYPE

local function AddTaskTech(level)
	table.insert(level.tasks, "AncientDragonLand")
end

AddLevelPreInit("FOREST", AddTaskTech)

But nothing happens. I added the log file aswell. Other than that the mod is working perfectly. Any ideas on what I did wrong?

client_log.txt

Edited by Zardexrlz
Link to comment
Share on other sites

2 hours ago, Zardexrlz said:

So I'm trying to make a new biome. I looked into the API examples (http://forums.kleientertainment.com/files/file/203-api-examples/) and other mods that added something like what I want (like steam biome) but didnt understand completely what I had to do. Note that rock_obsidian and rock_charcoal are mod prefabs, so is the BURNT_TURF (as opposed to GROUND.TURF_NAME, its just a constant number, so I placed it directly). Here is the part of the code that I added:

But nothing happens. I added the log file aswell. Other than that the mod is working perfectly. Any ideas on what I did wrong?

The API you're using is old. It may not work with the current iteration of the world generation code in Don't Starve Together.

Link to comment
Share on other sites

@Serpens Did my best to make something like that to work but no success :\.

@Kzisor Yeah I didn't found anything newer than

and that didn't seem to work. Do you have anything else newer/that you think would be helpful?

@Lumina Yeah, if I ever manage to do it in a decent way I might try to make a tutorial. It opens some pretty awesome possibilities for modders.

Thank you all for the replies :D

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