Matthew James
11/03/2022

View Bitbucket Repo

 

What is Steletric?

Stellaris meets metrics. Steletric tracks datapoints for all empires over the course of a game. This allows viewing of, for example, the available minerals over a period of time. There are many different metrics to view.

Steletric is a stand alone program, meaning it is not a mod for Stellaris in the typical sense. Steletric is its own application and is opened by its .exe file. It is designed to be run (an minimised) while Stellaris is running.

Why make Steletric?

Coming from other games I've always found the endgame victory notification dreadfully underwhelming. It basically says "good job" and that's it. There's no reliving the moments of turmoil or seeing where big plays or battles took place. Entire struggles could have happened to other empires that you were completely unaware of. Seeing the victory screen invokes an instant "Is that it? that's just an exit screen with more steps", the victory screen provides no new information (if your intel is high) and ultimately very little value.


Image Source

Other RTS games all have a post-game feature in common: a timeline showing different metrics. A classic example is "Age of Empires II" which looks like this after the game has ended:


Image source

In a game that is closer to the 4x strategy genre of Stellaris, "Sins of a Solar Empire" provides this timeline post-game feature beautifully (even if it has an 8-hour cut off).
Image Source

I modeled the design off these games and aimed at providing this feature to Stellaris.

How does it work?

Steletric monitors a folder for all Stellaris savegame files, unzips them and attempts to parse the gamedata within. After parsing, a snapshot is saved in the sqlite database along with some metadata. It then formats and displays this data as semi-interactive line-graphs.

This entire process is done every minute with the idea of keeping Steletric open and monitoring a folder while playing. This way Steletric will process all the auto-saves and bank those snapshots in its own database. This means even after the old autosaves are rotated out of the save directory they have already been saved and will still show as a datapoint in the graphs.

Why I personally made Steletric

I've been looking for a personal project to really dig into Electron and get my hand dirty on some more serious tech. I wanted to get a better understanding on how to test Node.js code and also how to properly use the IPC mechanism that Electron uses (and in a secure way). I also wanted to learn how Sqlite could be embedded into an Electron app and how to test that db through mocking it out for an in-memory db.

It's far from complete but the journey has been great and I have learnt a whole heap of cool stuff already.

As I said this is VERY early days but it may still be stable enough to not crash every time. Only the country objects are currently being parsed which means almost all of the military related datapoints will all be zero. There's also some bugs, like the stored techpoints not displaying correctly even though they are being captured.

Download Steletric Exe (Alpha 0.2.0) AT YOUR OWN RISK

(internet .exe's are scary, compile it yourself via the repo at the top of the page)