Skip to content

Depot Column Information

Kyle Kukshtel edited this page Jan 14, 2021 · 9 revisions

Columns in Depot provide structure to lines in a given sheet. A Column added to a sheet adds an entry for its type into every line currently in the sheet and any line added to that sheet. Depot already provides column types for most common primitive types used in programs, but also has a few other more complex types that help you better structure and reference your current data.

Column Editing

In addition the the column information below, a column itself can be edited by just clicking its name inside of depot. Once you've made changes to the column that you want to save, click save. Everything will be updated accordingly to match with your changes.

Column Updating

As Depot evolves, it becomes clear that columns need different metadata fields to be able to provide a better experience using Depot. When a new field is added into a column in Depot, provided you have the latest version of Depot, you will use that new column by default. However, Depot won't automatically upgrade old columns for you. Instead, when you open a column, if you see a button prompting you to upgrade, you can click it to change your column to the new schema:

Column Update Example

These upgrades never touch your actual data, just the column in the .dpo file. If you have other thoughts about this, feel free to contribute your strong opinions here.

Depot Column Types

This is an overview of all the column types currently in Depot. Most every column, in addition to the fields it provides for lines, has some other set of configurable properties. Those are outlined below as well.

GUID
ID
Text
Long Text
Float
Int
Bool
Image
Single Select
Multi Select
Line Reference
Sheet Reference
List
File
Properties
Grid

GUID

A GUID is a non-optional column that any given line has. These are used as a way to reference lines for LineRef columns, and also give you the ability to uniquely reference any line in your Depot file.

Type Icon Description Storage Type Default Value
GUID None A generated GUID for the given line. These cannot be edited. String value guid as string

ID

The ID is the "name" of the line, and is used by default as the line's display column when references somewhere else.

Type Icon Description Storage Type Default Value
ID None The ID of a column. These are ideally unique, and Depot will warn you if you duplicate the value. String value index in sheet as string

Text

A Text column is just a string of Text. Text columns should be used for inserting small snippets of text for a given line. If you want to enter longer text, you can use the Long Text column type.

Type Icon Description Storage Type Default Value
Text New Text Icon A standard line of text. String value ""

Column Config Options

These are the options available when creating or editing a Text column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
defaultValue A default value for this column

Long Text

Long text columns should be used when you need to enter longer strings of text for a given line. Things like paragraph-long text or more should be long text. An added benefit here specifically is that long text fields can be resized in Depot, allowing you to have more room to enter your text.

Type Icon Description Storage Type Default Value
Long Text New Long Text Icon Longer line of text. These fields can be resized in the editor. String Value ""

Column Config Options

These are the options available when creating or editing a Long Text column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
defaultValue A default value for this column

Float

Float columns are used to enter floating point values, i.e., values with fractional components or values that are extremely large.

Type Icon Description Storage Type Default Value
Float New Float Icon Any number Number value 0

Column Config Options

These are the options available when creating or editing a Float column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
min A minimum value that this vaue shouldn' go below (not yet enforced by Depot)
max A maximum value that this vaue shouldn't go above (not yet enforced by Depot)
defaultValue A default value for this column

Int

Int columns are used to enter integer values. If you need a fractional component to your values, use the Float column instead.

Type Icon Description Storage Type Default Value
Int New Int Icon Integer number Number value 0

Column Config Options

These are the options available when creating or editing a Int column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
min A minimum value that this vaue shouldn' go below (not yet enforced by Depot)
max A maximum value that this vaue shouldn't go above (not yet enforced by Depot)
defaultValue A default value for this column

Bool

Bool columns can be used to enter simple true or false values for a line, with the added benefit of being able to toggle the value as a checkmark. No more spelling true as ture.

Type Icon Description Storage Type Default Value
Bool New Bool Icon True / False boolean value. true or false true

Column Config Options

These are the options available when creating or editing a Bool column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
defaultValue A default value for this column, as true or false but displayed as a checkmark

Image

Image columns are used to link in images to your Depot file. Depot will display the image itself inside of Depot, and on hovering the image you can see an expanded view of your selected image. However, Depot only stores the relative path of the image in the Depot file. Your application is in charge of using that path to load the image. Additonally, images in Depot will only display if they are in a "valid" path from VS Code's perspective. This means your image has to either be in the extension install directory itself, or in your current project as a workspace folder.

Type Icon Description Storage Type Default Value
Image New Image Icon Path to an image relative to the location of the Depot file (displayed in the sheet) String relative path to the image ""

Column Config Options

These are the options available when creating or editing a Image column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
defaultValue A default value for this column. Note that this is a file path.

Single Select

A Single Select column is used like an Enum, allowing you to provide a set of values, and then in Depot be able to use a dropdown menu to select them.

Type Icon Description Storage Type Default Value
Single Select New Single Select Icon Exclusive choice between a set number of choices String value ""

Column Config Options

These are the options available when creating or editing a Single Select column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
defaultValue The default value for this single select. This should be an option from the option array below. Depot does not currently validate what you enter here, so b careful. Additionally, Single Select columns do have the option to select no option. In the Depot file, this is saved as an empty string, ""
options The options for this column. Options should be declared as list of comma seperated values. Exampe item1, item2, item3

Multi Select

A Multi-Select column allows you to choose any combination of options from a list of possible values via a dropdown menu. Right now you need to hold ctrl/cmd in order to be able to select different values.

Type Icon Description Storage Type Default Value
Multi Select New Multi Select Icon Several choices between a set number of choices Array of selected values as strings ``

Column Config Options

These are the options available when creating or editing a Multi Select column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
defaultValue The default value for this multi select. This should be an option or comma seperated array of options from the declared options below. Depot does not currently validate what you enter here, so b careful. Additionally, Multi Select columns do have the option to select no option. In the Depot file, this is saved as an empty string, `"
options The options for this column. Options should be declared as list of comma seperated values. Exampe item1, item2, item3
displayType Should this field display horizontally or vertically in line.

Line Reference

A Line Reference column allows you select a Line from any sheet in the current Depot file. This is useful if you want to have Lines in one sheet point to values in another sheet instead of feeling like you need to put all possible values in a single sheet.

Type Icon Description Storage Type Default Value
Line Reference New Line Reference Icon A reference to a line in a sheet in the current Depot file String GUID of selected line ""

Column Config Options

These are the options available when creating or editing a Line Reference column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
sheet This is a reference to a sheet in the current Depot file. This value is stored as that sheet's guid. The options and defaultValue of this column are dictated by what sheet you select here.
defaultValue The default line to select for this column. This is saved as the line's guid. If you delete the line referenced here, the value will revert to ""

Sheet Reference

A Sheet Reference column allows you to link in a sheet to your given line. This allows you to point specifific lines at specific tables. For example, you can point a Creatures item drops to a specific table of values, and then if you create a new table with new values, yu can point to the new table instead.

Type Icon Description Storage Type Default Value
Sheet Reference New Sheet Reference Icon A reference to a sheet in the current Depot file String GUID of selected sheet ""

Column Config Options

These are the options available when creating or editing a Sheet Reference column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
defaultValue This is a reference to a sheet in the current Depot file. This value is stored as that sheet's guid.

List

A List Column is the most advanced Column in Depot, but also one of the most useful. It allows you to essentially nest a new sheet inside of the current sheet. However, the lines in your "parent" sheet onl contain the data you define inside of them, allowing you to have structured data for your subsheets, but defined at the line level. Lists can be used as metadata, deeper references to othe lines and sheets, etc. They may be confusing at first but you'll get it as soon as you try them out!

Type Icon Description Storage Type Default Value
List New List Icon An array of structured data Array of structured values []

Column Config Options

These are the options available when creating or editing a List column

Name Description
name The name of the column. A line's value for this column will use this name as its key. Additionally, when you create this column, the name here is used as the name of the underlying sheet this List uses to structure its data.
description Description for the column. This is displayed if you hover the column

File

File columns are used to link in files to your Depot file. These files are not bundled and compressed into your Depot file - they are simply paths to the file. Note that because you're linking to an external resource here, Depot will not update itself if you move the file.

Type Icon Description Storage Type Default Value
File New File Reference Path to a file relative to the location of the Depot file (displayed in the sheet) String relative path to the image ""

Column Config Options

These are the options available when creating or editing a File column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
defaultValue A default value for this column. Note that this is a file path.

Properties

Properties are another complex type offered in Depot. They allow you to nest data inside a given line at the "top level" of that object instead of needing to use an array. For example, a sheet/list-only structure would mean that accessing the attack_power of a creature (at index 0) would need to be done like sheets[0].lines[0].stats[0].attack_power. However, a creature may only ever have one set of stats, so by using props we can instead access attack power by sheets[0].lines[0].stats.attack_power. Additionally, props can be nested inside of lists and other props, so you're free to configure your data however you like. Props also use a similar form to lists, where defining the prop fields means those fields are shared across all line entries, but the data is line specific.

Type Icon Description Storage Type Default Value
Properties New Properties This is a top level JSON object that allows you to specify properties for lines and index them directly from a line instead of needing to use an array. JSON Object {}

Column Config Options

These are the options available when creating or editing a Properties column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column

Grid

Grid(s), similar to Properties, allow you to nest data inside a given line at the "top level" of that object instead of needing to use an array. However, wheras Properties nest the contained data as an object, Grid allows you to nest the data as entries in an array. Each array index can also have its own specified type, so you are able to construct arrays of values that don't necessarily share the same type. Your implementing program can refer to the column information to know how to parse the array. Grids allow you then to access data values by index, so you can do things like sheets[0].lines[0].myGrid[0] to retrieve the first element of the Grid defined by the myGrid value. Like props, grids can be nested inside of lists and other props, so you're free to configure your data however you like.

The types of entries allowed for Grid indices are currently limited to "primitive" types (int, bool, float, text, longtext). However this is not a hard limitation on Depot, and represents only my limited time to work on the tool.

Type Icon Description Storage Type Default Value
Grid New Grid This is a top level Array object that allows you to specify an array of values and index them directly from a line instead of needing to use a list on entries. Array [true,true,true,true]

Column Config Options

These are the options available when creating or editing a Grid column

Name Description
name The name of the column. A line's value for this column will use this name as its key
description Description for the column. This is displayed if you hover the column
Length This is how long the underlying array of values is. Modifying the size of the array will affect your existing values. Making the array longer will add in new values to each line where the new entries have the default values set in the grid config. Making the array smaller will slice off the values that are now out of range.
Display Width Instead of always displaying the Grid in a straight left to right line, you can make the grid "wrap" by setting a width here that will define the number of displayed values per "line" when displaying the grid.
Column Width This defines the width in pixels of a given grid entry.
Column Height This defines the height in pixels of a given grid entry.
Grid Below the normal config settings you can see a preview of the grid you are defining. The dropdown menu allows you to assign the type of value for the corresponding index, and the field below that allows you to set the default value for that index.