eliasdoehne / stellaris-dashboard

A graph dashboard and event log for Stellaris.
125 stars 15 forks source link

Stellaris Dashboard

The Stellaris Dashboard is a program that reads your Stellaris save files while you play the game and shows detailed information and statistics about your playthrough.

The dashboard has two main components:

  1. A graph-based graph dashboard and a historical map of the galaxy.
  2. A text-based event ledger listing the events that define your game's history.

You can find some screenshots on the Steam workshop page: https://steamcommunity.com/sharedfiles/filedetails/?id=1466534202

The dashboard works with Ironman and the mod for in-game access is (currently) achievement compatible.

Installation

If you experience any problems, please start a new discussion topic in the steam workshop or open a issue on github.

Mod for in-game access

Before following the instructions below, subscribe to the mod in the Steam Workshop. Remember to activate the mod in the Stellaris Launcher. To access the dashboard, you can open the in-game internet browser by clicking on the help icon in the lower right, or pressing shortcut ALT-B. If the help button is not accessible, click the "More" button to reveal it:

Screenshot of overflow menu that contains the help icon

The dashboard can then be accessed with the buttons in the top right corner of the browser window:

Screenshot of navigation buttons added to the browser by the mod

You can also access the dashboard by opening http://localhost:28053 in any web browser (maybe you want to use it on a second monitor).

Dashboard Application

  1. Download the latest release of the dashboard from the releases page for your OS.
  2. Extract the zip archive to a location of your choice.
  3. Run the parse_saves application to read any existing save files. This will attempt to load any existing save files into the dashboard's database.
  4. Run the stellarisdashboard application. (recommended to run from a terminal in Linux and macOs to see the dashboard output)

Build it yourself

Other information

Save File Location

If the dashboard is not showing any data, first make sure that you play the game until at least one autosave is triggered while the dashboard is running in the background. If the dashboard does not react to the new save file, the most likely explanation is that it cannot find it.

Check that the save file location is correctly configured in the dashboard settings page, when you go to that path you should see one folder for each of your Stellaris games. By default, the dashboard assumes the values described in the Stellaris wiki. If you have enabled Steam cloud sync for your save files, you may need to change this location.

Visibility Settings

For balance and immersion, only some information about other empires is shown by default. You can enable some settings to show everything:

Timelapse Export

Using the controls under the "Galaxy Map" tab to export a gif timelapse of the galaxy map in your game. The timelapse shows the area controlled by each country on the given date. An example can be found here: https://www.youtube.com/watch?v=OoiRCEWs00I

You can either export the timelapse as a single gif file (which can be large and requires more memory), export the individual frames as png images, or both. The export may take several minutes, check the stellaris dashboard console for progress, and for the exact output location.

The form offers some additional parameters to customize the speed of the animation:

Market Price Graphs

The dashboard includes graphs of market prices for each resource in the game. To get the correct values, you will need to manually configure some things in the file config.yml, as these settings are not available in the built-in settings page.

If config.yml does not exist, go to the settings page linked at the top (or localhost:28053/settings/) and hit "Apply Settings". This will create the file with all of your current settings.

These configurations are applied only when preparing the graph, so you can adjust them at any time in the configuration without reprocessing any data.

Market fees

Currently, there is no easy way to get the market fee information from the save files. To still get the correct numbers in the graph, you can add the fee manually in the configuration by creating additional entries in the market_fee section. By default, a constant fee of 30% is assumed.

For example, to configure a game where the market_fee changed to 20% in 2240 and 5% in 2300, you could change the market_fee section like this:

market_fee:
- {date: 2200.01.01, fee: 0.3}
- {date: 2240.01.01, fee: 0.2}
- {date: 2300.01.01, fee: 0.05}

Resources

The default resource configuration should be correct for the current vanilla Stellaris game.

When using mods that change resources in the game (or if Stellaris is updated in the future), you might need to manually adjust the resource configuration in config.yml to have the data collected for the additional resources.

These values must be configured in the correct order, for vanilla Stellaris, this is the same order in which they are defined in the game file common/strategic_resources/00_strategic_resources.txt.

Names and Localizations

Since Stellaris 3.4, the game no longer stores names (of countries, systems, ships, ...) in the save files as they appear in-game, but instead uses a templating system where names are stored in a more abstract representation. To make names show up in the same way as they do in-game, the dashboard program will try to load the information required from your game files.

If this system is not configured correctly, you will see some long and cryptic names like

{"key": "format.gen_olig.1", "variables": [
{"key": "generic_oli_desc", "value": {"key": "Sovereign"}}, 
{"key": "generic_states", "value": {"key": "Realms"}}, 
{"key": "This.GetSpeciesName", "value": {"key": "SPEC_Klenn"}}]}

when using the dashboard.

If you installed Stellaris in the default location at (C:/Program Files (x86)/Steam/steamapps/common/Stellaris/ on windows), there is a good chance that everything will work without any additional actions. If your game (or Steam library) is not in the default location, you will need to change the "Stellaris install folder" setting and restart the dashboard.

If you play the game in another language, you can change the "Stellaris language" and restart the dashboard. Note that this setting should be the language code used by the game (ie l_braz_por, l_english, l_french, l_german, l_japanese, l_korean, l_polish, l_russian, l_simp_chinese, l_spanish).

If you use mods that add new names, the dashboard should automatically find the required files. Note that if you change your mod list, any new modded names will not be loaded until you restart the dashboard. If modded names are not working at all, you might need to change your "Stellaris user data folder" setting and restart the dashboard. This should be the folder containing the dlc_load.json file as well as the mod/ folder.

How to improve performance

If you find that the dashboard is too slow to browse, you can try some of these things:

Game Modes

Multiplayer

Support for Multiplayer is experimental. The dashboard will avoid showing information about other player controlled empires, even if the "Show all empires" checkbox is ticked in the settings. To use the dashboard in multiplayer, you must first configure your multiplayer username in the dashboard settings menu. You can disable this behavior, uncheck the "Hide other players" setting.

Observer Mode

When using the dashboard in observer mode, you should let the game generate at least one save file as a regular country. After that you can switch to observer mode. You can select the country for the

You should make sure to enable the Store data of all countries setting and you may also want to enable the Show information for all countries setting.

Update notifications

If a new version of the dashboard program is released I also release an update in the Steam workshop, and you will then see a notification in the dashboard UI:

This notification is shown because the workshop mod has a version ID, allowing the dashboard to compare its own version to this ID. The dashboard program itself does not send any data. It only runs on your computer.

Why a separate program?

The dashboard is quite complex and to my knowledge, making a mod with these features by editing the game files would be impossible, or at least much more difficult. This is why you have to run the external program to use the dashboard.

Mod compatibility

The dashboard may or may not work with other mods, it is developed with the vanilla game in mind. If you experience a problem with a modded game, you can still let me know: If the mod is quite popular and the problem is easily fixed, I will take a look.


The Python code is released under the MIT license:

MIT License

Copyright (c) 2018 Elias Doehne

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Stellaris Copyright © 2018 Paradox Interactive AB. www.paradoxplaza.com