Crystal Projector
This is a library for manipulating data structures in the video game Crystal Project. This currently can read:
- World files
- Database files
- Texture packs
- Save files
- Mod files
This will hopefully soon be able to modify and write out the above, as well as read additional things, like logfiles.
Using Crystal Projector as a Set of Schemas
JSON Files
The JSON Schema formats for each Crystal Project format can be found in schema/json.
Binary files
The Kaitai Struct formats for Crystal Project's .dat and .sav files can be found in schema/ksy.
Using Crystal Projector as a Python Library
You will need Python, version 3.8 or later.
To install Crystal Projector:
python3 -m pip install --upgrade --pre git+https://github.com/kaitai-io/kaitai_struct_python_runtime.git
python3 -m pip install crystal-projector
Then you can invoke it with:
crystal-projector --help
And use it in Python scripts like so:
import crystal_projector
image = crystal_projector.world.visualize_world_map(input("enter your Crystal Project 'Content' folder:"), "field")
image.save("map.png")
Developing Crystal Projector
Dependencies
Kaitai Struct
You need Kaitai Struct and its Python bindings, latest nightly.
KSC has some issues with Python:
- No type annotations.
- It imports sub-KSY file dependencies incorrectly;
import Xshould befrom . import X. - It does not stop keywords from being used as names.
The latter two are fixed by us.
Quicktype
We use Quicktype; you'll need its NPM package. However, Quicktype also has issues:
- No support for integer enums; if you omit
type: integerfrom such enums, Quicktype crashes. - Does not support multi-file
$refs in a smart manner.
Python packages
kaitaistruct: Do NOT pull this from PyPI. Do this instead:python3 -m pip install --upgrade --pre git+https://github.com/kaitai-io/kaitai_struct_python_runtime.git
Pillow: ForPIL.
For developing and testing:
pre-commit.pyyaml: Foryaml.jsonschema.
Installing the Project
python3 -m pip install -e .[dev, test]
pre-commit install
Building the Project
python3 build_schemas.py
Distributing the Project
python3 -m build
Metadata
Release files for crystal-projector 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crystal_projector-0.1.0.tar.gz | 15.6 kB | Without provenance | Details for crystal_projector-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crystal_projector-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for crystal_projector-0.1.0-py3-none-any.whl |
Total release size: 32.4 kB
Release files / crystal_projector-0.1.0.tar.gz
| Download URL | crystal_projector-0.1.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4726fffaf791e0d800226cd145de3c8a07d8ea7b4d80fe72fc9af73a190c4c46
|
|
BLAKE2b-256 checksum How to use checksums |
e6cb5c7133b9df00f57ee2cb162e6319f3e1178e69db6eb2eb775d1c5f74d7b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / crystal_projector-0.1.0-py3-none-any.whl
| Download URL | crystal_projector-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4903c95cb9de0f06328f22d44910d42fc672701bc810d4303c8711d91d81430
|
|
BLAKE2b-256 checksum How to use checksums |
2a4a03503829254a4ce9c2b123afcae73d0305932d86c6e7cfcc020147e2eaf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for crystal-projector 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.