1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-25 21:29:06 +02:00

secret update - economy rescaling

This commit is contained in:
danielmartin0 2022-04-30 03:15:50 +01:00
parent 55fced9972
commit cba8f26b21
12 changed files with 69 additions and 60 deletions

View File

@ -127,7 +127,7 @@ end
function Public.fuel_depletion_rate_sailing()
if (not Common.overworldx()) then return 0 end
return - 7.35 * (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.55 * (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
end
function Public.silo_total_pollution()
@ -287,7 +287,7 @@ end
function Public.launch_fuel_reward()
return Math.ceil(1000 * (1 + 0.13 * (Common.overworldx()/40)^(9/10)))
return Math.ceil(1100 * (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))
end
@ -315,7 +315,7 @@ function Public.apply_crew_buffs_per_x(force)
end
function Public.class_cost()
return 9000
return 10000
-- return Math.ceil(10000 / (Public.crew_scale()*10/4)^(1/6))
end

View File

@ -46,10 +46,10 @@ 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', 5000}, {'coal', 500}}, offer = {type='nothing', effect_description='Purchase an extra hold.'}},
[enum.MORE_POWER] = {price = {{'coin', 10000}, {'coal', 2000}}, offer = {type='nothing', effect_description='Upgrade the ship\'s passive power generators.'}},
[enum.UNLOCK_MERCHANTS] = {price = {{'coin', 10000}, {'coal', 2000}}, offer = {type='nothing', effect_description='Unlock merchant ships on future islands.'}},
[enum.ROCKETS_FOR_SALE] = {price = {{'coin', 15000}, {'coal', 2000}}, offer = {type='nothing', effect_description='Unlock the sale of rockets at covered markets.'}},
[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.'}},
}
function Public.execute_upgade(upgrade_type, player)

View File

@ -248,11 +248,12 @@ end
function Public.give(player, stacks, spill_position, spill_surface)
function Public.give(player, stacks, spill_position, spill_surface, flying_text_position)
-- stack elements of form {name = '', count = '', color = {r = , g = , b = }}
-- to just spill on the ground, pass player and nill and give a position and surface directly
spill_position = spill_position or player.position
spill_surface = spill_surface or player.surface
flying_text_position = flying_text_position or spill_position
local text1 = ''
local text2 = ''
@ -354,9 +355,9 @@ function Public.give(player, stacks, spill_position, spill_surface)
if #stacks2 > 1 then
text2 = '(' .. text2 .. ')'
end
Public.flying_text(spill_surface, spill_position, text1 .. ' [font=count-font]' .. text2 .. '[/font]')
Public.flying_text(spill_surface, flying_text_position, text1 .. ' [font=count-font]' .. text2 .. '[/font]')
else
Public.flying_text(spill_surface, spill_position, text1)
Public.flying_text(spill_surface, flying_text_position, text1)
end
end

View File

@ -817,36 +817,40 @@ local function base_kill_rewards(event)
if entity_name == 'small-worm-turret' then
iron_amount = 5
coin_amount = 40
coin_amount = 50
elseif entity_name == 'medium-worm-turret' then
iron_amount = 20
coin_amount = 70
coin_amount = 80
elseif entity_name == 'biter-spawner' or entity_name == 'spitter-spawner' then
iron_amount = 30
coin_amount = 70
coin_amount = 80
elseif entity_name == 'big-worm-turret' then
iron_amount = 30
coin_amount = 100
coin_amount = 120
elseif entity_name == 'behemoth-worm-turret' then
iron_amount = 50
coin_amount = 200
coin_amount = 240
elseif memory.overworldx > 0 then
if entity_name == 'small-biter' then
coin_amount = 1
if Math.random(3) == 1 then
coin_amount = 1
end
elseif entity_name == 'small-spitter' then
coin_amount = 1
if Math.random(3) == 1 then
coin_amount = 1
end
elseif entity_name == 'medium-biter' then
coin_amount = 2
coin_amount = 1
elseif entity_name == 'medium-spitter' then
coin_amount = 2
coin_amount = 1
elseif entity_name == 'big-biter' then
coin_amount = 3
coin_amount = 2
elseif entity_name == 'big-spitter' then
coin_amount = 3
coin_amount = 2
elseif entity_name == 'behemoth-biter' then
coin_amount = 5
coin_amount = 4
elseif entity_name == 'behemoth-spitter' then
coin_amount = 5
coin_amount = 4
end
end
@ -859,10 +863,10 @@ local function base_kill_rewards(event)
end
if revenge_target then
Common.give(event.cause.player, stack)
Common.give(revenge_target.player, stack, revenge_target.player.position, entity.surface, entity.position)
else
if event.cause.position then
Common.give(nil, stack, event.cause.position, entity.surface)
Common.give(nil, stack, event.cause.position, entity.surface, entity.position)
else
Common.give(nil, stack, entity.position, entity.surface)
end

View File

@ -41,7 +41,7 @@ Public.buried_treasure_loot_data_raw = {
}
Public.chest_loot_data_raw = {
{80, 0, 1, false, 'coin', 250, 400},
{80, 0, 1, false, 'coin', 250, 500},
{30, 0, 1, false, 'rail-signal', 25, 110},
{1, 0.2, 1, false, 'electric-engine-unit', 1, 2},
{3, 0, 1, false, 'small-lamp', 4, 16},

View File

@ -647,7 +647,7 @@ function Public.try_overworld_move_v2(vector) --islands stay, crowsnest moves
local player_index = player.index
if memory.classes_table and memory.classes_table[player_index] and memory.classes_table[player_index] == Classes.enum.MERCHANT then
Common.flying_text_small(player.surface, player.position, '[color=0.97,0.9,0.2]+[/color]')
Common.give_items_to_crew{{name = 'coin', count = 40 * vector.x}}
Common.give_items_to_crew{{name = 'coin', count = 50 * vector.x}}
end
end
end

View File

@ -46,8 +46,12 @@ function Public.quest_reward()
ret = {name = 'copper-plate', count = Math.ceil(2000 * multiplier), display_sprite = '[item=copper-plate]', display_amount = string.format('%.1fk', 2 * multiplier), chat_name = '[item=copper-plate]'}
elseif rng <= 0.7 then
ret = {name = 'solid-fuel', count = Math.ceil(450 * multiplier), display_sprite = '[item=solid-fuel]', display_amount = string.format('%.0f', Math.ceil(450 * multiplier)), chat_name = '[item=solid-fuel]'}
elseif rng <= 0.71 then
ret = {name = 'modular-armor', count = 1, display_sprite = '[item=modular-armor]', display_amount = '1', chat_name = '[item=modular-armor]'}
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 = 'coin', count = Math.ceil(6000 * (multiplier^(1/2))), display_sprite = '[item=coin]', display_amount = string.format('%.1fk', Math.ceil(6 * (multiplier^(1/2)))), chat_name = 'doubloons'}
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]'}
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

View File

@ -77,7 +77,7 @@ Public.explanation = {
[enum.FISHERMAN] = 'They fish at greater distance.',
[enum.SCOUT] = 'They are faster, but frail and deal less damage.',
[enum.SAMURAI] = 'They are tough, and *with no weapon equipped* fight well by melee, but poorly otherwise.',
[enum.MERCHANT] = 'They generate 40 doubloons per league.',
[enum.MERCHANT] = 'They generate 50 doubloons per league.',
[enum.SHORESMAN] = 'They move slightly faster and generate ore for the cabin whilst offboard, but move slower onboard.',
[enum.BOATSWAIN] = 'They move faster and generate ore for the cabin whilst below deck, but move slower offboard.',
[enum.PROSPECTOR] = 'They find more resources when handmining ore.',

View File

@ -70,22 +70,22 @@ Public.main_shop_data_1 = {
[Upgrades.enum.MORE_POWER] = {
tooltip = 'Upgrade the ship\'s power.',
what_you_get_sprite_buttons = {['utility/status_working'] = false},
base_cost = {coins = 5000, fuel = 500},
base_cost = {coins = 6000, fuel = 500},
},
[Upgrades.enum.EXTRA_HOLD] = {
tooltip = 'Upgrade the ship\'s hold.',
what_you_get_sprite_buttons = {['item/steel-chest'] = false},
base_cost = {coins = 10000, fuel = 2000},
base_cost = {coins = 12000, fuel = 2000},
},
[Upgrades.enum.UNLOCK_MERCHANTS] = {
tooltip = 'Unlock merchant ships.',
what_you_get_sprite_buttons = {['entity/market'] = false},
base_cost = {coins = 10000, fuel = 2000},
base_cost = {coins = 12000, fuel = 2000},
},
[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 = 15000, fuel = 2000},
base_cost = {coins = 18000, fuel = 2000},
},
}

View File

@ -1,7 +1,7 @@
local Memory = require 'maps.pirates.memory'
-- local Memory = require 'maps.pirates.memory'
-- local Roles = require 'maps.pirates.roles.roles'
local CoreData = require 'maps.pirates.coredata'
-- local CoreData = require 'maps.pirates.coredata'
local Classes = require 'maps.pirates.roles.classes'
-- local Crew = require 'maps.pirates.crew'
-- local Boats = require 'maps.pirates.structures.boats.boats'
@ -33,38 +33,38 @@ Public.market_barters = {
{price = {{'raw-fish', 50}}, offer = {type = 'give-item', item = 'copper-plate', count = 750}},
{price = {{'raw-fish', 50}}, offer = {type = 'give-item', item = 'steel-plate', count = 125}},
{price = {{'wood', 200}}, offer = {type = 'give-item', item = 'coin', count = 250}},
{price = {{'wood', 200}}, offer = {type = 'give-item', item = 'coin', count = 300}},
--TODO: add more complex trades
}
Public.market_permanent_offers = {
{price = {{'pistol', 1}}, offer = {type = 'give-item', item = 'coin', count = 450}},
{price = {{'coin', 2400}}, offer = {type = 'give-item', item = 'iron-ore', count = 800}},
{price = {{'coin', 2400}}, offer = {type = 'give-item', item = 'copper-ore', count = 800}},
{price = {{'coin', 3000}}, offer = {type = 'give-item', item = 'crude-oil-barrel', count = 100}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'fast-loader', count = 1}},
{price = {{'coin', 5000}}, offer = {type = 'give-item', item = 'beacon', count = 2}},
{price = {{'coin', 2800}}, offer = {type = 'give-item', item = 'speed-module-2', count = 2}},
{price = {{'coin', 3000}}, offer = {type = 'give-item', item = 'iron-ore', count = 800}},
{price = {{'coin', 3000}}, offer = {type = 'give-item', item = 'copper-ore', count = 800}},
{price = {{'coin', 3500}}, offer = {type = 'give-item', item = 'crude-oil-barrel', count = 100}},
{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}},
}
-- cheap but one-off
Public.market_sales = {
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'coal', count = 900}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine', count = 75}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'uranium-rounds-magazine', count = 30}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'piercing-shotgun-shell', count = 50}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'raw-fish', count = 300}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'laser-turret', count = 1}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'vehicle-machine-gun', count = 3}},
{price = {{'coin', 3000}}, offer = {type = 'give-item', item = 'modular-armor', count = 1}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'distractor-capsule', count = 20}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'poison-capsule', count = 20}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'slowdown-capsule', count = 20}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'coin', count = 4000}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'roboport', count = 1}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'construction-robot', count = 10}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'logistic-chest-passive-provider', count = 2}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'logistic-robot', count = 2}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'coal', count = 900}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine', count = 75}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'uranium-rounds-magazine', count = 30}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'piercing-shotgun-shell', count = 50}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'raw-fish', count = 300}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'laser-turret', count = 1}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'vehicle-machine-gun', count = 3}},
{price = {{'coin', 5000}}, offer = {type = 'give-item', item = 'modular-armor', count = 1}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'distractor-capsule', count = 20}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'poison-capsule', count = 20}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'slowdown-capsule', count = 20}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'coin', count = 5000}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'roboport', count = 1}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'construction-robot', count = 10}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'logistic-chest-passive-provider', count = 2}},
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'logistic-robot', count = 2}},
}

View File

@ -97,7 +97,7 @@ Public.Data.surfacename_rendering_pos = {x = -0.5, y = -15}
Public.cabin_shop_data = {
{
price = {{'coin', 1000}},
price = {{'electronic-circuit', 25}, {'coin', 1200}},
offer = {type='give-item', item = 'rail-signal', count = 100},
},
{

View File

@ -157,7 +157,7 @@ function Public.create_hold_surface(nth)
-- We place obstacle boxes before the other static boxes, so that they are potentially one tile closer to the edge than they would be otherwise:
local items = subtype == enum.INITIAL and Balance.starting_items_crew_downstairs() or {}
Common.surface_place_random_obstacle_boxes(Public.get_hold_surface(nth), {x=0,y=0}, Public.Data.width, Public.Data.height, 'rocket-silo', {[1] = 0, [2] = 5, [3] = 5, [4] = 2}, items)
Common.surface_place_random_obstacle_boxes(Public.get_hold_surface(nth), {x=0,y=0}, Public.Data.width, Public.Data.height, 'rocket-silo', {[1] = 0, [2] = 6, [3] = 5, [4] = 2}, items)
-- Public.hold_place_random_obstacle_boxes(nth, {[1] = 0, [2] = 9, [3] = 3, [4] = 1}, items)
local boxes = Common.build_from_blueprint(Public.Data.boxes_bp, surface, Public.Data.boxes_bp_offset, boat.force_name)