Project Zomboid

Project Zomboid

43 valoraciones
Project Zomboid Discord Integration Tutorial
Por RegretNothing y 2 colaboradores
A small tutorial how to integrate discord with your project zomboid server. Extra bot too.
   
Premiar
Favoritos
Favorito
Quitar
Project Zomboid Discord Integration (Windows OS)
Once your bot is online or setup done.


1. Locate your servertest.ini file. (C:\Users\your_username\Zomboid\Server)

2. Open it

3. Scroll down until you see
-DiscordEnable=
-DiscordToken=
-DiscordChannel=
-DiscordChannelID=

4. I will explain each of it one by one

DiscordEnable=true
Make sure set this to true

DiscordToken=
Please check guide below

DiscordChannel=
Please check guide below

DiscordChannelID=
Please check guide below
Discord Token
1. Go to https://discord.com/developers/applications and select your application

2. Select Bot Tab

3.Copy it (Do not share your bot token, your bot account might get hacked)



4. Go back to your servertest.ini and paste it DiscordToken="Your Token"

5. Next would be Discord Channel & Discord Channel ID
Discord Channel & Discord Channel ID (Choose either one)
For me Discord Channel ID is easier.

1. Open your discord and go to User settings > Advanced > Switch on Developer Mode

2. Go back to your server

3. Choose the channel that you want the server chat to display

4. Right click that channel and click copy ID

5. Go back to servertest.ini and paste it on DiscordChannelID= "Your Channel ID"

6. If your server still online make sure restart for the bot to work

7. Bot will only show /all chat for now, any message that send on that discord channel will be send in game chat too.

8. Example



Orange = Server /all chat
Light Blue = Discord Chat

"Extras" Discord Player Count Bot (Window OS)
*Close application will terminate the bot*

Requirements:

.Net Core 3.1[dotnet.microsoft.com]

Notes:
AntiVirus software may stop the executable from running.


1. Download DiscordPlayerCountBot[github.com]

2. Extract and unzip into a folder

3. Open DiscordPlayerCountBot.exe

4. Close it

5. Now there will be a new file config.json

6. Edit it with notepad

Name: "Will change the bot name"

Address: "Your public IP:port (Example: 123.123.123.123:16261)"

if you not sure do refer website below

WhatIsMyIP[www.whatismyip.com]
Battlemerics[www.battlemetrics.com]
Serverranks[serverranks.com]


Token: "your Discord bot token"


Status: (Default 0,)
For activity Status do refer picture below













UseNameAsLabel: "Leave it false"



UpdateTime:"choose the one you prefer (default 30 second)"

SteamAPIKey: "your steam api key"


8. After done edit, do save and run DiscordPlayerCountBot.exe

9. Check your bot status see if it work


Example of how bot look like






For more details guide, do refer Detailed Guide[github.com]
"Extras" Discord Player Count Bot - Docker
Requirements:
Docker[docs.docker.com]/ Docker-Compose [docs.docker.com]

There are two options with which you can deploy "Discord Player Count Bot" with Docker.
One is docker itself and second one is with help of docker-compose.

Personally I prefer the docker-compose one as it is easier to edit and is much more readable.

You can setup multiple bot instances by entering one or more values in BOT_NAMES, BOT_PUBADDRESSES, BOT_PORTS, BOT_DISCORD_TOKENS, BOT_STATUSES, BOT_USENAMETAGS and separating them with ";".

  • Docker
    1. Open Terminal
    2. Type: pro tip edit values as you type
      docker run -e BOT_NAMES='Bot1;Bot2' -e BOT_PUBADDRESSES='127.0.0.1;127.0.0.1' -e BOT_PORTS='16261;16262' -e BOT_DISCORD_TOKENS='DiscordToken1;DiscordToken2' -e BOT_UPDATE_TIME='30' -e BOT_STATUSES='1;2' -e BOT_USENAMETAGS='false;false' -e STEAM_API_KEY='your steam api key' specker/discordplayercountbot
    3. Edit values in single quotes and gently hit Enter
    4. If you did not make any typos bot should start shortly
  • Docker-Compose(Recommended)
    1. Create docker-compose.yml file and open it with text editor of your choosing
    2. Copy and paste:
      version: "3.7" services: discord-bot: image: specker/discordplayercountbot environment: BOT_NAMES: "Bot1;Bot2" BOT_PUBADDRESSES: "127.0.0.1;127.0.0.1" BOT_PORTS: "16261;16262" BOT_DISCORD_TOKENS: "DiscordToken1;DiscordToken2" BOT_UPDATE_TIME: "30" BOT_STATUSES: "1;2" BOT_USENAMETAGS: "false;false" STEAM_API_KEY: "your steam api key"
    3. Edit variables in quotes and save the file
    4. Open terminal where the file is and type
      docker-compose up
    5. Press Enter
    6. Voilà
60 comentarios
R Ξ C H K Λ 23 ABR a las 15:20 
Hi why in (the Discord Player Count Bot) it demand steam api key cuz i'm tryin to set a dedicated server for GoG players (nosteam) is there an issue with that ?
Galeg 10 MAR a las 7:28 
Thank you very much for the guide, it was very easy for me to create everything thanks to this
I have a question: when we write on Discord, the bot retransmits the message countless times within the server. Is there a way to configure it so that this does not happen?
Thank you very much for your time!
GravityWolf  [autor] 19 FEB a las 15:18 
I don't sorry 😔
z0ntir 19 FEB a las 7:33 
Hello, does anyone know if it will be possible that when a player dies a message is sent to Discord?
GravityWolf  [autor] 3 FEB a las 11:35 
The issues with game chat are issues with the game and the developers of the game. I cannot control it :steamsad:
Matthew 3 FEB a las 8:43 
i can see the ingame /all chat in discord but the discord chat isnt shown in the game chat window
GravityWolf  [autor] 23 DIC 2024 a las 7:38 
It's preferred :)
GravityWolf  [autor] 23 DIC 2024 a las 7:37 
Yes you can :)
bombardino crocodilo 22 DIC 2024 a las 23:48 
Can I use my ipv4 for player count bot?
Not A Dolphin 3 JUL 2024 a las 7:15 
found a solution to the only going from pz server to discord and not other way around, go to the bot settings and make sure "MESSAGE CONTENT INTENT" is enabled