Skip to main content

Utility for extracting information about Survivalist: Invisible Strain from the game's XML files and saving it in CSV and Steam Community markup formats.

Project description

survivalist-gamedata

Description

This is a utility for extracting information about the game Survivalist: Invisible Strain from the game's XML files. The information comprises the game's crafting recipes and items (equipment and liquids). The utility saves the extracted data in CSV format, as well as table format using the markup language used for writing Steam Community guides.

The utility is useful for fans and modders who want to generate up-to-date references for the game's crafting recipes and items.

The output of the utility is used for the Crafting Reference Guide and the Item Reference Guide for the game on steamcommunity.com.

Getting Started

Installing

The usual:

pip install survivalist-gamedata

Or an appropriate command for the virtual environment manager you use.

The installation will install the survivalist-gamedata console script.

Usage

The game needs to be installed to run this.

Run the utility on the command-line:

survivalist-gamedata

Or as a package:

python -m survivalist_gamedata

Get help:

survivalist-gamedata --help

The first time the utility is run, it will create a config.yaml file in your current working directory. You may configure this file to customise the utility's behavior if needed.

The utility will find the version of the game that is installed on your system, and creates a subdirectory in data/ for the output files for the detected version.

The utility will print essential messages to the console, and debugging messages to debug.log.

Configuration

The config.yaml file in your current working directory contains the utility's configuration directives.

  • The base_dir is by default set to the game's installation directory assuming you installed the game using Steam on Windows. Change this directive if your game is installed somewhere else.

  • version_file and gamedata_dirs tell the utility where the game files are. The utility will search for crafting recipes by looking for Recipes.xml in each directory. It will search for items by searching for XML files in Equipment/ and Liquid/ subdirectories in each directory.

  • String replacements are configured in replacements. Replacements are applied when outputting the game's data in Steam Community markup format.

  • The recipes section configures the output of the game's craftig recipes.

    • csv_fields configures which columns are exported to the CSV file.

    • The steam_tables > table directive configures the tables that are generated in Steam Community markup language. For each table, SkillType and optionally RecipeType must be specified to let the generator know what subset of the full recipes list you want to include in the table. Any recipe for which SkillType and RecipeType matches your configuration will be included. Optionally, columns can be specified to change the columns for specific tables, if different from default_columns.

  • The game_items section configures the output of the game's equipment and liquids.

    • skip_files specifies XML files that need to be excluded from the output, for example if they contain duplicated information.

    • remove_keys configures which columns are not exported to the CSV file.

    • The steam_tables > table directive configures the tables that are generated in Steam Community markup language. For each table, Category must be specified to let the generator know what subset of the full items list you want to include in the table. Any item for which the Category starts with your configuration will be included. Optionally, columns can be specified to change the columns for specific tables, if different from default_columns.

Version History

  • 1.0
    • Initial Release. Supports recipes, equipment and liquids.

Future development

As of January 2024, the utility works properly with Survivalist: Invisible Strain, public beta v196. In the future, more recipe files and gamedata directories may be added to the game. These may require tweaks to the utility's configuration and/or code.

Authors

License

This project is licensed under the Apache License Version 2.0 - see the LICENSE.txt file for details.

Acknowledgments

A shout-out to Bob The PR Bot - the sole developer of Survivalist: Invisible Strain!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

survivalist_gamedata-1.0.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

survivalist_gamedata-1.0.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file survivalist_gamedata-1.0.0.tar.gz.

File metadata

  • Download URL: survivalist_gamedata-1.0.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for survivalist_gamedata-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fca8d68ef31eebc82ad6ecbea30bd39c7d63a13b9f2b7ab571f2791903ad0219
MD5 05d0c507232e6dd746e6a48504dbc91b
BLAKE2b-256 36f3b090ca0a7afc9bda44119a8bb62c70dbe6a30818eb7796ffc4565d3f7980

See more details on using hashes here.

File details

Details for the file survivalist_gamedata-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for survivalist_gamedata-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6a33d7e76334a11eb32670a62dee3d7743cf18c3b5d2b8584193acb608f47e0
MD5 bccc814e797c628559cc5a7288094304
BLAKE2b-256 f064144c556f29d99bfb2f28a0f5e2b464cb4b7a1ab8730781c5daf2eab8d002

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page