Seasons System
Titan implements a robust, Path-of-Exile inspired Seasons System combined with Hades-style player-chosen restrictions. This system allows for periodic resets (Leagues) while maintaining a permanent "Standard" league where characters retire.
Overview
The Seasons System introduces:
- Temporary Seasons: Limited-time leagues with specific modifiers and start/end dates.
- Character Migration: Automatic migration of characters to the permanent league when a season ends.
- Player Restrictions: Optional challenges like Permadeath (Hardcore) and Solo Self-Found (SSF).
- Compound Identity: Characters are now uniquely identified by
(CharacterId, SeasonId).
Client Integration
Season Hub
Seasons are managed via the SeasonHub (/seasonHub).
Methods:
GetSeasonsAsync- List all seasonsGetCurrentSeasonAsync- Get active temporary season
Creating Characters
When creating a character (via CharacterHub), you must specify the SeasonId and optional Restrictions.
{
"seasonId": "season-1",
"name": "HeroName",
"restrictions": 3 // Bitmask: 1=Hardcore, 2=SSF
}
Restrictions
Hardcore (Permadeath)
- Effect: If a character dies, they are immediately migrated to the "Standard" permanent league.
- Migration: The
Hardcoreflag is removed upon death/migration, but other restrictions (like SSF) remain. - Trigger: Call
POST /api/character/{id}/{seasonId}/dieto trigger death/migration.
Solo Self-Found (SSF)
- Effect: Trading is completely disabled.
- Enforcement:
- Cannot initiate trades.
- Cannot be the target of a trade.
- Cannot join parties (future).
- Persistence: This restriction persists even after migration to Standard.
Architecture
Grains
- ISeasonRegistryGrain: Singleton that manages season definitions and states.
- ISeasonMigrationGrain: Orchestrates bulk migration of characters at season end.
- ICharacterGrain: Represents a character in a specific season. Handles death logic.
Compound Keys
To support seasons, specific grains now use compound keys:
| Grain Interface | Key Format | Description |
|---|---|---|
ICharacterGrain | Guid + String | CharacterId + SeasonId |
IInventoryGrain | Guid + String | CharacterId + SeasonId |
Real-time Updates
Connect to the Season SignalR Hub to receive live updates:
const connection = new signalR.HubConnectionBuilder()
.withUrl("/seasonHub")
.build();
connection.on("SeasonEvent", (evt) => {
console.log("Event:", evt.EventType, evt.Data);
});
Events included: SeasonStarted, SeasonEnded, MigrationProgress, CharacterDied, CharacterMigrated.