# Core Concepts

Before diving into specific systems, it helps to understand a few ideas that show up everywhere in Spark. Once you know these, everything else will make more sense.

## Database Entries

A **Database Entry** is a piece of game data defined in the Spark Editor. Every item, character, ability, quest, recipe, currency, class, race, and more is a database entry.

Each entry has a few standard fields:

| Field         | Description                                                                                      |
| ------------- | ------------------------------------------------------------------------------------------------ |
| `id`          | A unique identifier, auto-generated when the entry is created. Cannot be changed after creation. |
| `entryName`   | A short internal name, used for organizing entries in the editor.                                |
| `displayName` | The name shown to players in-game (e.g., "Iron Sword").                                          |
| `description` | A text description shown to players (e.g., in tooltips or info panels).                          |
| `icon`        | A sprite used to represent the entry in UI elements.                                             |

Beyond these standard fields, each entry type adds its own specific fields. For example, an Item Entry has fields for stack size, rarity, and equipment slot. A Quest Entry has fields for objectives and rewards.

Entries are stored as ScriptableObjects inside `Resources/` folders and are loaded automatically when the game starts.

## Plugins

A **Plugin** is a self-contained system that adds a specific feature set to Spark. The Character plugin manages characters. The Items plugin manages items and equipment. The Quests plugin manages quests.

Each plugin typically provides one or more database entry types that you create in the Spark Editor, scene components (entities) that you attach to GameObjects, and UI elements for displaying data to players.

Core plugins are always available. Optional plugins are installed separately and integrate automatically with the rest of the framework. See [How is Spark Distributed](/documentation/user-guide/getting-started/how-spark-is-distributed.md) for more on how plugins are packaged and sold.

## Entities

An **Entity** is a GameObject in your scene that has a `SparkEntity` component. This component gives the object a unique ID and lets other Spark systems find and interact with it.

Most gameplay objects in your scene are entities: the player character, NPCs, interactable objects, chests, crafting stations, and so on.

You add functionality to an entity by attaching additional Spark components. For example, a player character entity might have `InventoryEntity` for carrying items, `EquipmentEntity` for wearing gear, `ProgressionEntity` for tracking experience and level, and `QuestTrackerEntity` for tracking quest progress.

Each of these components connects to the corresponding plugin and its database entries.

## Extensions

An **Extension** lets one plugin add data to another plugin's database entries without modifying the original entry.

For example, the Combat plugin needs to store stat values (strength, agility, etc.) on items. Instead of modifying the Items plugin, the Combat plugin creates an extension that attaches stat data to item entries. In the Spark Editor, when you view an item entry, you will see a "Combat Stats" section added by the Combat extension.

This is how Spark stays modular. Plugins do not depend on each other directly. They connect through extensions.

As an editor user, you do not need to worry about how extensions work technically. You will see extension fields appear on entries when the relevant plugins are installed. Just fill them in like any other field.

## Next Steps

Now that you understand the core concepts, the rest of this guide walks through each system in detail. Continue to the [Plugins](/documentation/user-guide/plugins.md) section to explore individual plugin features.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sparkframework.dev/documentation/user-guide/getting-started/core-concepts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
