-
Notifications
You must be signed in to change notification settings - Fork 0
External Character Integration
AutoAnthony does not replace a custom character framework. Your mod continues to register its character, pool, cards, derivatives, relics, and multiplayer model IDs in its normal way.
const string profileId = "my_watcher:autoanthony";
ExternalComponentCharacterApi.Register(
new ExternalComponentCharacterRegistration(
ProfileId: profileId,
BalanceArchetype: GeneratedCharacter.Regent,
EnergyIconPrefix: "watcher"));The balance archetype selects existing legality and value conventions; it is not the profile identity. Different custom characters may reuse the same archetype because their profile IDs remain distinct.
The game ModelDb discovers concrete model types, so declare one concrete class per maximum generated slot:
abstract class WatcherChaosCard : ExternalChaosCardModel
{
protected sealed override string ComponentProfileId => "my_watcher:autoanthony";
public sealed override CardPoolModel Pool => ModelDb.CardPool<WatcherCardPool>();
}
sealed class WatcherChaosCard000 : WatcherChaosCard
{
protected override int Slot => 0;
}Continue for every stable slot your pool can expose. Do not create model types dynamically after ModelDb startup.
At new-run creation or save restoration, build complete definitions and install them in contiguous slot order:
ExternalComponentCharacterApi.InstallDefinitions(profileId, definitions);Every definition must:
- use slots
0..N-1without gaps; - carry a card whose
Characterequals the registered balance archetype; - contain one validated
RuntimeSpecper operation; - use stable portrait/effect identifiers that the owning mod can restore.
Call ExternalComponentCharacterApi.ClearDefinitions(profileId) when the run is discarded or fully cleaned up.
AutoAnthony provides generation, upgrades, rendering, operation interpretation, and generated Power persistence. The character mod owns when generation happens, how many cards each rarity gets, source art/effects, snapshot storage, network authority, and card-pool exposure.
The subscribed Watcher 0.9.25 uses direct CharacterModel, CardPoolModel, and CardModel subclasses plus manual
multiplayer ModelId registration. This is why the API accepts normal model types and stable IDs rather than BaseLib or
RitsuLib objects. See the repository's
WatcherComponentAdapter.cs.txt
for a compact adapter skeleton.
Source · Steam Workshop · AutoAnthony 0.3.32 · API v3