This is a small project to generate blueprint to the game Dyson Sphere Program (DSP)
Project description
dsp_bp_generator (Work in progress)
This is a small project to generate blueprint to the game Dyson Sphere Program (DSP). The project is inspired from the awesome work put into dspbptk, from where the MD5 implementation and the DysonSphereItem enum is taken.
In the beginning, the project aimed to be a tool only to generate a production factory of a user defined item. But since then, it have evolved to be a more generic implementation of a library, to generate and connect various buildings, due to the complexity of the way the blue print is encoded.
How to use
A few small examples show how to run the parser and the serializer of blueprints. As well as a small example of how to generate blueprints from scratch:
(tested using Python 3.8.10)
Create virtual environment:
python -m venv venv
Activate the virtual environment:
source venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Install this package:
pip install .
To run the blueprint parser, save your blueprint in a file, and run:
python parse.py --input_file=bp_input.txt --output_file=bp_output_data.txt
To run the blueprint parser- editer & serializer, save your blueprint in a file, and run:
python parse_edit_and_serialize.py --input_file=bp_input.txt --output_file=bp_output.txt
To generate and serialize a blueprint, try running:
python generate_and_serialize.py --output_file=bp_output.txt
Blueprint encoding
A blueprint in Dyson Sphere Program is a list of binary data blobs, each representing a building (this protocol is derived from the awsome work done in dspbptk).
| Building | Pose | Connection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
All these field is used to specify settings for each single object. The simple ones are for instance the postions (some buildings have two positions such as Sorters), but more complex ones are the indicies, which can be linked together to specify for instance a connection between two Belts, or a connection from a Sorter to an Arc Smelter. Small helper functions to handle all these settings for each building type have growned into a small library of tools to generate generic blueprints.
Before this big datablob, represnting a list of buildings, is a couple of headers.
| Blueprint | Header | Area | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
This whole data blob is finnaly compressed using gzip and then base64 encoded. Furthermore a fixed string is prepended, and a hash is appended.
Bluepring structure
For now only the most basic features is implemented. Generate and connects:
- Belts
- Smelters
- Sorters
- Assemblers
- Splitters
- Power poles
Forthermore, functionality to generate a production bus for an specific item at a user defined rate is implemented. However, only smelters and assemblers are supported. Which means no support for oil refinaries, chemical plants, etc.
The factory above is generated by dsp_bp_generator
Limitations:
- Do only support one recipe per item
- Does only support smelter- and assembler factories
- Does only support single output recipies
- Does not (fully) support prolifirator (Mk.I, Mk.II, Mk.III)
- Assumes all sorters and belts lives up to the requirements of throughput
- Does not support multiple belts of same item
- Does not support different tiers of sorters, factories nor belts
- Documentation...
TODOs
For now only the very basic support of structures are implemented.
Buildings to implement:
Tesla Tower- Wireless Power Tower
- Satelite Substation
- Wind turbine
- Thermal Power Plant
- Solar Panel
- Accumulator
- Geothermal Power Station
- Mini Fusion Power Plant
- Energy Exchanger
- Ray Receiver
Conveyer Belt MK.IConveyer Belt MK.IIConveyer Belt MK.IIISplitter- Automatic Piler
- Traffic Monitor
- Spray Coater
- Depot MK.I
- Depot MK.II
- Storange Tank
- Logistic Distributor
- Planeraty Logistics Station
- Interstellar Logistic Station
- Orbital Collector
Sorter MK.ISorter MK.IISorter MK.IIIPile Sorter- Mining Machine
- Advanced Mining Machine
- Water Pump
- Oil Extractor
- Oil Refinary
- Fractionator
- Chemical Plant
- Quantum Chemical Plant
- Miniature Particle Collider
Arc Smelter- Plane Smelter
Assembling Machine Mk.IAssembling Machine Mk.IIAssembling Machine Mk.III- Matrix Lab
- EM-Rail Ejector
- Vertical Launching Silo
- Gauss Turret
- Missile Turret
- Implosion cannon
- Laser Turret
- Plasma Turret
- SR Plasma Turret
- Battlefield Analysis Base
- Jammer Tower
- Signal Tower
- Planetary Shield Generator
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dsp_bp_generator-0.1.0.tar.gz.
File metadata
- Download URL: dsp_bp_generator-0.1.0.tar.gz
- Upload date:
- Size: 41.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1022-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a961f1d9d8234a0536a9cd8471935307f63478f5e3c559a740bc87459af6eb13
|
|
| MD5 |
b579c6cdb6012242b1d0a0485dbbdc89
|
|
| BLAKE2b-256 |
4b929a24357e36cd00006c65fa0a2e8e1eb16009d7df2ec8100e1bafe5d968bd
|
File details
Details for the file dsp_bp_generator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dsp_bp_generator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 51.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1022-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81600db89bb1ccb37380b16968f2463ce8f7c2aade81e014b7f96b7c2c08440d
|
|
| MD5 |
5cf406781cc3e2e09bc80fccdb26ff85
|
|
| BLAKE2b-256 |
e24a43cf8d0cfaeef42096661752fe03ab4a59cbaf78467926112c96a2087b3e
|