-
Notifications
You must be signed in to change notification settings - Fork 41
user references basic
This guide covers the basics of a reference. Note: It is assumed that you have been through the basic deck tutorial.
There are a few strict rules in creating your reference file:
- The first row is reserved for column names. It should not be used to store anything else.
- The first column is the count. Do not attempt to use it for anything else. It should contain numeric values and nothing else. 0 will result in ignoring the row completely.
- Do not use bracket characters [ ] or @ symbols in your column names.
- Avoid quotes in general. If you need to put in a special character (or not so special) refer to the list below. These apply to Text Elements (not Graphic, Shape, or otherwise).
Character | Escape Code (type this into your CSV instead) |
---|---|
Newline | \n |
" - Double Quote | \q |
, - Comma | \c |
Note: There is one optional/reserved column name: allowed_layout This column allows you to specify that the row is only to appear if the layout associated has the given name. This allows you to use the same reference file with different layouts. This is not a common situation but you may find it useful under certain circumstances.
All of the samples below are based on this data:
Count | Item | cost | description |
---|---|---|---|
1 | Weapon | 45 | A basic weapon |
1 | Hat | 35 | A basic hat with a logo on it |
The key is the use of the @[column name] define value.
Define: @[item]
Define: @[item] - $@[cost]
Define: @[item]
Define: @[item] - $@[cost]
There is a shortcut to adding a reference to a column to the Definition field. You can right-click on a value in the row preview as seen in the image below:
"What if I want to do crazy things like reference other columns in the reference file?" Go right ahead. You can define the value in a row to be @[another column name]. Be sure to read about reference defines too!