Page 1 of 1

New Generatable Resources

Posted: Tue May 21, 2013 7:32 pm
by metzyn
I'm wanting to make a new resource able to be generated in the same fashion as coal, iron, copper, and stone. I started working on this but am running into trouble. Is there a way to actually do this?

Re: New Generatable Resources

Posted: Tue May 21, 2013 7:40 pm
by ficolas
I think that if you make a entity with type resource, like iron copper and coal are made, they will spawn.

Re: New Generatable Resources

Posted: Tue May 21, 2013 7:45 pm
by metzyn
I'm getting an error of "Error while loading prototype "quartz-ore-particle": No such node (filename)"

I tried to copy the existing resource prototypes as closely as possible. Am I missing something?

Code: Select all

data:extend(
{
	{
		type = "particle",
		name = "quartz-ore-particle",
		flags = {},
		life_time = 180,
		pictures = {
			{
				filename = "__solar-expansion__/graphics/entity/quartz/quartz-ore-particle-1.png",
				priority = "extra-high",
				frame_width = 5,
				frame_height = 5,
				frame_count = 1
			},
			{
				filename = "__solar-expansion__/graphics/entity/quartz/quartz-ore-particle-2.png",
				priority = "extra-high",
				frame_width = 7,
				frame_height = 5,
				frame_count = 1
			},
			{
				filename = "__solar-expansion__/graphics/entity/quartz/quartz-ore-particle-3.png",
				priority = "extra-high",
				frame_width = 6,
				frame_height = 7,
				frame_count = 1
			},
			{
				framename = "__solar-expansion__/graphics/entity/quartz/quartz-ore-particle-4.png",
				priority = "extra-high",
				frame_width = 9,
				frame_height = 8,
				frame_count = 1
			}
		},
		shadows = {
			{
				filename = "__solar-expansion__/graphics/entity/quartz/quartz-ore-particle-shadow-1.png",
				priority = "extra-high",
				frame_width = 5,
				frame_height = 5,
				frame_count = 1
			},
			{
				filename = "__solar-expansion__/graphics/entity/quartz/quartz-ore-particle-shadow-2.png",
				priority = "extra-high",
				frame_width = 7,
				frame_height = 5,
				frame_count = 1
			},
			{
				filename = "__solar-expansion__/graphics/entity/quartz/quartz-ore-particle-shadow-3.png",
				priority = "extra-high",
				frame_width = 6,
				frame_height = 7,
				frame_count = 1
			},
			{
				filename = "__solar-expansion__/graphics/entity/quartz/quartz-ore-particle-shadow-4.png",
				priority = "extra-high",
				frame_width = 9,
				frame_height = 8,
				frame_count = 1
			}
		}
	},
	{
		type = "resource",
		name = "quartz-ore",
		icon = "__solar-expansion__/graphics/icon/quartz-ore.png",
		flags = {"placeable-neutral"},
		minable = {
			hardness = 0.9,
			mining_particle = "quartz-ore-particle",
			mining_time = 2,
			result = "quartz-ore"
		},
		collision_box = {{-0.1, -0.1}, {0.1, 0.1}},
		selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
		default_generator_settings = {
			frequency = "rare",
			richness = "regular",
			size = "small"
		},
		stage_counts = {1000, 600, 400, 200, 100, 50, 20, 1},
		stages = {
			filename = "__solar-explansion__/graphics/entity/quartz/quartz-ore.png",
			priority = "extra-high",
			frame_width = 38,
			frame_height = 38,
			frame_count = 3,
			direction_count = 8
		}
	}
})

Re: New Generatable Resources

Posted: Tue May 21, 2013 7:51 pm
by ficolas
u typed framename instead of filename in one of em

Re: New Generatable Resources

Posted: Tue May 21, 2013 8:08 pm
by metzyn
ficolas wrote:u typed framename instead of filename in one of em
My mistakes are normally that of overlooking a stupid typo. Thank you!