Page 1 of 1

Tile autoplacement

Posted: Fri Apr 25, 2014 5:28 pm
by Reygan
I have problem with tile autopacement. When i using water_autoplace_settings function from vanilla datafile my tileset is completely replaces all vanilla water. And dont matter, that set another temperature and humidity settings. I did that using green water as example.
Here is part of code:

Code: Select all

	{
		type = "tile",
		name = "deepice",
		collision_mask = {"water-tile", "resource-layer", "doodad-layer"},
		autoplace = water_autoplace_settings(250, {{{-15, 0.2}, {-25, 0}}}),
		layer = 45,
		variants =
		{
			main =
			{
				{
					picture = "__reygan__/graphics/terrain/deepice/deepice.png",
					count = 4,
					size = 1
				}
			},
			inner_corner =
			{
				picture = "__reygan__/graphics/terrain/deepice/deepice-inner-corner.png",
				count = 1
			},
			outer_corner =
			{
				picture = "__reygan__/graphics/terrain/deepice/deepice-outer-corner.png",
				count = 1
			},
			side =
			{
				picture = "__reygan__/graphics/terrain/deepice/deepice-side.png",
				count = 4
			}
		},
		walking_sound =
		{
			{
				filename = "__base__/sound/walking/dirt-02.wav",
				volume = 0.8
			},
			{
				filename = "__base__/sound/walking/dirt-03.wav",
				volume = 0.8
			},
			{
				filename = "__base__/sound/walking/dirt-04.wav",
				volume = 0.8
			}
		},
		allowed_neighbors = {"ice"},
		map_color = {r = 0.29, g = 0.48, b = 0.55}
	},
	{
		type = "tile",
		name = "ice",
		collision_mask = {"water-tile", "resource-layer", "doodad-layer"},
		autoplace = water_autoplace_settings(0, {{{-15, 0.2}, {-25, 0}}}),
		layer = 40,
		variants =
		{
			main =
			{
				{
					picture = "__reygan__/graphics/terrain/ice/ice.png",
					count = 4,
					size = 1
				}
			},
			inner_corner =
			{
				picture = "__reygan__/graphics/terrain/ice/ice-inner-corner.png",
				count = 1
			},
			outer_corner =
			{
				picture = "__reygan__/graphics/terrain/ice/ice-outer-corner.png",
				count = 1
			},
			side =
			{
				picture = "__reygan__/graphics/terrain/ice/ice-side.png",
				count = 4
			}
		},
		walking_sound =
		{
			{
				filename = "__base__/sound/walking/dirt-02.wav",
				volume = 0.8
			},
			{
				filename = "__base__/sound/walking/dirt-03.wav",
				volume = 0.8
			},
			{
				filename = "__base__/sound/walking/dirt-04.wav",
				volume = 0.8
			}
		},
		allowed_neighbors = {"grass-snowy"},
		map_color = {r = 0.29, g = 0.56, b = 0.62}
	},

Re: Tile autoplacement

Posted: Tue Apr 29, 2014 5:07 pm
by cube
Yes, this part doesn't work :-) That's why there is no green water in the generated world.
The reason I kept it this way is, that we can't allow green water to meet with the blue one (we don't have transitions between these two and with a stripe of grass it looks just ugly) and I didn't figure out any simple way to fix this. In 0.11, maybe? :-D

Re: Tile autoplacement

Posted: Tue Apr 29, 2014 5:07 pm
by cube
(the autoplacer works, problem is just with the water_autoplace_settings function)

Re: Tile autoplacement

Posted: Tue Apr 29, 2014 10:22 pm
by Reygan
cube wrote:(the autoplacer works, problem is just with the water_autoplace_settings function)
Ok, then, how i shoud set autoplace settings to make my ice spawn with green and blue water, not instead?

Re: Tile autoplacement

Posted: Wed Apr 30, 2014 12:03 pm
by cube
try using

Code: Select all

autoplace = water_autoplace_settings(250, {{{-15, 0.2}, {-25, 0}, 2}}),
This will double the importance of the temperature/moisture rectangle and cause the ice to overpower water in the specified conditions.

Also this approach will break as soon as we fix the water generation in base :).