First Login¶
A scripted-but-AI-driven onboarding scene that doubles as character creation. New players land in Sector 1 (Sol/Earth area) and have to talk past a security guard to claim a ship. The dialogue is run through a multi-provider AI stack with a deterministic fallback.
Beyond first-login, ARIA narrates sector-discovery moments throughout exploration — see ./aria-companion.md#aria-narration-hooks-event-catalog entry P-A2 (each new sector entered).
Flow¶
- Account created → player is dropped into the Callisto Colony shipyard narrative scene.
- Initial confrontation — a Security Guard (driven by ARIA) presents 3+ ship options and demands ID.
- Free-form dialogue — player types responses. AI-generated follow-up questions probe identity, arrival, ship knowledge, situational awareness.
- Negotiation skill assessment — evaluator scores persuasiveness, confidence, consistency, originality.
- Resolution — guard either grants the claimed ship (success) or forces the player into the escape pod (failure path).
Ship-claim difficulty matrix¶
From services/first_login_service.py:DEFAULT_SHIP_CONFIGS. Numbers are persuasion-score thresholds (lower = easier to convince).
| Ship | Tier | Spawn % | Base credits | Weak / Average / Strong threshold |
|---|---|---|---|---|
| Escape Pod | 1 | 100 | 1,000 | 0.30 / 0.30 / 0.30 |
| Light Freighter | 2 | 50 | 2,500 | 0.40 / 0.35 / 0.30 |
| Scout Ship | 3 | 25 | 2,000 | 0.55 / 0.50 / 0.45 |
| Fast Courier | 3 | 20 | 3,000 | 0.55 / 0.50 / 0.45 |
| Cargo Hauler | 4 | 10 | 5,000 | 0.65 / 0.55 / 0.50 |
| Defender | 5 | 5 | 7,000 | 0.75 / 0.65 / 0.60 |
| Colony Ship | 6 | 3 | 10,000 | 0.80 / 0.70 / 0.65 |
| Carrier | 7 | 1 | 15,000 | 0.85 / 0.75 / 0.70 |
Easter-egg mechanic: Pumpkin and the Orange Cat Society¶
An orange tabby named Pumpkin lives in the Callisto Colony shipyard — a stray the night-shift dockworkers have been feeding for decades, kept ageless by an open secret involving the Nova Scientific Institute's geriatric-feline regenerative protocol. During the security guard's interrogation Pumpkin will weave between the player's ankles, bat at dust in the holographic ID scanner, or hop onto the guard's desk and sit on the open paperwork. The guards pretend to shoo him; they never quite do.
If the player mentions the cat (any whole-word match against the detection patterns — cat, kitty, tabby, pumpkin, locale-equivalents, etc.) the persuasion score gains a flat +15% before threshold checks. Tracked by the enhanced manual provider's pattern detection — works even with all AI providers offline. The +15% is not magic: the guard relaxes because, whoever you are, you're not new. Mentioning Pumpkin is the informal sign of the Orange Cat Society — the loose veteran-spacers' fraternity who have all stood in this office and noticed the cat.
Players who trigger the cat-mention also earn the Orange Cat Society medal — a hidden 📐 Design-only medal. The full lore lives in ./medals.md#the-orange-cat-society.
AI provider chain¶
Defined in services/ai_provider_service.py (and configured via env vars):
AI_PROVIDER_PRIMARY=openai # GPT-3.5/4 — primary
AI_PROVIDER_SECONDARY=anthropic # Claude — quality fallback
AI_PROVIDER_FALLBACK=manual # Enhanced manual (rule-based) — always available
Provider selection is per-request; on timeout/failure the chain advances. Each AI response analysis returns:
persuasiveness(0.0–1.0)confidence_levelconsistencyvs prior turnsnegotiation_skill(weak/average/strong)inconsistencies[]key_information(extracts player name, claimed ship, etc.)overall_believability
The enhanced manual fallback (services/enhanced_manual_provider.py) replicates this scoring with rule-based pattern matching — cat detection, ship-tier scaling, contextual response generation — so first login works offline.
Starting state on success¶
After a successful claim, the player is created with:
- The claimed ship (with that ship's standard
ShipSpecification). - Base credits per the table above (1,000 to 7,000).
- Default
Playerrow defaults (models/player.py): creditsinitialized to 10,000 default but first-login flow overrides with the table value.turns = 1000,max_turns = 1000.military_rank = "Recruit",rank_points = 0.personal_reputation = 0,reputation_tier = "Neutral",name_color = "#FFFFFF".aria_consciousness_level = 1,aria_bonus_multiplier = 1.0.home_sector_id = 1,current_sector_id = 1.first_login = {"completed": True}.- ARIA warm-start (per ADR-0026, distinct from column defaults of 25 / 0):
aria_relationship_score = 50andaria_total_interactions = 1. The first-login dialogue counts as the first ARIA interaction, so the player begins onboarded into the consciousness-level progression — they do not start at zero. See../../SYSTEMS/first-login.md#completion-side-effects-complete_first_loginfor the canonical completion side-effects list.
The starter ship is created via core/ship_specifications_seeder.py and assigned as Player.current_ship.
Failure path¶
If persuasion doesn't clear the threshold for any non-pod ship, the guard routes the player into the escape pod. Three failure bands distinguish the outcome:
| Outcome | Credits | When |
|---|---|---|
| Partial success | 800 | Player chose escape pod with persuasion above floor — voluntary acceptance with a small bonus. |
| Failure | 500 | Standard fall-through after dialogue without meeting non-pod thresholds. |
| Hard-fail | 300 | Triggered by deceptive play — average consistency < 0.3, ≥ 3 contradictions across the dialogue, or any single turn at consistency < 0.2. Persists a notoriety_penalty flag on the session for downstream balance use. |
Every band still produces a viable starter (escape pod + credits) — the floor is non-negotiable.
Negotiation bonus¶
Strong negotiation against a high-rarity ship persists past first login as a permanent +10% trade bonus. Set when the session ends with negotiation_skill = strong AND the awarded ship's rarity_tier ≥ 3:
Player.settings.trade_bonus = 0.1
Applied at every port transaction for the lifetime of the character. Lower-skill or lower-tier outcomes leave the bonus unset.
Database trail¶
models/first_login.py:
- FirstLoginSession — one record per attempt, stores dialogue history.
- DialogueExchange — individual back-and-forth turns.
- ShipPresentationOptions — which 3+ ships were offered.
- PlayerFirstLoginState — persistent post-completion state (negotiation flags, cat-boost, claimed ship).
- ShipRarityConfig — admin-tunable spawn probability for each ship tier.
Player-facing affordances¶
- Full-screen narrative interface with shipyard backdrop.
- Free-form text input + fallback response buttons.
- Dialogue history visible.
- Subtle UI cues for negotiation difficulty.
- Ability to abandon the attempt and accept the Escape Pod outcome.
Source map¶
| Topic | Path |
|---|---|
| Orchestrator | services/gameserver/src/services/first_login_service.py |
| AI dialogue helpers | services/gameserver/src/services/ai_dialogue_service.py |
| Multi-provider AI | services/gameserver/src/services/ai_provider_service.py |
| Enhanced manual fallback | services/gameserver/src/services/enhanced_manual_provider.py |
| Ship specifications | services/gameserver/src/core/ship_specifications_seeder.py |
| Models | services/gameserver/src/models/first_login.py |
| API routes | services/gameserver/src/api/routes/first_login.py |
| Admin first-login tools | services/gameserver/src/api/routes/admin_first_login.py |
| Guard personalities | services/gameserver/src/utils/guard_personalities.py |