Victoria 3 save files data analytics notes

The idea is to feed data from vi3 save files to some streaming system like Kafka + kSQL, slice and dice that data into a wide set of dimensions and provide some high-level dimension view on an entire economics flow

For example - create a graph of resources to materials to consumer products and calculate various money flows

The first window should be a graph of all resources with all ingress and egress profitability if possible to get a picture of an economy of a country

  • It would be good to see that % of $ consumers income is spent on it
  • Get the number of open vacancies per state or type of building
    • the per type of building can be shown via the building list table

package main

import (

func main() {
    r, err := zip.OpenReader("autosave.v3")
    if err != nil {
    defer r.Close()

    for _, f := range r.File {
        fmt.Printf("Contents of %s:\n", f.Name)
        rc, err := f.Open()
        if err != nil {
        _, err = io.CopyN(os.Stdout, rc, 8000)
        if err != nil {

Use tree-spliter to parse CW DSL

Extract graph nodes from parsed tree-sitter nodes

#tcs #vi3 #mods