mirror of
https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git
synced 2025-02-03 13:01:24 +02:00
Polishing the scaling resources feature and changing the default settings for map gen too.
This commit is contained in:
parent
b9eb9ce043
commit
6864f0fd5a
@ -114,6 +114,12 @@ ENABLE_MODULAR_ARMOR_QUICK_START = true
|
||||
-- Read the README.md file for instructions.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
-- This scales resources so that even if you spawn "far away" from the center
|
||||
-- of the map, resources near to your spawn point scale so you aren't
|
||||
-- surrounded by 100M patches or something. This is useful depending on what
|
||||
-- map gen settings you pick.
|
||||
SCALE_RESOURCES_AROUND_SPAWNS = true
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Alien Options
|
||||
--------------------------------------------------------------------------------
|
||||
@ -221,7 +227,7 @@ OARC_CFG = {
|
||||
|
||||
-- Warning area has significantly reduced aliens
|
||||
-- This is the radius in tiles of warning area.
|
||||
warn_radius = CHUNK_SIZE*16,
|
||||
warn_radius = CHUNK_SIZE*12,
|
||||
|
||||
-- 1 : X (spawners alive : spawners destroyed) in this area
|
||||
warn_reduction = 20,
|
||||
|
@ -20,14 +20,14 @@
|
||||
|
||||
"autoplace_controls":
|
||||
{
|
||||
"coal" : {"frequency" : 0.20, "richness" : 0.50, "size" : 1.50},
|
||||
"copper-ore" : {"frequency" : 0.20, "richness" : 0.50, "size" : 1.50},
|
||||
"crude-oil" : {"frequency" : 0.20, "richness" : 0.50, "size" : 1.50},
|
||||
"enemy-base" : {"frequency" : 0.20, "richness" : 0.50, "size" : 0.50},
|
||||
"iron-ore" : {"frequency" : 0.20, "richness" : 0.50, "size" : 1.50},
|
||||
"stone" : {"frequency" : 0.20, "richness" : 0.50, "size" : 1.50},
|
||||
"trees" : {"frequency" : 0.50, "richness" : 1.00, "size" : 1.50},
|
||||
"uranium-ore" : {"frequency" : 0.20, "richness" : 0.50, "size" : 1.50}
|
||||
"coal" : {"frequency" : 0.20, "richness" : 8.00, "size" : 0.20},
|
||||
"iron-ore" : {"frequency" : 0.20, "richness" : 8.00, "size" : 0.20},
|
||||
"copper-ore" : {"frequency" : 0.20, "richness" : 8.00, "size" : 0.20},
|
||||
"stone" : {"frequency" : 0.20, "richness" : 8.00, "size" : 0.20},
|
||||
"uranium-ore" : {"frequency" : 0.20, "richness" : 8.00, "size" : 0.20},
|
||||
"crude-oil" : {"frequency" : 0.20, "richness" : 8.00, "size" : 0.20},
|
||||
"trees" : {"frequency" : 0.30, "richness" : 1.50, "size" : 1.00},
|
||||
"enemy-base" : {"frequency" : 0.40, "richness" : 0.50, "size" : 0.50},
|
||||
},
|
||||
|
||||
"cliff_settings":
|
||||
|
@ -3,7 +3,7 @@
|
||||
{
|
||||
"recipe_difficulty": 0,
|
||||
"technology_difficulty": 0,
|
||||
"technology_price_multiplier": 1,
|
||||
"technology_price_multiplier": 3,
|
||||
"research_queue_setting": "always"
|
||||
},
|
||||
"pollution":
|
||||
@ -11,30 +11,30 @@
|
||||
"enabled": true,
|
||||
"_comment_min_to_diffuse_1": "these are values for 60 ticks (1 simulated second)",
|
||||
"_comment_min_to_diffuse_2": "amount that is diffused to neighboring chunk",
|
||||
"diffusion_ratio":0.02,
|
||||
"min_to_diffuse":15,
|
||||
"ageing":1,
|
||||
"expected_max_per_chunk":7000,
|
||||
"min_to_show_per_chunk":700,
|
||||
"min_pollution_to_damage_trees": 3500,
|
||||
"pollution_with_max_forest_damage": 10000,
|
||||
"pollution_per_tree_damage": 2000,
|
||||
"pollution_restored_per_tree_damage": 500,
|
||||
"max_pollution_to_restore_trees": 1000,
|
||||
"enemy_attack_pollution_consumption_modifier": 1
|
||||
"diffusion_ratio": 0.02,
|
||||
"min_to_diffuse": 15,
|
||||
"ageing": 1,
|
||||
"expected_max_per_chunk": 150,
|
||||
"min_to_show_per_chunk": 50,
|
||||
"min_pollution_to_damage_trees": 60,
|
||||
"pollution_with_max_forest_damage": 150,
|
||||
"pollution_per_tree_damage": 50,
|
||||
"pollution_restored_per_tree_damage": 10,
|
||||
"max_pollution_to_restore_trees": 20,
|
||||
"enemy_attack_pollution_consumption_modifier": 0.5
|
||||
},
|
||||
"enemy_evolution":
|
||||
{
|
||||
"enabled": true,
|
||||
"time_factor": 0.000000,
|
||||
"destroy_factor": 0.003,
|
||||
"pollution_factor": 0.0000003
|
||||
"destroy_factor": 0.002,
|
||||
"pollution_factor": 0.0000002
|
||||
},
|
||||
"enemy_expansion":
|
||||
{
|
||||
"enabled": false,
|
||||
"min_base_spacing": 5,
|
||||
"max_expansion_distance": 20,
|
||||
"enabled": true,
|
||||
"min_base_spacing": 3,
|
||||
"max_expansion_distance": 10,
|
||||
"friendly_base_influence_radius": 2,
|
||||
"enemy_building_influence_radius": 2,
|
||||
"building_coefficient": 0.1,
|
||||
@ -44,8 +44,8 @@
|
||||
"max_colliding_tiles_coefficient": 0.9,
|
||||
"settler_group_min_size": 5,
|
||||
"settler_group_max_size": 20,
|
||||
"min_expansion_cooldown": 108000,
|
||||
"max_expansion_cooldown": 216000
|
||||
"min_expansion_cooldown": 14400,
|
||||
"max_expansion_cooldown": 108000
|
||||
},
|
||||
"unit_group":
|
||||
{
|
||||
|
@ -45,6 +45,7 @@ function InitOarcConfig()
|
||||
global.ocfg.enable_power_armor_start = ENABLE_POWER_ARMOR_QUICK_START
|
||||
global.ocfg.enable_modular_armor_start = ENABLE_MODULAR_ARMOR_QUICK_START
|
||||
global.ocfg.lock_goodies_rocket_launch = LOCK_GOODIES_UNTIL_ROCKET_LAUNCH
|
||||
global.ocfg.scale_resources_around_spawns = SCALE_RESOURCES_AROUND_SPAWNS
|
||||
|
||||
global.ocfg.modified_enemy_spawning = OARC_MODIFIED_ENEMY_SPAWNING
|
||||
global.ocfg.near_dist_start = NEAR_MIN_DIST
|
||||
|
@ -618,13 +618,13 @@ function CreateGameSurface()
|
||||
end
|
||||
|
||||
-- For easy local testing of map gen settings. Just set what you want and uncomment.
|
||||
-- nauvis_settings.terrain_segmentation = 0.5
|
||||
-- nauvis_settings.water = 1.2
|
||||
-- nauvis_settings.terrain_segmentation = 2
|
||||
-- nauvis_settings.water = 2.5
|
||||
-- nauvis_settings.starting_area = 0
|
||||
|
||||
-- local r_freq = 0.15
|
||||
-- local r_rich = 2.00
|
||||
-- local r_size = 0.08
|
||||
-- local r_freq = 0.20
|
||||
-- local r_rich = 10.00
|
||||
-- local r_size = 0.20
|
||||
-- nauvis_settings.autoplace_controls["coal"].frequency = r_freq
|
||||
-- nauvis_settings.autoplace_controls["coal"].richness = r_rich
|
||||
-- nauvis_settings.autoplace_controls["coal"].size = r_size
|
||||
@ -632,7 +632,7 @@ function CreateGameSurface()
|
||||
-- nauvis_settings.autoplace_controls["copper-ore"].richness = r_rich
|
||||
-- nauvis_settings.autoplace_controls["copper-ore"].size = r_size
|
||||
-- nauvis_settings.autoplace_controls["crude-oil"].frequency = r_freq
|
||||
-- nauvis_settings.autoplace_controls["crude-oil"].richness = r_rich*1.5
|
||||
-- nauvis_settings.autoplace_controls["crude-oil"].richness = r_rich
|
||||
-- nauvis_settings.autoplace_controls["crude-oil"].size = r_size
|
||||
-- nauvis_settings.autoplace_controls["iron-ore"].frequency = r_freq
|
||||
-- nauvis_settings.autoplace_controls["iron-ore"].richness = r_rich
|
||||
@ -640,26 +640,26 @@ function CreateGameSurface()
|
||||
-- nauvis_settings.autoplace_controls["stone"].frequency = r_freq
|
||||
-- nauvis_settings.autoplace_controls["stone"].richness = r_rich
|
||||
-- nauvis_settings.autoplace_controls["stone"].size = r_size
|
||||
-- nauvis_settings.autoplace_controls["uranium-ore"].frequency = 0.10
|
||||
-- nauvis_settings.autoplace_controls["uranium-ore"].frequency = r_freq*0.5
|
||||
-- nauvis_settings.autoplace_controls["uranium-ore"].richness = r_rich
|
||||
-- nauvis_settings.autoplace_controls["uranium-ore"].size = r_size
|
||||
|
||||
-- nauvis_settings.autoplace_controls["enemy-base"].frequency = 0.15
|
||||
-- nauvis_settings.autoplace_controls["enemy-base"].frequency = 0.40
|
||||
-- nauvis_settings.autoplace_controls["enemy-base"].richness = 0.50
|
||||
-- nauvis_settings.autoplace_controls["enemy-base"].size = 0.50
|
||||
|
||||
-- nauvis_settings.autoplace_controls["trees"].frequency = 0.50
|
||||
-- nauvis_settings.autoplace_controls["trees"].frequency = 0.30
|
||||
-- nauvis_settings.autoplace_controls["trees"].richness = 1.50
|
||||
-- nauvis_settings.autoplace_controls["trees"].size = 1.00
|
||||
|
||||
-- nauvis_settings.cliff_settings.cliff_elevation_0 = 15
|
||||
-- nauvis_settings.cliff_settings.cliff_elevation_interval = 35
|
||||
-- nauvis_settings.cliff_settings.cliff_elevation_0 = 10
|
||||
-- nauvis_settings.cliff_settings.cliff_elevation_interval = 50
|
||||
-- nauvis_settings.cliff_settings.richness = 10
|
||||
|
||||
-- nauvis_settings.property_expression_names["control-setting:aux:bias"] = "0.00"
|
||||
-- nauvis_settings.property_expression_names["control-setting:aux:frequency:multiplier"] = "1.00"
|
||||
-- nauvis_settings.property_expression_names["control-setting:moisture:bias"] = "0.50"
|
||||
-- nauvis_settings.property_expression_names["control-setting:moisture:frequency:multiplier"] = "1.00"
|
||||
-- nauvis_settings.property_expression_names["control-setting:aux:frequency:multiplier"] = "5.00"
|
||||
-- nauvis_settings.property_expression_names["control-setting:moisture:bias"] = "0.20"
|
||||
-- nauvis_settings.property_expression_names["control-setting:moisture:frequency:multiplier"] = "20"
|
||||
|
||||
-- Create new game surface
|
||||
local s = game.create_surface(GAME_SURFACE_NAME, nauvis_settings)
|
||||
|
@ -52,7 +52,9 @@ function SeparateSpawnsGenerateChunk(event)
|
||||
end
|
||||
|
||||
-- Downgrade resources near to spawns
|
||||
DowngradeResourcesDistanceBasedOnChunkGenerate(surface, chunkArea)
|
||||
if global.ocfg.scale_resources_around_spawns then
|
||||
DowngradeResourcesDistanceBasedOnChunkGenerate(surface, chunkArea)
|
||||
end
|
||||
|
||||
-- This handles chunk generation near player spawns
|
||||
-- If it is near a player spawn, it does a few things like make the area
|
||||
@ -68,7 +70,8 @@ function DowngradeResourcesDistanceBasedOnChunkGenerate(surface, chunkArea)
|
||||
if (closestSpawn == nil) then return end
|
||||
|
||||
local distance = getDistance(chunkArea.left_top, closestSpawn.pos)
|
||||
local modifier = (distance / (global.ocfg.spawn_config.safe_area.danger_radius*2))^2
|
||||
local modifier = (distance / (global.ocfg.spawn_config.safe_area.danger_radius))^2
|
||||
if modifier < 0.1 then modifier = 0.1 end
|
||||
if modifier > 1 then modifier = 1 end
|
||||
|
||||
for key, entity in pairs(surface.find_entities_filtered{area=chunkArea, type="resource"}) do
|
||||
|
Loading…
x
Reference in New Issue
Block a user