New Generatable Resources

Place to get help with not working mods / modding interface.
User avatar
metzyn
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 19, 2013 10:49 pm
Contact:

New Generatable Resources

Post 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?
Factorio Modder
Solar Expansion

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: New Generatable Resources

Post by ficolas »

I think that if you make a entity with type resource, like iron copper and coal are made, they will spawn.

User avatar
metzyn
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 19, 2013 10:49 pm
Contact:

Re: New Generatable Resources

Post 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
		}
	}
})
Factorio Modder
Solar Expansion

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: New Generatable Resources

Post by ficolas »

u typed framename instead of filename in one of em

User avatar
metzyn
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 19, 2013 10:49 pm
Contact:

Re: New Generatable Resources

Post 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!
Factorio Modder
Solar Expansion

Post Reply

Return to “Modding help”