Project: Thebanet

What It Does

Thebanet is a divination tool based on The Theban Oracle by Greg Jenkins. It is an example of how you can use Scratch to implement divination systems you have encountered in books or designed yourself.

Thebanet has 24 glyph tokens (letters of the Theban alphabet) + 1 blank “mystery” token, represented as nodes in a network. A network can have 1, 3, 6, or 9 nodes, and each node’s position in the network changes that node’s meaning (just like a Tarot card’s position in, say, a Celtic Cross spread qualifies the card’s inherent meaning). Instead of having the computer choose the tokens for you, it randomizes their order and then you select from among the set without consciously knowing what each token is (this is like drawing one or more rune-stones from a bag of mixed stones, or one or more Tarot cards from a shuffled deck). There are various options you can toggle on or off to help you select and read the tokens.

How It Works

The basic flow of interaction with Thebanet goes like this:

  1. Choose your network size: 1, 3, 6, or 9 nodes.
  2. Thebanet randomizes the 25 tokens (using a Fisher-Yates algorithm) and presents them as a 5 × 5 grid for you to select the chosen number of tokens from. You have the option of viewing a magic square of Mercury to concentrate on prior to selecting your tokens.1
  3. When you have selected the chosen number of tokens, Thebanet arranges them as hexagonal tiles. You may click any token to view a brief description of its meaning (expanded descriptions are given in Jenkins’s book). You can toggle an overlay that shows the number of each token’s position, or you may toggle a help screen that shows the meaning of each numbered position.

Thebanet has ten sprites—the most of any divination project in Technomancy 101.

  • NtwrkBttn — Used to select the network size. When the project starts, this sprite creates four clones of itself, each having a different costume, and then waits for you to click one of them. Each clone has a different value 1–4, stored in the buttonNum variable; when one of the buttons is clicked, the layout variable, which determines the size of the network, is updated to the clicked button’s buttonNum. Finally, the sprite deletes all clones and broadcasts the message drawGrid to activate the Grid sprite.
  • Grid — This sprite randomizes a list of numbers (named randList) from 1 to 25 corresponding to the 25 different Theban tokens, then it draws a 5 × 5 grid of buttons with each button assigned one of the randomized numbers (stored in the variable, cloneVal). When you click a button its cloneVal value is saved to the selectedNodes list; also, its costume changes from a blue square to a green square, indicating that square has been selected. Each time a grid button is selected, the variable seleCount increments by one, and when the count reaches the number of nodes in the chosen network size (1, 3, 6, or 9), the sprite broadcasts the message buildNodePosList to activate the Node sprite, and then broadcasts the message eraseGrid to itself to delete all 25 grid squares.
  • KameaBttn — This sprite is only shown when the Grid sprite is active, and is used to activate the Kamea sprite.
  • Kamea — Displays the magic square of Mercury (as a costume). When the KameaBttn is clicked, that sprite broadcasts the message showKamea, which when received by the Kamea sprite, causes the latter to show.
  • Node — Draws the network nodes, i.e, Theban tokens. The number of nodes to draw and their arrangement is determined by the selected network size set earlier in the layout variable. Which nodes are drawn and the order in which they are drawn are determined by the selecteNodes list that was built when you selected the squares from the grid. This sprite has two costumes for each possible node: a dim one and a bright one. The bright one displays whenever the mouse cursor is touching the node, thus the node appears to be highlighted. The value of each node (from selectList) is stored in the node’s local variable, nodeVal. When a node is clicked, the global variable nodeIndex is set to the clicked node’s nodeVal, and then the message showMeaning is broadcast to activate the Meaning sprite. If the mouse pointer is then moved away from the node, the sprite broadcasts the message hideMeaning telling the Meaning sprite to hide.
  • Meaning — Shows a brief text description of a selected node’s meaning. This sprite simply shows when it receives the showMeaning message, and hides when it receives the hideMeaning message.
  • OvrlyBttn — Sends a message to the Overlay sprite telling the latter to turn on or off. The OvrlyBttn sprite does not show until the stage’s backdrop = 4, which is the backdrop displayed when the Node sprite has drawn all of the nodes.
  • Overlay — Displays a diagram laid over the network, showing the number of each placement within the network. Like a Tarot card spread, the placement of each token within the scheme modifies that token’s meaning. The numbers within the network mean different things depending on the network’s size. If you are not sure what a number means, you can activate the Help sprite.
  • HelpButton — Sends a message to the Help sprite telling it to turn on or off. The HelpButton sprite is only visible and clickable when the Overlay sprite is showing.
  • Help — Displays a help screen that briefly describes the meaning of each node placement within the network.

Make It Better

  • Allow for token reversals, perhaps represented by red tokens.
  • The Node sprite has 50 costumes, half of which are just brighter version of the other 25, to highlight a token when hovering over it with your mouse pointer. The same thing could be accomplished by keeping only the 25 brighter costumes and using Scratch’s set (brightness) effect to () or change (brightness) effect by () to dim the tokens a little when not selected. Adding red tokens for reversals as suggested above would expand the total number of costumes to 100, but could be accomplished with just the same 25 costumes and using a combination of the brightness and color effects (you would need to experiment a little to find the best values for dimming the tokens or changing them from blue to red).
  • Add the ability to de-select a square in the selection grid.

  1. For more about using the square of Mercury in this context, see Paul Huson’s Mastering Witchcraft.