Skip to main content

A library for synthesizing character sprites for galgame games using the krkr engine

Project description

Kirikiri Sprite Synth

This is a simple tool to generate a sprite sheet from a set of images. It provides exactly the same sprite sheet as the one generated by the Kirikiri engine, which is used in many visual novels.

Usage

from PIL import Image
from kirikiri_sprite_synth import SpriteSynth


# Create a SpriteSynth object
synth = SpriteSynth(
    a_info_path='a_info.txt',
    # Path to a_info file, usually located at /fgimage/<character_name>a_info.txt
    b_info_path='b_info.txt',
    # Path to b_info file, usually located at /fgimage/<character_name>b_info.txt
    layers_info_path_template='{info_type}.txt',
    # Path to layer info files, usually located at /fgimage/<character_name>/<character_name>{info_type}.txt
    assets_path='assets',
    # Path to the assets folder, usually located at /fgimage/<character_name>
)

# Generate the sprite sheet
sprite: Image.Image = synth.draw(
    dress="私服",
    face="01",
    pose="1",
)

# Save the sprite sheet
sprite.save('sprite.png')

Installation

pip
pip install kirikiri-sprite-synth
pdm
pdm add kirikiri-sprite-synth
poetry
poetry add kirikiri-sprite-synth
conda
conda install kiri-kiri-sprite-synth -c conda-forge

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Senren * Banka: Great visual novel that inspired me to create this tool.

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

krkr_sprite_synth-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

krkr_sprite_synth-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file krkr_sprite_synth-0.1.0.tar.gz.

File metadata

  • Download URL: krkr_sprite_synth-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for krkr_sprite_synth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 de9fc4062b34112409aefea29e7cd62a559011c23630d38aa0aad9e187837f0c
MD5 c2a528b4078403f3afc0b299fe52f2c4
BLAKE2b-256 edb1aa2ae194e660a189e446db065bc1945cbc22fcd145d7387e5c564a8fb9bf

See more details on using hashes here.

File details

Details for the file krkr_sprite_synth-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: krkr_sprite_synth-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for krkr_sprite_synth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 155a15685cfd46f4701ef436c06b3008087b6e84765e3c503295f4b481cb8556
MD5 79e5c75e02f06f6fdc18f823ca85f9d6
BLAKE2b-256 cef5a1f97d1eac42bf16b604a19dcf865c1cb7abb6c664ac96b04b390300af87

See more details on using hashes here.

Supported by

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