Hello, I'm new in the forum. I have been looking for how to add new ore, I looked through some other mods but the way they handle it is so different I don't know how to do it myself. I am making a mod that require adding new ore in the map and well its the major thing blocking me from making my mod ^^'
I'd like to know if someone has a solution for me so I can release my first mod!
How do you add new ore generation
- Solar's Wrath
- Burner Inserter
- Posts: 19
- Joined: Mon Mar 21, 2016 8:09 pm
- Contact:
Re: How do you add new ore generation
For my mod I did that things for add new ores:
autoplace-controls.lua
noise-layers.lua
items/ores.lua
entities/resources.lua
So u need basic ore item, resource entity, noise-level and autoplace-control for settings when you start new game
Settings for spawning in entity section, good luck!
autoplace-controls.lua
Code: Select all
{
type = "autoplace-control",
name = "tin-ore",
richness = true,
order = "b-f"
},
Code: Select all
{
type = "noise-layer",
name = "tin-ore"
},
Code: Select all
{
type = "item",
name = "tin-ore",
icon = "__base__/graphics/icons/copper-ore.png",
flags = {"goes-to-main-inventory"},
subgroup = "raw-resource",
order = "g[tin-ore]",
stack_size = 200
},
entities/resources.lua
Code: Select all
{
type = "resource",
name = "tin-ore",
icon = "__base__/graphics/icons/copper-ore.png",
flags = {"placeable-neutral"},
order="a-b-e",
minable =
{
hardness = 0.9,
mining_particle = "copper-ore-particle",
mining_time = 2,
result = "tin-ore"
},
collision_box = {{ -0.1, -0.1}, {0.1, 0.1}},
selection_box = {{ -0.5, -0.5}, {0.5, 0.5}},
autoplace =
{
control = "tin-ore",
sharpness = 1,
richness_multiplier = 13000,
richness_base = 350,
size_control_multiplier = 0.06,
peaks = {
{
influence = 0.2,
starting_area_weight_optimal = 0,
starting_area_weight_range = 0,
starting_area_weight_max_range = 2,
},
{
influence = 0.65,
noise_layer = "tin-ore",
noise_octaves_difference = -1.9,
noise_persistence = 0.3,
starting_area_weight_optimal = 0,
starting_area_weight_range = 0,
starting_area_weight_max_range = 2,
},
{
influence = 0.3,
starting_area_weight_optimal = 1,
starting_area_weight_range = 0,
starting_area_weight_max_range = 2,
},
{
influence = 0.55,
noise_layer = "tin-ore",
noise_octaves_difference = -2.3,
noise_persistence = 0.4,
starting_area_weight_optimal = 1,
starting_area_weight_range = 0,
starting_area_weight_max_range = 2,
},
{
influence = -0.2,
max_influence = 0,
noise_layer = "iron-ore",
noise_octaves_difference = -2.3,
noise_persistence = 0.45,
},
{
influence = -0.2,
max_influence = 0,
noise_layer = "coal",
noise_octaves_difference = -2.3,
noise_persistence = 0.45,
},
{
influence = -0.2,
max_influence = 0,
noise_layer = "stone",
noise_octaves_difference = -3,
noise_persistence = 0.45,
},
},
},
stage_counts = {1000, 600, 400, 200, 100, 50, 20, 1},
stages =
{
sheet =
{
filename = "__base__/graphics/entity/copper-ore/copper-ore.png",
priority = "extra-high",
width = 38,
height = 38,
frame_count = 4,
variation_count = 8
}
},
map_color = {r=0.215, g=0.215, b=0.215}
},
Settings for spawning in entity section, good luck!
- Solar's Wrath
- Burner Inserter
- Posts: 19
- Joined: Mon Mar 21, 2016 8:09 pm
- Contact:
Re: How do you add new ore generation
Thanks!! I'll try that
Edit: I can name items/ores.lua the way I want? same for entities/resources.lua?
Edit: I can name items/ores.lua the way I want? same for entities/resources.lua?