Browse Source

Added Factorio, closes #2

master
Yuri van Midden 2 years ago
parent
commit
ea081d8883
Signed by: yuri GPG Key ID: B1E365DD233EF90A
  1. 65
      config/factorio/map-gen-settings.json
  2. 116
      config/factorio/map-settings.json
  3. 117
      config/factorio/mod-list.json
  4. 3
      config/factorio/server-adminlist.json
  5. 70
      config/factorio/server-settings.json
  6. 35
      docker-compose.yml
  7. 3
      env.dist

65
config/factorio/map-gen-settings.json

@ -0,0 +1,65 @@
{
"terrain_segmentation": 1,
"water": 1,
"autoplace_controls": {
"coal": {
"frequency": 1,
"size": 1,
"richness": 3
},
"copper-ore": {
"frequency": 1,
"size": 3,
"richness": 3
},
"crude-oil": {
"frequency": 1,
"size": 3,
"richness": 3
},
"enemy-base": {
"frequency": 0.25,
"size": 0.75,
"richness": 1
},
"iron-ore": {
"frequency": 1,
"size": 3,
"richness": 3
},
"stone": {
"frequency": 1,
"size": 1,
"richness": 3
},
"trees": {
"frequency": 1,
"size": 0.3333333432674408,
"richness": 1
},
"uranium-ore": {
"frequency": 1,
"size": 1,
"richness": 3
}
},
"autoplace_settings": {},
"property_expression_names": {},
"starting_points": [
{
"x": 0,
"y": 0
}
],
"seed": 4166916206,
"width": 2000000,
"height": 2000000,
"starting_area": 6,
"peaceful_mode": true,
"cliff_settings": {
"name": "cliff",
"cliff_elevation_0": 10,
"cliff_elevation_interval": 40,
"richness": 0
}
}

116
config/factorio/map-settings.json

@ -0,0 +1,116 @@
{
"pollution": {
"enabled": true,
"diffusion_ratio": 0.02,
"min_to_diffuse": 15,
"ageing": 1,
"expected_max_per_chunk": 150,
"min_to_show_per_chunk": 50,
"min_pollution_to_damage_trees": 60,
"pollution_with_max_forest_damage": 150,
"pollution_per_tree_damage": 50,
"pollution_restored_per_tree_damage": 10,
"max_pollution_to_restore_trees": 20,
"enemy_attack_pollution_consumption_modifier": 1
},
"steering": {
"default": {
"radius": 1.2,
"separation_factor": 1.2,
"separation_force": 0.005,
"force_unit_fuzzy_goto_behavior": false
},
"moving": {
"radius": 3,
"separation_factor": 3,
"separation_force": 0.01,
"force_unit_fuzzy_goto_behavior": false
}
},
"enemy_evolution": {
"enabled": true,
"time_factor": 0.000004,
"destroy_factor": 0.002,
"pollution_factor": 9e-7
},
"enemy_expansion": {
"enabled": true,
"max_expansion_distance": 7,
"friendly_base_influence_radius": 2,
"enemy_building_influence_radius": 2,
"building_coefficient": 0.1,
"other_base_coefficient": 2,
"neighbouring_chunk_coefficient": 0.5,
"neighbouring_base_chunk_coefficient": 0.4,
"max_colliding_tiles_coefficient": 0.9,
"settler_group_min_size": 5,
"settler_group_max_size": 20,
"min_expansion_cooldown": 14400,
"max_expansion_cooldown": 216000
},
"unit_group": {
"min_group_gathering_time": 3600,
"max_group_gathering_time": 36000,
"max_wait_time_for_late_members": 7200,
"max_group_radius": 30,
"min_group_radius": 5,
"max_member_speedup_when_behind": 1.4,
"max_member_slowdown_when_ahead": 0.6,
"max_group_slowdown_factor": 0.3,
"max_group_member_fallback_factor": 3,
"member_disown_distance": 10,
"tick_tolerance_when_member_arrives": 60,
"max_gathering_unit_groups": 30,
"max_unit_group_size": 200
},
"path_finder": {
"fwd2bwd_ratio": 5,
"goal_pressure_ratio": 2,
"use_path_cache": true,
"max_steps_worked_per_tick": 1000,
"max_work_done_per_tick": 8000,
"short_cache_size": 5,
"long_cache_size": 25,
"short_cache_min_cacheable_distance": 10,
"short_cache_min_algo_steps_to_cache": 50,
"long_cache_min_cacheable_distance": 30,
"cache_max_connect_to_cache_steps_multiplier": 100,
"cache_accept_path_start_distance_ratio": 0.2,
"cache_accept_path_end_distance_ratio": 0.15,
"negative_cache_accept_path_start_distance_ratio": 0.3,
"negative_cache_accept_path_end_distance_ratio": 0.3,
"cache_path_start_distance_rating_multiplier": 10,
"cache_path_end_distance_rating_multiplier": 20,
"stale_enemy_with_same_destination_collision_penalty": 30,
"ignore_moving_enemy_collision_distance": 5,
"enemy_with_different_destination_collision_penalty": 30,
"general_entity_collision_penalty": 10,
"general_entity_subsequent_collision_penalty": 3,
"extended_collision_penalty": 3,
"max_clients_to_accept_any_new_request": 10,
"max_clients_to_accept_short_new_request": 100,
"direct_distance_to_consider_short_request": 100,
"short_request_max_steps": 1000,
"short_request_ratio": 0.5,
"min_steps_to_check_path_find_termination": 2000,
"start_to_goal_cost_multiplier_to_terminate_path_find": 2000,
"overload_levels": [
0,
100,
500
],
"overload_multipliers": [
2,
3,
4
],
"negative_path_cache_delay_interval": 20
},
"max_failed_behavior_count": 3,
"difficulty_settings": {
"recipe_difficulty": 0,
"technology_difficulty": 0,
"technology_price_multiplier": 1,
"research_queue_setting": "always"
}
}

117
config/factorio/mod-list.json

@ -0,0 +1,117 @@
{
"mods":
[
{
"name": "base",
"enabled": true
},
{
"name": "AutoDeconstruct",
"enabled": true
},
{
"name": "BotSpeed",
"enabled": true
},
{
"name": "Enhanced_Map_Colors",
"enabled": false
},
{
"name": "even-distribution",
"enabled": true
},
{
"name": "FactorioExtended-Plus-Core",
"enabled": true
},
{
"name": "FactorioExtended-Plus-Equipment",
"enabled": true
},
{
"name": "FactorioExtended-Plus-Logistics",
"enabled": true
},
{
"name": "FactorioExtended-Plus-Machines",
"enabled": true
},
{
"name": "FactorioExtended-Plus-Power",
"enabled": true
},
{
"name": "FactorioExtended-Plus-Storage",
"enabled": true
},
{
"name": "FactorioExtended-Plus-Transport",
"enabled": true
},
{
"name": "FactorioExtended-Plus-Weaponry",
"enabled": true
},
{
"name": "far-reach",
"enabled": true
},
{
"name": "flib",
"enabled": true
},
{
"name": "FNEI",
"enabled": false
},
{
"name": "LogisticTrainNetwork",
"enabled": true
},
{
"name": "miniloader",
"enabled": true
},
{
"name": "OpteraLib",
"enabled": false
},
{
"name": "QoL-TempStations",
"enabled": false
},
{
"name": "Squeak Through",
"enabled": true
},
{
"name": "Waterfill_v17",
"enabled": true
}
]
}

3
config/factorio/server-adminlist.json

@ -0,0 +1,3 @@
[
""
]

70
config/factorio/server-settings.json

@ -0,0 +1,70 @@
{
"name": "Harambee factory workers",
"description": "Dedicated server for members of Harambee, a volleyball club from the Netherlands",
"tags": ["volleyball", "harambee", "nerds", "fabrieksarbeiders"],
"_comment_max_players": "Maximum number of players allowed, admins can join even a full server. 0 means unlimited.",
"max_players": 0,
"_comment_visibility": ["public: Game will be published on the official Factorio matching server",
"lan: Game will be broadcast on LAN"],
"visibility":
{
"public": true,
"lan": true
},
"_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
"username": "${USERNAME}",
"password": "",
"_comment_token": "Authentication token. May be used instead of 'password' above.",
"token": "${TOKEN}",
"game_password": "${GAME_PASSWORD}",
"_comment_require_user_verification": "When set to true, the server will only allow clients that have a valid Factorio.com account",
"require_user_verification": true,
"_comment_max_upload_in_kilobytes_per_second" : "optional, default value is 0. 0 means unlimited.",
"max_upload_in_kilobytes_per_second": 0,
"_comment_max_upload_slots" : "optional, default value is 5. 0 means unlimited.",
"max_upload_slots": 10,
"_comment_minimum_latency_in_ticks": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum.",
"minimum_latency_in_ticks": 0,
"_comment_ignore_player_limit_for_returning_players": "Players that played on this map already can join even when the max player limit was reached.",
"ignore_player_limit_for_returning_players": false,
"_comment_allow_commands": "possible values are, true, false and admins-only",
"allow_commands": "admins-only",
"_comment_autosave_interval": "Autosave interval in minutes",
"autosave_interval": 10,
"_comment_autosave_slots": "server autosave slots, it is cycled through when the server autosaves.",
"autosave_slots": 10,
"_comment_afk_autokick_interval": "How many minutes until someone is kicked when doing nothing, 0 for never.",
"afk_autokick_interval": 30,
"_comment_auto_pause": "Whether should the server be paused when no players are present.",
"auto_pause": true,
"only_admins_can_pause_the_game": true,
"_comment_autosave_only_on_server": "Whether autosaves should be saved only on server or also on all connected clients. Default is true.",
"autosave_only_on_server": true,
"_comment_non_blocking_saving": "Highly experimental feature, enable only at your own risk of losing your saves. On UNIX systems, server will fork itself to create an autosave. Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.",
"non_blocking_saving": false,
"_comment_segment_sizes": "Long network messages are split into segments that are sent over multiple ticks. Their size depends on the number of peers currently connected. Increasing the segment size will increase upload bandwidth requirement for the server and download bandwidth requirement for clients. This setting only affects server outbound messages. Changing these settings can have a negative impact on connection stability for some clients.",
"minimum_segment_size": 25,
"minimum_segment_size_peer_count": 20,
"maximum_segment_size": 100,
"maximum_segment_size_peer_count": 10
}

35
docker-compose.yml

@ -24,17 +24,24 @@ services:
#
# Factorio
#
# factorio:
# image: factoriotools/factorio:stable
# container_name: games_factorio
# restart: unless-stopped
# environment:
# - TZ=${TZ}
# - UPDATE_MODS_ON_START=${FACTORIO_UPDATE_MODS_ON_START} # [true|false], requires FACTORIO_TOKEN to be set
# - USERNAME=${FACTORIO_USERNAME}
# - TOKEN=${FACTORIO_TOKEN}
# ports:
# - "34197:34197/udp"
# - "27015:27015/tcp"
# volumes:
# - "${DATA_DIR}/factorio:/factorio"
factorio:
image: factoriotools/factorio:stable
container_name: games_factorio
restart: unless-stopped
environment:
- TZ=${TZ}
- UPDATE_MODS_ON_START=${FACTORIO_UPDATE_MODS_ON_START} # [true|false], requires FACTORIO_TOKEN to be set
- USERNAME=${FACTORIO_USERNAME}
- TOKEN=${FACTORIO_TOKEN}
- GAME_PASSWORD=${FACTORIO_GAME_PASSWORD}
ports:
- "34197:34197/udp"
- "27015:27015/tcp"
volumes:
- "${DATA_DIR}/factorio:/factorio"
- "./config/factorio/server-settings.json:/server-settings.json:ro"
- "./config/factorio/server-adminlist.json:/factorio/config/server-adminlist.json"
- "./config/factorio/map-settings.json:/factorio/config/map-settings.json"
- "./config/factorio/map-gen-settings.json:/factorio/config/map-gen-settings.json"
- "./config/factorio/mod-list.json:/factorio/mods/mod-list.json"
entrypoint: /bin/sh -c "mkdir -p /factorio/config && envsubst < /server-settings.json > /factorio/config/server-settings.json && exec /docker-entrypoint.sh"

3
env.dist

@ -18,4 +18,5 @@ VALHEIM_SERVER_PUBLIC=1
#
FACTORIO_UPDATE_MODS_ON_START=false # [true|false], requires FACTORIO_TOKEN to be set
FACTORIO_USERNAME=
FACTORIO_TOKEN=
FACTORIO_TOKEN=
FACTORIO_GAME_PASSWORD=
Loading…
Cancel
Save