Skip to content

Spreadsheets: CSV and Google Sheets

Tags, attributes and effects can be designed in a spreadsheet and imported as assets. Tables are an editor-time source: nothing reads them at runtime, and imported assets stay normal assets you can edit by hand.

  1. Create → Arcana → Data Table Importer, pick a Kind (Tags, Attributes or Effects) and a Target (a tag database, an attribute database, or a folder for effect assets).
  2. Set the Source: a CSV file of the project, or a link. Google Sheets links are converted to their CSV export; share the sheet with anyone with the link (viewer) or publish it to the web. Other tabs are selected by their gid in the link.
  3. Preview lists what will be created and updated (with the changed columns), rows identical to the project, and errors with their line and column. Import writes the valid rows and skips the others.
  4. Entries of the target that the table does not list are shown as orphans. They are never removed by an import, only by Remove orphans, after confirmation.
  5. Export CSV writes the current target as a table: a quick way to start a sheet from existing assets.

Re-importing an unchanged table changes nothing. Effects are matched to assets by Id (the asset name). An import only sets the columns tables can hold: executions, custom magnitudes and RequireAny tag conditions added in the inspector are kept.

Columns

Column names are case-insensitive and can come in any order. Missing columns use their default; unknown columns are ignored, with a warning, so a sheet can keep notes next to the data.

Table Columns
Tags Tag
Attributes Name, Default, Min, Max, MaxAttribute, IsMeta
Effects Id, Duration (Instant, HasDuration, Infinite), DurationSeconds, Period, ExecuteOnApplication, Modifiers, AssetTags, GrantedTags, RequiredTags, BlockedTags, OngoingRequiredTags, OngoingBlockedTags, RemoveEffectsWithTags, ImmunityTags, Cues, Stacking, StackLimit, StackDurationRefresh, StackPeriodReset, StackExpiration

Cell syntax:

  • Lists are separated by ;: State.Burning; Element.Fire.
  • Numbers take a dot or a comma as decimal separator (1.5 or 1,5), so sheets exported with a French or German locale import as is. No thousands separators. Inside Scalable(...), Attribute(...) and SetByCaller(...), commas separate arguments: use a dot there.
  • Modifiers are Attribute:Op:Magnitude, separated by ;. Ops: Add, Multiply (MultiplyAdditive), MultiplyCompound, Divide, Override.
  • Magnitudes: a number (-8), Scalable(5, 1:1|10:4) (base value times a curve of level:factor keys), Attribute(Strength, Source, 0.5, Snapshot) (attribute, Source or Target, coefficient, optional Snapshot), SetByCaller(Data.Damage, 0) (tag and default value).
Id,Duration,DurationSeconds,Period,Modifiers,GrantedTags,Cues
fx_burn,HasDuration,6,1,Health:Add:-8,State.Burning,GameplayCue.Burn
fx_haste,HasDuration,4,,"MoveSpeed:Multiply:1.3",State.Haste,
fx_strike,Instant,,,"Health:Add:Attribute(Strength, Source, -1.5)",,GameplayCue.Hit

Tag and attribute names of effect tables are checked against Project Settings → Arcana. Import tags and attributes first.

Command line and CI

Every importer of the project is imported, tags first, then attributes, then effects:

Unity -batchmode -quit -projectPath . -executeMethod ZazuLabs.Arcana.Editor.Data.DataImport.ImportAllFromCommandLine

The exit code is 1 if a table has errors. The command line never removes orphans. From code, use DataImport.Plan, DataImport.Apply, DataImport.RemoveOrphans and DataImport.Export.