-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
Identifies one generation profile with ProfileId, balance Character, and UnlockComponentRoles. Use stable ASCII
profile IDs. The two-argument constructor is for built-in profiles.
Contains ShellCatalog, ComponentCatalog, NameCatalog, an occurrence-policy factory, and an
IComponentValuePolicy. CreateOccurrencePolicy() must return fresh pool-scoped state. Its optional
ComponentKeywordPolicy independently controls native/custom base-keyword and upgrade availability.
Register(ComponentPackageRegistration) atomically preflights and installs profile, stable named localization,
keyword definitions/upgrades, multiplicity, and custom valuation metadata. Register before the first
ComponentApi.Resolve. Duplicate package IDs are rejected without leaving partial registry state.
IncludeInUltimateChaos defaults to true and contributes the complete normal source catalog to the weighted union.
ComponentApi.ComposeCatalog combines complete source catalogs without losing occurrence weighting. An external
normal profile can be resolved with UnlockComponentRoles=true without registering a duplicate Ultimate profile.
Builds all structural indexes from reviewed IroncladCardRecipe values. The historical type name is retained for
binary/source compatibility; it is valid for any balance archetype.
Stable flags for cross-cutting assembly facts: Beneficial, Negative, Restricted, EnemyDamage,
PowerFoundation, ScalableReward, and SelfCardMovement. Targets, zones, values, triggers, conditions, execution,
and valuation stay in their dedicated RuntimeSpec/route fields.
Registers Chinese/English templates by component SemanticId. Named placeholders bind to RuntimeSpec value slots
([[damage]], [[hits]], [[energy:energy]], [[stars:stars]]) or registered text slots ([[token]]). Generated
operations persist the small localization ID, not the compiled template. The older ComponentLocalizedText exact
sentence registry remains an API v2 compatibility surface only.
Registers stable ASCII custom keyword IDs and optional deterministic IComponentKeywordRule legality. Recipe and
upgrade records carry those IDs without extending the game's closed enums. A custom keyword is presentation and
classification metadata, not a hidden gameplay effect; its effect still needs structured runtime and valuation routes.
-
SourcePriorWeight: native/source family prior. -
SelectionWeight: closed-loop correction after accepted cards. -
VariantWeight: choice within a family. -
Observe: receives finalized cards only, never failed attempts.
Use ComponentApi.CreateNativeOccurrencePolicy(catalog) unless the character needs a custom distribution.
Controls numeric scalability, native-value preservation, sampling, clamping, value bonuses, and trigger payoff
scaling. Use ComponentApi.DefaultValuePolicy unless you need a fully custom numeric model.
Returns finalized effect value in hundredths of one point of single-target damage. Exact opcode/variant routes win over opcode-wide routes.
ComponentValuationRegistration also supports one downside mode:
-
NegativeLinearValuePerUnit > 0: linear compensation per unit; or -
NegativeMultiplier > 1: whole-card multiplicative downside compensation.
Do not set both.
-
Repeatable: ordinary component. -
SinglePerCard: at most once on one generated card. -
UniquePerPool: at most once in the generated pool.
Register with ComponentMultiplicityRegistration. Pool uniqueness is consumed only by accepted finalized cards.
-
Register(opcode, variant, handler)registers one route. -
RegisterPackage(packageId, routes)validates and commits a route set. -
HasRouteandRegisteredRoutessupport startup audits. - Registration freezes when the first generated operation executes.
RegisterPackage atomically registers optional IComponentHoverTipProvider routes. Registration freezes on first
generated hover-tip render.
RegisterPackage maps generator keyword IDs to IComponentKeywordRuntimeAdapter instances. An adapter can expose
native CardKeyword values, semantic tags, hover tips, and an upgrade callback. Registration freezes on the first
generated-card keyword query.
-
Registerdeclares profile identity, archetype, and energy-icon prefix. - An optional
IExternalAncientRelicAdaptersupplies Archaic Tooth and Dusty Tome behavior without a hard-coded character ID. -
InstallDefinitionsreplaces one profile's complete run-scoped definition list. -
GetDefinitionsreturns the installed immutable list. -
ClearDefinitionsremoves run-scoped definitions.
Character registration freezes when definitions are first installed or read.
Native execution still contains compatibility branches for built-in templates; custom namespaced opcodes use the generic runtime registry. The game's keyword enums remain closed, so API v3 stores custom identity as ASCII IDs and projects it through runtime adapters instead of manufacturing enum members. The owning mod still supplies its save field, host-authoritative definition synchronization, concrete card classes/art, custom token/orb/status resolution, and any novel card lifecycle hook.
Base class for concrete fixed-slot card models. Override ComponentProfileId, Slot, and Pool; generated text,
upgrades, trigger dispatch, and operation execution are inherited.
Registration throws immediately for non-ASCII IDs, duplicate routes, missing RuntimeSpecs or named localization, unknown keyword IDs, duplicate semantic IDs, invalid trigger owners, empty catalogs, or a catalog whose character differs from its profile archetype. Package registries preflight before mutation; treat failures as initialization errors and retry only after fixing the complete registration.
Source · Steam Workshop · AutoAnthony 0.3.32 · API v3