Building Levels For Patterna

In this article, you will learn how to build a level for Patterna. If you are looking for information on how to upload the level to Steam Workshop, go here.

The usage of the editor relies heavily on hotkeys. These are set with a QWERTY-keyboard in mind. If you prefer different keyboard settings, you can change the hotkeys in the game’s launcher.

Your First Patterna Level

First, you will have to open the level editor. You can access it from the Extras menu. Once you are in the editor, you will see a menu bar on the lower edge of the screen and a white grid on a black background. Some parts of the menu bar will be self-explanatory, but take special note of the most important features: Undo and Redo. They are bound to the usual key bindings (Ctrl+Z for undo).
The first step in building a level is to create the underlying graph (i.e., the nodes and the edges).

As in the game, you can use the mouse wheel to zoom in and out. Furthermore, the WASD and arrow keys allow you to pan around. To reset the camera to its initial position, press Backspace.

Placing and Removing Nodes

To place a node at the position of your mouse pointer, hit the G key. By default the nodes will be snapped to the grid. You can disable this behavior by unchecking the box labeled Grid Snap in the lower left corner. Right beside that checkbox is a slider with a label that lets you change the resolution of the grid.
You can remove a node by first clicking it to select it, and then pressing the Delete key on your keyboard.

Drawing Edges

As soon as you have a few nodes placed, you can start to connect them with edges. Left-click any node to connect it. Now you will be able to draw edges from and to this node, but first you need to switch into Edge Mode: This can be done either by hitting the Tab key or by checking the box in the lower left corner labeled Edge Mode. Now:

  • Left-clicking a node will draw a directed edge from the currently selected node to clicked node and select the clicked node. More specifically, it will toggle this edge in that direction, meaning that if there already is an edge in that direction, it will be removed.
  • Right-clicking a node will draw an undirected edge from the currently selected node to the clicked node. Similarly to the Left-Clicking case, this will toggle the edge (but in both directions). For example, if there are two nodes A and B and a directed edge from A to B, then using this on the edge will make than an edge from B to A.
  • If you hold down Shift while doing this, your currently selected node does not change (this is useful to draw many edges from a single node).
  • If you hold down Alt while doing this, all edge directions are reversed (combine it with Shift to draw many edges to a single node).
Adding Information to your Level

Now we still need to make a solvable level form the graph. Each node has different data attached to it that can be changed in the editor:

  • Is this node revealed from the beginning of the level?
  • Is this node a pattern node?
  • What information does this node hold, if any?
  • What colors does this node have?

Lets us first mention that you can hit Space or click the button labeled All Visible to switch between a view that presents all nodes as revealed and a mode that shows all nodes as they would be seen in the game.
To change the data of a node, first select it. Now:

  • To change the reveal state of the node, hit V (as in v isible).
  • To change whether a node is a pattern node, hit C (as in c-is-pretty-close-to-v-so-it-was-an-obvious-choice).
  • To toggle the information on the node, use the Q and E keys. If you want change the connectivity information associated with radius information, hit F.
  • To toggle the colors of a key, use the number keys 1 to 4.
Testing for Solvability

The editor allows you to test whether your level is solvable (using the default Patterna rules, disregarding any other information that you might give your players). Note that for large levels, this can take quite a lot of time. To check solvability, click the Check Solvability button in the upper row. You can see whether the program is still working on solving you level in the text field right next to the button. Note that changing the level in any way while the solver is running will stop the solver. Once the solver is finished, you can use the Mark Solvable Nodes checkbox to change to a mode in which nodes whose state can be inferred are marked yellow and nodes that are not solvable are marked red. Note that the colors used for marking depend on your color settings for highlights, since it is essentially using the same mechanism.
Please note that you do not have to test your levels for solvability. If you are sure that your level can be solved, go ahead without using the solver.

Changing Level Metadata (Name etc.)

To change the level metadata, click on Level Settings in the upper row. Here you can enter a name for the level and a message to show at the start of the level (as in the tutorial). Furthermore, you can set some flags but most of them are quite specific in their use (they are only used in the tutorial). The flags are:

  • Initially Revealed Colors allows you to set for each of the four colors whether it will initially be visible to the player, even when there is no node with information about that color revealed.
  • Disable Main UI disables the UI in the lower left corner.
  • Disable Color Panels disables the color panels in the UI in the lower left corner.
  • Disable Finish Button disables the button that allows you solve a level when it is trivial.
  • Disallow Guessing uses the inbuilt solver to determine whether the player can know the state of a node whenever the player tries to reveal that node. NOTE: It is not recommended to use this for all but small levels, since the solver might not be fast enough to allow the game to still be responsive. It is mainly there for the tutorial.
Saving the Level

That should be pretty self-explanatory. Click the Save As button to open a file browser and select a path to save the level. This will produce a JSON file representing the level (– I know you are curious. Take a look inside, by all means. Tinker with it. Break it.). This JSON file can be uploaded to Steam Workshop to make your level available to the public. You can learn about uploading your level to Steam Workshop here.

Playing Your Level

If you want to play your level without uploading it to Steam Workshop, you can do so by placing the level in the CustomLevels folder in the Patterna subdirectory of %appdata% on Windows (or the equivalent of that on Mac/Linux).

The Randomize Menu

Clicking the Randomize button in the middle row will open a menu that allows you to create a random but solvable level on the graph you have specified. It has a bunch of options that should speak for themselves.

The Transform Menu

Clicking the Transform button in the middle row will open a menu with different ways to change the positioning of the level. You can scale, rotate (around the origin) and offset your level. Most importantly, you can center your level by either taking a the center of mass of all nodes or by taking the center of the bounding box of the level as the origin.