Headless factorio server is used in this instruction (from factorio.com) in /home/factorio
.
Tested on Ubuntu 18.04.4 LTS, Ubuntu 18.04.4 LTS (Server), WSL1 Ubuntu
Download the executable from a release on github
Configuring
Enter installation directory cd FactoCord/
(or any name you want)
Copy config-example.json
to config.json
(cp config-example.json config.json
)
Open config.json
with any editor (ex. nano config.json
)
Then in text editor you must set:
- Your Discord token for the bot (
discord_token
) - ID of factorio channel for chatting (
factorio_channel_id
) - Launching parameters (flags to factorio executable) (
launch_parameters
) - Executable path (
executable
) - Discord IDs of all the admins (for commands) (
admin_ids
) mod-list.json
file location (including the filename) (mod_list_location
)
Running
chmod +x ./FactoCord3
./FactoCord3
Installing deps
Make sure system is up to date sudo apt-get update -y && sudo apt-get upgrade -y
Download go 1.12+ (sudo apt install golang-go git -y
) (you may need to get it from the website, repos can be outdated)
Cloning repo
git clone https://github.com/maxsupermanhd/FactoCord-3.0.git
Configuring
Enter created directory cd FactoCord-3.0/
Copy config-example.json
to config.json
(cp config-example.json config.json
)
Open config.json
with any editor (ex. nano config.json
)
Then in text editor you must set:
- Your Discord token for the bot (discord_token)
- ID of factorio channel for chatting (factorio_channel_id)
- Launching parameters (flags to factorio executable) (launch_parameters)
- Executable path (executable)
- Admin IDs (for commands) (admin_ids)
- Mod list .json file location (including the filename) (mod_list_location)
Building
go build
Running
./FactoCord-3.0
... will eventually disable achievements, but you will have nice and clear chat in Discord.
To have afk kicked people showed and be able to customize/potentially modify messages
please use control.lua addition from repo root.
If you don't want to be control.lua modified so hard, you can place it near and use
a require
to get discord sending function (wrapper) and have full functionality of FactoCord.