A python script/lib for making custom textboxes that look like they are from games.
Python 3.10
Pillow
Image and font files from the appropriate game are required for it to work, and are not included in this repository.
Each game "style" also requires some metadata files specifying the layout, example ones for OMORI and Oneshot are included.
Data format reference can be found in the examples directory.
Textboxes can be created by either using generate()
, which gives the most flexibility, or parsestr()
, which is less flexible but more appropriate for something like a Discord bot.
(parsestrlist()
can also be used, but will probably be removed later, since you can use the presplit
kwarg of parsestr()
for the same sort of thing)
The syntax for parsestr()
is defined in the str
key in the parse.json
of the style.
gen_help()
can be called to create a help message that is accurate to the currently available styles, including parsestr()
syntax and recognized flags.
generate("oneshot", {"main": "My rams clock at 1333 megaherds."}, {"face": "shepherd"})
or parsestr("oneshot shepherd My rams clock at 1333 megaherds.")
generate("omori", {"main": "Hi, OMORI! Cliff-faced as usual, I see.\nYou should totally smile more! I've always liked your smile.", "name": "MARI"}, {"face": "mari_dw_smile2"})
or parsestr("omori MARI mari_dw_smile2 Hi, OMORI! Cliff-faced as usual, I see.\nYou should totally smile more! I've always liked your smile.")