1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-17 20:58:13 +02:00

Tweaked quest market item count formula

Changes:
- Changed quest item count formula using new philosophy: start lower, scale slightly faster. This results in ~30% on average smaller requirement for items to open the market in early game. The reasoning: it was observed that new players rarely complete the market quest, since they don't make items as fast as needed. As well as when players progress, they can craft items much faster (due to speed modules)
This commit is contained in:
Piratux 2022-10-12 22:02:12 +03:00
parent 7ebe940cbb
commit 69a46dd3fc
2 changed files with 32 additions and 4 deletions

View File

@ -396,11 +396,35 @@ function Public.resource_quest_multiplier()
end
function Public.quest_market_entry_price_scale()
return 0.85 * (1 + 0.030 * (Common.overworldx()/40 - 1)) * ((1 + Public.crew_scale())^(1/3)) * Math.sloped(Common.difficulty_scale(), 1/2) --whilst the scenario philosophy says that resource scales tend to be independent of crew size, we account slightly for the fact that more players tend to handcraft more
-- Whilst the scenario philosophy says that resource scales tend to be independent of crew size, we account slightly for the fact that more players tend to handcraft more
-- Idea behind formula: small scale for early islands, but scale linearly ~3-4 times every 25 islands (scaling and starting scale is more aggressive for higher difficulties)
-- Returned value examples
-- Assuming parameters:
-- crew_size = 3
-- difficulty = easy (0.5)
-- @NOTE: assuming starting island is 0th island
-- x = 40 (1st island): 0.419
-- x = 200 (5th island): 0.582
-- x = 600 (15th island): 0.992
-- x = 1000 (25th island): 1.401
return (1 + 0.05 * (Common.overworldx()/40 - 1)) * ((1 + Public.crew_scale())^(1/3)) * Math.sloped(Common.difficulty_scale(), 1/2) - 0.4
end
function Public.quest_furnace_entry_price_scale()
return 0.85 * (1 + 0.010 * (Common.overworldx()/40 - 1)) * ((1 + Public.crew_scale())^(1/3)) * Math.sloped(Common.difficulty_scale(), 1/2) --slower increase with time, because this is more time-constrained than resource-constrained
-- Slower increase with time, because this is more time-constrained than resource-constrained
-- Idea behind formula: small scale for early islands, but scale linearly ~2-3 times every 25 islands (scaling and starting scale is more aggressive for higher difficulties)
-- Returned value examples
-- Assuming parameters:
-- crew_size = 3
-- difficulty = easy (0.5)
-- @NOTE: assuming starting island is 0th island
-- x = 40 (1st island): 0.419
-- x = 200 (5th island): 0.517
-- x = 600 (15th island): 0.762
-- x = 1000 (25th island): 1.008
return (1 + 0.03 * (Common.overworldx()/40 - 1)) * ((1 + Public.crew_scale())^(1/3)) * Math.sloped(Common.difficulty_scale(), 1/2) - 0.4
end
function Public.apply_crew_buffs_per_league(force, leagues_travelled)

View File

@ -15,7 +15,11 @@ local Public = {}
local window_name = 'crew'
local function get_selected_player_index(flow)
return tonumber(flow.members.body.members_listbox.get_item(flow.members.body.members_listbox.selected_index)[2])
if flow.members.body.members_listbox.selected_index ~= 0 then
return tonumber(flow.members.body.members_listbox.get_item(flow.members.body.members_listbox.selected_index)[2])
else
return nil
end
end
function Public.toggle_window(player)
@ -331,7 +335,7 @@ function Public.full_update(player)
flow.undock_tip.visible = Common.is_captain(player)
flow.captain.body.capn_pass.visible = other_player_selected
flow.captain.body.capn_plank.visible = flow.captain.body.capn_pass.visible
flow.captain.body.capn_plank.visible = other_player_selected
flow.captain.body.make_officer.visible = other_player_selected and (not Common.is_officer(selected_player_index))
flow.captain.body.unmake_officer.visible = other_player_selected and Common.is_officer(selected_player_index)