Skip to content

Instantly share code, notes, and snippets.

@Drac346
Drac346 / factorio.15.notes.txt
Last active October 1, 2017 14:25
Random Factorio 0.15 LUA Scripts for Custom Servers (these will disable achievements)
#walkthought: https://www.accessdenied.wtf/single-post/2017/09/24/Factorio-15-Server-Customizations-with-LUA-Commands
#Set game to peaceful mode (global setting)
/c game.player.surface.peaceful_mode=true
#In the next section, replace "player_name_[1,2,3]" with whatever name makes sense to you
#create player factions (this is for 4 players, 3 named and the default [player] faction)
/c game.create_force('f_player_name_1')
/c game.create_force('f_player_name_2')
/c game.create_force('f_player_name_3')
@Drac346
Drac346 / factoriocmd.sh
Last active November 24, 2018 14:53
Factorio Linux Server Admin Script
#!/bin/bash
#Written on Ubuntu 16.04 LTS
#Written against Factorio 0.15.3 (tested again 0.15.35)
#walkthough: tbd
#props: https://gist.github.com/othyn/e1287fd937c1e267cdbcef07227ed48c
#disclaimer: stole the idea from someone (can't remember who, sorry), but modified it for my wants
#Requires Sudo for systemctl commands (start, stop, restart, ect)
clear
@Drac346
Drac346 / ServerGrid.ServerOnly.json
Last active December 28, 2018 02:23
ServerGrid.ServerOnly.json - Update the IP, Port,and Password
{
"LocalS3URL": "",
"LocalS3AccessKeyId": "",
"LocalS3SecretKey": "",
"LocalS3BucketName": "",
"LocalS3Region": "",
"TribeLogConfig": {
"MaxRedisEntries": 1000,
"BackupMode": "off",
"MaxFileHistory": 10,
@Drac346
Drac346 / ServerGrid.json
Created December 28, 2018 02:27
ServerGrid.json - Search for XXXYYYXXX to find the values you need to modify
{
"BaseServerArgs": "",
"gridSize": 1400000.0,
"MetaWorldURL": "",
"WorldFriendlyName": "XXXYYYXXX",
"WorldAtlasId": "XXXYYYXXX",
"AuthListURL": "",
"WorldAtlasPassword": "XXXYYYXXX",
"ModIDs": "",
"MapImageURL": "XXXYYYXXX",
@Drac346
Drac346 / Atlas-MainMenu
Last active December 29, 2018 19:04
Automating basic startup and shutdown functions for my 3x3 servers
Function Atlas-MainMenu {
#######
# Script Variables
#Atlas Executable in ""
$MainExe = "c:\games\atlas\ShooterGame\Binaries\Win64\ShooterGameServer.exe"
#Make sure you have the following settings configured in the ServerGrid.json: MaxPlayers, ReservedPlayerSlots, Ports, SeamlessIP
#Make sure you have the following configured in each servers GameUserSettings.ini: serverPVE=<0 for PVP, 1 for PVE>
#Add to the bottom of GameUserSettings.ini if it's not there so you don't need to call it in every startup file (Max of 150 players, reserved must be a smaller positive number)
@Drac346
Drac346 / redis.windows-service.conf
Created December 30, 2018 14:22
Atlas DSS Guide Redis CONFIG - CHANGE THE PASSWORD \\ this listens on ONLY the 127.0.0.1 IP Address
# Redis configuration file example
# Guide on how to use with Atlas: https://www.drac346.net/2018/12/atlas-dedicated-server-setup-main-menu.html
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
@Drac346
Drac346 / servergrid.templates.json
Created January 22, 2019 00:30
Atlas Templates w/ Whales and Squids
"serverTemplates": [
{
"templateColorR": 0.05,
"templateColorG": 0.2,
"templateColorB": 1.0,
"gridX": 0,
"gridY": 0,
"MachineIdTag": "",
"ip": "",
"name": "Polar",
@Drac346
Drac346 / 7d2dcmd.sh
Last active July 2, 2019 12:41
7 Days to Die Command Script for the Service
#!/bin/bash
#Written on Ubuntu 16.04 LTS
#Written against Factorio 0.15.3 (tested again 0.15.35)
#walkthough: tbd
#props: https://gist.github.com/othyn/e1287fd937c1e267cdbcef07227ed48c
#disclaimer: stole the idea from someone (can't remember who, sorry), but modified it for my wants
#Requires Sudo for systemctl commands (start, stop, restart, ect)
clear
@Drac346
Drac346 / factorio.service
Last active April 25, 2023 17:09
Factorio SystemD Configuration
#place in /etc/systemd/system/factorio.service
# systemctl start factorio.service
# systemctl enable factorio.service #autostarts the server
# systemctl stop factorio.service
[Unit]
Descritpion=Factorio Headless Server
After=network.target
After=systemd-user-sessions.service
After=network-online.target
@Drac346
Drac346 / 7d2d.service
Last active May 13, 2023 15:30
7 days 2 die SystemD configuration
#place in /etc/systemd/system/7d2d.service
# systemctl start 7d2d.service
# systemctl enable 7d2d.service #autostarts the server
# systemctl stop 7d2d.service
[Unit]
Descritpion=7D2D Headless Server
After=network.target
After=systemd-user-sessions.service
After=network-online.target