Avorion

Avorion

Not enough ratings
Obsidian Discord Bridge
   
Award
Favorite
Favorited
Unfavorite
Mods: Mod
File Size
Posted
321.529 KB
12 Jul @ 11:43pm
1 Change Note ( view )

Subscribe to download
Obsidian Discord Bridge

Description
The Obsidian Discord Bridge creates communication between your Avorion server and Discord. Watch server chat in real-time, let Discord users communicate with players in-game, and keep track of server activity - all without requiring players to install any mods!

Originally made for my Avorion Server Obsidian Network: New Beginnings I thought it was too good to not share. So here it is!

Features
  • Bidirectional Chat - Messages flow both ways between Discord and Avorion
  • Player Tracking - See who joins and leaves your server with styled notifications
  • Live Status - Discord bot displays current player count in its status
  • Smart Colors - Each player gets a unique color that avoids confusion with system messages
  • Server-Side Only - No client downloads required! Players connect normally
  • Cross-Platform - Works on Windows and Linux servers

How It Works
This mod uses a clever file-based communication system between Avorion's Lua environment and an external Python Discord bot. Messages are queued and delivered reliably with acknowledgment protocols to ensure nothing gets lost.

📦 Requirements
For the Avorion Server:
  • AzimuthLib - Required dependency (install from Workshop)
  • Server admin access

For the Discord Bot:
  • Python 3.8 or higher
  • Discord Bot Token (create one here[discord.com])
  • A dedicated Discord channel for the bridge

🛠️ Installation
1. Install the Mod
  • Subscribe to this mod and AzimuthLib
  • Add both to your server's mod list

2. Set Up the Discord Bot
  1. Install Python dependencies:
    pip install discord.py python-dotenv
  2. Edit the included .env file with your configuration:
    # Discord Bot Configuration DISCORD_BOT_TOKEN=your_bot_token_here DISCORD_CHANNEL_ID=your_channel_id_here # Your Galaxy folder name. Defaults to dedicated_server. Uncomment below and change if your galaxy save folder differs from the default path or name. # AVORION_GALAXY_NAME=dedicated_server
  3. Run the bot:
    Included in the mod workshop folder is a helper.py file. Located at \workshop\content\445220\3524430287
    python helper.py
    Important!: The helper needs to be running at all times when the server is running. As there is no way to have a discord bot running directly through the mod/server due to Avorion's sandboxed nature.

    You can make a script/batch file to run helper.py for you automatically when the server is run. I have not included this due to the many ways server owners can start their servers.

🤝 Support & Contribution
  • Issues? Report them on Discord via the Obsidian Network server, message me on Steam or comment in the Bug/Issues Discussion thread.
  • Questions? Leave a comment!
  • Want to be a part of our community? Join our Discord Server[discord.gg]

Technical Details
This mod implements a robust file-based IPC (Inter-Process Communication) system that works within Avorion's sandboxed Lua environment. It uses special control characters for message delimiting and includes acknowledgment mechanisms to prevent message loss or duplication.

By running entirely on the server, this mod:
  • Requires zero client-side installation
  • Maintains security by keeping Discord tokens server-side
  • Reduces complexity for players
  • Works with vanilla clients

📄 License
MIT License - Feel free to modify!

🙏 Credits
  • Built using AzimuthLib by Rinart73
  • Inspired by similar bridges for other games and Avorion Announcer be sure to show them some love!
  • Claude AI (I am not the best at coding so using Claude helped me speed up the development process)
  • Thanks massively to the Avorion modding community!



⭐ If you find this mod useful, please rate and favorite! It helps other server admins discover it.
Popular Discussions View All (1)
0
13 Jul @ 3:55am
Bugs/Issues
Jordan
2 Comments
KelTuze 13 Jul @ 3:35am 
Согласен, для хостов отличная штука. Да и я давно хотел такое.
Joenyan 13 Jul @ 3:27am 
Great concept. Useless for me, but pretty handy for others