mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-24 03:47:58 +02:00
Merge pull request #259 from eric-anderson/dungeons_1.1.1
Dungeons 1.1.1 - Rebalance based on main Comfy server playthrough
This commit is contained in:
commit
ff3c33956d
@ -83,7 +83,7 @@ max_depth=You are on deepest level already!
|
||||
min_depth=You are on highest level already!
|
||||
only_on_spawn=You can change floors only on spawn.
|
||||
level_required=You need level __1__ for travelling to next floor!
|
||||
floor_size_required=You need to explore at least 60 rooms on this floor to access next floor!
|
||||
floor_size_required=You need to explore at least __1__ rooms on this floor to access next floor!
|
||||
travel_down=You have descended to deeper part of dungeon.
|
||||
travel_up=You have ascended to previous part of dungeon.
|
||||
first_visit=__1__ [lvl __2__] was first to reach Floor __3__!
|
||||
|
@ -82,7 +82,7 @@ max_depth=Вы уже на самом глубоком уровне!
|
||||
min_depth=Вы уже на самом верхнем уровне!
|
||||
only_on_spawn=Вы можете изменить этаж только на точке появления.
|
||||
level_required=Вам нужен __1__ уровень для перехода на следующий этаж!
|
||||
floor_size_required=Вам нужно исследовать не менее 60 комнат на этом этаже, чтобы попасть на следующий этаж!
|
||||
floor_size_required=Вам нужно исследовать не менее __1__ комнат на этом этаже, чтобы попасть на следующий этаж!
|
||||
travel_down=Вы спустились в более глубокую часть подземелья.
|
||||
travel_up=Вы поднялись в предыдущую часть подземелья.
|
||||
first_visit=__1__ [ур. __2__] впервые достиг __3__ этажа!
|
||||
|
@ -83,7 +83,7 @@ max_depth=You are on deepest level already!
|
||||
min_depth=You are on highest level already!
|
||||
only_on_spawn=You can change floors only on spawn.
|
||||
level_required=You need level __1__ for travelling to next floor!
|
||||
floor_size_required=You need to explore at least 60 rooms on this floor to access next floor!
|
||||
floor_size_required=You need to explore at least __1__ rooms on this floor to access next floor!
|
||||
travel_down=You have descended to deeper part of dungeon.
|
||||
travel_up=You have ascended to previous part of dungeon.
|
||||
first_visit=__1__ [lvl __2__] was first to reach Floor __3__!
|
||||
|
@ -9,11 +9,16 @@ local rainbow_tiles = {
|
||||
'purple-refined-concrete'
|
||||
}
|
||||
|
||||
-- balanced the same as end-game rocks from functions.lua:rocky_loot
|
||||
local ores = {
|
||||
'copper-ore',
|
||||
'copper-ore',
|
||||
'copper-ore',
|
||||
'iron-ore',
|
||||
'iron-ore',
|
||||
'iron-ore',
|
||||
'iron-ore',
|
||||
'coal',
|
||||
'coal',
|
||||
'stone'
|
||||
}
|
||||
@ -43,7 +48,7 @@ local function treasure(surface, room)
|
||||
surface.set_tiles({{name = rainbow_tiles[math_random(1, 2)], position = tile.position}}, true)
|
||||
|
||||
if math_random(1, 3) == 1 then
|
||||
surface.create_entity({name = ores[math_random(1, 6)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index) * scale_factor})
|
||||
surface.create_entity({name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index) * scale_factor})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
local Public = {}
|
||||
|
||||
local FLOOR_ZERO_ROCK_ORE = 40
|
||||
local ROCK_ORE_INCREASE_PER_FLOOR = 15
|
||||
local FLOOR_FOR_MAX_ROCK_ORE = 15
|
||||
local LOOT_EVOLUTION_SCALE_FACTOR = 0.9
|
||||
local LOOT_MULTIPLIER = 3000
|
||||
local EVOLUTION_PER_FLOOR = 0.06
|
||||
|
||||
local BiterRaffle = require 'functions.biter_raffle'
|
||||
local LootRaffle = require 'functions.loot_raffle'
|
||||
local Get_noise = require 'utils.get_noise'
|
||||
@ -20,23 +27,43 @@ LootRaffle.TweakItemWorth({
|
||||
['power-armor'] = 4096, -- floors 8-13 from research.lua
|
||||
['personal-laser-defense-equipment'] = 1536, -- floors 10-14 from research.lua
|
||||
['power-armor-mk2'] = 24576, -- floors 14-21 from research.lua
|
||||
-- reduce ammo/follower rates
|
||||
['firearm-magazine'] = 8,
|
||||
['piercing-rounds-magazine'] = 16,
|
||||
['uranium-rounds-magazine'] = 128,
|
||||
['shotgun-shell'] = 8,
|
||||
['piercing-shotgun-shell'] = 64,
|
||||
['flamethrower-ammo'] = 128,
|
||||
['rocket'] = 16,
|
||||
['explosive-rocket'] = 128,
|
||||
['grenade'] = 32,
|
||||
['cluster-grenade'] = 128,
|
||||
['poison-capsule'] = 64,
|
||||
['slowdown-capsule'] = 32,
|
||||
['defender-capsule'] = 96,
|
||||
['distractor-capsule'] = 512,
|
||||
['destroyer-capsule'] = 2048,
|
||||
})
|
||||
|
||||
function Public.get_dungeon_evolution_factor(surface_index)
|
||||
local dungeontable = DungeonsTable.get_dungeontable()
|
||||
local e = dungeontable.depth[surface_index] * 0.0005
|
||||
local e = dungeontable.depth[surface_index] * EVOLUTION_PER_FLOOR / 100
|
||||
if dungeontable.tiered then
|
||||
e = math.min(e, (surface_index - dungeontable.original_surface_index) * 0.05 + 0.05)
|
||||
e = math.min(e, (surface_index - dungeontable.original_surface_index) * EVOLUTION_PER_FLOOR + EVOLUTION_PER_FLOOR)
|
||||
end
|
||||
return e
|
||||
end
|
||||
|
||||
function Public.get_loot_evolution_factor(surface_index)
|
||||
return Public.get_dungeon_evolution_factor(surface_index) * LOOT_EVOLUTION_SCALE_FACTOR
|
||||
end
|
||||
|
||||
local function blacklist(surface_index, special)
|
||||
local dungeontable = DungeonsTable.get_dungeontable()
|
||||
local evolution_factor = Public.get_dungeon_evolution_factor(surface_index)
|
||||
local evolution_factor = Public.get_loot_evolution_factor(surface_index)
|
||||
if special then
|
||||
-- treasure rooms act as if they are 3 levels farther down.
|
||||
evolution_factor = evolution_factor + 0.15
|
||||
evolution_factor = evolution_factor + 3 * EVOLUTION_PER_FLOOR
|
||||
end
|
||||
local blacklists = {}
|
||||
--general unused items on dungeons
|
||||
@ -118,16 +145,19 @@ function Public.get_common_resource_amount(surface_index)
|
||||
amount = amount / 8
|
||||
local floor = surface_index - dungeontable.original_surface_index
|
||||
-- rocks stop going up here, so more than make up for it in resources on ground
|
||||
if floor > 19 then
|
||||
amount = amount * (1+(floor - 19)/5)
|
||||
if floor > FLOOR_FOR_MAX_ROCK_ORE then
|
||||
amount = amount * (1+(floor - FLOOR_FOR_MAX_ROCK_ORE)/10)
|
||||
end
|
||||
end
|
||||
return amount
|
||||
end
|
||||
|
||||
function Public.get_base_loot_value(surface_index)
|
||||
return Public.get_loot_evolution_factor(surface_index) * LOOT_MULTIPLIER
|
||||
end
|
||||
|
||||
local function get_loot_value(surface_index, multiplier)
|
||||
local value = Public.get_dungeon_evolution_factor(surface_index) * 4000 * multiplier
|
||||
return value
|
||||
return Public.get_base_loot_value(surface_index) * multiplier
|
||||
end
|
||||
|
||||
function Public.common_loot_crate(surface, position, special)
|
||||
@ -378,19 +408,10 @@ function Public.on_marked_for_deconstruction(event)
|
||||
end
|
||||
end
|
||||
|
||||
-- old function 0 - 250 floor 0; 250-500 floor 1; 500 floor 2+
|
||||
-- new function 25 - 75 floor 0; 50-100 floor 1; 75-125 floor 2; ...; 500 floor 19
|
||||
--
|
||||
-- 1000 science (all types) = 9822 coal, 13492 stone, 48736 copper, 63018 iron
|
||||
-- 20 27 98 127 max-stones
|
||||
|
||||
local function get_ore_amount(surface_index)
|
||||
local d = DungeonsTable.get_dungeontable()
|
||||
local floor = surface_index - d.original_surface_index
|
||||
local rooms = d.depth[surface_index] - floor * 100
|
||||
local floor = surface_index - DungeonsTable.get_dungeontable().original_surface_index
|
||||
|
||||
local min = 25 * (floor + 1)
|
||||
local amount = min + math.min(50, rooms / 4) -- 200 rooms = 50
|
||||
local amount = FLOOR_ZERO_ROCK_ORE + ROCK_ORE_INCREASE_PER_FLOOR * math.min(FLOOR_FOR_MAX_ROCK_ORE, floor)
|
||||
return math_random(math_floor(amount * 0.7), math_floor(amount * 1.3))
|
||||
end
|
||||
|
||||
@ -452,11 +473,12 @@ function Public.rocky_loot(event)
|
||||
local floor = player.surface.index - DungeonsTable.get_dungeontable().original_surface_index;
|
||||
if floor < 10 then
|
||||
-- early game science uses less copper and more iron/stone
|
||||
rock_mining = {'iron-ore', 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'stone', 'stone', 'coal', 'coal'}
|
||||
rock_mining = {'iron-ore', 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'stone', 'stone', 'coal', 'coal', 'coal'}
|
||||
else
|
||||
-- end game prod 3 base uses (for all-sciences) 1 stone : 2 coal : 3.5 copper : 4.5 iron
|
||||
-- this is a decent approximation which will still require some modest amount of mining setup
|
||||
rock_mining = {'iron-ore', 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'copper-ore', 'stone', 'coal', 'coal'}
|
||||
-- end game prod 3 base uses (for all-sciences) 1 stone : 2 coal : 3.5 copper : 4.5 iron
|
||||
-- this is a decent approximation which will still require some modest amount of mining setup
|
||||
-- coal gets 3 to compensate for coal-based power generation
|
||||
rock_mining = {'iron-ore', 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'copper-ore', 'stone', 'coal', 'coal', 'coal'}
|
||||
end
|
||||
local mined_loot = rock_mining[math_random(1, #rock_mining)]
|
||||
local text = '+' .. amount .. ' [item=' .. mined_loot .. ']'
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- Tuning factors
|
||||
local first_research_room_min = 40
|
||||
local first_research_room_min = 60
|
||||
local first_research_floor_scale = 1
|
||||
local last_research_room_max = 160
|
||||
local last_research_room_max = 300
|
||||
local last_research_floor_scale = 2.5
|
||||
|
||||
-- Early technologies are cheap and we have lots of excess resources for them. Slow down the early part of the
|
||||
@ -340,7 +340,7 @@ local all_research = {
|
||||
{ name = "follower-robot-count-7", min = 20, max = 25 },
|
||||
|
||||
{ name = "spidertron", min = 22, max = 25 },
|
||||
{ name = "atomic-bomb", min = 22, max = 25 },
|
||||
{ name = "atomic-bomb", min = 40, max = 50 },
|
||||
|
||||
-- -- ["landfill"] = { min = 1, max = 100 },
|
||||
-- -- ["land-mine"] = { min = 1, max = 100 },
|
||||
|
@ -4,6 +4,9 @@ require 'modules.mineable_wreckage_yields_scrap'
|
||||
require 'modules.satellite_score'
|
||||
require 'modules.charging_station'
|
||||
|
||||
-- Tuning constants
|
||||
local MIN_ROOMS_TO_DESCEND = 100
|
||||
|
||||
local MapInfo = require 'modules.map_info'
|
||||
local Room_generator = require 'functions.room_generator'
|
||||
local RPG = require 'modules.rpg.main'
|
||||
@ -137,7 +140,7 @@ local function draw_depth_gui()
|
||||
Functions.get_dungeon_evolution_factor(surface.index) * 100,
|
||||
forceshp[enemy_force.index] * 100,
|
||||
math_round(enemy_force.get_ammo_damage_modifier('melee') * 100 + 100, 1),
|
||||
Functions.get_dungeon_evolution_factor(surface.index) * 2000,
|
||||
Functions.get_base_loot_value(surface.index),
|
||||
dungeontable.treasures[surface.index],
|
||||
techs
|
||||
}
|
||||
@ -174,7 +177,7 @@ local function expand(surface, position)
|
||||
if not room then
|
||||
return
|
||||
end
|
||||
local treasure_room_one_in = 30 + 10 * dungeontable.treasures[surface.index]
|
||||
local treasure_room_one_in = 30 + 15 * dungeontable.treasures[surface.index]
|
||||
if dungeontable.surface_size[surface.index] >= 225 and math.random(1, treasure_room_one_in) == 1 and room.room_tiles[1] then
|
||||
log('Found treasure room, change was 1 in ' .. treasure_room_one_in)
|
||||
Biomes['treasure'](surface, room)
|
||||
@ -524,8 +527,9 @@ local function get_lowest_safe_floor(player)
|
||||
local level = rpg[player.index].level
|
||||
local sizes = dungeontable.surface_size
|
||||
local safe = dungeontable.original_surface_index
|
||||
local min_size = 200 + MIN_ROOMS_TO_DESCEND / 4
|
||||
for key, size in pairs(sizes) do
|
||||
if size > 215 and level >= (key + 1 - dungeontable.original_surface_index) * 10 and game.surfaces[key + 1] then
|
||||
if size >= min_size and level >= (key + 1 - dungeontable.original_surface_index) * 10 and game.surfaces[key + 1] then
|
||||
safe = key + 1
|
||||
else
|
||||
break
|
||||
@ -554,8 +558,8 @@ local function descend(player, button, shift)
|
||||
end
|
||||
local surface = game.surfaces[player.surface.index + 1]
|
||||
if not surface then
|
||||
if dungeontable.surface_size[player.surface.index] < 215 then
|
||||
player.print({'dungeons_tiered.floor_size_required'})
|
||||
if dungeontable.surface_size[player.surface.index] < 200 + MIN_ROOMS_TO_DESCEND/4 then
|
||||
player.print({'dungeons_tiered.floor_size_required', MIN_ROOMS_TO_DESCEND})
|
||||
return
|
||||
end
|
||||
surface = game.create_surface('dungeons_floor' .. player.surface.index - dungeontable.original_surface_index + 1, get_map_gen_settings())
|
||||
@ -847,6 +851,25 @@ Event.add(defines.events.on_player_changed_surface, on_player_changed_surface)
|
||||
Event.add(defines.events.on_player_respawned, on_player_respawned)
|
||||
|
||||
Changelog.SetVersions({
|
||||
{ ver = 'next', date = 'the future', desc = 'Make suggestions in the comfy #dungeons discord channel' },
|
||||
{ ver = '1.1.1', date = '2022-04-10', desc = [[
|
||||
Balancing patch
|
||||
* Evolution goes up faster with floor level 0.05/level -> 0.06/level; e.g. floor 20 now like floor 24 before
|
||||
* Now require 100 open rooms to descend
|
||||
* Treasure rooms
|
||||
* Occur less frequently as each subsequent one is found. was 1 in 30 + 10*Nfound now 1 in 30 + 15*Nfound
|
||||
* Rebalanced ores to match end-game science needs. Was very low on copper
|
||||
* Loot
|
||||
* Ammo/follower robot frequency ~0.5x previous
|
||||
* Loot is calculated at floor evolution * 0.9
|
||||
* Loot/box down by 0.75x
|
||||
* Rocks
|
||||
* Ore from rocks from 25 + 25*floor to 40 + 15*floor capped at floor 15
|
||||
* Rebalanced to include ~10% more coal to give coal for power
|
||||
* Require getting to room 100 before you can descend
|
||||
* Science from rooms 40-160+2.5*floor to 60-300+2.5*floor
|
||||
* Atomic bomb research moved to 40-50
|
||||
]]},
|
||||
{ ver = '1.1', date = '2022-03-13', desc = [[
|
||||
* All research is now found at random.
|
||||
* Red science floors 0-1
|
||||
|
Loading…
x
Reference in New Issue
Block a user