This page is out of date

You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.

Some places to look are:

Please do not create new links to this page.


Import from Celtx

Celtx 1 is a nice, standard, and free screenplay editor. It provides traditional screenplay formatting and many useful screenplay editing and organization tools and reports.

celtx2renpy.py 2 is a command line Python script from User:WorldMaker to convert a Celtx screenplay (following a few simple conventions) into a Ren'Py script.

You'll need argparse and beautifulsoup, both of which you can install with easy_install or pip install. Then from a command line you can run the celtx2renpy.py converter with your screenplay script.

The input file that it expects is not the .celtx file, but the .html screenplay script file embedded in the .celtx file, which is a normal .zip archive and you should be able to open in any archive program. (If you are working with version control, an automation tool called musdex (on PyPI, also from User:WorldMaker) for version-controlling such zip archives as bundles of files, which can handle the extraction for you.)

The converter follows a few simple script conventions, that are meant look meaningfully well in Celtx and are relatively close to their screenplay intentions/counterparts:

Scene Heading
Starts a new "label" named from the lower-cased text up to the first double dash. Ex: "OPENING -- THE BEGINNING" starts a new label called "opening".
Action
Actions become character-less (narrator) dialog.
Character and Dialog
Should be as expected, character saying dialog. Character names are lower-cased. Only special behavior is that the character named "NARRATOR" gets output as character-less, which is used for parentheticals.
Parenthetical
A parenthetical surrounded in square brackets is a "condition" and becomes an "if" for the current "shot" or current character's dialog, depending on which one it follows. A parenthetical surrounded in curly brackets becomes a "python:" block.
Transition
A transition is lower-cased and assumed to be a Ren'Py command, for example "JUMP OPENING" or even "SHOW BG AWESOME".
Shot
A shot title is title-cased, and any final colons are removed, and used as a menu option. All of the following scripting is the reaction to that menu choice, up until the next shot/scene.

Obviously you can't do really deep nesting or similarly complicated script structures, but hopefully you should get about 95% of the way to the script that you want with this tool.