Skip to content

flying-huckleberry/SLbot

Repository files navigation

Synopsis

This node.js application is a web server, discord bot, & data-sending cron, which hosts statistical game server data generated by SLmod.

SLbot screenshot

When SLmod is used on a DCS game server, SLbot cron will periodically send its game data. You can run it alongside each DCS game server that uses SLmod, and it will periodically check different stats data. If it finds something new, it sends the data off as a JSON object to your SLbot Web Server instance, whether that is run locally, or hosted somewhere else.

SLbot Web Server then, keeps track of the current stats data for all the DCS game servers which are sending it data. It also acts as the front end website which can be publicly accessed to view stats for the servers.

See it in action

SLbot's third feature is a Discord bot. When this feature is enabled (alongside the Web Server), it will allow you to create a personal Bot for your unit/group's discord server(s), which will provide realtime updates to the stats dataset, and let you query for useful statistics data such as player hours, kills, and deaths.

TODO: full bot writeup, creating a bot, bot commands

Technical details

SLbot is an electron-packaged node.js application, utilizing Discord.js for the bot server & Express for the web server. The lua table containing player stats is converted to JSON, and sent off to the web server's API, where it is stored and integrated into the master database, which is fully capable of hosting statistics for multiple game servers. Note that you can run SLbot on other game servers, while only enabling the "DCS Server" feature, which will send the data to another instance of SLbot, which has the other features enabled (Web Server, Discord Bot).

Motivation

I fly helicopter simulations with a unit called the 229th. The simulator is DCS, and the mod is SLmod, which is really neat because it logs game statistics.

The idea was, let's get that data from SLmod and make it web-facing so people can look anytime, say, what their flight hours are for a particular server.

This could help IP's see logged hours, or just let people go and see their kills or deaths.

API Reference

  • /api/dcs/slmod/update -> accepts POST JSON content
  • /api/web/fetch -> sends POST JSON content to client
  • TODO: full API

License

MIT

About

Runs alongside SLmod to provide a suite of features centered around making your SLmod server statistics available online

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published