Game Mechanics - wolscott/Holy_Land GitHub Wiki
Game Mechanics
Locations
Holy Land is primarily a work of interactive fiction, so the mechanics are relatively simple. Gameplay revolves around Locations, which are shown to the user simply as a text description of where they are or what is happening. Below this description are options that the player may select. These options take the player to a location, possibly the same one. Arrive at a location may have one or more Effects, and some locations may immediately and invisibly redirect the player to another location.
Keywords
In order to keep track of choices the player has made, things that have happened, or items that have been collected, the Holy Land Game Engine tracks "Keywords" with associated integer values. Keywords used are defined entirely in the story file. Currently, the values associated with Keywords are only changed by Effects and checked by Conditional Redirects, but "Conditional Options" are a planned feature.
Effects
And Effect is simply the altering of a the value associated with a specific keyword upon arrival at a location. The value can be altered up or down by any integer value. Effects do not happen until after Conditional Redirects.
Conditional Redirects
A "Conditional Redirect" compares the current value associated with a specific keyword to a specified value. If the current value is greater than or equal to the specified value, the player is immediately redirected to the location specified by the conditional redirect. This happens before any effects from the first location are applied and before the location is displayed to the player.
Example
Trying to describe this game and its mechanics in general terms is making it sound really confusing, so here is an example from early gameplay:
When the game starts, you see something like this
You are standing in the road near your home.
1 Go to chicken coop
2 Go to smithy
3 Go into your home
If you enter "1", you will see
You are standing in front of the chicken coop. It is in need of repairs
1 fix coop
2 go back to the road
This location has a conditional redirect that wasn't triggered this time. Right now there are no keyword/value pairs stored because nothing has happened.
if you again enter "1" you will see
It takes several hours, but you are able to repair all of the damage to the chicken coop
1 go back to the road
Now, you didn't see it, but when you arrived at this location, you gained the keyword "Chicken" and it was incremented by 1. If you go back to the road and again enter "1" to return to the chicken coop, you will see
You are standing in front of the chicken coop. It has been repaired.
1 go back to the road
This is because the location you were at before, the one where the description said that the coop was damaged, had a conditional redirect that checked if the value of "chicken" was 1 or greater. In that case, you are redirected to this location.
Since the keywords are completely abstract and can represent anything, the creator of a story file can create much more complex mechanics, such as inventory management, using effects and conditional redirects. Having options to display keyword/value pairs to the player is a planned feature.