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
    a_layers_info_path='a.txt',
    # Path to a layer info files, usually located at /fgimage/<character_name>/<character_name>a.txt
    b_layers_info_path='b.txt',
    # Path to b layer info files, usually located at /fgimage/<character_name>/<character_name>b.txt
    assets_path='assets',
    # Path to the assets folder, usually located at /fgimage/<character_name>
    character_name='character_name',
    # Name of the character, used to assist in locating the layer images
)

# 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.2.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

krkr_sprite_synth-0.2.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krkr_sprite_synth-0.2.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.22.4 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for krkr_sprite_synth-0.2.0.tar.gz
Algorithm Hash digest
SHA256 049b6c2ccd76ca5f46c27e0221664d8b0d74ade3097cb24f1f36cc3548ee3055
MD5 58a64d0c35982f92fe68d453247b9de5
BLAKE2b-256 f826111334715a05011e9635302acd97695c68e54aad59c3fa13ccdbc9c250c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krkr_sprite_synth-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.22.4 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for krkr_sprite_synth-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39219a4b551447a1fd79a50ceefffcc81fd67693db076de2b87266182ab9cd1d
MD5 e35aa74b6b166f06e0af371cf3f39c18
BLAKE2b-256 9ef9ca7c253033d3420a5533457c130b9e0dd3540eaa0b9586fada4e7762b564

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