Data Records - npruehs/tome-editor GitHub Wiki

Records associate fields with values to make up the actual data of your game. Each record consists of a collection of fields with their respective values.

Adding Records

New data records can be added to your game as follows:

  1. In the main window, click Records > New Record...
  2. Enter a name for the new record.
  3. Specify the fields and/or components to be used for the new record.
  4. Specify which file to add the new record to.
  5. Click OK.

New Record

If you've defined any field of type File, and that field references image files, you can also have Tome use that field for showing icons in the record tree.

Editing Records

Records can be edited just by double-clicking any record in the Record Tree to the left. This shows the same window as adding a new record, and allows changing record names and fields.

By double-clicking any field in the Record Table to the right, you can edit the current value of that field. This will bring up a window showing the name, type and description of the edited field, and will validate any entered data.

Edit Field Value

You can always revert the current field value to the value inherited from the record parent, if any, or to the default value of the field, otherwise.

If you've selected multiple records who share the same parent, you can change their field values all at once.

Reverting Records

Just like fields can be reverted to the value inherited from the record parent or to the default value of the field, so can whole records. Reverting a record has the same effect as reverting all of its fields individually.

  1. In the main window, select any record.
  2. Click Records > Revert Record.
  3. Click Yes.

Revert Record

If you've selected multiple records who share the same parent, you can revert them all at once.

Duplicating Records

Records can be duplicated to avoid time-consuming copying & pasting. Duplicating a record will create a new record with the same parent and field values.

  1. In the main window, select any record.
  2. Click Records > Duplicate Record.
  3. Specify a name for the new record and click OK.

Duplicate Record

Deleting Records

Existing records can be removed at any time from the main window:

  1. In the main window, select any record.
  2. Click Records > Delete Record.

If you've selected multiple records who share the same parent, you can delete them all at once.

Record Hierarchy

You can drag and drop any record onto another record in the record tree in order make the first record a child of the second one. Children will automatically inherit all fields of their ancestors (their parent, and all parents of that parent), along with their values.

Setting a field value of a child record will override the value of its parent. However, you can't remove any field that is inherited from a parent record.

Records can't be made children of any of their descendants (their children, and all children of these children).

If any record is removed, their children are removed as well.

If any record field is removed, it is removed from all of their descendants as well.

In order to unparent a record, just drag and drop it at any white space in the record tree, making it another root of the hierarchy again.

Read-Only Records

You can manually edit the records file and add the attribute ReadOnly="true" to any records. Users won't be able to edit, revert, remove or reparent these records in Tome.

This can be useful to prevent users from accidentally editing root records. Read-only records will be highlighted in blue in the record tree.

Read-Only Records

Then, you can manually edit your project file and add the attribute IgnoreReadOnly="true" to the TomeProject element. This will allow you to edit read-only records in that project. By doing so, you can create a second project file referencing the same data files to be able to conveniently edit read-only records as a project owner.

Next: Components