| Articles | 2 min read
In the last couple of days I've been busy refining my create_story functions; specifically I've been adding more features, earmarking code to be re-factored and tweaking my _template layout. The main changes include:
- create_story now creates a character in the world/characters folder if a character of that name doesn't exist.
- Characters now have an index file in json format (and I'll do the same for the other major world-building elements)
- Stories now record the thematic subject and a list of the major themes in the story
- I've demoted religions now to sit under the articles folder
- A new web server function that I'll use to preview content in a web browser
Some of these changes are not directly linked to the story manager, but in mapping story's protagonist it made me start to think how I was going to manage characters. To some developers, changing and refactoring code as I write new functions might seem like bad practice, but it's also how I write stories: non-linear and with scope to change earlier part of the story, settings and characters as my ideas grow and develop.
There's not much more I can do now for the story manger module but there's a couple of features I'd like to add before moving on the next module:
- The story character index needs to contain characterisation data about a character that's only relevant to that story i.e. their epiphany, conflicts and how they relate to the theme.
- I need to create a locations index for tracking all places mentioned or visited in the story. Down the road, I may also do likewise for organisations and other top-level world-building elements.
- I also need to create a function that adds characters and locations to the index.
- At some point, I'll write a function that turns all the scenes (stored as CSV) into markdown documents ready to write.but I'll likely wait until I start drafting scenes.
Once I've done this, it's time to move on to the characters module, so we can start to populate our worlds with people.
As a Side Note...
I'm starting to use json more and more because I'm finding it's a highly convenient means of storing objects. It's lightweight, hierarchical and easier to read and write than XML. In PHP it's staggeringly easy to convert json to and from PHP arrays or objects.
The latest file to use it is the index file for all characters that inhabit the world. I'll discuss this in depth when I start the characters module of the app.