astralArchivist

Apophis - Customizable Idea Generator

By Will Thibault | 01.20.15 00.33.23
Introducing Apophis, a Javascript-based extensible Idea Generator! Designed for use with either solo or group RPGs, Apophis could be providing you your next flash of inspiration!

After playing my solo game once, I decided I needed a better set-up for my idea generator. What I had was certainly workable, but I had a bunch of peripheral devices floating around my desk cluttering it up. I'd been meaning to brush up on Javascript, so I ran up a simple web app to handle my idea generator and the bulk of my text editing. I call it Apophis, and you can try it out here, or download it here. While it's designed for use as a solo gaming tool, it would also be useful for group games, especially if you want to try a more improvisational GMing style.

Features

  • Extendable idea generator
  • Simple to add additional "tables"
  • Plain text editor with save functionality1

Customisation

As you can see if you head over to the Apophis page, it comes pre-loaded with two random "tables" - a d12 and one that picks a random Magic: the Gathering color identity2, weighted toward results with fewer colors. My own copy contains several more tables, but I can't share it - they're modified versions of tables from Mythic GME, UNE, and BOLD. In my experience, most solo gamers are the sort to tinker anyways.

Adding a new table to roll on is easy. If you're familiar with Javascript, here's the quick rundown;

  1. Add any number of arrays with unique names.
  2. Add buttons, each with an onclick event that calls the randGen() function. You can include one or more arguments, which should each be the name of an array. In this way you can tie multiple rolls to a single button-press.

That's really all there is to it; the program could probably be modified to allow full dice-math, but that wasn't a design goal for the release. If you want to extend its functionality for your own use, though, code on!

Not Familiar with Javascript?

If that was all Greek to you, no worries! This is about as entry-level as a finished web app can be, and with the following tutorial you'll be making your own random tables in no time. Before you get started, you'll need a plain-text editor. You can use Notepad (or, if on Mac, whatever its equivalent is), but personally I recommend Notepad++.

First, you'll need to download Apophis from the link above, then extract the file. Go into the folder this creates and look for a file called index.html. Open it using the plain-text editor of your choice.

If you're using Notepad++ or another program that displays the line number, scroll down until you hit line 49. You should see something that looks like this;

/*
 * ######## DO NOT EDIT ABOVE THIS LINE ########
 */


This is where you'll be adding arrays. Arrays are tables, essentially, just like in gaming books. An array should look like this;

var arrayName=[
     "Entry 1",
     "Entry 2",
     "Entry 3",
     "Entry 4"
];


The array can be as long or as short as you like, and can have any normal text you want beside Entry 1 or whatever. Just remember the comma after each entry except the last one. Also, be sure to give your array a unique alphanumeric name in place of arrayName! if the name isn't unique, the computer will run only one of them; if it's not alphanumeric, the program may not work. If you're not going to use them, you could also delete the arrayD12 and arrayColorIdentity arrays.

When you're finished with your arrays, you'll need to add buttons so you can actually roll on them. Scroll down until you see the following (it's line 216 in the base document, but that will change if you add or remove arrays).

<!-- ######## DO NOT EDIT ABOVE THIS LINE ######## -->


Underneath that, you'll see some HTML code. That's the code for the d12 and Color Identity buttons. If you don't want to use those tables, you can delete them. Then add a button for each roll you want available, as follows;

<button onclick="randGen(arrayName)" class="button">Button Text</button>


Just replace arrayName with the array you want to use, and Button Text with the text you want to see.

The program is built to allow multiple simultaneous table rolls, too. Instead of outputting one word, it outputs the rolls from each table separated by a space. In order to do this, simply include more arrays in the button code above, each separated by a comma. The example below uses three arrays, but you could use 2 or as many as you like. You probably don't need more than a few, though.

<button onclick="randGen(arrayName1,arrayName2,arrayName3)" class="button">Button Text</button>


Once you've done all that, save the file and close it, then right-click the index.html file, and choose open. You should see the Apophis interface, just like the one I have here online, except with whatever buttons you added to it!

What's In A Name?

Whenever I work on a coding project, I like to give it a cool-sounding name. It's part of the fun for me! Each time I do, though, I try to have it connected to what the program does in some subtle way. In its early prototype stages, I just called it "Generator," but that was a bit generic. Thanks to a link to this page on the Fate Core Google+ community, I learned the word "Apophenia," which is the tendency humans have to see a pattern even where there actually isn't one. It's why a smiley face looks like a face, why you can see animals in the shape of clouds, and it's the mechanism that allows idea generators to work. After toying around with the word a little bit, I remembered Apophis - the Greek name of the Egyptian deity Apep. As a snake-god, visual theming would be easy; and Apep was a god of chaos, which seemed appropriate for a web app all about getting random ideas. It occurs to me now that "Deus Ex Machina" or some variant on it may have worked, but I'm happy with Apophis.

Anyway, I hope you all enjoy the program! It was fun to code, and I know I'll be getting some milage out of it!


1 - From what I understand, the save functionality I used is a feature of HTML5, which is pretty new. It's possible if you have an older browser that it may not work. My preference is for Chrome, and on the current version it works just fine for me, but it could be different for you. [return]

2 - Whether you play Magic or not, the color wheel can be a useful characterization tool - the colors represent, thematically, different motivations and approaches to the world. It's a very fun subject, and the articles that I linked to above are very fun reads. Using the colors as a writing and roleplaying tool is an article unto itself, though. [return]

Will Thibault is a winged, feathered serpent rarely found anywhere except in warm, jungle-like regions or flying through the ether. Due to his intelligence and powers he is regarded with awe by the inhabitants of his homelands and is considered to be divine.
Last Edited: 01.20.15 03.22.02