Skip to content

fsd66/stellaris-research-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stellaris Research Path

This is a utility that leverages data from Turanar's stellaris-tech-tree and lists the set of research required for a given technology.

Stellaris' tech-tree is organized roughly as a directed graph, and this utility does a simple breadth-first-search to list technology dependencies.

While specifying the target technology is case-insensitive, it must match exactly

Usage

const path = require("path");
const { readTechnologyFile, findResearchPath } = require("stellaris-research-path");

// readTechnologyFile returns a Promise so async/await works too!
readTechnologyFile(path.join(__dirname, "data", "stellaris-technologies.json"))
    .then(techFile => {
        const researchPath = findResearchPath("Mega-Engineering", techFile);
        // ...do stuff
    }).catch(err => console.error(err));

In actual use, you might want to cache the technology file in memory if you plan to run this function a lot, but I will leave that determination to your own judgement and use case.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published