Merge pull request #486 from bbassie/feature/convert-configs

Convert the remaining scenario configs into features
This commit is contained in:
Bastiaan authored and GitHub committed 2026-10-05 00:33:36 +01:00
1 parent b4ee485b13
commit 757a36fc03
44 files changed
+2137 -2033

No files matched your search

-112
View File
@@ -1,112 +0,0 @@
--- This file is used to setup the map starting settings and the items players will start with
-- @config Advanced-Start
--- These are called factories because they return another function
-- use these as a simple methods of adding new items
-- they will do most of the work for you
-- ['item-name'] = factory(params)
-- luacheck:ignore 212/amount_made 212/items_made 212/player
-- Use these to adjust for ticks ie game.tick < 5*minutes
-- luacheck:ignore 211/seconds 211/minutes 211/hours
local seconds, minutes, hours = 60, 3600, 216000
--- Use to make a split point for the number of items given based on time
-- ['stone-furnace']=cutoff_time(5*minutes, 4,0) -- before 5 minutes give four items after 5 minutes give none
local function cutoff_time(time, before, after)
return function(amount_made, items_made, player)
if game.tick < time then
return before
else
return after
end
end
end
--- Use to make a split point for the number of items given based on amount made
-- ['firearm-magazine']=cutoff_amount_made(100, 10, 0) -- give 10 items until 100 items have been made
local function cutoff_amount_made(amount, before, after)
return function(amount_made, items_made, player)
if amount_made < amount then
return before
else
return after
end
end
end
--- Same as above but will not give any items if x amount has been made of another item, useful for tiers
-- ['light-armor']=cutoff_amount_made_unless(5, 0,1,'heavy-armor',5) -- give light armor once 5 have been made unless 5 heavy armor has been made
local function cutoff_amount_made_unless(amount, before, after, second_item, second_amount)
return function(amount_made, items_made, player)
if items_made(second_item) < second_amount then
if amount_made < amount then
return before
else
return after
end
else
return 0
end
end
end
-- Use for mass production items where you want the amount to change based on the amount already made
-- ['iron-plate']=scale_amount_made(5*minutes, 10, 10) -- for first 5 minutes give 10 items then after apply a factor of 10
local function scale_amount_made(amount, before, scalar)
return function(amount_made, items_made, player)
if amount_made < amount then
return before
else
return (amount_made * scalar) / ((game.tick / minutes) ^ 2)
end
end
end
--[[
Common values
game.tick is the amount of time the game has been on for
amount_made is the amount of that item which has been made
items_made('item-name') will return the amount of any item made
player is the player who just spawned
hours, minutes, seconds are the number of ticks in each unit of time
]]
return {
skip_intro = true, --- @setting skip_intro skips the intro given in the default factorio free play scenario
skip_victory = true, --- @setting skip_victory will skip the victory screen when a rocket is launched
friendly_fire = false, --- @setting friendly_fire weather players will be able to attack each other on the same force
disable_crashsite = true, --- @setting disable_crashsite weather to disable creation of the crashsite
enemy_expansion = false, --- @setting enemy_expansion a catch all for in case the map settings file fails to load
chart_radius = 10 * 32, --- @setting chart_radius the number of tiles that will be charted when the map starts
items = { --- @setting items items and there condition for being given
-- ['item-name'] = function(amount_made, production_stats, player) return <Number> end -- 0 means no items given
-- Plates
["iron-plate"] = scale_amount_made(100, 10, 10),
["copper-plate"] = scale_amount_made(100, 0, 8),
["steel-plate"] = scale_amount_made(100, 0, 4),
-- Secondary Items
["electronic-circuit"] = scale_amount_made(1000, 0, 6),
["iron-gear-wheel"] = scale_amount_made(1000, 0, 6),
-- Starting Items
["burner-mining-drill"] = cutoff_time(10 * minutes, 4, 0),
["stone-furnace"] = cutoff_time(10 * minutes, 4, 0),
-- Armor
["light-armor"] = cutoff_amount_made_unless(5, 0, 1, "heavy-armor", 5),
["heavy-armor"] = cutoff_amount_made(5, 0, 1),
-- Weapon
["pistol"] = cutoff_amount_made_unless(0, 1, 1, "submachine-gun", 5),
["submachine-gun"] = cutoff_amount_made(5, 0, 1),
-- Ammo
["firearm-magazine"] = cutoff_amount_made_unless(100, 10, 0, "piercing-rounds-magazine", 100),
["piercing-rounds-magazine"] = cutoff_amount_made(100, 0, 10),
--[[
['construction-robot'] = 10,
['modular-armor'] = 1,
['solar-panel-equipment'] = 16,
['belt-immunity-equipment'] = 1,
['battery-equipment'] = 2,
['personal-roboport-equipment'] = 1
]]
}
}
-105
View File
@@ -1,105 +0,0 @@
--- Lists all bonuses which can be used, name followed by min max
-- @config Bonuses
return {
--[[
Base point is equal to the amount of standard value in each parameter.
CMMS CRS CCS CISB CHB CRDB PBR
STD 20 60 24 10 12 8 40
= 174
MAX 40 120 48 20 24 16 80
= 348
]]
points = {
base = 174,
increase_percentage_per_role_level = 0.03,
role_name = "Member",
},
periodic_bonus_rate = 300,
player_bonus = {
{
name = "character_mining_speed_modifier",
scale = 1,
cost = 10,
max_value = 4,
value_step = 0.5,
is_percentage = true,
},
{
name = "character_running_speed_modifier",
scale = 1,
cost = 60,
max_value = 2,
value_step = 0.25,
is_percentage = true,
},
{
name = "character_crafting_speed_modifier",
scale = 1,
cost = 4,
max_value = 12,
value_step = 1,
is_percentage = true,
},
{
name = "character_inventory_slots_bonus",
scale = 10,
cost = 2,
max_value = 100,
value_step = 10,
},
{
name = "character_health_bonus",
scale = 50,
cost = 4,
max_value = 300,
value_step = 50,
},
{
name = "character_reach_distance_bonus",
scale = 1,
cost = 1,
max_value = 16,
value_step = 2,
combined_bonus = {
"character_resource_reach_distance_bonus",
"character_build_distance_bonus",
},
},
{
name = "personal_battery_recharge",
scale = 4,
cost = 40,
max_value = 8,
value_step = 1,
is_special = true,
},
},
force_bonus = {
["worker_robots_battery_modifier"] = {
max_value = 1,
value_step = 1,
scale = 1,
cost = 1,
is_percentage = false,
},
["worker_robots_storage_bonus"] = {
max_value = 1,
value_step = 1,
scale = 1,
cost = 1,
is_percentage = false,
},
["following_robots_lifetime_modifier"] = {
max_value = 1,
value_step = 1,
scale = 1,
cost = 1,
is_percentage = false,
},
},
surface_bonus = {
},
}
-26
View File
@@ -1,26 +0,0 @@
--- Config file for the compliatrons including where they spawn and what messages they show
-- @config Compilatron
local config_server_detail = require("modules.exp_legacy.config.server_detail") --- @dep config.server_detail
return {
message_cycle = 60 * 15, --- @setting message_cycle 15 seconds default, how often (in ticks) the messages will cycle
locations = {
["Spawn"] = {
spawn_position = { x = 0, y = 0 },
spawn_surface = "nauvis",
entity_name = "small-biter",
messages = {
{ "info.website", config_server_detail["website"] },
{ "info.read-readme" },
{ "info.discord", config_server_detail["discord"] },
{ "info.softmod" },
{ "info.redmew" },
{ "info.custom-commands" },
{ "info.status", config_server_detail["status"] },
{ "info.lhd" },
{ "info.github", config_server_detail["github"] },
{ "info.patreon", config_server_detail["patreon"] },
},
}
},
}
-11
View File
@@ -1,11 +0,0 @@
--- This config controls whether actions such as deconning by players without sufficient permissions is logged or not
-- @config Deconlog
return {
decon_area = true, --- @setting decon_area whether to log when an area is being deconstructed
built_entity = true, --- @setting built_entity whether to log when an entity is built
mined_entity = true, --- @setting mined_entity whether to log when an entity is mined
fired_rocket = true, --- @setting fired_nuke whether to log when a rocket is fired
fired_explosive_rocket = true, --- @setting fired_nuke whether to log when a explosive rocket is fired
fired_nuke = true, --- @setting fired_nuke whether to log when a nuke is fired
}
-7
View File
@@ -1,7 +0,0 @@
return {
modules = {
["forcestats"] = true,
["logistorage"] = false,
["other"] = true,
},
}
-129
View File
@@ -1,129 +0,0 @@
--- This file contains all the different settings for the autofill system and gui
-- @config Autofill
local config = {
-- General config
icon = "item/piercing-rounds-magazine", -- @setting icon that will be used for the toolbar
categories = {
ammo = "ammo",
fuel = "fuel",
shell = "shell",
},
entities = {
car = "car",
tank = "tank",
spidertron = "spidertron",
locomotive = "locomotive",
gun_turret = "gun-turret",
burner_mining_drill = "burner-mining-drill",
stone_furnace = "stone-furnace",
steel_furnace = "steel-furnace",
},
default_entities = {},
}
local default_categories = {
{
category = config.categories.ammo,
entity = { config.entities.car, config.entities.tank, config.entities.gun_turret },
inv = { defines.inventory.car_ammo, defines.inventory.turret_ammo },
items = {
{ name = "uranium-rounds-magazine", amount = 10, enabled = false },
{ name = "piercing-rounds-magazine", amount = 10, enabled = false },
{ name = "firearm-magazine", amount = 10, enabled = false },
},
},
{
category = config.categories.ammo,
entity = { config.entities.tank },
inv = { defines.inventory.car_ammo },
items = {
{ name = "flamethrower-ammo", amount = 10, enabled = false },
},
},
{
category = config.categories.shell,
entity = { config.entities.tank },
inv = { defines.inventory.car_ammo },
items = {
{ name = "cannon-shell", amount = 10, enabled = false },
{ name = "explosive-cannon-shell", amount = 10, enabled = false },
{ name = "uranium-cannon-shell", amount = 10, enabled = false },
{ name = "explosive-uranium-cannon-shell", amount = 10, enabled = false },
},
},
{
category = config.categories.ammo,
entity = { config.entities.spidertron },
inv = { defines.inventory.car_ammo },
items = {
{ name = "rocket", amount = 10, enabled = false },
{ name = "explosive-rocket", amount = 10, enabled = false },
{ name = "atomic-bomb", amount = 10, enabled = false },
},
},
{
category = config.categories.fuel,
entity = { config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace },
inv = { defines.inventory.fuel },
items = {
{ name = "nuclear-fuel", amount = 10, enabled = false },
{ name = "rocket-fuel", amount = 10, enabled = false },
{ name = "solid-fuel", amount = 10, enabled = false },
{ name = "coal", amount = 10, enabled = false },
},
},
}
local function get_items_by_inv(entity, inv)
local items = entity.items
for _, category in pairs(default_categories) do
if table.contains(category.entity, entity.entity) then
if table.contains(category.inv, inv) then
for _, item in pairs(category.items) do
items[item.name] = {
entity = entity.entity,
category = category.category,
inv = inv,
name = item.name,
amount = item.amount,
enabled = item.enabled,
}
end
end
end
end
return items
end
local function generate_default_setting(entity_name, inv, enabled)
if not config.default_entities[entity_name] then
config.default_entities[entity_name] = {
entity = entity_name,
enabled = enabled,
items = {},
}
end
get_items_by_inv(config.default_entities[entity_name], inv)
end
generate_default_setting(config.entities.car, defines.inventory.fuel, true)
generate_default_setting(config.entities.car, defines.inventory.car_ammo, true)
generate_default_setting(config.entities.locomotive, defines.inventory.fuel, true)
generate_default_setting(config.entities.tank, defines.inventory.fuel, true)
generate_default_setting(config.entities.tank, defines.inventory.car_ammo, true)
generate_default_setting(config.entities.spidertron, defines.inventory.car_ammo, true)
generate_default_setting(config.entities.gun_turret, defines.inventory.turret_ammo, true)
generate_default_setting(config.entities.burner_mining_drill, defines.inventory.fuel, true)
generate_default_setting(config.entities.stone_furnace, defines.inventory.fuel, true)
generate_default_setting(config.entities.steel_furnace, defines.inventory.fuel, true)
return config
@@ -1,168 +0,0 @@
--- Config for the different action buttons that show on the player list;
-- each button has the button define(s) given along side an auth function, and optional reason callback;
-- if a reason callback is used then Store.set(action_name_store,player.name,'BUTTON_NAME') should be called during on_click;
-- buttons can be removed from the gui by commenting them out of the config at the bottom of this file;
-- the key used for the name of the button is the permission name used by the role system;
-- @config Player-List
local ExpUtil = require("modules/exp_util")
local Gui = require("modules/exp_gui")
local Roles = require("modules/exp_roles")
local Reports = require("modules/exp_reports")
local Jail = require("modules/exp_scenario/control/jail")
local Colors = require("modules/exp_util/include/color")
local format_player_name = ExpUtil.format_player_name_locale
--- Accessors injected by the gui so the actions can read the selected player and set the selected action
local get_selected_player --- @type fun(player: LuaPlayer): LuaPlayer
local set_selected_action --- @type fun(player: LuaPlayer, action: string?)
local function set_accessors(player_getter, action_setter)
get_selected_player, set_selected_action = player_getter, action_setter
end
-- gets the action player and a coloured name for the action to be used on
local function get_action_player(player)
local selected_player = get_selected_player(player) --[[@as LuaPlayer]]
local selected_player_color = format_player_name(selected_player)
return selected_player, selected_player_color
end
-- teleports one player to another
local function teleport(from_player, to_player)
local surface = to_player.physical_surface
local position = surface.find_non_colliding_position("character", to_player.physical_position, 32, 1)
if not position then return false end -- return false if no new position
if from_player.driving then from_player.driving = false end -- kicks a player out a vehicle if in one
from_player.teleport(position, surface)
return true
end
local function new_button(sprite, tooltip)
return Gui.define(tooltip[1])
:draw{
type = "sprite-button",
style = "tool_button",
sprite = sprite,
tooltip = tooltip,
}
:style{
padding = -1,
height = 28,
width = 28,
}
end
--- Teleports the user to the action player
-- @element goto_player
local goto_player = new_button("utility/export", { "exp-gui_player-list.goto-player" })
:on_click(function(def, player, element)
local selected_player = get_action_player(player)
if not player.character or not selected_player.character then
player.print({ "exp-commands-parse.player-alive" }, Colors.orange_red)
else
teleport(player, selected_player)
end
end)
--- Teleports the action player to the user
-- @element bring_player
local bring_player = new_button("utility/import", { "exp-gui_player-list.bring-player" })
:on_click(function(def, player, element)
local selected_player = get_action_player(player)
if not player.character or not selected_player.character then
player.print({ "exp-commands-parse.player-alive" }, Colors.orange_red)
else
teleport(selected_player, player)
end
end)
--- Reports the action player, requires a reason to be given
-- @element report_player
local report_player = new_button("utility/spawn_flag", { "exp-gui_player-list.report-player" })
:on_click(function(def, player, element)
set_selected_action(player, "exp_scenario.command.create_report")
end)
local function report_player_callback(player, reason)
local selected_player = get_action_player(player)
Reports.create_report(player, selected_player, reason)
end
--- Jails the action player, requires a reason
-- @element jail_player
local jail_player = new_button("utility/multiplayer_waiting_icon", { "exp-gui_player-list.jail-player" })
:on_click(function(def, player, element)
local selected_player, selected_player_color = get_action_player(player)
if Jail.is_jailed(selected_player) then
player.print({ "exp-commands_jail.already-jailed", selected_player_color }, Colors.orange_red)
else
set_selected_action(player, "exp_scenario.command.jail")
end
end)
local function jail_player_callback(player, reason)
local selected_player, selected_player_color = get_action_player(player)
local by_player_name_color = format_player_name(player)
game.print{ "exp-commands_jail.jailed", selected_player_color, by_player_name_color, reason }
Jail.jail_player(selected_player, player.name, reason)
end
--- Kicks the action player, requires a reason
-- @element kick_player
local kick_player = new_button("utility/warning_icon", { "exp-gui_player-list.kick-player" })
:on_click(function(def, player, element)
set_selected_action(player, "exp_scenario.gui.player_list.kick")
end)
local function kick_player_callback(player, reason)
local selected_player = get_action_player(player)
game.kick_player(selected_player, reason)
end
--- Bans the action player, requires a reason
-- @element ban_player
local ban_player = new_button("utility/danger_icon", { "exp-gui_player-list.ban-player" })
:on_click(function(def, player, element)
set_selected_action(player, "exp_scenario.gui.player_list.ban")
end)
local function ban_player_callback(player, reason)
local selected_player = get_action_player(player)
game.ban_player(selected_player, reason)
end
return {
set_accessors = set_accessors,
buttons = {
["exp_scenario.command.teleport"] = {
auth = function(player, selected_player)
return player.name ~= selected_player.name
end, -- cant teleport to your self
goto_player,
bring_player,
},
["exp_scenario.command.create_report"] = {
auth = function(player, selected_player)
if player == selected_player then return false end
return not Roles.player_has_permission(selected_player, "exp_scenario.bypass.reports")
end, -- can report any player that isn't immune
reason_callback = report_player_callback,
report_player,
},
["exp_scenario.command.jail"] = {
auth = Roles.player_outranks,
reason_callback = jail_player_callback,
jail_player,
},
["exp_scenario.gui.player_list.kick"] = {
auth = Roles.player_outranks,
reason_callback = kick_player_callback,
kick_player,
},
["exp_scenario.gui.player_list.ban"] = {
auth = Roles.player_outranks,
reason_callback = ban_player_callback,
ban_player,
},
},
}
-47
View File
@@ -1,47 +0,0 @@
--- This file controls what will show in each section of the rocket info gui
-- @config Rockets
return {
stats = { --- @setting stats The data that will show in the stats section
show_stats = true, --- @setting show_stats false will hide this section all together
show_first_rocket = true, --- @setting show_first_rocket false will not show when the first rocket was launched
show_last_rocket = true, --- @setting show_last_rocket false will not show when the last rocket was launched
show_fastest_rocket = true, --- @setting show_fastest_rocket false will not show the time taken for the fastest rocket
show_total_rockets = true, --- @setting show_total_rockets false will not show the total number of rockets launched
show_game_avg = true, --- @setting show_game_avg false will hide the avg across the entire map time
rolling_avg = { --- @setting rolling_avg each number will be one statistic; 5 means the avg time taken for the last 5 rockets
5, 10, 25,
},
},
milestones = { --- @setting milestones each number will be one statistic; 5 means the time that the 5th rocket was launched
show_milestones = true, --- @setting show_milestones false will hide this section all together
1,
2,
5,
10,
20,
50,
100,
200,
500,
1000,
1500,
2000,
2500,
3000,
3500,
4000,
4500,
5000,
},
progress = { --- @setting progress The data and buttons in the build progress section
show_progress = true, --- @setting show_progress false will hide this section altogether
allow_zoom_to_map = true, --- @setting allow_zoom_to_map false will disable the zoom to map feature
allow_remote_launch = true, --- @setting allow_remote_launch false removes the remote launch button for all players
remote_launch_admins_only = false, --- @setting remote_launch_admins_only true will remove the remote launch button for all non (game) admins
remote_launch_role_permission = "exp_scenario.gui.rocket_info.remote_launch", --- @setting remote_launch_role_permission value used by custom permission system to allow or disallow the button
allow_toggle_active = true, --- @setting allow_toggle_active false removes the remote toggle auto launch button for all players
toggle_active_admins_only = false, --- @setting toggle_active_admins_only true will remove the toggle auto launch button for all non (game) admins
toggle_active_role_permission = "exp_scenario.gui.rocket_info.toggle_active", --- @setting toggle_active_role_permission value used by custom permission system to allow or disallow the button
},
}
-21
View File
@@ -1,21 +0,0 @@
--- Config file for the science info gui
-- @config Science
return {
-- list of all science packs to be shown in the gui
show_eta = true, --- @setting show_eta when true the eta for research completion will be shown
color_cutoff = 0.8, --- @setting color_cutoff the amount that production can fall before the text changes color
color_flux = 0.1, --- @setting color_flux the amount of fluctuation allowed in production before the icon changes color
"automation-science-pack",
"logistic-science-pack",
"military-science-pack",
"chemical-science-pack",
"production-science-pack",
"utility-science-pack",
"space-science-pack",
"metallurgic-science-pack",
"agricultural-science-pack",
"electromagnetic-science-pack",
"cryogenic-science-pack",
"promethium-science-pack",
}
-13
View File
@@ -1,13 +0,0 @@
--- Config file for the tasks gui
-- @config Tasks
return {
-- Adding tasks
allow_add_task = "all", --- @setting allow_add_task dictates who is allowed to add new tasks; values: all, admin, exp_roles, none
exp_roles_allow_add_task = "exp_scenario.gui.task_list.add", --- @setting exp_roles_allow_add_task if exp_roles is used then this is the required permission
-- Editing tasks
allow_edit_task = "exp_roles", --- @setting allow_edit_task dictates who is allowed to edit existing tasks; values: all, admin, exp_roles, none
exp_roles_allow_edit_task = "exp_scenario.gui.task_list.edit", --- @setting exp_roles_allow_edit_task if exp_roles is used then this is the required permission
user_can_edit_own_tasks = true, --- @settings if true then the user who made the task can edit it regardless of the allow_edit_task setting
}
-52
View File
@@ -1,52 +0,0 @@
--- This file contains all the different settings for the warp system and gui
-- @config Warps
return {
-- General config
update_smoothing = 10, --- @setting update_smoothing the amount of smoothing applied to updates to the cooldown timer, higher is better, max is 60
minimum_distance = 100, --- @setting minimum_distance the minimum distance that is allowed between warps on the same force
default_icon = { type = "item", name = "discharge-defense-equipment" }, --- @setting default_icon the default icon that will be used for warps
-- Warp cooldowns
bypass_warp_cooldown = "exp_roles", --- @setting bypass_warp_cooldown dictates who the warp cooldown is applied to; values: all, admin, exp_roles, none
exp_roles_bypass_warp_cooldown = "exp_scenario.gui.warp_list.bypass_cooldown", --- @setting exp_roles_bypass_warp_cooldown if exp_roles is used then this is the required permission
cooldown_duration = 60, --- @setting cooldown_duration the duration of the warp cooldown in seconds
-- Warp proximity
bypass_warp_proximity = "exp_roles", --- @setting bypass_warp_proximity dictates who the warp proximity is applied to; values: all, admin, exp_roles, none
exp_roles_bypass_warp_proximity = "exp_scenario.gui.warp_list.bypass_proximity", --- @setting exp_roles_bypass_warp_proximity if exp_roles is used then this is the required permission
standard_proximity_radius = 4, --- @setting standard_proximity_radius the minimum distance a player is allowed to be to a warp in order to use it
spawn_proximity_radius = 20, --- @setting spawn_proximity_radius the minimum distance a player is allowed to be from they spawn point to use warps
-- Adding warps
allow_add_warp = "exp_roles", --- @setting allow_add_warp dictates who is allowed to add warps; values: all, admin, exp_roles, none
exp_roles_allow_add_warp = "exp_scenario.gui.warp_list.add", --- @setting exp_roles_allow_add_warp if exp_roles is used then this is the required permission
-- Editing warps
allow_edit_warp = "exp_roles", --- @setting allow_edit_warp dictates who is allowed to edit warps; values: all, admin, exp_roles, none
exp_roles_allow_edit_warp = "exp_scenario.gui.warp_list.edit", --- @setting exp_roles_allow_edit_warp if exp_roles is used then this is the required permission
user_can_edit_own_warps = false, --- @settings user_can_edit_own_warps if true then the user who made the warp can edit it regardless of the allow_edit_warp setting
-- Warp area generation
entities = { --- @setting entities The entities which are created for warp areas
{ "small-lamp", -4, -2 }, { "small-lamp", -2, -4 }, { "medium-electric-pole", -3, -3 }, -- Top left corner
{ "small-lamp", 3, -2 }, { "small-lamp", 1, -4 }, { "medium-electric-pole", 2, -3 }, -- Top right corner
{ "small-lamp", 3, 1 }, { "small-lamp", 1, 3 }, { "medium-electric-pole", 2, 2 }, -- Bottom right corner
{ "small-lamp", -4, 1 }, { "small-lamp", -2, 3 }, { "medium-electric-pole", -3, 2 }, -- Bottom left corner
},
tiles = { --- @setting tiles The tiles which are created for warp areas
{ "black-refined-concrete", -4, -2 }, { "black-refined-concrete", -4, -1 }, { "black-refined-concrete", -4, 0 }, { "black-refined-concrete", -4, 1 },
{ "black-refined-concrete", -3, -3 }, { "purple-refined-concrete", -3, -2 }, { "purple-refined-concrete", -3, -1 }, { "purple-refined-concrete", -3, 0 },
{ "purple-refined-concrete", -3, 1 }, { "black-refined-concrete", -3, 2 }, { "black-refined-concrete", -2, -4 }, { "purple-refined-concrete", -2, -3 },
{ "purple-refined-concrete", -2, -2 }, { "purple-refined-concrete", -2, -1 }, { "purple-refined-concrete", -2, 0 }, { "purple-refined-concrete", -2, 1 },
{ "purple-refined-concrete", -2, 2 }, { "black-refined-concrete", -2, 3 }, { "black-refined-concrete", -1, -4 }, { "purple-refined-concrete", -1, -3 },
{ "purple-refined-concrete", -1, -2 }, { "purple-refined-concrete", -1, -1 }, { "purple-refined-concrete", -1, 0 }, { "purple-refined-concrete", -1, 1 },
{ "purple-refined-concrete", -1, 2 }, { "black-refined-concrete", -1, 3 }, { "black-refined-concrete", 0, -4 }, { "purple-refined-concrete", 0, -3 },
{ "purple-refined-concrete", 0, -2 }, { "purple-refined-concrete", 0, -1 }, { "purple-refined-concrete", 0, 0 }, { "purple-refined-concrete", 0, 1 },
{ "purple-refined-concrete", 0, 2 }, { "black-refined-concrete", 0, 3 }, { "black-refined-concrete", 1, -4 }, { "purple-refined-concrete", 1, -3 },
{ "purple-refined-concrete", 1, -2 }, { "purple-refined-concrete", 1, -1 }, { "purple-refined-concrete", 1, 0 }, { "purple-refined-concrete", 1, 1 },
{ "purple-refined-concrete", 1, 2 }, { "black-refined-concrete", 1, 3 }, { "black-refined-concrete", 2, -3 }, { "purple-refined-concrete", 2, -2 },
{ "purple-refined-concrete", 2, -1 }, { "purple-refined-concrete", 2, 0 }, { "purple-refined-concrete", 2, 1 }, { "black-refined-concrete", 2, 2 },
{ "black-refined-concrete", 3, -2 }, { "black-refined-concrete", 3, -1 }, { "black-refined-concrete", 3, 0 }, { "black-refined-concrete", 3, 1 },
},
}
@@ -1,9 +0,0 @@
--- Config to control when players items are removed, this is a list of event names that will trigger inventory clear
-- @config inventory_clear
local events = defines.events
return {
events.on_player_banned,
events.on_player_kicked,
-- events.on_player_left_game
}
-30
View File
@@ -1,30 +0,0 @@
--- Settings for logging
-- @config logging
return {
file_name = "log/logging.log",
rocket_launch_display = {
[1] = true,
[2] = true,
[5] = true,
[10] = true,
[20] = true,
[50] = true,
[100] = true,
[200] = true,
},
rocket_launch_display_rate = 500,
disconnect_reason = {
[defines.disconnect_reason.quit] = "left the game",
[defines.disconnect_reason.dropped] = "was dropped from the game",
[defines.disconnect_reason.reconnect] = "is reconnecting",
[defines.disconnect_reason.wrong_input] = "was having a wrong input",
[defines.disconnect_reason.desync_limit_reached] = "had desync limit reached",
[defines.disconnect_reason.cannot_keep_up] = "cannot keep up",
[defines.disconnect_reason.afk] = "was afk",
[defines.disconnect_reason.kicked] = "was kicked",
[defines.disconnect_reason.kicked_and_deleted] = "was kicked and deleted",
[defines.disconnect_reason.banned] = "was banned",
[defines.disconnect_reason.switching_servers] = "is switching servers",
},
}
-86
View File
@@ -1,86 +0,0 @@
return {
module_slots_per_row = 4,
module_slot_max = 8,
copy_paste_module = true,
copy_paste_rotation = false,
machines = {
},
machine_sets = {
["base"] = {
["electric-mining-drill"] = {
["module"] = "efficiency-module",
["prod"] = true,
},
["pumpjack"] = {
["module"] = "efficiency-module",
["prod"] = true,
},
["assembling-machine-2"] = {
["module"] = "productivity-module",
["prod"] = true,
},
["assembling-machine-3"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["electric-furnace"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["beacon"] = {
["module"] = "speed-module-3",
["prod"] = false,
},
["oil-refinery"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["chemical-plant"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["centrifuge"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["lab"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["rocket-silo"] = {
["module"] = "productivity-module-3",
["prod"] = true,
}
},
["space-age"] = {
["big-mining-drill"] = {
["module"] = "efficiency-module",
["prod"] = true,
},
["biochamber"] = {
["module"] = "efficiency-module",
["prod"] = true,
},
["electromagnetic-plant"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["cryogenic-plant"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["biolab"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["foundry"] = {
["module"] = "productivity-module-3",
["prod"] = true,
},
["recycler"] = {
["module"] = "quality-module-3",
["prod"] = true,
}
}
}
}
@@ -1,9 +0,0 @@
--- This controls how pollution is viewed on the map
-- @config Pollution-Grading
return {
reference_point = { x = 0, y = 0 }, --- @setting reference_point where pollution is read from
max_scalar = 0.5, --- @setting max_scalar the scale between true max and max
min_scalar = 0.17, --- @setting min_scalar the scale between the lowest max and min
update_delay = 15, --- @setting update_delay time in minutes between view updates
}
-8
View File
@@ -1,8 +0,0 @@
--- Config file for the repair command
-- @config Repair
return {
allow_blueprint_repair = false, --- @setting allow_blueprint_repair when true will allow blueprints (things not destroyed by biters) to be build instantly using the repair command
allow_ghost_revive = true, --- @setting allow_ghost_revive when true will allow ghosts (things destroyed by biters) to be build instantly using the repair command
allow_heal_entities = true, --- @setting allow_heal_entities when true will heal entities to full health that are within range
}
-179
View File
@@ -1,179 +0,0 @@
--- Res Settings
-- @config Research
return {
enabled = true,
pollution_ageing_by_research = false,
queue_amount = 3,
mod_set = "base",
mod_set_lookup = {
"space-age",
},
-- this enable 20 more inventory for each mining productivity level up to 4
bonus_inventory = {
enabled = true,
res = {
-- Mining Productivity
["mining-productivity"] = true,
["mining-productivity-2"] = true,
["mining-productivity-3"] = true,
["mining-productivity-4"] = true,
},
name = "character_inventory_slots_bonus",
rate = 5,
limit = 20,
},
file = {
name = "log/research.log",
final_res = {
["base"] = {
["name"] = "mining-productivity-4",
["level"] = 4
},
["space-age"] = {
["name"] = "mining-productivity-3",
["level"] = 3
}
}
},
milestone = {
["base"] = {
["automation"] = 600,
["logistics"] = 300,
["steel-processing"] = 300,
["logistic-science-pack"] = 300,
["electronics"] = 300,
["fast-inserter"] = 300,
["steel-axe"] = 300,
["automation-2"] = 300,
["advanced-material-processing"] = 300,
["engine"] = 300,
["fluid-handling"] = 300,
["oil-processing"] = 300,
["sulfur-processing"] = 300,
["plastics"] = 300,
["advanced-circuit"] = 300,
["chemical-science-pack"] = 300,
["modules"] = 300,
["logistics-2"] = 300,
["railway"] = 300,
["research-speed-1"] = 300,
["research-speed-2"] = 300,
["battery"] = 300,
["concrete"] = 300,
["flammables"] = 300,
["low-density-structure"] = 300,
["advanced-material-processing-2"] = 300,
["productivity-module"] = 300,
["production-science-pack"] = 300,
["processing-unit"] = 300,
["advanced-oil-processing"] = 300,
["electric-engine"] = 300,
["robotics"] = 300,
["construction-robotics"] = 300,
["worker-robots-speed-1"] = 300,
["worker-robots-speed-2"] = 300,
["utility-science-pack"] = 300,
["productivity-module-2"] = 300,
["speed-module-2"] = 300,
["rocket-fuel"] = 300,
["effect-transmission"] = 300,
["productivity-module-3"] = 300,
["speed-module-3"] = 300,
["rocket-silo"] = 300,
["space-science-pack"] = 300,
},
["space-age"] = {
["logistic-science-pack"] = 3600,
["military-science-pack"] = 3600,
["chemical-science-pack"] = 5400,
["utility-science-pack"] = 7200,
["production-science-pack"] = 7200,
["space-science-pack"] = 7200,
["metallurgic-science-pack"] = 10800,
["electromagnetic-science-pack"] = 10800,
["agricultural-science-pack"] = 10800,
["cryogenic-science-pack"] = 10800,
["promethium-science-pack"] = 14400,
}
},
inf_res = {
["base"] = {
-- Mining Productivity
["mining-productivity-4"] = 4,
-- Robot Speed
["worker-robots-speed-6"] = 6,
-- Laser Damage
["energy-weapons-damage-7"] = 7,
-- Explosive Damage
["stronger-explosives-7"] = 7,
-- Bullet Damage
["physical-projectile-damage-7"] = 7,
-- Flame Damage
["refined-flammables-7"] = 7,
-- Artillery Range
["artillery-shell-range-1"] = 1,
-- Artillery Speed
["artillery-shell-speed-1"] = 1,
-- Follower Robot Count
["follower-robot-count-5"] = 5,
},
["space-age"] = {
-- Mining Productivity
["mining-productivity-3"] = 3,
-- Robot Speed
["worker-robots-speed-7"] = 7,
-- Laser Damage
["laser-weapons-damage-7"] = 7,
-- Electric Damage
["electric-weapons-damage-4"] = 4,
-- Explosive Damage
["stronger-explosives-7"] = 7,
-- Bullet Damage
["physical-projectile-damage-7"] = 7,
-- Flame Damage
["refined-flammables-7"] = 7,
-- Artillery Range
["artillery-shell-range-1"] = 1,
-- Artillery Speed
["artillery-shell-speed-1"] = 1,
-- Artillery Damage
["artillery-shell-damage-1"] = 1,
-- Railgun Speed
["railgun-shooting-speed-1"] = 1,
-- Railgun Damage
["railgun-damage-1"] = 1,
-- Health
["health"] = 1,
-- Research Productivity
["research-productivity"] = 1,
-- Scrap Recycling Productivity
["scrap-recycling-productivity"] = 1,
-- Asteroid Productivity
["asteroid-productivity"] = 1,
-- Processing Unit Productivity
["processing-unit-productivity"] = 1,
-- Steel Plate Productivity
["steel-plate-productivity"] = 1,
-- Low Density Structure Productivity
["low-density-structure-productivity"] = 1,
-- Plastic Bar Productivity
["plastic-bar-productivity"] = 1,
-- Rocket Fuel Productivity
["rocket-fuel-productivity"] = 1,
-- Rocket Part Productivity
["rocket-part-productivity"] = 1,
-- Follower Robot Count
["follower-robot-count-5"] = 5,
},
},
-- prevent research up to a certain level
limit_res = {
-- Artillery Range
["artillery-shell-range-1"] = 7,
-- Artillery Speed
["artillery-shell-speed-1"] = 7,
-- Atomic Bomb
-- ["atomic-bomb"] = 1
},
}
-116
View File
@@ -1,116 +0,0 @@
--- This file controls the placement/degrading of tiles as players build and walk
-- @config Scorched-Earth
return {
weakness_value = 70, --- @setting weakness_value lower value will make tiles more likely to degrade
strengths = { --- @setting strengths this decides how "strong" a tile is, bigger number means less likely to degrade
-- debug: /interface require('modules.addons.worn-paths')(player.name,true)
-- note: tiles are effected by the tiles around them, so player paths will not degrade as fast when made wider
-- note: values are relative to the tile with the highest value, recommended to keep highest tile as a "nice" number
-- note: tiles not in list will never degrade under any conditions (which is why some are omitted such as water)
["refined-concrete"] = 100,
["refined-hazard-concrete-left"] = 100,
["refined-hazard-concrete-right"] = 100,
["concrete"] = 90,
["hazard-concrete-left"] = 90,
["hazard-concrete-right"] = 90,
["stone-path"] = 80,
["red-desert-0"] = 80,
["dry-dirt"] = 50,
-- grass four (main grass tiles)
["grass-1"] = 50,
["grass-2"] = 40,
["grass-3"] = 30,
["grass-4"] = 25,
-- red three (main red tiles)
["red-desert-1"] = 40,
["red-desert-2"] = 30,
["red-desert-3"] = 25,
-- sand three (main sand tiles)
["sand-1"] = 40,
["sand-2"] = 30,
["sand-3"] = 25,
-- dirt 3 (main dirt tiles)
["dirt-1"] = 40,
["dirt-2"] = 30,
["dirt-3"] = 25,
-- last three/four (all sets of three merge here)
["dirt-4"] = 25,
["dirt-5"] = 30,
["dirt-6"] = 40,
-- ["dirt-7"]=0, -- last tile, nothing to degrade to
-- land fill chain
-- ["landfill"]=50,
-- ["water-shallow"]=90,
-- ["water-mud"]=0, -- last tile, nothing to degrade to
},
degrade_order = { --- @setting degrade_order when a tile degrades it will turn into the next tile given here
["refined-concrete"] = "concrete",
["refined-hazard-concrete-left"] = "hazard-concrete-left",
["refined-hazard-concrete-right"] = "hazard-concrete-right",
["concrete"] = "stone-path",
["hazard-concrete-left"] = "stone-path",
["hazard-concrete-right"] = "stone-path",
["stone-path"] = "dry-dirt",
["red-desert-0"] = "dry-dirt",
["dry-dirt"] = "dirt-4",
-- grass four (main grass tiles)
["grass-1"] = "grass-2",
["grass-2"] = "grass-3",
["grass-3"] = "grass-4",
["grass-4"] = "dirt-4",
-- red three (main red tiles)
["red-desert-1"] = "red-desert-2",
["red-desert-2"] = "red-desert-3",
["red-desert-3"] = "dirt-4",
-- sand three (main sand tiles)
["sand-1"] = "sand-2",
["sand-2"] = "sand-3",
["sand-3"] = "dirt-4",
-- dirt 3 (main dirt tiles)
["dirt-1"] = "dirt-2",
["dirt-2"] = "dirt-3",
["dirt-3"] = "dirt-4",
-- last three/four (all sets of three merge here)
["dirt-4"] = "dirt-5",
["dirt-5"] = "dirt-6",
["dirt-6"] = "dirt-7",
-- ["dirt-7"]=0, -- last tile, nothing to degrade to
-- land fill chain
-- ["landfill"]='grass-2', -- 'water-shallow'
-- ["water-shallow"]='water-mud',
-- ["water-mud"]=0, -- last tile, nothing to degrade to
},
entities = { --- @setting entities entities in this list will degrade the tiles under them when they are placed
["stone-furnace"] = true,
["steel-furnace"] = true,
["electric-furnace"] = true,
["assembling-machine-1"] = true,
["assembling-machine-2"] = true,
["assembling-machine-3"] = true,
["beacon"] = true,
["centrifuge"] = true,
["chemical-plant"] = true,
["oil-refinery"] = true,
["storage-tank"] = true,
["nuclear-reactor"] = true,
["steam-engine"] = true,
["steam-turbine"] = true,
["boiler"] = true,
["heat-exchanger"] = true,
["stone-wall"] = true,
["gate"] = true,
["gun-turret"] = true,
["laser-turret"] = true,
["flamethrower-turret"] = true,
["radar"] = true,
["lab"] = true,
["big-electric-pole"] = true,
["substation"] = true,
["rocket-silo"] = true,
["pumpjack"] = true,
["electric-mining-drill"] = true,
["roboport"] = true,
["accumulator"] = true,
},
}
-180
View File
@@ -1,180 +0,0 @@
--- Settings for vlayer including the allowed items, the update frequency, and some cheats
-- @config Vlayer
return {
update_tick_storage = 60, --- @setting update_tick_storage The number of ticks between each update of the storage interfaces
update_tick_energy = 10, --- @setting update_tick_energy The number of ticks between each update of the energy and circuit interfaces
update_tick_gui = 60, --- @setting update_tick_gui The number of ticks between each update of the gui
unlimited_capacity = false, --- @setting unlimited_capacity When true the vlayer has an unlimited energy capacity, accumulators are not required
unlimited_surface_area = false, --- @setting unlimited_surface_area When true the vlayer has an unlimited surface area, landfill is not required
modded_auto_downgrade = false, --- @setting modded_auto_downgrade When true modded items will be converted into their base game equivalent, original items can not be recovered
power_on_space = false, --- @setting power_on_space When true allow on spaceship
power_on_space_research = { --- @setting power_on_space_research the research level needed to use power_on_space
name = "research-productivity",
level = 10
},
mimic_surface = "nauvis", --- @setting mimic_surface Surface name/index the vlayer will copy its settings from, use nil to use the settings below
surface = { --- @setting surface When mimic_surface is nil these settings will be used instead, see LuaSurface for details
always_day = false,
solar_power_multiplier = 1,
min_brightness = 0.15,
ticks_per_day = 25200,
daytime = 0,
dusk = 0.25,
evening = 0.45,
morning = 0.55,
dawn = 0.75,
},
interface_limit = { --- @setting interface_limit Sets the limit for the number of vlayer interfaces that can be created
energy = 1, -- >1 allows for disconnected power networks to receive power
circuit = 20, -- No caveats
storage_input = 20, -- No caveats
storage_output = 1, -- >0 allows for item teleportation (allowed_items only)
},
--- @class Vlayer.ItemProperties
--- @field starting_value number
--- @field required_area number
--- @field production number?
--- @field discharge number?
--- @field capacity number?
--- @field surface_area number?
--- @field fuel_value number?
--- @field power boolean?
--- @field modded boolean? Set when the item is registered from a modded equivalent
--- @field base_game_equivalent string?
--- @field multiplier number?
--- @type table<string, Vlayer.ItemProperties>
allowed_items = { --- @setting allowed_items List of all items allowed in vlayer storage and their properties
--[[
Allowed properties:
starting_value : The amount of the item placed into the vlayer on game start, ignores area requirements
required_area : When greater than 0 the items properties are not applied unless their is sufficient surplus surface area
production : The energy production of the item in MW, used for solar panels
discharge : The energy discharge of the item in MW, used for accumulators
capacity : The energy capacity of the item in MJ, used for accumulators
surface_area : The surface area provided by the item, used for landfill
]]
["solar-panel"] = {
starting_value = 0,
required_area = 9,
production = 0.06, -- MW
},
["accumulator"] = {
starting_value = 0,
required_area = 4,
discharge = 0.3, -- MW
capacity = 5, -- MJ
},
["landfill"] = {
starting_value = 0,
required_area = 0,
surface_area = 20, -- Tiles
},
["wood"] = {
starting_value = 0,
required_area = 0,
surface_area = 0,
fuel_value = 2, -- MJ
power = true, -- turn all wood to power to reduce trash
},
["coal"] = {
starting_value = 0,
required_area = 0,
surface_area = 0,
fuel_value = 4, -- MJ
power = false, -- turn all coal to power to reduce trash
},
["solid-fuel"] = {
starting_value = 0,
required_area = 0,
surface_area = 0,
fuel_value = 12, -- MJ
power = false, -- turn all solid fuel to power to reduce trash
},
["rocket-fuel"] = {
starting_value = 0,
required_area = 0,
surface_area = 0,
fuel_value = 100, -- MJ
power = false, -- turn all rocket fuel to power to reduce trash
}
},
modded_items = { --- @setting modded_items List of all modded items allowed in vlayer storage and their base game equivalent
["solar-panel-2"] = {
starting_value = 0,
base_game_equivalent = "solar-panel",
multiplier = 4,
},
["solar-panel-3"] = {
starting_value = 0,
base_game_equivalent = "solar-panel",
multiplier = 16,
},
["solar-panel-4"] = {
starting_value = 0,
base_game_equivalent = "solar-panel",
multiplier = 64,
},
["solar-panel-5"] = {
starting_value = 0,
base_game_equivalent = "solar-panel",
multiplier = 256,
},
["solar-panel-6"] = {
starting_value = 0,
base_game_equivalent = "solar-panel",
multiplier = 1024,
},
["solar-panel-7"] = {
starting_value = 0,
base_game_equivalent = "solar-panel",
multiplier = 4096,
},
["solar-panel-8"] = {
starting_value = 0,
base_game_equivalent = "solar-panel",
multiplier = 16384,
},
["accumulator-2"] = {
starting_value = 0,
base_game_equivalent = "accumulator",
multiplier = 4,
},
["accumulator-3"] = {
starting_value = 0,
base_game_equivalent = "accumulator",
multiplier = 16,
},
["accumulator-4"] = {
starting_value = 0,
base_game_equivalent = "accumulator",
multiplier = 64,
},
["accumulator-5"] = {
starting_value = 0,
base_game_equivalent = "accumulator",
multiplier = 256,
},
["accumulator-6"] = {
starting_value = 0,
base_game_equivalent = "accumulator",
multiplier = 1024,
},
["accumulator-7"] = {
starting_value = 0,
base_game_equivalent = "accumulator",
multiplier = 4096,
},
["accumulator-8"] = {
starting_value = 0,
base_game_equivalent = "accumulator",
multiplier = 16384,
},
}
}