Code Monkey home page Code Monkey logo

zomboi's Introduction

Zomboi

A discord bot for Project Zomboid. You are welcome to log any issues, questions, or feature suggestions you have

Features

  • Mirror in-game chat messages to discord channel using linked discord name/avatar
  • Notifications for logins, disconnects, deaths and perk changes
  • Presence shows number of players currently online
  • View and change server options
  • Request a map showing a players location

Commands (prefix: !):

MapHandler:
  location Get the last known location of the given user
RCONAdapter:
  option   Show or set the value of a server option
UserHandler:
  info     Get detailed user info
  users    Return a list of users on the server with basic info
No Category:
  help     Shows this message

Requirements

Python 3.8 and above should work, but please do log any issues you have with lower versions as I'm open to supporting them

To install dependencies: pip install -r requirements.txt

Configuration

Configuration can be specified using environment variables, which can also be declared using an environment file named .env. Sample configuration is provided in a file named sample.env. You can copy this file, name it .env and change the values to suit your environment.

Running the bot

This bot works by monitoring the log files produced by the game, so must be run on the same machine as the server/host

To run: python zomboi.py

It may be a good idea to run as a service, especially on a dedicated server

Docker

You will have to mount the maps and logs directories of the Project Zomboid server into the zomboi container at the expected paths.

To build and run zomboi in a Docker container:

docker build -t zomboi .
docker run -d -v /path/to/maps:~/steam/steamapps/common/ProjectZomboid/media/maps -v /path/to/logs:~/Zomboid/Logs -e DISCORD_TOKEN=my_bot_token -e CHANNEL=channel_name_or_id -e RCON_PASSWORD=my_rcon_password zomboi

Or using docker-compose:

docker-compose build
docker-compose up -d

zomboi's People

Contributors

jonnyptn avatar petegilb avatar laurigates avatar

Stargazers

YeonHo Park avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.