Skip to content

Commit

Permalink
Updated map descriptions and landfill tech from maps named in issue R…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayefuu committed Sep 11, 2019
1 parent ef89b1f commit 6d9791b
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 10 deletions.
43 changes: 42 additions & 1 deletion map_gen/maps/fractal_balls.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
local b = require 'map_gen.shared.builders'
local RS = require 'map_gen.shared.redmew_surface'
local MGSP = require 'resources.map_gen_settings'

local degrees = require "utils.math".degrees
local ScenarioInfo = require 'features.gui.info'
local Event = require 'utils.event'

RS.set_map_gen_settings(
{
MGSP.ore_oil_none, -- Comment this if you want to enable vanilla ore generation in some of the rings.
MGSP.cliff_none,
MGSP.water_none
}
)

ScenarioInfo.set_map_name('Fractal Balls')
ScenarioInfo.set_map_description(
[[
Circular groups of ore islands linked by paths arranged in a fractal,
expanding pattern.
]]
)
ScenarioInfo.add_map_extra_info(
[[
A space limited start leads players to explore larger and larger rings of
biter infested map.
Each ore patch upon its own island must be belted out to a production area
or loaded on to trains.
This map encourages use of trains similar to RSO due to the spread out nature of
the ores, with islands only accessible by bots encouraging the player to revisit
exhausted ore areas later in the game to extract more resources.
]]
)

ScenarioInfo.set_new_info(
[[
2019-09-11 - Jayefuu
- Updated map descriptions
- Disabled landfill to prevent cheating
- Added config example to disable vanilla ores. Balances map better if the rings aren't full of ore.
]]
)



local function value(base, mult)
return function(x, y)
return mult * (math.abs(x) + math.abs(y)) + base
Expand Down Expand Up @@ -160,4 +194,11 @@ map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_tile(map, false, 'water')
map = b.fish(map, 0.0025)

-- Disable landfill technology
local function on_init()
local player_force = game.forces.player
player_force.technologies['landfill'].enabled = false -- disable landfill
end
Event.on_init(on_init)

return map
25 changes: 25 additions & 0 deletions map_gen/maps/fruit_loops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local math = require 'utils.math'
local table = require 'utils.table'
local RS = require 'map_gen.shared.redmew_surface'
local MGSP = require 'resources.map_gen_settings'
local ScenarioInfo = require 'features.gui.info'

-- change these to change the pattern.
local seed1 = 17000
Expand All @@ -16,6 +17,30 @@ RS.set_map_gen_settings(
}
)

ScenarioInfo.set_map_name('Fruit Loops')
ScenarioInfo.set_map_description(
[[
Colourful fruity loop ore filled islands in a sea of..... not milk.
]]
)
ScenarioInfo.add_map_extra_info(
[[
Donut shaped islands populated with ores, stone, trees and.... WORMS!
A well balanced map which needs connecting of islands by landfill then careful
removal of worms to open up new islands for exploitation. The RedMew market and
wise spending of coins eases strategic expansion.
]]
)

ScenarioInfo.set_new_info(
[[
2019-09-11 - Jayefuu
- Updated map descriptions
]]
)


local function value(base, mult, pow)
return function(x, y)
local d_sq = x * x + y * y
Expand Down
20 changes: 20 additions & 0 deletions map_gen/maps/gears.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local pic = require "map_gen.data.presets.gears"

local RS = require 'map_gen.shared.redmew_surface'
local MGSP = require 'resources.map_gen_settings'
local ScenarioInfo = require 'features.gui.info'

RS.set_map_gen_settings(
{
Expand All @@ -11,6 +12,25 @@ RS.set_map_gen_settings(
}
)

ScenarioInfo.set_map_name('Gears')
ScenarioInfo.set_map_description(
[[
Large gear shaped islands
]]
)
ScenarioInfo.add_map_extra_info(
[[
Vanilla play on a gear shaped map.
]]
)

ScenarioInfo.set_new_info(
[[
2019-09-11 - Jayefuu
- Updated map descriptions
]]
)

pic = b.decompress(pic)

local shape = b.picture(pic)
Expand Down
9 changes: 9 additions & 0 deletions map_gen/maps/grid_bot_islands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ local ScenarioInfo = require 'features.gui.info'
ScenarioInfo.set_map_name('Grid Bot Islands')
ScenarioInfo.set_map_description('Grid islands with island-based ore mining and deathworld biter settings')
ScenarioInfo.set_map_extra_info('- Mine the islands with your bots\n- Buy more bots and chests from the market\n- Defend from the hordes of biters!!\n- Earn gold from killing worms and nests and mining trees and rocks')
ScenarioInfo.set_new_info(
[[
2019-09-09
- Added automatic disabling of landfill tech instead of manual disable by player
- Updated map description
]]
)

-- Modify the player starting items to kickstart island mining
local player_create = global.config.player_create
Expand Down Expand Up @@ -375,6 +382,8 @@ local function on_init()
local item_market_1 = surface.create_entity({name = 'market', position = {0, 0}})
item_market_1.destructible = false
Retailer.add_market('items', item_market_1)

player_force.technologies['landfill'].enabled = false -- disable landfill
end
Event.on_init(on_init)

Expand Down
35 changes: 32 additions & 3 deletions map_gen/maps/grid_islands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ local Random = require 'map_gen.shared.random'
local table = require 'utils.table'
local RS = require 'map_gen.shared.redmew_surface'
local MGSP = require 'resources.map_gen_settings'

local Event = require 'utils.event'
local degrees = require "utils.math".degrees
local ScenarioInfo = require 'features.gui.info'

local ore_seed1 = 1000
local ore_seed2 = ore_seed1 * 2
Expand All @@ -16,6 +17,29 @@ RS.set_map_gen_settings(
}
)

ScenarioInfo.set_map_name('Grid Islands')
ScenarioInfo.set_map_description(
[[
Large islands linked by multiple land bridges for rails
]]
)
ScenarioInfo.add_map_extra_info(
[[
- Custom ore generation
- Square, circle and diamond islands
- Islands linked by causeways
- Encourages rail use to transport materials for manufacture
]]
)

ScenarioInfo.set_new_info(
[[
2019-09-09
- Added automatic disabling of landfill tech instead of manual disable by player
- Updated map description
]]
)

local h_track = {
b.line_x(2),
b.translate(b.line_x(2), 0, -3),
Expand Down Expand Up @@ -169,9 +193,14 @@ local paths =

local sea = b.tile('deepwater')
sea = b.fish(sea, 0.0025)

map = b.any {map, paths, sea}

map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')

-- Disable landfill technology
local function on_init()
local player_force = game.forces.player
player_force.technologies['landfill'].enabled = false -- disable landfill
end
Event.on_init(on_init)

return map
42 changes: 36 additions & 6 deletions map_gen/maps/grid_islands_rotated.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
-- Map by grilledham, modified by Jayefuu
-- This variation on grid_islands.lua has 1) Greater island separation 2) 4 not 2 rail tracks 3) Whole map rotated 45 degrees

-- For best balance run the following commands after map generation:
-- /silent-command game.forces["player"].technologies["landfill"].enabled = false
-- /silent-command game.forces.player.character_running_speed_modifier = 1.5
-- /silent-command game.difficulty_settings.technology_price_multiplier=2

local b = require 'map_gen.shared.builders'
local Random = require 'map_gen.shared.random'
local math = require "utils.math"
local table = require 'utils.table'
local RS = require 'map_gen.shared.redmew_surface'
local MGSP = require 'resources.map_gen_settings'

local Event = require 'utils.event'
local degrees = math.rad
local ScenarioInfo = require 'features.gui.info'

local ore_seed1 = 1000
local ore_seed2 = ore_seed1 * 2
Expand All @@ -26,6 +22,30 @@ RS.set_map_gen_settings(
}
)

ScenarioInfo.set_map_name('Grid Islands Rotated')
ScenarioInfo.set_map_description(
[[
Large islands with diagonal rail bridges
]]
)
ScenarioInfo.add_map_extra_info(
[[
- Custom ore generation
- Square, circle and diamond islands
- Islands linked by causeways
- Encourages rail use to transport materials for manufacture
]]
)

ScenarioInfo.set_new_info(
[[
2019-09-09
- Added automatic disabling of landfill tech instead of manual disable by player
- Updated map description
]]
)


local track = {
b.translate(b.line_x(3), 0, -3),
b.translate(b.line_x(3), 0, 3),
Expand Down Expand Up @@ -177,4 +197,14 @@ map = b.any {map, paths, sea}
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.rotate(map,degrees(45))


-- Disable landfill technology
local function on_init()
local player_force = game.forces.player
player_force.technologies['landfill'].enabled = false -- disable landfill
end
Event.on_init(on_init)



return map

0 comments on commit 6d9791b

Please sign in to comment.