Instructions

Content.Instructions("kitchen-rules")
.Name("Dungeon kitchen rules")
.Title("Fish Stew")
.Label("Watch out")
.Page("Chop the fish, boil it in a pot, then plate it up!", "art/steps.png")
.Page("The doors drop on a timer. Don't get caught on the wrong side!", "art/doors.png", "Mind the Doors")
.Page("The rat steals from the middle lane. Get close to shoo it away!", "art/rat.png", "The Rat");A level that picks this set shows it before the round starts. It uses the game's own popup: the chalkboard, the fonts, the paper note and HOLD TO SKIP. Players hold the button for a second to turn the page, or the page turns itself after 15 seconds. The round starts after the last page. It shows on every kitchen, also the ones that have no popup of their own.
InstructionsBuilder
public sealed class InstructionsBuilder
{
public InstructionsBuilder Name(string name);
public InstructionsBuilder Title(string title);
public InstructionsBuilder Label(string label);
public InstructionsBuilder Page(string text, string image = null, string title = null);
}Name: what the level editor calls the set.Title: the popup's title, on every page without its own. The set'sNamewhen not set.Label: the paper note in the corner. The game's NEW RECIPE when not set.Page: 1 to 4 pages, in order.textis under the picture, at most 400 characters.imageis a PNG in the addon folder, in the place of the game's recipe picture.titlereplaces the set's title on this page.- Titles are at most 60 characters, the label 40. The game shows all of it in capitals.
- A page with no picture shows its text larger, in the middle of the board.
- With more than one page, the corner shows the page number, such as 2/3.
The picture
Make it the size of the game's own: 1325×804, chalk drawn on a transparent background. The game draws the board, so leave it out. In pixels from the top-left:
| Area | Covered by |
|---|---|
| y 52 to 160 | the title and its underline |
| x 1000 to 1325, y 0 to 230 | the paper note |
| y 666 to 771 | the page text |
| x 1140 to 1300, y 735 to 785 | the page number |
That leaves about x 40 to 1285, y 165 to 655 for the drawing, less the note's corner. The game's own pictures draw there too. A picture of another size keeps its shape and is fitted into the same box.
In a level
The editor's INSTRUCTIONS setting picks a set from the loaded addons and puts its addon on the level's list. It can also be Your own pages: text pages written in the editor, without pictures. See level.json.
Online, the host turns the pages and every player sees the same page. A guest turns the page itself if the host's turn doesn't arrive in 35 seconds.
Content.Instructions is in std 0.4.0: set compat.std to ">=0.4.0" in swofty.json. A level that uses instructions needs Swofty Core 0.4.0.