Screenwritng in Fountain Format: Interoperability, Render and Analysis

This entry is part of the serie Screenwriting in Fountain Format

  1. Screenwriting in Fountain: Concept and Basic Usage
  2. Screenwritng in Fountain Format: Using and Customizing Atom Editor
  3. Screenwritng in Fountain Format: Interoperability, Render and Analysis

Introduction

In the first article of this series on script editing, we saw how writing in Fountain allow to write our scripts in any text editing software.

In this article, we will explore the interoperability possibilities offered by this format, with a set of tools that I developed to meet my needs. No need to use the Atom editor, presented in the second article of the series, to benefit from what will be exposed here, you can use any text or scenario editor to prepare your Fountain files. However, working directly in Fountain will have some benefits.

Since Fountain is simply plain text, it is very easy to code functions (as webapps, scripts etc) to process / analyze the contents of these files.

Thus, there are plenty of mini webapps to process Fountain, most of them based on Fountain.js by mattdaly, a simple web page that allows you to file a .fountain file to render in HTML. There are others, such as ScreenPlain, which also allows for rendering HTML or FinalDraft format, or AfterWriting which is able to generate a PDF export, and to have dialogs stats reports.

However, there were no existing solutions for my specific needs:

  • Responsive HTML render, for a pleasant reading on any device, using a simple web browser.
  • Dialogues charts, to visualize the distribution of the dialogues between the characters.
  • Automatic initialization and refreshing, without having to manually load the Fountain file (as I use the scenarios in dialog recording sessions, I need the actor to be able to see the changes in real time without having to refresh the page).
  • Colors on characters names (yes, always that!).

So I decided to start developing my own mini webapp, by editing Fountain.js and adding the desired features. Developed over 3 months (one evening here and there) during the writing of season 2 of my saga Alien 2347, the app should be mature enough for a presentation!

If you want to see detailed and technical list of features which I have integrated, or if you want to contribute / create your own version, you can consult the project on GitHub.

Usage

Online

You can simply drag and drop a .fountain file onto the online version of the application, accessible at x-raym.github.io/Fountain.js/app/. Your scenario will be analyzed and displayed as HTML. However, this version does not currently handle custom colors; I may integrate this in the future according to feedbacks I’ll get.

A simple invitation to drag and drop.

Locally

You can download the app (it’s less than 1MB) to use it Local. You will only have to launch the index.html file to display the same page as the online version.

Automatic Initialization

One of the strengths of this webapp is that you can analyze a scenario directly without having to drag and drop in the loading page.

Small restriction, only FireFox allows to use the automatic display from a local file. Other browsers have limitations on local file permissions that prevent the use of the features I’ve used.

To do this, create a subfolder in the application folder, and place a your .fountain file in it, as well of a copy of /samples/sample.html renamed just like your Fountain file. So, if you have a MyScenario.fountain file, put it in a /MyScripts/ folder and place a copy of /samples/sample.html renamed to MyScenario.html next to it. Double-clicking MyScenario.html will automatically render MyScenario.fountain in your browser. You can place as many .fountain as you want in these subfolders.

Mis in place of the automatic initialization of a document.

Optionally, you can create a characters.json file in a /assets folder next to your .fountain to render it. take into account information specific to your characters (such as their colors or groups). Take as a reference the one provided as an example in the application to create your own.

If you prefer to have your Fountain files outside the application folder, you will need to edit the HTML file to correct the path to the resources it tries to call.

Render

The rendering is very similar to those proposed by Fountain.js, however I added some features:

  • Several themes : light and dark blue (inspired by Atom theme)
  • Mobile friendly
  • Button for full width display (useful for charts)
  • Character names colorization
  • Interactive table of contents for sequences
Some buttons allow to customize the display.

Ice on the cake, the scenario file is checked every second to see if it has been modified since the the last render, which makes it possible to have an almost real-time rendering during editing.

Editing the source Fountain file on the left with Atom, and updating the preview on the right without reloading the page. In this case, it can be used to modify the lines of a scenario which an actor would be viewing on another device (he would then see the changes take place in real time), or to display the statist of the scenario as you write.

Analysis

Balance of Dialogues

In addition to these initialization and rendering options, your script is provided with dialogs charts.

First of all, a classic but indispensable bar chart, to see the dialog distribution by character.

A visual and interactive visualization of dialogue distribution between the characters, with their respective colors.

You can filter the analysis by sequence, and even change the unit used.

Very inspired by the charts and the subject of the screenplay analysis articles made by the interactive visual essay journal The Pudding (The Largest Ever Analysis of Film Dialogue by Gender: 2,000 scripts, 25,000 actors, 4 million lines, She Giggles, He Gallops), I thought that it would be nice to have a chart of dialogues distribution by groups of characters, in particularly by genre. A feature which even the most used screenwriting softwares do not offer (I contacted CeltX support to submit the idea, their response was rather positive, but considering an integration is a whole other thing).

To be totally flexible, I integrated this feature so that groups can be named arbitrary (there is no predefined group). Here is the result :

A visualization of the dialog distribution by groups of characters. We can see how imbalance is the speaking time between male and female characters. At the scale of a sequence, it is not necessarily a problem, but it would be interesting to ensure that this imbalance is not present on the whole episode.

Group definition (their types, their sub-categories, their colors, their assigned characters) is done via the file /assets/characters.json already mentioned above. The charts are generated automatically accordingly.

X-Range

Dialog Balance graphs are great for seeing if a character do not get all the attention (whether on purpose or not) across a sequence or the whole script. However, it does not account for the rhythm or the lines distribution within the sequences themselves.

This is how I came up with the idea of ​​integrating an X-Range chart, to represent all the dialogue lines of the episodes according to their character and their position in the scenario. Here is the result :

This visualization allows to evaluate the rhythm of a dialogue. We see that the distribution is rather balanced between main characters, but some characters tend to have longer sentences, like Zawn.

Notice the similarity between this display and that of the project recorded in the sound processing software used to make it:

A screenshot of the project after recording the dialog under REAPER. We see the similarity with the X-Range representation of the scenario.

Note: I will surely add descriptions in this chart at some point. Personally, I write mostly for audio fiction, for which dialogues is one of the only drivers of the story, so there is almost no line of description except one onomatopoeia here and there.

Conclusion

Working in a simple, universal format allows many people to develop custom features for their writing process, without having to wait for a developer to integrate them into their software. Everyone can freely enjoy the tools made and shared by others (the spirit of sharing underlying the use of open formats favoring the sharing of these tools), or even to modify them according to their own personal needs.

Many other things can be imagined around the processing of Fountain files: generation of tables of contents of the sequences, list of the characters in order of appearance … It turns out precisely that I looked at the subject out of curiosity (you can check the Python scripts I coded on my Fountain-Scripts repo. No doc written yet, but I will do it if people are interested).

For my part, I am satisfied to have managed to find solutions which can meet my needs, whether for writing, rendering, or doing analysis. Enough coding for now, it’s time to go back to scriptwriting!


Apart from the conception of the tool showcased here, the writing of this article required several hours of writing and translations. You can support this project by donation!

Thanks to Marie for the proofreading!