A possible approach to procedural storytelling: cheating

Shamus Young is back with his column called Experienced Points, and this time he’s talking about procedural stories.

Here, have an awesome procedurally generated city built for the suspended project called "Subversion" by Introversion software.
Here, have an awesome procedurally generated city built for the suspended project called “Subversion” by Introversion software.

Oh boy.

Systematizing storytelling in its purest form may be one of the hardest challenges that we as an industry will face. Sure, there are story templates that we could use but that would take a tremendous amount of skill and work for it to avoid constant repetition and generic characters. How many times can you play the hero archetype without getting bored?

Fundamentally, I agree with everything Shamus says in that column, though I’d wish he went into specifics and not just talk about storytelling in general. So, that’s exactly what I’ve set out to do. I’m not going to argue that my way of doing things is the best, but I think it might be interesting to go down this path.

My view on procedural storytelling is that it should mostly function as a DM guiding the players through a campaign. The lesson I seem to have assimilated from countless stories is that as a DM, you should prepare a believable world instead of a great storyline, because whether you like it or not, the players are the ones in control of the story and they are going to go wherever the hell they want to go. A DM should build a world with lots of opportunities for interesting interactions and then let the players loose like children in a candy store. Then, after a good session, the DM goes home and thinks about what happened, processes all the information so far and then transforms the world with consequences for the player’s actions.

A recently screwed over character suddenly is revealed to be a prince and a world war breaks loose. A previously fatally wounded character becomes a servant of the devil to survive the injuries. A romantic plot is hatched by the flirty conversation with the shopkeeper. A vindictive tyrant begins to offer compensation for information over who was the one to steal the castle’s food supply. The one little orphan bleeding out down the street that the players ignored was sent there by a trickster god and the players are going to suffer for it, because that’s the worst thing you could do to a trickster god: to ignore it.

Those are all the little and not so little details a DM can come up with depending on the player’s actions.

Basically, what all of this implies is that the game should be a sandbox created procedurally. The world created needs characters, motives, relationships and all sorts of fun stuff to be systematized. The world needs to be set up with interesting choices and situations and once the players go down a certain path, if that path wasn’t going to be interesting enough, then cheat a little and change or create relationships that weren’t visible to the player up until now. That’s the key to procedural storytelling, in my opinion, because any procedural engine can’t be expected to create interesting paths for every player without cheating. Yeah, turns out that peasant you pushed over was just that, a peasant. Yeah, you ransacked a town but nobody of note cares about it or has even heard of it. Yeah, nothing that you did caused anything of importance to happen … awesome.

Not every orphan needs to be a trap, not every peasant needs to turn out to be a prince, but at least one big consequence is needed per chapter or session for the players to be interested in the story they are telling.

Removing the context menu in flash v11.2

Remember my rant about the whole “the unavoidable context menu of flash being a fucking insult to game developers” thing? Yeah, fun times.

Anyway, it turns out that since version 11.2 (released back in January) developers have been able to disable the context menu … but I’m only aware of this fact because I did an extremely specific google search that miraculously directed me to this very blog post that I’m linking by a “Game Developer Evangelist” at Adobe. That post has a nice and rather long-winded video of how to actually disable the context menu.

In short, it’s something like this*:

//Define a function to call when the right mouse button is pressed

protected function yourFunction(event:MouseEvent):void {}

//Somewhere in your code, add an event listener that listens to the right mouse button:

stage.addEventListener(MouseEvent.RIGHT_CLICK, yourFunction);

Easy!

The funny thing is, I already had this version of flash and I didn’t notice any of the new types of mouse events shown in the video. As it turns out, to be able to win the privilege of actually being able to take control of the right mouse button, you need to configure the crap out of your IDE. Well, at least in my case.

That IDE is FlashDevelop, by the way.

After 4 hours of trying things out, failing miserably, finding new configurations to toy around with, failing miserably again with no sign of improvement, I ended up solving the whole issue by searching yet again and finding the right blog post with the exact information I was looking for.

If you’ve been on the internet for any amount of time, you know perfectly well how unlikely that is, so excuse me while I savor the moment.

Developmeeeent, FUCK YEAH
Awwwww riiiiiight

AWESOME! Fuck Yeah! I can’t believe this. Blog Post, you’re the answer I’ve been looking for for more than a year. Yeah, that’s right, you naughty post. Mmmmhhhh, yeeeeessss.

*cough*

Yeah, so, that magical blog post that I was talking about is aptly called “Configuring FlashDevelop for Flash version 11.2” and is found in this here linky.

In the possible case that the blog post is lost forever or becomes inaccessible, let me copy & paste the steps for getting Flash Develop to work with Flash version 11.2. I’ve modified some of the steps a bit to reflect the changes done to the “Adobe Support Center” downloads page.

  1. Get the files.
    You can find the installation links here.

    • Launch the flash player 11.2 installer for your OS. This is required to be able to play 11.2 content on your browsers
    • Download the “playerglobal.swc to target the 11.2 APIs ”:
      • into “\FlashDevelop\Tools\flexsdk\frameworks\libs\player\11.2\” (create the 11.2 folder as it won’t exist)
      • save as “playerglobal.swc”.
    • Download the “Standalone Debugger”:
      • into “\FlashDevelop\Tools\flexlibs\runtimes\player\11.2\win\” (create the 11.2\win folders inside “player”)
      • save as “FlashPlayerDebugger.exe”.
  2. Configure FlashDevelop
    • Go to Tools -> Program Settings
    • Click on the “FlashViewer” plugin settings page
    • Set the “External Player Path” to point to your recently downloaded “11.2\win\FlashPlayerDebugger.exe” file.
  3. Configure your projects
    • Go to project properties by right clicking the project’s name.
    • Set the platform version to 11.2.
    • Add the following line to “Additional Compiler Options”:-swf-version=15
  4. Done, test your project!

If you follow these instructions, you’ll finally be able to get rid of that horrible, horrible context menu. However, if at least one of the configurations isn’t right, when you try to add a listener for the right-click you’ll get an error saying:

TypeError: Error #2007: Parameter type must be non-null.

And … well … that’s it really.

I’m kind of confused as to why I haven’t heard about any of this from any other site. Particularly gaming sites, now that I think about it. Oh well, I hope this helps somebody out there, because the solution to this issue is not very intuitive and might be conducive to some rage induced hair-pulling.

——————

*Wordpress doesn’t seem to have a handy way of displaying code, so a citation format will have to do. Luckily, it’s kinda legible only because it’s really simple and has no indentation whatsoever.

Image taken from here.