Skip to main content

A fan-made Python library for Doki Doki Literature Club!, providing DDLC-style character dialogs, choice menus, and typewriter effects using PySide6. Fully cross-platform.

Project description

dokibox

A fan-made Python library for Doki Doki Literature Club, implementing various in-game prompt boxes using PySide6.

⚠️ Credit & IP Guidelines

dokibox is a fan derivative work based on Doki Doki Literature Club (DDLC) and is not officially affiliated with Team Salvato. The original game can be downloaded here or from the Steam store page.

Any user creating derivative works with this library must strictly follow the official IP guidelines.

Special thanks to Joseph from Team Salvato for his support and responses via email!

image

Installation

Install from PyPI:

pip install dokibox

Import

import dokibox

ynbox — Yes/No Dialog

image
dokibox.ynbox(msg="Delete?", tooltip=False)  bool
Parameter Type Default Description
msg str "" Message text
tooltip bool False Tooltip text
btn_texts tuple None Confirm button prompt. When set to None, dokibox will automatically detect the system language. To modify, please pass in a tuple, replacing "Yes" with the first parameter and "No" with the second parameter. English is used by default when the language is unknown.
font_family str None Font family (default: "Microsoft YaHei"). Set to None or unset to use default.
font_size int None Font size in points. Set to None or unset to use default.
pinned bool True Whether to pin

Return value: clicking "Yes" returns True; clicking "No" or pressing Esc returns False.

if dokibox.ynbox("Delete?"):
    print("User clicked Yes")

msgbox — Message Box

image
dokibox.msgbox(msg="Operation successful!", tooltip=False)  True
Parameter Type Default Description
msg str "" Message text
tooltip bool False Tooltip text
font_family str None Font family (default: "Microsoft YaHei"). Set to None to use default.
font_size int None Font size in points. Set to None to use default.
pinned bool True Whether to pin

Single OK button. Closes on click, Enter, or Esc; returns True.

dokibox.msgbox("Saved successfully!")

choicebox — Multiple Choice Dialog

image
dokibox.choicebox(msg="", choices=None, tooltip=False, force=None)  str | None
Parameter Type Default Description
msg str "" Prompt text; hidden when empty
choices list None List of choices
tooltip bool False Tooltip text
force int None Force-select an index (0-based); cursor moves to the center of that choice
font_family str None Font family (default: "Microsoft YaHei"). Set to None to use default.
font_size int None Font size in points. Set to None to use default.
pinned bool True Whether to pin

Return value: the selected text content; Esc returns None.

char = dokibox.choicebox("Choose a character", ["Sayori", "Yuri", "Natsuki"], force=1)
print(char)  # "Yuri"

dialogbox — Bottom Dialog Box

image
dokibox.dialogbox(msg="", w=None, h=220, name=None, typewriter=True, speed=50, bold=False)
Parameter Type Default Description
msg str "" Message text
w int None Width (default 60% of screen width)
h int 220 Height
name str None Character name tag (white rounded label protruding above the dialog)
typewriter bool True Typewriter mode
chardelay int 50 Typewriter interval per character (ms)
bold bool False Bold black stroke on text
overflow_mode string wrap Has three parameters: wrap, overflow, and hide. wrap enables automatic line wrapping, overflow causes content to overflow the screen, and hide hides the content that goes off-screen.
font_family str None Font family (default: "Microsoft YaHei"). Set to None to use default.
font_size int None Font size in points (default: 20). Set to None to use default.
fdst bool False If True, destroys the window when dismissed. Use this for the final line of a dialogue scene or story branch to ensure the window closes completely.
transparent bool True Apply alpha gradient from top to bottom, making the body see-through
glare bool True Draw a white semicircular highlight at the bottom of the dialog
pinned bool True Whether to pin

In typewriter mode:

  • Text appears character by character
  • First click → reveals full text instantly
  • Second click → closes
dokibox.dialogbox("Do you actually go by Administrator or something?", name="Monika")
dokibox.dialogbox("Slower...", speed=80, bold=True)
dokibox.dialogbox("All at once", typewriter=False)

enterbox - Text Enter Box

image
cmd = dokibox.enterbox("Please enter your name")
print(cmd) #The user input string
Parameter Type Default Description
msg str "" Prompt text
default str "" Auto-filled content
tooltip bool False Tooltip text
pinned bool True Whether to pin to the top
font_family str None Font name (default "Microsoft YaHei"); pass None to use the default
font_size int None Font size (in points, default 20); pass None to use the default
max_length int None Maximum input character length
pinned bool True Whether to pin

garbled — Generate Garbled String

image
dokibox.dialogbox(dokibox.garbled(200), name="Monika", typewriter=True,chardelay=5,bold=True,overflow_mode="overflow")
Parameter Type Default Description
n int 200 the length of garbled string

Finally

This project is licensed under the MIT license. When using it, please strictly comply with Team Salvato's relevant fan work IP creation guidelines.

Sayori is my favorite!🎀

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

dokibox-2.3.2.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

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

dokibox-2.3.2-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file dokibox-2.3.2.tar.gz.

File metadata

  • Download URL: dokibox-2.3.2.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for dokibox-2.3.2.tar.gz
Algorithm Hash digest
SHA256 cfa508f7238463fbf634ce3820c13ff997e6de1cf4c607bd15c03bdf376c962e
MD5 cb585601bc5b90e1e92b19e71dfd4d77
BLAKE2b-256 9dd6da9fce6a2e16a51becac2848c58812e757f82d016bec9d0a40ece054266d

See more details on using hashes here.

File details

Details for the file dokibox-2.3.2-py3-none-any.whl.

File metadata

  • Download URL: dokibox-2.3.2-py3-none-any.whl
  • Upload date:
  • Size: 32.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for dokibox-2.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c11491a25d16e3ba0c17344cebeb001284cc83504732aa14ed6c7ae4ac7f94b
MD5 c959e11bbc8c301d9e5927ea8f7ac5bd
BLAKE2b-256 cfcc9eed3cecd4d24c0063410999a60d1ecc3e7d33a5d5e997b0e7da8d84e8d6

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