> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Island Storage Artifact

> Persistent data storage.

The `btcsky_artifact` manages persistent storage for all island data, synchronized across the network via MySQL.

## Purpose

The BTC Sky Artifact stores:

* **Island Metadata**: ID, owner, creation date.
* **Dimensions**: Unlocked worlds and chunks.
* **Members**: Roles, join dates, permissions.
* **Economy**: Bank balance and history.
* **Tech Tree**: Research and upgrade progress.

## Configuration

<ResponseField name="mysqlArtifact" type="Ref<MySQLArtifactEntry>">
  Reference to the MySQL storage handler.
</ResponseField>

<ResponseField name="syncInterval" type="Int" default="60">
  How often (in seconds) to synchronize data across servers.
</ResponseField>

<ResponseField name="cacheExpiry" type="Int" default="300">
  Time in seconds to keep data in memory after last access.
</ResponseField>

## Data Schema

### Core Tables

* **Islands**: Stores level, worth, bank, and spawn location.
* **Members**: Links players to islands with roles.
* **Dimensions**: Tracks unlocked status and owned chunks per dimension.
* **Warps**: Stores user-set warp points.

### Synchronization

The artifact uses a "Write-Behind" caching strategy:

1. **Load**: Data fetched on player join.
2. **Modify**: Changes applied to memory immediately.
3. **Sync**: Changes pushed to database periodically or on quit.
4. **Broadcast**: Updates sent to other servers via Redis/MySQL for consistency.

***

# Contract Storage Artifact

**Type:** `btcsky_contract_artifact`

Persistent storage for island-specific contracts and procedural objectives.

## Purpose

Manages the lifecycle of island contracts (Active, Completed, Expired) and ensures procedurally generated objectives are consistent across server restarts.
