1 Types Objects and Fields
liquibyte edited this page 2026-11-19 16:23:32 -06:00

Types, Objects and Fields

The ideas everything else in Skein is built on: object types and the objects in them, how objects nest, the document each object has, the fields a type defines and the values each object gives them, table fields, relationships, and the links you write in documents. The other pages say where each of these is made and changed.

1. The picture as a whole

An object type defines fields and holds objects; objects nest; each object has a document, field values, table rows, an icon and a color; a relationship joins two objects and shows in the Inspector and the Graph; a link in a document joins two objects and shows in the Graph

A small recipe project. The type defines the fields; each object fills them in. The two kinds of connection between objects are kept apart: relationships are made in the Inspector, links in the documents; the Graph draws both.

2. Object types

An object type is a kind of thing in your project: "Recipes", "Characters", "Places", "Research". A new project has none; you make each one with File > New Group (Ctrl+Shift+N). The menus and the Project Tree's right-click menu call a type a group; the dialogs call it an object type. Both mean the same thing.

A type has:

  • a name, which you can change with Edit > Rename (F2);
  • an icon, chosen with Edit > Change Icon... (Ctrl+Shift+I) from the whole icon library; every object of the type shows it unless it has an icon of its own;
  • a color, which tints its icon in the Project Tree, and the icons of its objects that have no color of their own. A type that you make yourself takes the color of Settings > Templates > "Default new object type color", when that is set; a type that an import makes does not;
  • fields, defined in Edit > Manage Fields... (section 5);
  • its top-level objects, shown under it in the Project Tree.

A type has no document of its own. When you select it, the Document panel shows a list of its top-level objects, each a link to that object. A type can only be deleted when it has no objects left: delete or move them first.

3. Objects

An object is one thing: a recipe, a character, a note. Each object belongs to exactly one type, chosen when it is made, and it keeps that type for good. An object sits either directly under its type (a top-level object) or under another object, as its child. Children can have children of their own, as deep as you like, so the Project Tree is a real outline.

  • A child made with New Child Node or Make Child Node gets its parent's type.
  • Dragging an object onto an object of another type makes it a child there, and it keeps its own type. So a scene of type "Scenes" can live under a chapter of type "Chapters".
  • An object cannot become a child of itself or of one of its own children.
  • Deleting an object deletes all its children too, together with their documents, field values, table rows and relationships. Skein asks first, and a delete cannot be undone.

Every object has a name, a document (section 4), a value for each field of its type, its own rows in each table field, an optional icon and color of its own, and a place on the Graph. Inside the project, Skein knows an object by a fixed id such as obj_7f1c2a9b4e6d1a2f; the name can change, the id never does. Links between objects use the id (see The Document Panel).

4. Documents

Every object has one document: its write-up, in Markdown. The Document panel shows it formatted (rich text) as you write, or as plain Markdown source when you press Ctrl+M. A new object's document is empty, or holds the template chosen in Settings > Templates (Meeting Notes, Research Note or Character Profile). See The Document Panel.

5. Fields and their values

A field is defined once for a type, with Edit > Manage Fields... (Ctrl+Shift+F), and then appears on the Inspector's Properties tab of every object of that type, where you fill it in for each object. The field's name is also its label in the Inspector. These are the kinds of field you can add:

Kind In the Inspector What it holds
Text A one-line entry Up to 255 characters of text.
Textarea A multi-line text box, 80 pixels high Several lines of text.
Image A 96 by 96 pixel picture with a Choose... button under it The path of a picture file (PNG, JPEG, GIF or BMP). The picture itself stays where it is.
Dropdown A list to choose from One of the choices you gave when you made the field (at most 24).
Table A small grid with a caption, below the other fields Rows of text, one column for each column you named (at most 8). See section 6.

Every object also has two built-in fields that no type needs to define: Notes, a one-line text field, and Color, the object's own color, which tints its icon in the Project Tree. Until you choose one, the object's icon takes its type's color.

Fields of the kind Number, which earlier versions of Skein could make, still show as a number entry and keep working; new ones cannot be added. A value is saved into the project as you type it (and reaches the file with the next save, see Projects and Saving).

Renaming a field keeps every object's value under the new name. Deleting a field hides its values; Undo brings the field back with its values.

6. Table fields

A table field is for a list of facts that a single field cannot hold, such as the ingredients of a recipe (amount and name on each row) or the scenes of a chapter. The type defines the columns; each object has its own rows. All cells are plain text.

  • Add a table field in Manage Fields with the kind Table. Skein then asks for its columns, separated by commas.
  • Edit the cells in the Inspector, straight in the grid.
  • Add and delete rows, and add and delete columns, in the Row/Column dialog, opened from Manage Fields. See The Inspector.
  • Deleting a table field deletes its rows. Undo brings back the table and its columns, but not the rows.

7. Relationships

A relationship is a named, one-way connection from one object to another: "Uses" from a recipe to an ingredient, "Mentor of" from one character to another. You make one on the Inspector's Relationships tab with Add Relationship...: you type the name of the relationship, and, if you like, after / its inverse name (how it reads from the other side: "Uses / Used In"), choose the other object, and Skein makes it from the selected object to that one.

  • The relationship names you have used become the project's relationship types. Typing a name again (in any mix of capitals) reuses that type; a new name makes a new type.
  • A relationship shows on the Relationships tab of both objects, as its name and the other object, which is a link to it: "Uses: Rye flour" on the recipe, "Used In: Rye bread" on the ingredient (or "Uses ←: Rye bread" when the type has no inverse name).
  • Relationships are independent of the links in documents. The Graph draws both as edges.
  • Deleting either object deletes the relationship.

A link is written in a document, with the toolbar's Insert Link button or by hand in Markdown: [label](target) or [[target]]. The target is another object (by its id, or by its name when both objects share a parent), or a web or mail address. A click on a link to an object selects that object; a click on a web or mail address opens it in your browser or mail program.

Links between objects are what the Graph draws, and each object's Relationships tab lists, under "Referenced by", the objects whose documents link to it. See The Document Panel and The Graph.

9. Known limitations

  • A Dropdown field's choices cannot be changed after the field is made, and no field can change its kind. Make a new field instead.
  • Fields cannot be put in another order; they show in the order they were made.
  • The Inspector shows at most 14 fields of a type besides Notes and Color, and at most 4 table fields, for an object. Manage Fields lists at most 16 fields of a type.
  • An object's type cannot be changed after it is made, and neither can a type's color.