mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Implement CSV / TSV import (#45)
- add csv/tsv importer - add `make_map` script function - add `alt name` field property - add `construction script` field property - add `construction script` game property
This commit is contained in:
@@ -28,6 +28,7 @@ Fields are part of the [[file:style triangle]]:
|
||||
* @color@
|
||||
* @info@
|
||||
| @name@ [[type:string]] ''required'' Name of the field.
|
||||
| @alt names@ [[type:list]] of [[type:string]] Possible alternate names for this field, mainly to look for it when importing CSV files. They are trimmed, made case insensitive, and don't distinguish between spaces and underscores.
|
||||
| @description@ [[type:localized string]] @""@ Description of the field, shown in the status bar when the mouse is over the field.
|
||||
| @icon@ [[type:filename]] Filename of an icon for this field, used for automatically generated [[type:statistics category]]s.
|
||||
| @editable@ [[type:boolean]] @true@ Can values of this field be edited?
|
||||
@@ -42,6 +43,10 @@ Fields are part of the [[file:style triangle]]:
|
||||
| @card list name@ [[type:localized string]] field name Alternate name to use for the card list, for example an abbreviation.
|
||||
| @card list alignment@ [[type:alignment]] @left@ Alignment of the card list column.
|
||||
| @sort script@ [[type:script]] Alternate way to sort the card list when using this column to sort the list.
|
||||
| @construction script@ [[type:script]] Script applied to the value given when creating a card with the new_card function.
|
||||
For example, the pt field should not be initialized directly, since it is a combination of the power field and toughness field.
|
||||
So if a value is given for pt, it must be redirected to power and toughness like so: {split := split_text(value, match:"/"); [power:split[0], toughness:split[1]]}.
|
||||
The script must return a map from field names to values. Use the make_map function to dynamically create maps.
|
||||
|
||||
The @type@ determines what values of this field contain:
|
||||
! Type Values contain Displayed as
|
||||
|
||||
@@ -33,6 +33,7 @@ Such a package contains a [[file:format|data file]] called <tt>game</tt> that ha
|
||||
| @default set style@ [[type:indexmap]] of [[type:style]]s Default style for the set fields, can be overridden by the stylesheet.
|
||||
| @card fields@ [[type:list]] of [[type:field]]s Fields for each card.
|
||||
| @card list color script@ [[type:script]] from fields Script that determines the color of an item in the card list. <br/>If not set uses the @card list colors@ property of the first card field that has it.
|
||||
| @construction script@ [[type:script]] Script that is applied as the last step in the creation of a card in the new_card function. Must return a map from field names to values. Use the make_map function to dynamically create maps.
|
||||
| @statistics dimensions@ [[type:list]] of [[type:statistics dimension]]s from fields Dimensions for statistics, a dimension is roughly the same as an axis. <br/>By default all card fields with 'show statistics' set to true are used.
|
||||
| @statistics categories@ [[type:list]] of [[type:statistics category]]s from dimensions DOC_MSE_VERSION: not used since 0.3.6
|
||||
Choices shown on the statistics panel. <br/>By default all statistics dimensions are used.
|
||||
|
||||
Reference in New Issue
Block a user