Tile autoplacement

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Reygan
Fast Inserter
Fast Inserter
Posts: 177
Joined: Tue Jan 28, 2014 8:42 pm
Contact:

Tile autoplacement

Post 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}
	},
Daniel V. Lenskiy

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Tile autoplacement

Post 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
I have no idea what I'm talking about.

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Tile autoplacement

Post by cube »

(the autoplacer works, problem is just with the water_autoplace_settings function)
I have no idea what I'm talking about.

User avatar
Reygan
Fast Inserter
Fast Inserter
Posts: 177
Joined: Tue Jan 28, 2014 8:42 pm
Contact:

Re: Tile autoplacement

Post 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?
Daniel V. Lenskiy

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Tile autoplacement

Post 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 :).
I have no idea what I'm talking about.

Post Reply

Return to “Modding help”