CYOA using locations
This method uses a location for each of the pages of text in the interactive book, and alters the movement commands so that they refer to numbered menu choices instead of compass directions.
It is recomended that you use the Choose your own adventure Library INSTEAD of the standard library, so that the player is limited to menu choices and any other commands that you specifically impliment.
We are using locations as pages in the story, but instead of moving in directions (north/east/west/south etc.), we want the player to be able to choose from a numbered list of options by entering a number.
To setup these numbered choices you first need to create a location and go to it's "directions" page:
You may have noticed that each of the directions on the Directions page is an underlined hyperlink. If you click on one of these it will open a dialog box which displays all of the words that the player can type when they want to move in this particular direction. For example if you were to click on "North" to open the first entry (which corresponds to movement towards the top of the map) then you will see the words "North" and "N" separated by a slash.
So that the map forms a nice orderly flowchart, and because I never use more than 5 options on any menu, I usually change South to 1, SouthEast to 2, SouthWest to 3, East to 4 and West to 5. The directions page will now look like this:
Writing the first page of the story
The first page of the story is written in the introduction dialog, so select it from the main menu:
Note that the "Display first room description" checkbox is not selected and "Start the adventure at location" drop-down should be set to the location you created above.
The first page of the story is written and at the bottom we provide a menu of choices for the reader to select from. This is a simple numbered list which makes it quick and easy for the reader to press a single key and enter to select an option.
Adding more pages
The easiest way to create each page of the story is to double-click on the map and type-in the name of the menu choice that will lead you to this page (This is because this short description of the location will be the first thing displayed when the player chooses it from the menu).
The pages can then be linked together by double clicking on the exit from one page (remembering that choice  is bottom center,  is bottom right etc.) and linking it to any of the top entrances on the destination location.
This link can be made one-way by right clicking on either end of the link and choosing the "One-way link" option:
The flowchart of the game can then be tidied-up by moving the locations around and possibly changing the order of some of the menus to make more room in some areas of the map:
Finally you can double-click on each location to write the text of the page and the menu leading to the linked pages.
You will probably have menu choices with the same name in different parts of the game. If you add extra text or a number inside of angle brackets to the short location name then it will be easier to tell them apart in the Developer, but this extra text will not be displayed by the Runner when the game is being played.
The combinatorial explosion
If each of the menu choices on each page links to a new page, then the number of pages that must be written quickly increases to unmanageable numbers. If each page only has two choices then you need at each level: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 pages. So you need to write a thousand pages just to give the reader 11 pages to read on any particular path, and over a million if you have 4 choices on each page.
Clearly we need to greatly reduce the number of pages, but without limiting the readers choices too much. The simplest is just to make many of the choices dead-ends. If the reader makes an obviously bad choice then the main character can die or fail in their task so that the story ends there.
Often a CYOA will have a small number of main branches that will follow a different story line, each one concluding in a different ending for the story.
To give the reader more valid choices and make it more interesting we can also add short branches that offer a different path to the same result and which merge back to the main story, and quests which dont have to be done in a particular order.
Writing the story
A good way to start writing a CYOA is to start with the main story sequence and first write the main path through the story from beginning to its successful conclusion. Extra menu choices can be put in as you go, but leave all of these branches until the main story is complete, then go back and add in one branch at a time, fleshing it out further as you go.
- Don't make the main path the first menu choice every time or its going to be very easy for the reader to figure out that they just need to keep pressing "1" to get to the successful conclusion.
- To better keep track of the pages, put the locations and tasks of each 'Chapter' of the story into its own folder, and on a different page of the map.
A simple way to add extra choices is to insert an optional page between two other pages that the reader can either select to see or bypass. This is usually a menu choice that either leads to a failure or in which nothing of importance happens in the story. Its menu then gives all of the same choices as the previous page (except itself) so that the story continues the same way regardless of whether this page was read or not.
A more complex variation of this might allow the main character to obtain an object or do something which is then used later in the story to change the presented options. Alternately, if the reader misses obtaining an object this time then later in the story they could be given other chances to obtain it by adding bypass branches that only appear in a menu if the object has not been obtained yet.
Menu choices that should only be shown if certain conditions are met can be controlled by embedded IF expressions or alternate descriptions. Note that you should also add a restriction to the movement direction to prevent the player from choosing these disabled options.
After branching into two (or more) separate story lines, both are continued independently for awhile but the goal in both is the same. You could be trying to obtain a particular object or certain information, but using different methods in each branch. When successful, the two branches converge back into the same page of the main story.
If the two branches need to repeat the same section of text then you can use a text variable. Just fill the varable with the text and use %VariableName% (The name of that variable between percent signs) to insert it anywhere in the text.
Quests are parts of the story which can be separated into self-contained sections which can be read in any order. This allows the reader to select which part of the story they read first, usually by choosing to go to a different location at a major branch point.
All of the quests in a group loop back to the original quest selection page, where the reader can then select one of the other quests to go on. Usually a certain number of quests, all of them, or particular quests, must be completed satisfactorily before the reader is offered the option to continue to the end of the main story.
With all the branching and optional quests mentioned above you will eventually get to a stage where the description on a page may not be correct depending on how they got there. The character could be holding different objects or their relationship with another character may have improved or soured.
Using a restriction on a "Display after default" description you can conditionally insert a few lines of text based on whether a particular page was displayed (The location has been "seen" by the player character), or on the value of a variable, property etc.
- This can be followed by an Alternate description, with no restritions, to display the rest of the page.
- Extra choices can be added to the menu using another restricted alternate description after this.
Text variables can also be used to slightly alter any of these descriptions by changing their contents when circumstances change. eg. "Sally is smiling at you cheerfully" or "Sally is glowering at you in a very unfriendly manner" depending on how you treated her earlier.
To alter the value stored in a variable when the player selects a specific menu choice you will need to create a system task that has been set to "Player enters location" and the location that that menu choice goes to.
In this system task you can then use actions to set variables or change other parts of the game.
It is also possible to have several such tasks for the same location and use restrictions to control which of them is run.
|<<< Choose Your Own Adventure||Main Page||CYOA using tasks >>>|