Collection types
A field's collection type decides how many values it holds. You choose it when you create the field. Formula and Visual fields don't have one. Below are the three options, how each is stored in the record file and how each appears in your code.

Scalar
A scalar field holds a single value, or nothing if it isn't required. This is the default.
- In the record file: the value, for example
"damage": 12. - In code: a nullable property such as
float?,string?orDateTime?. A required field is never null, so it's a plainfloat,string,DateTimeorbool.
List
A list field holds any number of values of its type. The values are kept in order, and you can add, remove and reorder them in the record editor. In the table, a list cell shows a count, and choosing it opens the list editor.
- In the record file: an array, for example
"tags": ["fire", "ranged"]. - In code: a
List<T>that starts empty, such asList<string>orList<float>. A list of enum values isList<followed by the enum's name. A list of references is anIEnumerableof the target's class, and entries that no longer resolve are skipped.
Rules such as a minimum or a maximum apply to single values, so they aren't available on lists.
Quantised list
A quantised list is a list of references where each entry has a quantity. Use it for things like a recipe that needs 3 Iron Ore and 1 Leather, or a drop table with a count for each drop.
In the field editor, Quantity is the maximum number of entries the field can hold. Each entry is a record and a number, and the number defaults to 1.
- In the record file: an array of objects, for example
"ingredients": [{ "ref": "iron-ore", "quantity": 3 }]. Therefis the target record's slug. - In code: a
List<QuantisedEntry<T>>. Each entry hasRef, the slug,Quantity, the number, andValue, the loaded record.
Choosing one
| You want | Use |
|---|---|
| One value | Scalar |
| Several values of the same kind, in order | List |
| Several records, each with a count | Quantised list |
See Field types for which types exist, and Generated C# types for the full mapping.