Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Python-assisted creative writing: managing dyna...

Pycon ZA
October 07, 2016

Python-assisted creative writing: managing dynamic gender in RPG scenarios by Adrianna Pińska

The ability to modify text programmatically through simple scripting can empower writers to make creative choices which would otherwise be impossible.

In this talk I will discuss why it is useful for the gender of characters in a live action roleplaying game scenario to be an easily changeable property, and introduce Genderiser, a Python script which is intended to assist non-technical writers in utilising this technique in their own work.

The talk is aimed at anyone who is interested in applying their programming skills to creative writing. I hope to encourage beginners to use Genderiser and adapt it to their own needs—whether they are creating a similar type of interactive fiction, or more traditional works such as novels or short stories.

There will also be a more technical overview of how the script works, and how I have attempted to distribute it in a form which is useful to non-technical users. I will also discuss future directions for the code, such as the addition of a graphical interface and use of better packaging and installation tools.

Pycon ZA

October 07, 2016
Tweet

More Decks by Pycon ZA

Other Decks in Programming

Transcript

  1. What are RPGs? Interactive storytelling; with or without a GM

    Tabletop vs live action (LARP) Different kinds of LARP: boffer vs theatre-style Different levels of preparation: spontaneous vs prewritten My focus: prewritten scenarios with prewritten characters
  2. Typical usage of RPG scenarios in ZA Tabletop RPGs LARPs

    GM is an interaction bottleneck Mostly peer-to-peer interactions Ideal number of players: 4 or 5 Usually 10 or more players Many available; low demand Few available; high demand Run once in parallel at a convention Re-run every few months or years Standalone; can be run by anyone Perpetual draft; usually run by writers Written once; finished! Constantly tweaked and updated after feedback Whole document public-facing Only character sheets public-facing Short(er) character sheets Long(er) character sheets Character sheets given out at table Character sheets emailed in advance
  3. Gendered characters make organisation difficult Every character must be cast

    – every piece of the puzzle is important. Typically over 10 characters; hard enough to organise as it is. Prewritten characters may have gender mismatch with available player pool. Less willingness for cross-gender play in LARPs. Organiser needs to match demographics; this is annoying especially with old LARPs written for demographics which have changed especially if someone drops out – now have to match at last minute!
  4. Solutions Increased cross-gender casting – seems to be on the

    rise ... but why not adjust scenario to the players? Write characters that can be played by a person of any gender Simple, right?
  5. Now we have a new problem Two copies of each

    character sheet? Nope! The problem is with third person pronouns – every other character sheet! One flexible character = 2 copies of LARP Two flexible characters = 4 copies Ten = 1024 copies Clearly not feasible to do by hand Especially when we keep making changes!
  6. Why not make do with a shortcut? Ignore the issue

    – tell the players to make a mental substitution Use ”they” everywhere This breaks immersion and can be distracting / confusing. Like bad CGI! I’m a perfectionist – I want my public-facing writing to be polished. How to do properly? Easy for a programmer! Impossible for a non-programmer. So many just don’t do it.
  7. How to empower non-technical writers? Goal: make tool that anyone

    can use This imposes certain constraints: Portability Ease of installation Usability with existing workflow Shouldn’t require switching file formats or editors
  8. Python to the rescue: Genderiser https://bitbucket.org/confluence/genderiser Replaces placeholder variables in

    text with appropriate gendered words. Can also use singular ”they” or arbitrarily defined custom pronouns. Handles docx and odt as well as plain text formats (autodetected). Na¨ ıve approach: unzip, search/replace, rezip. Commandline options to print information about configuration and project. Some tests!
  9. Configuration Built-in config: List of genders, which may inherit (makes

    defining new pronoun sets easy) A mapping of pronouns and other gendered words for each gender User config: Can override / add genders and words List files in project (explicit list or glob) Set current gender for each character (using e.g. surname as ID)
  10. What it does Generates list of variables: product of character

    IDs x words e.g. smith they, smith their, smith them... Replaces variables in text according to gender of each character e.g. if smith is female, smith they becomes she Some variables can be predefined with different values for different characters e.g. jones name is Mark/Mary, but smith name is John/Jane Capitalised variable: capitalised replacement
  11. Future work Currently one huge file with no dependencies. Better

    way to do this? Generate standalone executable, e.g. pyinstaller Currently a commandline app Add a simple GUI? TKinter? Testing on multiple platforms Requires guinea pigs