export type DS4ActorDataType = DS4ActorDataCharacter | DS4ActorDataCreature; export interface ModifiableData { base: T; mod: T; total?: T; } interface ResourceData extends ModifiableData { value: T; max?: T; } interface UsableResource { total: T; used: T; } interface DS4ActorDataBase { attributes: DS4ActorDataAttributes; traits: DS4ActorDataTraits; combatValues: DS4ActorDataCombatValues; } interface DS4ActorDataAttributes { body: ModifiableData; mobility: ModifiableData; mind: ModifiableData; } interface DS4ActorDataTraits { strength: ModifiableData; constitution: ModifiableData; agility: ModifiableData; dexterity: ModifiableData; intellect: ModifiableData; aura: ModifiableData; } interface DS4ActorDataCombatValues { hitPoints: ResourceData; defense: ModifiableData; initiative: ModifiableData; movement: ModifiableData; meleeAttack: ModifiableData; rangedAttack: ModifiableData; spellcasting: ModifiableData; targetedSpellcasting: ModifiableData; } interface DS4ActorDataCharacter extends DS4ActorDataBase { baseInfo: DS4ActorDataCharacterBaseInfo; progression: DS4ActorDataCharacterProgression; language: DS4ActorDataCharacterLanguage; profile: DS4ActorDataCharacterProfile; } interface DS4ActorDataCharacterBaseInfo { race: string; class: string; heroClass: string; culture: string; } interface DS4ActorDataCharacterProgression { level: number; experiencePoints: number; talentPoints: UsableResource; progressPoints: UsableResource; } interface DS4ActorDataCharacterLanguage { languages: string; alphabets: string; } interface DS4ActorDataCharacterProfile { gender: string; birthday: string; birthplace: string; age: number; height: number; hairColor: string; weight: number; eyeColor: string; specialCharacteristics: string; } interface DS4ActorDataCreature extends DS4ActorDataBase { baseInfo: DS4ActorDataCreatureBaseInfo; } type CreatureType = "animal" | "construct" | "humanoid" | "magicalEntity" | "plantBeing" | "undead"; type SizeCategory = "tiny" | "small" | "normal" | "large" | "huge" | "colossal"; interface DS4ActorDataCreatureBaseInfo { loot: string; foeFactor: number; creatureType: CreatureType; sizeCategory: SizeCategory; experiencePoints: number; }