The Archetype Manager is Chronos Atlas’s system for extending the default entity structure with the custom fields your world requires. Because every world is different — a hard-magic fantasy needs spell-power ratings, a sci-fi setting needs starship classifications, a historical project needs dates of coronation — the Archetype Manager lets you define exactly which extra attributes appear on entities, what data type each holds, and whether they are required or optional.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Fixius50/WorlBuilding-Writting-App/llms.txt
Use this file to discover all available pages before exploring further.
What is an Archetype?
An Archetype (internally a Plantilla) is a named field definition associated with one or more entity types within a project. When you create an archetype, Chronos Atlas registers it in theplantillas table and automatically renders a corresponding input field in the entity editor sidebar for every entity of the targeted type.
This follows the EAV (Entity–Attribute–Value) pattern: the schema lives in Plantilla records, and the actual data lives in Valor records linked to individual entities.
Project-scoped
Each archetype belongs to a specific
project_id. Changing a field definition in one project does not affect any other project.Global or Specific
An archetype can apply to all entity types in the project (
aplica_a_todo = 1) or only to a specific type (tipo_objetivo, e.g., PERSONAJE, LUGAR).Creating a Template Field
Navigate to Archetype Manager
Open Settings (gear icon in the left sidebar footer), then click Archetype Manager in the navigation. The page loads all existing archetypes for the current project via
TemplateUseCase.getTemplates(projectId).Click '+ Nuevo Atributo'
Click the primary button in the top-right of the page header. The creation form expands inline within a highlighted panel.
Fill in the field name
Enter a descriptive name in the Nombre del Atributo field. Examples: “Nivel de Magia”, “Raza”, “Fecha de Coronación”, “Clase de Nave”.
Choose the data type
Select one of the six supported field types from the Tipo de Dato dropdown:
| Type | Label in UI | Description |
|---|---|---|
text | Texto Corto | Short single-line text |
long_text | Texto Largo | Multi-line textarea |
number | Número | Numeric value |
date | Fecha | Date picker |
boolean | Interruptor (Sí/No) | Yes/No toggle |
select | Lista Desplegable | Dropdown list |
Assign a category
Enter a Categoría label (e.g., “Apariencia”, “Estadísticas”, “Biografía”). Category names group related fields into sections in the entity editor sidebar.
Set the scope
Choose Global (
aplica_a_todo = 1) to apply the field to all entity types in the project, or Específico (aplica_a_todo = 0) to restrict it to one type. If Específico is selected, choose the target type from the dropdown: PERSONAJE, LUGAR, ORGANIZACION, OBJETO, or EVENTO.Toggle required
Check Es obligatorio if the field must be filled. This sets
es_obligatorio = 1 on the Plantilla record.TemplateUseCase Methods
TheTemplateUseCase class (src/features/Settings/application/TemplateUseCase.ts) is the application-layer interface for all archetype and attribute-value operations:
The Plantilla Interface
Every archetype is stored as aPlantilla record. The full TypeScript interface from database.ts is:
Valor record that stores the actual data per entity:
Editing Existing Archetypes
The archetype list on the Archetype Manager page displays everyPlantilla for the current project. Each row shows:
- Field name (
tpl.nombre) in bold uppercase - Type badge (
tpl.tipo) as a small colored chip - Category and Scope (Global or
Solo ${tipo_objetivo}) as metadata labels - Edit and Delete action buttons that appear on hover
TemplateUseCase.updateTemplate().
Click Delete (trash icon) to remove the archetype via TemplateUseCase.deleteTemplate(). This also removes all Valor records associated with that Plantilla across all entities in the project (cascade behavior enforced at the database level).