1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-24 03:47:58 +02:00

v1.1.2.0.5

- biters produced per unit of pollution produced by vanilla methods now scales with difficulty
- fuel cost of major upgrades decreased
- coin reward from killing spitters doubled
This commit is contained in:
danielmartin0 2022-05-03 13:52:21 +01:00
parent a39d00c24c
commit 541c87f4b3
20 changed files with 93 additions and 90 deletions

View File

@ -63,18 +63,17 @@ function Public.Tick_actions(tickinterval)
local minute_cycle = {-- even seconds only
[2] = Public.eat_up_fraction_of_all_pollution_wrapped,
[4] = Public.try_rogue_attack,
[6] = Public.poke_script_groups,
[16] = Public.try_main_attack,
[20] = Public.poke_script_groups,
[4] = Public.poke_script_groups,
[6] = Public.try_rogue_attack,
[14] = Public.poke_script_groups,
[21] = Public.try_main_attack,
[24] = Public.tell_biters_near_silo_to_attack_it,
[28] = Public.eat_up_fraction_of_all_pollution_wrapped,
[30] = Public.try_secondary_attack,
[36] = Public.poke_script_groups,
[46] = Public.poke_script_groups,
[50] = Public.tell_biters_near_silo_to_attack_it,
[52] = Public.create_mail_delivery_biters,
[56] = Public.poke_script_groups,
[34] = Public.poke_script_groups,
[36] = Public.try_secondary_attack,
[44] = Public.poke_script_groups,
[48] = Public.eat_up_fraction_of_all_pollution_wrapped,
[54] = Public.poke_script_groups,
[56] = Public.create_mail_delivery_biters,
[58] = Public.poke_inactive_scripted_biters,
}
@ -150,7 +149,7 @@ function Public.try_main_attack()
local wave_size_multiplier = Public.wave_size_rng()
if wave_size_multiplier == 0 then
-- log('attack aborted by chance')
log('attack aborted by chance')
return nil
else
local group = Public.spawn_group_of_scripted_biters(2/3, 6, 180, wave_size_multiplier)
@ -169,7 +168,7 @@ function Public.try_secondary_attack()
local wave_size_multiplier = Public.wave_size_rng()
if wave_size_multiplier == 0 then
-- log('attack aborted by chance')
log('attack aborted by chance')
return nil
else
local surface = game.surfaces[Common.current_destination().surface_name]
@ -197,7 +196,7 @@ function Public.try_rogue_attack()
local wave_size_multiplier = Public.wave_size_rng()
if wave_size_multiplier == 0 then
-- log('attack aborted by chance')
log('attack aborted by chance')
return nil
else
local surface = game.surfaces[Common.current_destination().surface_name]

View File

@ -28,20 +28,16 @@ Public.EEI_stages = { --multipliers
function Public.scripted_biters_pollution_cost_multiplier()
-- return 1.3 --tuned
-- return 1.33
-- return 1.45 --We started getting too strong biter attacks once we staggered the waves more
-- caught a bug with the wave multiplier! going back to 1.3
return 1.3 * (1 + 1.3 / ((1 + (Common.overworldx()/40))^(1.5+Common.difficulty()))) -- the factor in brackets makes the early-game easier; in particular the first island, but on easier difficulties the next few islands as well
return 1.45 / Math.sloped(Common.difficulty_scale(), 1/5) * (1 + 1.2 / ((1 + (Common.overworldx()/40))^(1.5+Common.difficulty_scale()))) -- the complicated factor just makes the early-game easier; in particular the first island, but on easier difficulties the next few islands as well
end
function Public.cost_to_leave_multiplier()
-- return Math.sloped(Common.difficulty(), 7/10) --should scale with difficulty similar to, but slightly slower than, passive fuel depletion rate --Edit: not sure about this?
-- return Math.sloped(Common.difficulty(), 9/10)
-- return Math.sloped(Common.difficulty_scale(), 7/10) --should scale with difficulty similar to, but slightly slower than, passive fuel depletion rate --Edit: not sure about this?
-- return Math.sloped(Common.difficulty_scale(), 9/10)
-- extra factor now that the cost scales with time:
return Math.sloped(Common.difficulty(), 8/10)
return Math.sloped(Common.difficulty_scale(), 8/10)
end
Public.rocket_launch_coin_reward = 5000
@ -49,7 +45,7 @@ Public.rocket_launch_coin_reward = 5000
function Public.crew_scale()
local ret = Common.activecrewcount()/10
if ret == 0 then ret = 1/10 end --if all players are afk
if ret > 2.4 then ret = 2.4 end --we have to cap this because you need time to mine the ore... and big crews are a mess anyway. currently this value matches the 24 player cap
if ret > 2.4 then ret = 2.4 end --we have to cap this because you need time to mine the ore... and big crews are a mess anyway. currently this value matches the 24 player capacity setting
return ret
end
@ -75,7 +71,7 @@ function Public.silo_energy_needed_MJ()
local est_base_power = 2*Public.starting_boatEEIpower_production_MW() * (1 + 0.05 * (Common.overworldx()/40)^(5/3))
return est_secs * est_base_power
-- return est_secs * est_base_power * Math.sloped(Common.difficulty(), 1/3)
-- return est_secs * est_base_power * Math.sloped(Common.difficulty_scale(), 1/3)
end
function Public.silo_count()
@ -86,8 +82,8 @@ end
function Public.game_slowness_scale()
-- return 1 / Public.crew_scale()^(55/100) / Math.sloped(Common.difficulty(), 1/4) --changed crew_scale factor significantly to help smaller crews
return 1 / Public.crew_scale()^(50/100) / Math.sloped(Common.difficulty(), 1/4) --changed crew_scale factor significantly to help smaller crews
-- return 1 / Public.crew_scale()^(55/100) / Math.sloped(Common.difficulty_scale(), 1/4) --changed crew_scale factor significantly to help smaller crews
return 1 / Public.crew_scale()^(50/100) / Math.sloped(Common.difficulty_scale(), 1/4) --changed crew_scale factor significantly to help smaller crews
end
@ -121,7 +117,7 @@ function Public.fuel_depletion_rate_static()
local rate
if Common.overworldx() > 0 then
rate = 575 * (0 + (Common.overworldx()/40)^(9/10)) * Public.crew_scale()^(1/7) * Math.sloped(Common.difficulty(), 65/100) / T --most of the crewsize dependence is through T, i.e. the coal cost per island stays the same... but the extra player dependency accounts for the fact that even in compressed time, more players seem to get more resources per island
rate = 575 * (0 + (Common.overworldx()/40)^(9/10)) * Public.crew_scale()^(1/7) * Math.sloped(Common.difficulty_scale(), 65/100) / T --most of the crewsize dependence is through T, i.e. the coal cost per island stays the same... but the extra player dependency accounts for the fact that even in compressed time, more players seem to get more resources per island
else
rate = 0
end
@ -132,12 +128,12 @@ end
function Public.fuel_depletion_rate_sailing()
if (not Common.overworldx()) then return 0 end
return - 7.65 * (1 + 0.135 * (Common.overworldx()/40)^(100/100)) * Math.sloped(Common.difficulty(), 1/20) --shouldn't depend on difficulty much if at all, as available resources don't depend much on difficulty
return - 7.65 * (1 + 0.135 * (Common.overworldx()/40)^(100/100)) * Math.sloped(Common.difficulty_scale(), 1/20) --shouldn't depend on difficulty much if at all, as available resources don't depend much on difficulty
end
function Public.silo_total_pollution()
return (
365 * (Common.difficulty()^(1.2)) * Public.crew_scale()^(2/5) * (3.2 + 0.7 * (Common.overworldx()/40)^(1.6)) --shape of the curve with x is tuned
365 * (Common.difficulty_scale()^(1.2)) * Public.crew_scale()^(2/5) * (3.2 + 0.7 * (Common.overworldx()/40)^(1.6)) / Math.sloped(Common.difficulty_scale(), 1/5) --shape of the curve with x is tuned. Final factor of difficulty is to offset a change made to scripted_biters_pollution_cost_multiplier
)
end
@ -167,8 +163,8 @@ function Public.boat_passive_pollution_per_minute(time)
end
return boost * (
2.73 * Common.difficulty() * (Common.overworldx()/40)^(1.8) * (Public.crew_scale())^(55/100)
) -- There is no _explicit_ T dependence, but it depends almost the same way on the crew_scale as T does.
2.73 * (Common.difficulty_scale()^(1.1)) * (Common.overworldx()/40)^(1.8) * (Public.crew_scale())^(55/100)-- There is no _explicit_ T dependence, but it depends almost the same way on the crew_scale as T does.
) / Math.sloped(Common.difficulty_scale(), 1/5) --Final factor of difficulty is to offset a change made to scripted_biters_pollution_cost_multiplier
end
@ -179,7 +175,7 @@ function Public.base_evolution_leagues(leagues)
if overworldx == 0 then
evo = 0
else
evo = (0.0201 * (overworldx/40)) * Math.sloped(Common.difficulty(), 1/5)
evo = (0.0201 * (overworldx/40)) * Math.sloped(Common.difficulty_scale(), 1/5)
if overworldx > 600 and overworldx < 1000 then
evo = evo + (0.0025 * (overworldx - 600)/40)
@ -240,7 +236,7 @@ function Public.evolution_per_nest_kill() --it's important to have evo go up wit
return 0
end
-- return 0.003 * Common.difficulty()
-- return 0.003 * Common.difficulty_scale()
end
function Public.evolution_per_full_silo_charge()
@ -252,7 +248,7 @@ end
function Public.bonus_damage_to_humans()
local ret = 0.025
local diff = Common.difficulty()
local diff = Common.difficulty_scale()
if diff <= 0.7 then ret = 0 end
if diff >= 1.3 then ret = 0.050 end
return ret
@ -293,11 +289,11 @@ end
function Public.launch_fuel_reward()
return Math.ceil(1250 * (1 + 0.13 * (Common.overworldx()/40)^(9/10)))
-- return Math.ceil(1000 * (1 + 0.1 * (Common.overworldx()/40)^(8/10)) / Math.sloped(Common.difficulty(), 1/4))
-- return Math.ceil(1000 * (1 + 0.1 * (Common.overworldx()/40)^(8/10)) / Math.sloped(Common.difficulty_scale(), 1/4))
end
function Public.quest_reward_multiplier()
return (0.4 + 0.08 * (Common.overworldx()/40)^(8/10)) * Math.sloped(Common.difficulty(), 1/3) * (Public.crew_scale())^(1/8)
return (0.4 + 0.08 * (Common.overworldx()/40)^(8/10)) * Math.sloped(Common.difficulty_scale(), 1/3) * (Public.crew_scale())^(1/8)
end
function Public.island_richness_avg_multiplier()
@ -311,16 +307,16 @@ function Public.island_richness_avg_multiplier()
end
function Public.resource_quest_multiplier()
return (1.0 + 0.075 * (Common.overworldx()/40)^(8/10)) * Math.sloped(Common.difficulty(), 1/3) * (Public.crew_scale())^(1/8)
return (1.0 + 0.075 * (Common.overworldx()/40)^(8/10)) * Math.sloped(Common.difficulty_scale(), 1/3) * (Public.crew_scale())^(1/8)
end
function Public.apply_crew_buffs_per_x(force)
force.laboratory_productivity_bonus = Math.max(0, 7/100 * (Common.overworldx()/40) - (10*(Common.difficulty()) - 5)) --difficulty causes lab productivity boosts to start later
force.laboratory_productivity_bonus = Math.max(0, 7/100 * (Common.overworldx()/40) - (10*(Common.difficulty_scale()) - 5)) --difficulty causes lab productivity boosts to start later
end
function Public.class_cost()
return 9000
return 8000
-- return Math.ceil(10000 / (Public.crew_scale()*10/4)^(1/6))
end
@ -343,7 +339,7 @@ function Public.sandworm_evo_increase_per_spawn()
if _DEBUG then
return 1/100
else
return 1/100 * 1/8 * Math.sloped(Common.difficulty(), 3/5)
return 1/100 * 1/8 * Math.sloped(Common.difficulty_scale(), 3/5)
end
end
@ -352,7 +348,7 @@ function Public.kraken_kill_reward()
end
function Public.kraken_health()
return Math.ceil(3500 * Math.max(1, 1 + 0.08 * ((Common.overworldx()/40)^(13/10)-6)) * (Public.crew_scale()^(5/8)) * Math.sloped(Common.difficulty(), 3/4))
return Math.ceil(3500 * Math.max(1, 1 + 0.08 * ((Common.overworldx()/40)^(13/10)-6)) * (Public.crew_scale()^(5/8)) * Math.sloped(Common.difficulty_scale(), 3/4))
end
Public.kraken_regen_scale = 0.1 --starting off low
@ -395,7 +391,7 @@ function Public.barter_decay_parameter()
end
function Public.sandworm_speed()
return 6.4 * Math.sloped(Common.difficulty(), 1/5)
return 6.4 * Math.sloped(Common.difficulty_scale(), 1/5)
end
-- function Public.island_otherresources_prospect_decay_parameter()
@ -504,7 +500,7 @@ end
function Public.covered_entry_price_scale()
return 0.85 * (1 + 0.033 * (Common.overworldx()/40 - 1)) * ((1 + Public.crew_scale())^(1/3)) * Math.sloped(Common.difficulty(), 1/2) --whilst resource scales tend to be held fixed with crew size, we account slightly for the fact that more players tend to handcraft more
return 0.85 * (1 + 0.033 * (Common.overworldx()/40 - 1)) * ((1 + Public.crew_scale())^(1/3)) * Math.sloped(Common.difficulty_scale(), 1/2) --whilst resource scales tend to be held fixed with crew size, we account slightly for the fact that more players tend to handcraft more
end
-- if the prices are too high, players will accidentally throw too much in when they can't do it
@ -582,7 +578,7 @@ function Public.covered1_entry_price()
-- local overworldx = memory.overworldx or 0
local game_completion_progress = Math.max(Math.min(Math.sloped(Common.difficulty(),1/2) * Common.game_completion_progress(), 1), 0)
local game_completion_progress = Math.max(Math.min(Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress(), 1), 0)
local data = Public.covered1_entry_price_data()
local types, weights = {}, {}

View File

@ -47,9 +47,9 @@ Public.crowsnest_display_form = {
-- WARNING: The dock market pulls from these values, but the Crowsnest caption pulls data from main_shop_data_1. So don't change one without the other
Public.market_offer_form = {
[enum.EXTRA_HOLD] = {price = {{'coin', 6000}, {'coal', 500}}, offer = {type='nothing', effect_description='Purchase an extra hold.'}},
[enum.MORE_POWER] = {price = {{'coin', 12000}, {'coal', 2000}}, offer = {type='nothing', effect_description='Upgrade the ship\'s passive power generators.'}},
[enum.UNLOCK_MERCHANTS] = {price = {{'coin', 12000}, {'coal', 2000}}, offer = {type='nothing', effect_description='Unlock merchant ships on future islands.'}},
[enum.ROCKETS_FOR_SALE] = {price = {{'coin', 18000}, {'coal', 2000}}, offer = {type='nothing', effect_description='Unlock the sale of rockets at covered markets.'}},
[enum.MORE_POWER] = {price = {{'coin', 12000}, {'coal', 1500}}, offer = {type='nothing', effect_description='Upgrade the ship\'s passive power generators.'}},
[enum.UNLOCK_MERCHANTS] = {price = {{'coin', 12000}, {'coal', 1500}}, offer = {type='nothing', effect_description='Unlock merchant ships on future islands.'}},
[enum.ROCKETS_FOR_SALE] = {price = {{'coin', 18000}, {'coal', 1500}}, offer = {type='nothing', effect_description='Unlock the sale of rockets at covered markets.'}},
}
function Public.execute_upgade(upgrade_type, player)

View File

@ -68,7 +68,14 @@ function Public.oil_abstract_to_real(amount)
return Math.ceil(amount*3000)
end
function Public.difficulty() return Memory.get_crew_memory().difficulty end
function Public.difficulty_scale()
local memory = Memory.get_crew_memory()
if memory.overworldx > 0 then
return memory.difficulty
else
return 1
end
end
function Public.capacity() return Memory.get_crew_memory().capacity end
-- function Public.mode() return Memory.get_crew_memory().mode end
function Public.overworldx() return Memory.get_crew_memory().overworldx end

View File

@ -5,8 +5,8 @@ local _inspect = require 'utils.inspect'.inspect
local Public = {}
Public.scenario_id_name = 'pirates'
Public.version_string = '1.1.2.0.3'
Public.version_float = 1.1203
Public.version_string = '1.1.2.0.5'
Public.version_float = 1.1205
Public.blueprint_library_allowed = true
Public.blueprint_importing_allowed = true
@ -111,10 +111,10 @@ Public.difficulty_options = {
-- The difficulty values we currently offer
--For the value of Easy difficulty, we are pulled in two directions: We wish to make the game comfy to play for those who haven't played it, but we also wish to represent the game mechanics faithfully so that Normal is not a crazy distance away.
{value = 0.55, icon = 'item/firearm-magazine', text = 'Easy', associated_color = {r = 50, g = 255, b = 50}},
{value = 0.9, icon = 'item/piercing-rounds-magazine', text = 'Normal', associated_color = {r = 255, g = 255, b = 50}},
{value = 1.5, icon = 'item/uranium-rounds-magazine', text = 'Hard', associated_color = {r = 255, g = 50, b = 50}},
{value = 3, icon = 'item/atomic-bomb', text = 'Nightmare', associated_color = {r = 120, g = 35, b = 35}},
{value = 0.6, icon = 'item/firearm-magazine', text = 'Easy', associated_color = {r = 50, g = 255, b = 50}},
{value = 1.0, icon = 'item/piercing-rounds-magazine', text = 'Normal', associated_color = {r = 255, g = 255, b = 50}},
{value = 1.4, icon = 'item/uranium-rounds-magazine', text = 'Hard', associated_color = {r = 255, g = 50, b = 50}},
{value = 2.8, icon = 'item/atomic-bomb', text = 'Nightmare', associated_color = {r = 120, g = 35, b = 35}},
}
function Public.get_difficulty_name_from_value(difficulty_value)
-- Functions will reference this when given a difficulty value and want to present a difficulty name to the player; just make it consistent with the above
@ -190,7 +190,7 @@ Public.biterPollutionValues = {
-- ['small-spitter'] = 4
-- }
Public.max_extra_seconds_at_sea = 8 * 60
Public.max_extra_seconds_at_sea = 7 * 60
Public.loco_bp_1 = [[0eNqV0ttqwzAMBuB30bVTVufsVxljpKloBYkcbLdrCH73Oi6UMrxDLm3zf7KEFjgMF5wMsQO1APWaLaj3BSyduBvWOzdPCArI4QgCuBvX06B7PWpHVwQvgPiIN1B7L/4Mmo6Gl4j0HwKQHTnCR+F4mD/5Mh7QBDNVUsCkbYhoXusEJmsFzKCqAGtDgegej2/rj76J8il+aX1EzvozWpcwm10ZVbkrfcLJ/+u0vzvF07EuTOd0dlkc0k9NJpFyI1KnkGrrZJp0R/XWyUQnLEJcFfWykgKuaGxMyGZf1K2sC5nnTVl5fwdTR+VL]]

View File

@ -92,7 +92,7 @@ function Public.try_add_extra_time_at_sea(ticks)
if not memory.extra_time_at_sea then memory.extra_time_at_sea = 0 end
if memory.extra_time_at_sea > CoreData.max_extra_seconds_at_sea * 60 then return false end
if memory.extra_time_at_sea >= CoreData.max_extra_seconds_at_sea * 60 then return false end
-- if memory.boat and memory.boat.state and memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP then return false end

View File

@ -836,21 +836,21 @@ local function base_kill_rewards(event)
coin_amount = 1
end
elseif entity_name == 'small-spitter' then
if Math.random(3) == 1 then
if Math.random(3) <= 2 then
coin_amount = 1
end
elseif entity_name == 'medium-biter' then
coin_amount = 1
elseif entity_name == 'medium-spitter' then
coin_amount = 1
coin_amount = 2
elseif entity_name == 'big-biter' then
coin_amount = 2
elseif entity_name == 'big-spitter' then
coin_amount = 2
coin_amount = 4
elseif entity_name == 'behemoth-biter' then
coin_amount = 4
elseif entity_name == 'behemoth-spitter' then
coin_amount = 4
coin_amount = 8
end
end

View File

@ -210,7 +210,7 @@ function Public.wooden_chest_loot()
local num = 1
return Public.chest_loot(num,
Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * Common.game_completion_progress())) --enforce 0 to 1
Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress())) --enforce 0 to 1
)
end
@ -218,7 +218,7 @@ function Public.iron_chest_loot()
local num = 2
local loot = Public.chest_loot(num,
Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (5/100 + Common.game_completion_progress()))) --enforce 0 to 1
Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (5/100 + Common.game_completion_progress()))) --enforce 0 to 1
) --reward higher difficulties with better loot
loot[#loot + 1] = {name = 'coin', count = Math.random(1,1500)}
@ -229,7 +229,7 @@ function Public.covered_wooden_chest_loot()
local num = 2
local loot = Public.chest_loot(num,
Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (10/100 + Common.game_completion_progress()))) --enforce 0 to 1
Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (10/100 + Common.game_completion_progress()))) --enforce 0 to 1
) --reward higher difficulties with better loot
return loot
@ -296,7 +296,7 @@ function Public.chest_loot(number_of_items, game_completion_progress)
end
function Public.buried_treasure_loot()
local ret = Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.buried_treasure_loot_data_raw), 1, Math.sloped(Common.difficulty(),1/2) * Common.game_completion_progress_capped())
local ret = Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.buried_treasure_loot_data_raw), 1, Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress_capped())
if ret and ret[1] then return ret[1] end
end
@ -305,7 +305,7 @@ function Public.maze_camp_loot()
if Math.random(10) <= 7 then
return {Public.random_plates()}
else
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.chest_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (15/100 + Common.game_completion_progress()))))
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.chest_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (15/100 + Common.game_completion_progress()))))
end
end
@ -321,7 +321,7 @@ Public.maze_lab_loot_data_raw = {
}
function Public.maze_lab_loot()
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_lab_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (Common.game_completion_progress()))))
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_lab_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (Common.game_completion_progress()))))
end
Public.maze_treasure_data_raw = {
@ -391,7 +391,7 @@ function Public.maze_treasure_loot()
if Math.random(5) == 1 then
return {Public.random_plates(8)}
else
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_treasure_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (Common.game_completion_progress()))))
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_treasure_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (Common.game_completion_progress()))))
end
end

View File

@ -162,11 +162,11 @@ function Public.go_from_starting_dock_to_first_destination()
boat.EEI_stage = 1
Boats.update_EEIs(boat)
-- if Common.difficulty() == 1 then
-- if Common.difficulty_scale() == 1 then
-- Boats.upgrade_chests(boat, 'iron-chest')
-- Hold.upgrade_chests(1, 'iron-chest')
-- Crowsnest.upgrade_chests('iron-chest')
-- elseif Common.difficulty() > 1 then
-- elseif Common.difficulty_scale() > 1 then
-- Boats.upgrade_chests(boat, 'steel-chest')
-- Hold.upgrade_chests(1, 'steel-chest')
-- Crowsnest.upgrade_chests('steel-chest')
@ -538,7 +538,7 @@ function Public.go_from_currentdestination_to_sea()
if memory.overworldx == 0 and memory.boat then
local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty())
local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty_scale())
if difficulty_name == CoreData.difficulty_options[#CoreData.difficulty_options].text then
Boats.upgrade_chests(boat, 'steel-chest')
Hold.upgrade_chests(1, 'steel-chest')

View File

@ -51,7 +51,7 @@ function Public.quest_reward()
elseif rng <= 0.8 then
ret = {name = 'steel-plate', count = Math.ceil(380 * multiplier), display_sprite = '[item=steel-plate]', display_amount = string.format('%.0f', 380 * multiplier), chat_name = '[item=steel-plate]'}
elseif rng <= 0.9 then
ret = {name = 'raw-fish', count = Math.ceil(800 * (multiplier^(1/2))), display_sprite = '[item=raw-fish]', display_amount = string.format('%.1fk', Math.ceil(0.8 * (multiplier^(1/2)))), chat_name = '[item=raw-fish]'}
ret = {name = 'raw-fish', count = Math.ceil(450 * (multiplier^(1/2))), display_sprite = '[item=raw-fish]', display_amount = string.format('%.1fk', Math.ceil(0.45 * (multiplier^(1/2)))), chat_name = '[item=raw-fish]'}
else
ret = {name = 'piercing-rounds-magazine', count = Math.ceil(250 * multiplier), display_sprite = '[item=piercing-rounds-magazine]', display_amount = string.format('%.0f', Math.ceil(250 * multiplier)), chat_name = '[item=piercing-rounds-magazine]'}
end
@ -177,7 +177,7 @@ function Public.initialise_resourcecount_quest()
destination.dynamic_data.quest_params.initial_count = force.item_production_statistics.get_flow_count{name = generated_production_quest.item, input = true, precision_index = defines.flow_precision_index.one_thousand_hours, count = true}
end
local progressneeded_before_rounding = generated_production_quest.base_rate * Balance.resource_quest_multiplier() * Common.difficulty()
local progressneeded_before_rounding = generated_production_quest.base_rate * Balance.resource_quest_multiplier() * Common.difficulty_scale()
destination.dynamic_data.quest_progressneeded = Math.ceil(progressneeded_before_rounding/10)*10
@ -204,10 +204,10 @@ function Public.initialise_worms_quest()
1 + 9 * Math.slopefromto(count, 0, 20) + 10 * Math.slopefromto(count, 20, 70)
)
if Common.difficulty() < 1 then needed = Math.max(1, needed - 3) end
if Common.difficulty() > 1 then needed = Math.max(1, needed + 2) end
if Common.difficulty_scale() < 1 then needed = Math.max(1, needed - 3) end
if Common.difficulty_scale() > 1 then needed = Math.max(1, needed + 2) end
local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty())
local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty_scale())
if difficulty_name == CoreData.difficulty_options[1].text then
needed = Math.max(1, needed - 3)
elseif difficulty_name ~= CoreData.difficulty_options[2].text then

View File

@ -75,17 +75,17 @@ Public.main_shop_data_1 = {
[Upgrades.enum.EXTRA_HOLD] = {
tooltip = 'Upgrade the ship\'s hold.',
what_you_get_sprite_buttons = {['item/steel-chest'] = false},
base_cost = {coins = 12000, fuel = 2000},
base_cost = {coins = 12000, fuel = 1500},
},
[Upgrades.enum.UNLOCK_MERCHANTS] = {
tooltip = 'Unlock merchant ships.',
what_you_get_sprite_buttons = {['entity/market'] = false},
base_cost = {coins = 12000, fuel = 2000},
base_cost = {coins = 12000, fuel = 1500},
},
[Upgrades.enum.ROCKETS_FOR_SALE] = {
tooltip = 'Unlock rockets for sale at covered-up markets.',
what_you_get_sprite_buttons = {['item/rocket-launcher'] = false},
base_cost = {coins = 18000, fuel = 2000},
base_cost = {coins = 18000, fuel = 1500},
},
}

View File

@ -43,7 +43,7 @@ Public.offers_default = {
{price = {{'coin', 400}}, offer = {type = 'give-item', item = 'distractor-capsule', count = 3}},
{price = {{'coin', 500}}, offer = {type = 'give-item', item = 'slowdown-capsule', count = 5}},
{price = {{'coin', 500}}, offer = {type = 'give-item', item = 'poison-capsule', count = 5}},
{price = {{'coin', 500}}, offer = {type = 'give-item', item = 'gate', count = 10}},
{price = {{'coin', 600}}, offer = {type = 'give-item', item = 'gate', count = 10}},
{price = {{'coin', 100}}, offer = {type = 'give-item', item = 'storage-tank', count = 4}},
{price = {{'coin', 200}}, offer = {type = 'give-item', item = 'big-electric-pole', count = 8}},
{price = {{'coin', 200}}, offer = {type = 'give-item', item = 'steel-furnace', count = 4}},

View File

@ -45,6 +45,7 @@ Public.market_permanent_offers = {
{price = {{'coin', 3000}}, offer = {type = 'give-item', item = 'fast-loader', count = 1}},
{price = {{'coin', 6000}}, offer = {type = 'give-item', item = 'beacon', count = 2}},
{price = {{'coin', 3500}}, offer = {type = 'give-item', item = 'speed-module-2', count = 2}},
{price = {{'coin', 24000}}, offer = {type = 'give-item', item = 'artillery-targeting-remote', count = 1}},
}
-- cheap but one-off

View File

@ -96,16 +96,16 @@ Public.Data.surfacename_rendering_pos = {x = -0.5, y = -15}
Public.cabin_shop_data = {
{
price = {{'coal', 25}, {'coin', 300}},
offer = {type='give-item', item = 'artillery-shell', count = 6},
},
{
price = {{'electronic-circuit', 30}, {'coin', 800}},
offer = {type='give-item', item = 'rail-signal', count = 100},
},
{
price = {{'coal', 30}, {'coin', 800}},
offer = {type='give-item', item = 'artillery-shell', count = 8},
},
{
price = {{'stone-brick', 30}, {'coin', 800}},
price = {{'stone-brick', 30}, {'coin', 1000}},
offer = {type='give-item', item = 'uranium-238', count = 10},
},
{

View File

@ -187,7 +187,7 @@ function Public.create_hold_surface(nth)
end
if subtype == enum.SECONDARY then
local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty())
local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty_scale())
if difficulty_name == CoreData.difficulty_options[#CoreData.difficulty_options].text then
Public.upgrade_chests(nth, 'steel-chest')
elseif difficulty_name ~= CoreData.difficulty_options[1].text then

View File

@ -27,7 +27,7 @@ function Public.silo_setup_position(x_fractional_offset, x_absolute_offset)
local surface = game.surfaces[destination.surface_name]
local boatposition = memory.boat.position
local island_center = destination.static_params.islandcenter_position
local difficulty_offset = (1 - Common.difficulty()) * 20 or 0
local difficulty_offset = (1 - Common.difficulty_scale()) * 20 or 0
local silo_count = Balance.silo_count()

View File

@ -283,7 +283,7 @@ local function radioactive_tick()
local pollution = 0
local timer = destination.dynamic_data.timer
if timer and timer > 15 then
pollution = 4.9 * (6 * Common.difficulty()^(1.1) * (memory.overworldx/40)^(14/10) * (Balance.crew_scale())^(0.6)) / 3600 * tickinterval * (1 + (Common.difficulty()-1)*0.2 + 0.001 * timer)
pollution = 4.9 * (6 * Common.difficulty_scale()^(1.1) * (memory.overworldx/40)^(14/10) * (Balance.crew_scale())^(0.6)) / 3600 * tickinterval * (1 + (Common.difficulty_scale()-1)*0.2 + 0.001 * timer)
end
if pollution > 0 then

View File

@ -336,7 +336,7 @@ function Public.underground_worms_ai()
worms[#worms] = nil
end
local max_worms = Math.ceil(45 * Math.sloped(Common.difficulty(), 1/2))
local max_worms = Math.ceil(45 * Math.sloped(Common.difficulty_scale(), 1/2))
-- spawn worms
if game.tick % 90 == 0 then

View File

@ -169,7 +169,7 @@ function Public.destination_on_collide(destination)
local playercount = Common.activecrewcount()
local max_evo
local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty())
local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty_scale())
if difficulty_name == CoreData.difficulty_options[1].text then
if memory.overworldx/40 < 20 then
max_evo = 0.9 - (20 - memory.overworldx/40) * 1/100

View File

@ -1180,7 +1180,7 @@ function Public.silo_update(tickinterval)
memory.floating_pollution = memory.floating_pollution + pollution/2
game.surfaces[destination.surface_name].pollute(p, pollution/2)
if memory.overworldx >= 160 and dynamic_data.rocketsiloenergyconsumed >= 0.25 * dynamic_data.rocketsiloenergyneeded and (not dynamic_data.parrot_silo_warned) then
if memory.overworldx >= 80 and dynamic_data.rocketsiloenergyconsumed >= 0.25 * dynamic_data.rocketsiloenergyneeded and (not dynamic_data.parrot_silo_warned) then
dynamic_data.parrot_silo_warned = true
Common.parrot_speak(memory.force, 'The silo is attracting biters...')
elseif dynamic_data.rocketsiloenergyconsumed >= dynamic_data.rocketsiloenergyneeded and (not (silo.rocket_parts == 100)) and (dynamic_data.silocharged == false) and (not memory.game_lost) then