Jump to content

different sizes for every biome


Recommended Posts

what do you think should be changed?
A task is added like this in the game:

Spoiler

AddTask("For a nice walk", {
		locks={LOCKS.BASIC_COMBAT,LOCKS.TIER2},
		keys_given={KEYS.POOP,KEYS.WOOL,KEYS.WOOD,KEYS.GRASS,KEYS.TIER2},
		room_choices={
			["BeefalowPlain"] = 1,
			["MandrakeHome"] = function() return 1 + math.random(SIZE_VARIATION) end,
			--["Wormhole"] = 1,
			["DeepForest"] = function() return 1 + math.random(SIZE_VARIATION) end, 
			["Forest"] = function() return math.random(SIZE_VARIATION) end, 
		},
		room_bg=GROUND.FOREST,
		background_room="BGForest",
		colour={r=1,g=0,b=1,a=1}
	}) 


AddTask("Badlands", {
		locks={LOCKS.ADVANCED_COMBAT,LOCKS.MONSTERS_DEFEATED,LOCKS.TIER4},
		keys_given={KEYS.HOUNDS,KEYS.TIER5, KEYS.ROCKS},
		room_choices={
			["DragonflyArena"] = 1,
			["Badlands"] = 2,
			["HoundyBadlands"] = function() return (math.random() < 0.33) and 2 or 1 end,
			["BarePlain"] = 1,
			["BuzzardyBadlands"] = function() return (math.random() < 0.5) and 2 or 1 end,
		},
		room_bg=GROUND.DIRT,
		background_room="BGBadlands",
		colour={r=1,g=0.6,b=1,a=1},
	})

 

that means that the area "For a nice walk" has BeefalowPlain, MandrakeHome, DeepForest and Forest (there are also 2 other tasks, that includes MandrakeHome), while all except BeefalowPlain have random size, depending on size_variation.

What should a mod now change?
Add + x to all four of them, to increase the "For a nice walk" area?
Or just increase those that have a value unequal 1 by default?

Or what?

Edited by Serpens
Link to comment
Share on other sites

3 hours ago, Serpens said:

what do you think should be changed?
A task is added like this in the game:

  Hide contents


AddTask("For a nice walk", {
		locks={LOCKS.BASIC_COMBAT,LOCKS.TIER2},
		keys_given={KEYS.POOP,KEYS.WOOL,KEYS.WOOD,KEYS.GRASS,KEYS.TIER2},
		room_choices={
			["BeefalowPlain"] = 1,
			["MandrakeHome"] = function() return 1 + math.random(SIZE_VARIATION) end,
			--["Wormhole"] = 1,
			["DeepForest"] = function() return 1 + math.random(SIZE_VARIATION) end, 
			["Forest"] = function() return math.random(SIZE_VARIATION) end, 
		},
		room_bg=GROUND.FOREST,
		background_room="BGForest",
		colour={r=1,g=0,b=1,a=1}
	}) 


AddTask("Badlands", {
		locks={LOCKS.ADVANCED_COMBAT,LOCKS.MONSTERS_DEFEATED,LOCKS.TIER4},
		keys_given={KEYS.HOUNDS,KEYS.TIER5, KEYS.ROCKS},
		room_choices={
			["DragonflyArena"] = 1,
			["Badlands"] = 2,
			["HoundyBadlands"] = function() return (math.random() < 0.33) and 2 or 1 end,
			["BarePlain"] = 1,
			["BuzzardyBadlands"] = function() return (math.random() < 0.5) and 2 or 1 end,
		},
		room_bg=GROUND.DIRT,
		background_room="BGBadlands",
		colour={r=1,g=0.6,b=1,a=1},
	})

 

that means that the area "For a nice walk" has BeefalowPlain, MandrakeHome, DeepForest and Forest (there are also 2 other tasks, that includes MandrakeHome), while all except BeefalowPlain have random size, depending on size_variation.

What should a mod now change?
Add + x to all four of them, to increase the "make a pick" area?
Or just increase those that have a value unequal 1 by default?

Or what?

well, if possible, the mod would have all new tasks, with only 1 biome (or room), so you could configure the size of that one biome directly.

Edited by Cherryzion
Link to comment
Share on other sites

2 minutes ago, Cherryzion said:

well, if possible, the mod would have all new tasks, with only 1 biome (or room), so you could configure the size of that one biome directly.

urgh.... I don't think it is a good idea to change the game that heavy...

If you plan to do such a massive change, it is better to create completely new map generation, which is a very big task.

Edited by Serpens
Link to comment
Share on other sites

1 minute ago, Serpens said:

If you plan to do such a massive change, it is better to create completely new map generation, which is a very big task.

if i can learn enough about it, im

up to the task.

which file was that code from?

Link to comment
Share on other sites

3 hours ago, Serpens said:

Add + x to all four of them, to increase the "make a pick" area?

That might actually work pretty well.

 

3 hours ago, Serpens said:

Or just increase those that have a value unequal 1 by default?

What do you mean by this though?

Link to comment
Share on other sites

1 hour ago, Cherryzion said:

That might actually work pretty well.

 

What do you mean by this though?

some of them are " = 1" , while others are "1 + random" or "random" or "1 or 2".
So it is difficult to simply add + x to all of them, cause this will result in total mess ;)

The code is from scripts/map/tasks forest.lua and DLCtasks.lua
I think you can modify them with AddTaskPreInit / AddRoomPreInit in modmain.
But if you want to replace them, you can also just override the forest.lua.

Edited by Serpens
Link to comment
Share on other sites

4 hours ago, Serpens said:

some of them are " = 1" , while others are "1 + random" or "random" or "1 or 2".
So it is difficult to simply add + x to all of them, cause this will result in total mess ;)

The code is from scripts/map/tasks forest.lua and DLCtasks.lua
I think you can modify them with AddTaskPreInit / AddRoomPreInit in modmain.
But if you want to replace them, you can also just override the forest.lua.

This guide makes it seem pretty easy. As long as you remember to add in all the necessary stuff, like staticlayouts and set pieces, it should be good. and it'd be making a custom level, like world preset, obviously.

Link to comment
Share on other sites

of course it is easy to code, if you just change size values.
But I think the result will be very poor balanced map, because of the problems of how big +x should be for all the different room_choices.

And if you do what you suggested first, only allowing one room_choice per task, it can't work without also making completly new tasks, whcih are then used for worldgeneration. And creating completely new tasks is much work. I still don't know exactly how those "keys"/"locks" work and other important stuff to make my own tasks.

So these are the two possibilites I see.
The first one is easy to code. But you have to carefully think about how much you increase what, so the result is still balanced.

Edited by Serpens
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...