Skip to content

writing_definitions

Trplnr edited this page Jul 4, 2026 · 7 revisions

Writing Definitions

A Reef slideshow is composed of pages, transitions, and the final slideshow page list. Pages are responsible for displaying elements and this is the most complicated part of a slideshow. Transitions are optional but they can help ease switching into other pages. And finally, the slideshow page list is the final component to cap it all off. It is just a list containing references to pages and this is what screens read when loading a slideshow. It being just a list of pages means you can reuse the same page over and over again! This can be a blank screen, or just a wordmark, or anything you think can be reused.

Here is an example of a really basic page just containing a background with text:

{
    "sequence": [
        [
            {
                "type": "graphic",
                "model": "ns:graphic/my_background",
                "pos": [0, 0, -0.01]
            },
            {
                "type": "text",
                "text": {"text": "My cool red text", "color": "red"},
                "pos": [5, 5, 0]
            }
        ]
    ]
}

As you can see, theres this repeating structure that has a type, and a pos. This is an element which is actually the real thing responsible for having actual stuff to display on a page. Theres multiple types of elements, these can be either a graphic, animated_graphic, and text. Graphic elements just summon an item display with an item_model component set to the model field. Animated elements run an animation from start to end using an item model. And text elements are just plain text displays.

The graphic element is positioned slightly backwards to prevent z-fighting with the text element.

You might be wondering why the elements are wrapped in a double list named sequence. This is because you can leave other elements to display later in the same page without switching pages.

Page with multiple element groups

  • just tell them the basics of slideshows, pages, transitions, then yeet them to the definition schemas for more info
  • after, tell them where to store their slideshows (in their own storage)
  • then tell them how to register their stuff
  • next secion (making models)

Clone this wiki locally