ZazuLabs.Arcana.Data¶
AttributeData¶
An attribute row.
| Member | Description |
|---|---|
DefaultBaseValue |
Default base value. |
IsMeta |
Meta attribute. |
MaxAttribute |
Capping attribute, or null. |
MaxValue |
Maximum, or null. |
MinValue |
Minimum, or null. |
Name |
Unique name. |
AttributeTable¶
Attribute table. Columns: Name (required), Default, Min, Max, MaxAttribute, IsMeta. Empty Min or Max means no bound.
| Member | Description |
|---|---|
Columns |
Columns in written order. |
Parse(CsvTable) |
Reads attributes. MaxAttribute must name an attribute of the table. |
ToRow(AttributeData) |
One row as written. |
Write(AttributeData>) |
Writes an attribute table. |
Cells¶
Parsing and formatting of cell values. Numbers use '.' as decimal separator; ',' is accepted too.
| Member | Description |
|---|---|
FormatCurve(Single>>) |
Formats curve keys as "x:y|x:y". |
FormatFloat(Single) |
Shortest invariant representation. |
FormatList(String>) |
Joins items with "; ". |
FormatMagnitude(MagnitudeData) |
Formats a magnitude in the syntax read by Cells.TryParseMagnitude. |
ParseList(String) |
Splits a list cell on ';' (outside parentheses), trimming and skipping empty items. |
SplitTopLevel(String, Char) |
Splits on separator outside parentheses. |
TryParseBool(String, Boolean, Boolean) |
Parses true/false, yes/no, 1/0, x (true) and empty (defaultValue). |
TryParseCurve(String, Single>>, String) |
Parses curve keys "x:y" separated by '|' or ';'. |
TryParseEnum(String, ``0) |
Parses an enum name, ignoring case and spaces. |
TryParseFloat(String, Single) |
Parses a number with '.' or ',' as decimal separator. |
TryParseMagnitude(String, MagnitudeData, String) |
Parses a magnitude: a number, Scalable(value, x:y\|x:y), Attribute(Name[, Source\|Target][, coefficient][, Snapshot]) or SetByCaller(Tag[, default]). |
Csv¶
RFC 4180 CSV reading and writing: quoted cells, doubled quotes, line breaks inside quotes, CRLF or LF, UTF-8 BOM. The separator (',', ';' or tab) is detected from the header row.
| Member | Description |
|---|---|
Parse(String, Char>) |
Parses text. The first non-empty row is the header. |
Write(String>, String>>, Char) |
Writes a table. Cells containing the separator, quotes or line breaks are quoted. |
CsvRow¶
One data row.
| Member | Description |
|---|---|
Get(String) |
Cell of column column, or an empty string if the column or cell is missing. |
Cells |
Cells, trimmed unless quoted. |
Line |
1-based line where the row starts in the source text. |
CsvTable¶
A parsed CSV table: a header row and data rows with their source line numbers.
| Member | Description |
|---|---|
ColumnIndex(String) |
Index of a column (case-insensitive), or -1. |
HasColumn(String) |
True if the column exists. |
Headers |
Column names, trimmed. |
Rows |
Data rows, empty lines skipped. |
Separator |
Separator found or given: ',', ';' or tab. |
DataError¶
A problem found in a table. Warnings do not block an import; errors skip their row.
| Member | Description |
|---|---|
constructor(Int32, String, String, Boolean) |
Creates an error. |
ToString() |
|
Column |
Column involved, or null. |
IsWarning |
True for a warning. |
Line |
1-based source line, 0 for the whole table. |
Message |
What is wrong and how to fix it. |
DataTableResult`1¶
Parsed rows and the problems found.
| Member | Description |
|---|---|
Errors |
Errors (rows skipped) and warnings. |
HasErrors |
True if at least one error, not counting warnings. |
Items |
Rows without error, in table order. |
DataValidation¶
Tells table parsers which tag and attribute names exist. Null functions skip the check.
| Member | Description |
|---|---|
From(GameplayTagRegistry, GameplayAttributeRegistry) |
Checks against registries. |
IsKnownAttribute |
Returns true if an attribute name exists. |
IsKnownTag |
Returns true if a tag name exists. |
EffectData¶
An effect row: everything a GameplayEffectDefinition holds except executions (code).
| Member | Description |
|---|---|
AssetTags |
Asset tags. |
BlockedTags |
Application requirement: none allowed. |
Cues |
Gameplay cue tags. |
Duration |
Duration of a timed effect. |
DurationPolicy |
Instant, timed or infinite. |
ExecutePeriodicOnApplication |
Periodic effects execute on application. |
GrantedTags |
Granted tags. |
Id |
Unique id, used as asset name. |
ImmunityTags |
Granted application immunity. |
Modifiers |
Modifiers. |
OngoingBlockedTags |
Ongoing requirement: none allowed. |
OngoingRequiredTags |
Ongoing requirement: all required. |
Period |
Seconds between executions, 0 for none. |
RemoveEffectsWithTags |
Effects removed on application. |
RequiredTags |
Application requirement: all required. |
StackDurationRefresh |
Duration refresh on stacking. |
StackExpiration |
Expiration of a stack. |
StackLimit |
Stack limit, 0 for none. |
StackPeriodReset |
Period reset on stacking. |
Stacking |
Stacking type. |
EffectTable¶
Effect table. Id is required; every other column is optional. See EffectTable.Columns and the package README.
| Member | Description |
|---|---|
Columns |
Columns in written order. |
Parse(CsvTable, DataValidation) |
Reads effects. Unknown tags and attributes are errors when validation can check them. |
ToDefinition(EffectData, GameplayTagRegistry, GameplayAttributeRegistry) |
Builds a core definition from a row, resolving names against registries. |
ToRow(EffectData) |
One row as written, in EffectTable.Columns order. Equal rows mean equal effects. |
Write(EffectData>) |
Writes an effect table with every column. |
GoogleSheets¶
Google Sheets links.
| Member | Description |
|---|---|
ToCsvUrl(String) |
Turns a Google Sheets link into its CSV download link. Accepts an editor link (/spreadsheets/d/ID/edit#gid=N, sheet shared with "anyone with the link") or a "Publish to the web" link. Other URLs are returned unchanged. |
MagnitudeData¶
A magnitude written in a cell.
| Member | Description |
|---|---|
Build(GameplayTagRegistry, GameplayAttributeRegistry) |
Builds the core magnitude. |
Constant(Single) |
A constant. |
ToString() |
|
Coefficient |
Coefficient of an attribute-based magnitude. |
Curve |
Curve keys of a scalable magnitude. |
From |
Side read by an attribute-based magnitude. |
Kind |
Kind. |
Name |
Tag of a set-by-caller, attribute of an attribute-based magnitude. |
Snapshot |
Attribute-based magnitude read once on application. |
Value |
Constant value, scalable value, or set-by-caller default. |
MagnitudeKind¶
Kind of a MagnitudeData.
| Member | Description |
|---|---|
AttributeBased |
Attribute(Strength, Source, 0.5): coefficient × attribute; add Snapshot to read it once. |
Constant |
-8 |
Scalable |
Scalable(-5, 1:1\|10:4): value × curve at the level. |
SetByCaller |
SetByCaller(Data.Damage) or SetByCaller(Data.Damage, 10). |
ModifierData¶
A modifier written as Attribute:Op:Magnitude, e.g. Health:Add:-8.
| Member | Description |
|---|---|
ToString() |
|
Attribute |
Attribute name. |
Magnitude |
Magnitude. |
Op |
Operation. |
TagTable¶
Tag table: one tag per row in column Tag. Other columns (descriptions, notes) are ignored.
| Member | Description |
|---|---|
TagColumn |
Column holding the tag name. |
Parse(CsvTable) |
Reads tag names. Invalid or duplicate names are reported. |
Write(String>) |
Writes a tag table. |