Jump to content

Recommended Posts

I'm trying to make an already existing structure to generate once per world in every shipwrecked world on meadow biome. I tried to already edit some modworldgenmain.lua files from other mods I'm using, but I only succeeded in crashing the game with "Don't Starve stopped responding"  message... so it's not going too well... I also sadly didn't find any tutorials on how to generate a structure on forum. Thanks for help :)

Okay... Seems like i figured out the way to make my code not crash the game, but it still doesn't generate, could someone please tell me what is wrong with my code? Probably something obvious, but I'm not too advanced in modding yet

 

local GROUND = GLOBAL.GROUND
local LOCKS = GLOBAL.LOCKS
local KEYS = GLOBAL.KEYS
AddRoom("glommer_statue", 
{
colour={r=0,g=0,b=0,a=0}, 
value = GROUND.MEADOW,
tags = {}, 
contents =  {
distributepercent = 1,
countstaticlayouts= glommer_statue = 1,
},                                    
distributeprefabs=
{
statueglommer = 1
},
}})
AddTask("GlommerStatue", {  
		locks=LOCKS.ISLAND3,
		keys_given={KEYS.ISLAND4},
		crosslink_factor=math.random(0,1),
		make_loop=math.random(0, 100) < 50,
		room_choices={
			["glommer_statue"] = 1,
		}, 
		room_bg=GROUND.MEADOW,
		colour={r=1,g=1,b=0,a=1}
	}

 

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