Skip to content

Instantly share code, notes, and snippets.

@Bilka2
Last active May 6, 2019 10:10
Show Gist options
  • Save Bilka2/aa88490c23124a6f214c02c73a368aa7 to your computer and use it in GitHub Desktop.
Save Bilka2/aa88490c23124a6f214c02c73a368aa7 to your computer and use it in GitHub Desktop.
Factorio version 0.16.51/0.17
-- data for 0.16.51, functionality in 0.17 explained in comment below
["big-worm-turret"] = {
autoplace = {
control = "enemy-base",
force = "enemy",
max_probability = 0.2,
order = "b[enemy]-b[worm]",
peaks = {
{
influence = 0,
richness_influence = 40,
tier_from_start_max_range = 68,
tier_from_start_optimal = 34,
tier_from_start_top_property_limit = 34
},
{
influence = -1,
starting_area_weight_max_range = 2,
starting_area_weight_optimal = 1,
starting_area_weight_range = 0
},
{
influence = 0.1,
noise_layer = "enemy-base",
noise_octaves_difference = -1.7,
noise_persistence = 0.5
},
{
influence = 0.2,
noise_layer = "enemy-base",
noise_octaves_difference = -1.7,
noise_persistence = 0.5,
tier_from_start_max_range = 68,
tier_from_start_optimal = 34,
tier_from_start_top_property_limit = 34
},
{
influence = 0.005
}
},
random_probability_penalty = 0.05,
richness_base = 0,
richness_multiplier = 1,
sharpness = 0.4
},
build_base_evolution_requirement = 0.5
},
["medium-worm-turret"] = {
autoplace = {
control = "enemy-base",
force = "enemy",
max_probability = 0.2,
order = "b[enemy]-b[worm]",
peaks = {
{
influence = 0,
richness_influence = 40,
tier_from_start_max_range = 52.399999999999999,
tier_from_start_optimal = 26.199999999999999,
tier_from_start_top_property_limit = 26.199999999999999
},
{
influence = -1,
starting_area_weight_max_range = 2,
starting_area_weight_optimal = 1,
starting_area_weight_range = 0
},
{
influence = 0.1,
noise_layer = "enemy-base",
noise_octaves_difference = -1.7,
noise_persistence = 0.5
},
{
influence = 0.2,
noise_layer = "enemy-base",
noise_octaves_difference = -1.7,
noise_persistence = 0.5,
tier_from_start_max_range = 52.399999999999999,
tier_from_start_optimal = 26.199999999999999,
tier_from_start_top_property_limit = 26.199999999999999
},
{
influence = 0.002
}
},
random_probability_penalty = 0.05,
richness_base = 0,
richness_multiplier = 1,
sharpness = 0.4
},
build_base_evolution_requirement = 0.3
},
["small-worm-turret"] = {
autoplace = {
control = "enemy-base",
force = "enemy",
max_probability = 0.2,
order = "b[enemy]-b[worm]",
peaks = {
{
influence = 0,
richness_influence = 40,
tier_from_start_max_range = 42,
tier_from_start_optimal = 21,
tier_from_start_top_property_limit = 21
},
{
influence = -1,
starting_area_weight_max_range = 2,
starting_area_weight_optimal = 1,
starting_area_weight_range = 0
},
{
influence = 0.1,
noise_layer = "enemy-base",
noise_octaves_difference = -1.7,
noise_persistence = 0.5
},
{
influence = 0.2,
noise_layer = "enemy-base",
noise_octaves_difference = -1.7,
noise_persistence = 0.5,
tier_from_start_max_range = 42,
tier_from_start_optimal = 21,
tier_from_start_top_property_limit = 21
},
{
influence = 0
}
},
random_probability_penalty = 0.05,
richness_base = 0,
richness_multiplier = 1,
sharpness = 0.4
}
}
@Bilka2
Copy link
Author

Bilka2 commented Dec 1, 2018

Q:
What are the rules governing how worms are spawned and upgraded during enemy expansion? What does richness determine?
A:

  • Enemy expansion randomly chooses an entity that has the enemy-base autoplace control and that matches the evolution requirement. No richness involved there.
    • Worms and spawners have the enemy base autoplace control.
    • build_base_evolution_requirement = 0.5 is the evolution requirement of the big worm, so it can only be created if the evolution is above 0.5. This property be found on medium and big worm.
  • Upgrading of existing structures like worms isn't a thing. Once a spawner or worm is placed, it's there to stay until the player kills it.

Q:
What about map generation? We don't see big worms sometimes in biter nests near the starting area. How is that controlled if not by richness?
A:
See how tier_from_start is different for the different worms? That right there controls it. That and the last influence on the small worm are the only differences of the autoplace between the worms, further enforcing that richness does not affect the worms.

@Bilka2
Copy link
Author

Bilka2 commented May 6, 2019

With 0.17, the above autoplace controls are outdated, but the general principle still stands:

  • Medium worms need an evolution factor of 0.3 to be spawned during expansion. Big worms need a factor of 0.5 and behemoth worms a factor of 0.9.
  • The new autoplace controls use a "distance_factor" for the spawning, this is 0 for the small worm, 2 for the medium worm, 5 for the big worm and 8 for the behemoth worm. Just like in 0.16, this is the only difference between the different tiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment