From 753c43615d57b09d9cc57e412bfaab77bb3cb75f Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Sun, 15 Sep 2024 17:57:57 +0100 Subject: [PATCH] revert island size increasese --- maps/pirates/overworld.lua | 2 +- .../surfaces/islands/horseshoe/data.lua | 8 +-- .../surfaces/islands/horseshoe/horseshoe.lua | 2 +- maps/pirates/surfaces/islands/hunt.lua | 2 +- .../surfaces/islands/standard/data.lua | 6 +- .../surfaces/islands/standard/standard.lua | 54 ++++++++--------- .../standard_variant/standard_variant.lua | 58 +++++++++---------- maps/pirates/surfaces/islands/swamp/data.lua | 6 +- 8 files changed, 63 insertions(+), 75 deletions(-) diff --git a/maps/pirates/overworld.lua b/maps/pirates/overworld.lua index 23af1544..8b614af7 100644 --- a/maps/pirates/overworld.lua +++ b/maps/pirates/overworld.lua @@ -70,7 +70,7 @@ local destinationScheme = { [15] = { DOCK, B, B }, [16] = { RADIOACTIVE, RADIOACTIVE, RADIOACTIVE }, [17] = { B, B, B }, - [18] = { C, C, C }, --first showing of robot frame cost + [18] = { C, C, C }, --first showing of robot frame cost [19] = { DOCK, B, B }, [20] = { WALKWAYS, WALKWAYS, WALKWAYS }, --rocket launch cost begins [21] = { SWAMP, RED_DESERT, STANDARD2 }, -- uniquely, this has a rocket launch cost, but still has an auto-undock timer diff --git a/maps/pirates/surfaces/islands/horseshoe/data.lua b/maps/pirates/surfaces/islands/horseshoe/data.lua index 45c30ea0..8eba0ae0 100644 --- a/maps/pirates/surfaces/islands/horseshoe/data.lua +++ b/maps/pirates/surfaces/islands/horseshoe/data.lua @@ -9,8 +9,8 @@ local Public = {} Public.display_names = { { 'pirates.location_displayname_horseshoe_1' }, { 'pirates.location_displayname_horseshoe_2' }, { 'pirates.location_displayname_horseshoe_3' } } -Public.terraingen_frame_width = 992 -Public.terraingen_frame_height = 992 +Public.terraingen_frame_width = 896 +Public.terraingen_frame_height = 896 Public.static_params_default = { starting_time_of_day = 0, daynightcycletype = 1, @@ -30,8 +30,8 @@ function Public.base_ores() } end -local rscale1 = 264 -local rscale2 = 230 +local rscale1 = 240 +local rscale2 = 210 local hscale = 0.1 Public.noiseparams = { radius1 = { diff --git a/maps/pirates/surfaces/islands/horseshoe/horseshoe.lua b/maps/pirates/surfaces/islands/horseshoe/horseshoe.lua index 7bef7591..3f4927a9 100644 --- a/maps/pirates/surfaces/islands/horseshoe/horseshoe.lua +++ b/maps/pirates/surfaces/islands/horseshoe/horseshoe.lua @@ -114,7 +114,7 @@ function Public.chunk_structures(args) return { placeable = noises.farness(p) > 0.36, -- spawners_indestructible = false, - spawners_indestructible = noises.farness(p) > 0.82, + spawners_indestructible = noises.farness(p) > 0.8, density_perchunk = 9 * Math.slopefromto(noises.mood(p), 0.12, -0.18) * Math.slopefromto(noises.farness(p), 0.36, 1) * args.biter_base_density_scale, } end diff --git a/maps/pirates/surfaces/islands/hunt.lua b/maps/pirates/surfaces/islands/hunt.lua index 710f3eb6..eaad45b0 100644 --- a/maps/pirates/surfaces/islands/hunt.lua +++ b/maps/pirates/surfaces/islands/hunt.lua @@ -101,7 +101,7 @@ function Public.mid_farness_position_1(args, points_to_avoid) if (not Utils.contains(CoreData.tiles_that_conflict_with_resource_layer, tile.name)) and (not Utils.contains(CoreData.edgemost_tile_names, tile.name)) then local p3 = { x = p2.x + args.static_params.terraingen_coordinates_offset.x, y = p2.y + args.static_params.terraingen_coordinates_offset.y } - if IslandsCommon.island_farness_1(args)(p3) > 0.1 and IslandsCommon.island_farness_1(args)(p3) < 0.7 then + if IslandsCommon.island_farness_1(args)(p3) > 0.1 and IslandsCommon.island_farness_1(args)(p3) < 0.75 then local allowed = true for _, pa in pairs(points_to_avoid) do if Math.distance({ x = pa.x, y = pa.y }, p2) < pa.r then diff --git a/maps/pirates/surfaces/islands/standard/data.lua b/maps/pirates/surfaces/islands/standard/data.lua index 9e49cdbb..db77da81 100644 --- a/maps/pirates/surfaces/islands/standard/data.lua +++ b/maps/pirates/surfaces/islands/standard/data.lua @@ -9,8 +9,8 @@ local Public = {} Public.display_names = { { 'pirates.location_displayname_standard_1' } } -Public.terraingen_frame_width = 1024 -Public.terraingen_frame_height = 1024 +Public.terraingen_frame_width = 896 +Public.terraingen_frame_height = 896 Public.static_params_default = { default_decoratives = true, base_starting_treasure = 1000, @@ -32,7 +32,7 @@ function Public.base_ores() } end -local rscale = 280 +local rscale = 250 local hscale = 0.1 Public.noiseparams = { radius = { diff --git a/maps/pirates/surfaces/islands/standard/standard.lua b/maps/pirates/surfaces/islands/standard/standard.lua index b64a9ace..67fc99a1 100644 --- a/maps/pirates/surfaces/islands/standard/standard.lua +++ b/maps/pirates/surfaces/islands/standard/standard.lua @@ -30,7 +30,6 @@ function Public.noises(args) return ret end - function Public.terrain(args) local noises = Public.noises(args) local p = args.p @@ -39,63 +38,62 @@ function Public.terrain(args) if IslandsCommon.place_water_tile(args) then return end if noises.height(p) < 0 then - args.tiles[#args.tiles + 1] = {name = 'water', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'water', position = args.p } return end if noises.height(p) < 0.05 then - args.tiles[#args.tiles + 1] = {name = 'sand-1', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'sand-1', position = args.p } if (not args.iconized_generation) and noises.farness(p) > 0.02 and noises.farness(p) < 0.6 and Math.random(500) == 1 then - args.specials[#args.specials + 1] = {name = 'buried-treasure', position = args.p} + args.specials[#args.specials + 1] = { name = 'buried-treasure', position = args.p } end elseif noises.height(p) < 0.12 then - args.tiles[#args.tiles + 1] = {name = 'sand-2', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'sand-2', position = args.p } else if noises.forest_abs_suppressed(p) > 0.3 and noises.rock(p) < 0.3 then - args.tiles[#args.tiles + 1] = {name = 'dry-dirt', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'dry-dirt', position = args.p } elseif noises.forest_abs_suppressed(p) > 0.15 and noises.rock(p) < 0.3 then - args.tiles[#args.tiles + 1] = {name = 'dirt-3', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'dirt-3', position = args.p } else - args.tiles[#args.tiles + 1] = {name = 'dirt-2', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'dirt-2', position = args.p } end end if noises.height(p) > 0.06 then if noises.forest_abs_suppressed(p) > 0.5 then - if (not args.iconized_generation) and noises.forest_abs_suppressed(p) < 0.75 and Math.random(1300) == 1 then - args.specials[#args.specials + 1] = {name = 'chest', position = args.p} + if (not args.iconized_generation) and noises.forest_abs_suppressed(p) < 0.75 and Math.random(1300) == 1 then + args.specials[#args.specials + 1] = { name = 'chest', position = args.p } else local forest_noise = noises.forest(p) local treedensity = 0.7 * Math.slopefromto(noises.forest_abs_suppressed(p), 0.5, 0.7) if forest_noise > 0 then if noises.rock(p) > 0 then - if Math.random(1,100) < treedensity*100 then args.entities[#args.entities + 1] = {name = 'tree-06', position = args.p, visible_on_overworld = true} end + if Math.random(1, 100) < treedensity * 100 then args.entities[#args.entities + 1] = { name = 'tree-06', position = args.p, visible_on_overworld = true } end else - if Math.random(1,100) < treedensity*100 then args.entities[#args.entities + 1] = {name = 'tree-06-brown', position = args.p} end + if Math.random(1, 100) < treedensity * 100 then args.entities[#args.entities + 1] = { name = 'tree-06-brown', position = args.p } end end elseif forest_noise < -1 then - if Math.random(1,100) < treedensity*100 then args.entities[#args.entities + 1] = {name = 'tree-03', position = args.p, visible_on_overworld = true} end + if Math.random(1, 100) < treedensity * 100 then args.entities[#args.entities + 1] = { name = 'tree-03', position = args.p, visible_on_overworld = true } end else - if Math.random(1,100) < treedensity*100 then args.entities[#args.entities + 1] = {name = 'tree-07', position = args.p} end + if Math.random(1, 100) < treedensity * 100 then args.entities[#args.entities + 1] = { name = 'tree-07', position = args.p } end end end end end if noises.forest_abs_suppressed(p) < 0.45 then - if noises.height(p) > 0.12 then if noises.rock_abs(p) > 0.22 then - local rockdensity = 1/600 * Math.slopefromto(noises.rock_abs(p), 0.22, 0.6) + 1/5 * Math.slopefromto(noises.rock_abs(p), 2.4, 2.6) + local rockdensity = 1 / 600 * Math.slopefromto(noises.rock_abs(p), 0.22, 0.6) + 1 / 5 * Math.slopefromto(noises.rock_abs(p), 2.4, 2.6) local rockrng = Math.random() if rockrng < rockdensity then args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p) elseif rockrng < rockdensity * 1.5 then - args.decoratives[#args.decoratives + 1] = {name = 'rock-medium', position = args.p} + args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p } elseif rockrng < rockdensity * 2 then - args.decoratives[#args.decoratives + 1] = {name = 'rock-small', position = args.p} + args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p } elseif rockrng < rockdensity * 2.5 then - args.decoratives[#args.decoratives + 1] = {name = 'rock-tiny', position = args.p} + args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p } end end end @@ -103,29 +101,27 @@ function Public.terrain(args) if noises.height(p) > 0.18 and noises.mood(p) > 0.6 then if noises.forest_abs(p) < 0.2 and noises.rock_abs(p) > 1.5 then - args.entities[#args.entities + 1] = {name = 'coal', position = args.p, amount = 7} + args.entities[#args.entities + 1] = { name = 'coal', position = args.p, amount = 7 } end end end - function Public.chunk_structures(args) - - local spec = function(p) - local noises = Public.noises{p = p, noise_generator = args.noise_generator, static_params = args.static_params, seed = args.seed} + local spec = function (p) + local noises = Public.noises { p = p, noise_generator = args.noise_generator, static_params = args.static_params, seed = args.seed } return { placeable = noises.farness(p) > 0.3, spawners_indestructible = noises.farness(p) > 0.7, -- spawners_indestructible = false, - density_perchunk = 30 * Math.slopefromto(noises.mood(p), 0.14, -0.1) * Math.slopefromto(noises.farness(p), 0.3, 1)^(1.5) * args.biter_base_density_scale, + density_perchunk = 30 * Math.slopefromto(noises.mood(p), 0.14, -0.1) * Math.slopefromto(noises.farness(p), 0.3, 1) ^ 1.5 * args.biter_base_density_scale, } end IslandsCommon.enemies_1(args, spec) - local spec2 = function(p) - local noises = Public.noises{p = p, noise_generator = args.noise_generator, static_params = args.static_params, seed = args.seed} + local spec2 = function (p) + local noises = Public.noises { p = p, noise_generator = args.noise_generator, static_params = args.static_params, seed = args.seed } return { -- placeable = noises.height(p) >= 0 and noises.forest_abs_suppressed(p) < 0.3 + Math.max(0, 0.2 - noises.height(p)), @@ -137,7 +133,6 @@ function Public.chunk_structures(args) IslandsCommon.assorted_structures_1(args, spec2) end - -- function Public.break_rock(surface, p, entity_name) -- -- return Ores.try_ore_spawn(surface, p, entity_name) -- end @@ -147,5 +142,4 @@ function Public.generate_silo_setup_position(points_to_avoid) return Hunt.silo_setup_position(points_to_avoid) end - -return Public \ No newline at end of file +return Public diff --git a/maps/pirates/surfaces/islands/standard_variant/standard_variant.lua b/maps/pirates/surfaces/islands/standard_variant/standard_variant.lua index 8962fe77..dbbbf382 100644 --- a/maps/pirates/surfaces/islands/standard_variant/standard_variant.lua +++ b/maps/pirates/surfaces/islands/standard_variant/standard_variant.lua @@ -30,7 +30,6 @@ function Public.noises(args) return ret end - function Public.terrain(args) local noises = Public.noises(args) local p = args.p @@ -39,67 +38,66 @@ function Public.terrain(args) if IslandsCommon.place_water_tile(args) then return end if noises.height(p) < 0 then - args.tiles[#args.tiles + 1] = {name = 'water', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'water', position = args.p } return end if noises.height(p) < 0.04 then - args.tiles[#args.tiles + 1] = {name = 'sand-1', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'sand-1', position = args.p } if (not args.iconized_generation) and noises.farness(p) > 0.02 and noises.farness(p) < 0.6 and Math.random(500) == 1 then - args.specials[#args.specials + 1] = {name = 'buried-treasure', position = args.p} + args.specials[#args.specials + 1] = { name = 'buried-treasure', position = args.p } end elseif noises.height(p) < 0.05 then - args.tiles[#args.tiles + 1] = {name = 'sand-2', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'sand-2', position = args.p } elseif noises.height(p) < 0.11 then - args.tiles[#args.tiles + 1] = {name = 'dry-dirt', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'dry-dirt', position = args.p } elseif noises.height(p) < 0.12 then - args.tiles[#args.tiles + 1] = {name = 'grass-4', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'grass-4', position = args.p } else if noises.forest_abs_suppressed(p) > 0.3 and noises.rock(p) < 0.3 then - args.tiles[#args.tiles + 1] = {name = 'dirt-7', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'dirt-7', position = args.p } elseif noises.forest_abs_suppressed(p) > 0.15 and noises.rock(p) < 0.3 then - args.tiles[#args.tiles + 1] = {name = 'grass-4', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'grass-4', position = args.p } else - args.tiles[#args.tiles + 1] = {name = 'grass-3', position = args.p} + args.tiles[#args.tiles + 1] = { name = 'grass-3', position = args.p } end end if noises.height(p) > 0.11 then if noises.forest_abs_suppressed(p) > 0.7 then - if (not args.iconized_generation) and noises.forest_abs_suppressed(p) < 1 and Math.random(700) == 1 then -- high amounts of this - args.specials[#args.specials + 1] = {name = 'chest', position = args.p} + if (not args.iconized_generation) and noises.forest_abs_suppressed(p) < 1 and Math.random(700) == 1 then -- high amounts of this + args.specials[#args.specials + 1] = { name = 'chest', position = args.p } else local forest_noise = noises.forest(p) local treedensity = 0.7 * Math.slopefromto(noises.forest_abs_suppressed(p), 0.61, 0.76) if forest_noise > 0 then if noises.rock(p) > 0.05 then - if Math.random(1,100) < treedensity*100 then args.entities[#args.entities + 1] = {name = 'tree-08-red', position = args.p, visible_on_overworld = true} end + if Math.random(1, 100) < treedensity * 100 then args.entities[#args.entities + 1] = { name = 'tree-08-red', position = args.p, visible_on_overworld = true } end elseif noises.rock(p) < -0.05 then - if Math.random(1,100) < treedensity*100 then args.entities[#args.entities + 1] = {name = 'tree-09-brown', position = args.p} end + if Math.random(1, 100) < treedensity * 100 then args.entities[#args.entities + 1] = { name = 'tree-09-brown', position = args.p } end end elseif forest_noise < -1.2 then - if Math.random(1,100) < treedensity*100 then args.entities[#args.entities + 1] = {name = 'tree-09', position = args.p, visible_on_overworld = true} end + if Math.random(1, 100) < treedensity * 100 then args.entities[#args.entities + 1] = { name = 'tree-09', position = args.p, visible_on_overworld = true } end else - if Math.random(1,100) < treedensity*100 then args.entities[#args.entities + 1] = {name = 'tree-02-red', position = args.p} end + if Math.random(1, 100) < treedensity * 100 then args.entities[#args.entities + 1] = { name = 'tree-02-red', position = args.p } end end end end end if noises.forest_abs_suppressed(p) < 0.45 then - if noises.height(p) > 0.12 then if noises.rock_abs(p) > 0.25 then - local rockdensity = 1/600 * Math.slopefromto(noises.rock_abs(p), 0.25, 0.6) + 1/5 * Math.slopefromto(noises.rock_abs(p), 2.4, 2.6) + local rockdensity = 1 / 600 * Math.slopefromto(noises.rock_abs(p), 0.25, 0.6) + 1 / 5 * Math.slopefromto(noises.rock_abs(p), 2.4, 2.6) local rockrng = Math.random() if rockrng < rockdensity then args.entities[#args.entities + 1] = IslandsCommon.random_rock_1(args.p) elseif rockrng < rockdensity * 1.5 then - args.decoratives[#args.decoratives + 1] = {name = 'rock-medium', position = args.p} + args.decoratives[#args.decoratives + 1] = { name = 'rock-medium', position = args.p } elseif rockrng < rockdensity * 2 then - args.decoratives[#args.decoratives + 1] = {name = 'rock-small', position = args.p} + args.decoratives[#args.decoratives + 1] = { name = 'rock-small', position = args.p } elseif rockrng < rockdensity * 2.5 then - args.decoratives[#args.decoratives + 1] = {name = 'rock-tiny', position = args.p} + args.decoratives[#args.decoratives + 1] = { name = 'rock-tiny', position = args.p } end end end @@ -107,29 +105,27 @@ function Public.terrain(args) if noises.height(p) > 0.18 and noises.mood(p) > 0.3 then if noises.forest_abs(p) < 0.2 and noises.rock_abs(p) > 1.5 then - args.entities[#args.entities + 1] = {name = 'coal', position = args.p, amount = 7} + args.entities[#args.entities + 1] = { name = 'coal', position = args.p, amount = 7 } end end end - function Public.chunk_structures(args) - - local spec = function(p) - local noises = Public.noises{p = p, noise_generator = args.noise_generator, static_params = args.static_params, seed = args.seed} + local spec = function (p) + local noises = Public.noises { p = p, noise_generator = args.noise_generator, static_params = args.static_params, seed = args.seed } return { placeable = noises.farness(p) > 0.3, -- spawners_indestructible = false, spawners_indestructible = noises.farness(p) > 0.7, - density_perchunk = 25 * Math.slopefromto(noises.mood(p), 0.16, -0.1) * Math.slopefromto(noises.farness(p), 0.3, 1)^2 * args.biter_base_density_scale, + density_perchunk = 25 * Math.slopefromto(noises.mood(p), 0.16, -0.1) * Math.slopefromto(noises.farness(p), 0.3, 1) ^ 2 * args.biter_base_density_scale, } end IslandsCommon.enemies_1(args, spec) - local spec2 = function(p) - local noises = Public.noises{p = p, noise_generator = args.noise_generator, static_params = args.static_params, seed = args.seed} + local spec2 = function (p) + local noises = Public.noises { p = p, noise_generator = args.noise_generator, static_params = args.static_params, seed = args.seed } return { -- placeable = noises.height(p) >= 0 and noises.forest_abs_suppressed(p) < 0.3 + Math.max(0, 0.2 - noises.height(p)), @@ -141,7 +137,6 @@ function Public.chunk_structures(args) IslandsCommon.assorted_structures_1(args, spec2) end - -- function Public.break_rock(surface, p, entity_name) -- -- return Ores.try_ore_spawn(surface, p, entity_name) -- end @@ -151,5 +146,4 @@ function Public.generate_silo_setup_position(points_to_avoid) return Hunt.silo_setup_position(points_to_avoid) end - -return Public \ No newline at end of file +return Public diff --git a/maps/pirates/surfaces/islands/swamp/data.lua b/maps/pirates/surfaces/islands/swamp/data.lua index 3e2bfab7..98a82cfe 100644 --- a/maps/pirates/surfaces/islands/swamp/data.lua +++ b/maps/pirates/surfaces/islands/swamp/data.lua @@ -9,8 +9,8 @@ local Public = {} Public.display_names = { { 'pirates.location_displayname_swamp_1' } } -Public.terraingen_frame_width = 480 -Public.terraingen_frame_height = 480 +Public.terraingen_frame_width = 400 +Public.terraingen_frame_height = 400 Public.static_params_default = { starting_time_of_day = 0.26, daynightcycletype = 1, @@ -32,7 +32,7 @@ function Public.base_ores() } end -local rscale = 185 +local rscale = 170 Public.noiseparams = { radius = { type = 'simplex_2d',