Commit Graph

434 Commits

Author SHA1 Message Date
Z. Cliffe Schreuders
2929bdb322 feat: Add TEMPLATE_006 (Message Logs) and comprehensive template documentation
Created Template 006 for encrypted messaging app evidence (Signal/Wickr) showing ENTROPY handler-asset communications, plus comprehensive README documentation for the entire template system.

## New Files:

### TEMPLATE_AGENT_ID_006_message_logs.md
- **Evidence Type:** Signal/Wickr encrypted messaging app logs
- **Key Feature:** Handler uses subject's REAL NAME 8 times in operational comms
- **Direct Identity Confirmation:** Definitive proof of NPC as ENTROPY asset
- **Evidence Strength:** 75% alone → 99% combined with other templates
- **High Cooperation Potential:** 85% base (subject wants out, shows coercion)

**5 Message Threads Included:**
1. Initial Tasking - Handler assigns data theft, uses real name
2. Operational Concerns - Subject worried, handler reassures
3. Coordination with Cell - Payment confirmed, second asset mentioned
4. Internal ENTROPY Comms - Handler briefs cell leader, confirms recruitment method
5. Escalation and Pressure - Subject wants out, handler threatens and coerces

**What Makes This Template Unique:**
- Only template with direct real name confirmation via ENTROPY internal comms
- Shows subject is KNOWN ENTITY within ENTROPY organization
- Reveals handler's OPSEC failure (using real names)
- Documents coercion and victimization (subject tried to quit)
- Provides intelligence beyond subject: handler contact, cell structure, operations
- Creates moral complexity: perpetrator who is also victim

**Substitution Variables (17 total):**
- [SUBJECT_NAME], [SUBJECT_CODENAME], [HANDLER_CODENAME]
- [CELL_DESIGNATION], [OPERATION_NAME]
- [HANDLER_PHONE], [SUBJECT_PHONE]
- [TARGET_ORGANIZATION], [DATA_TYPE], [SYSTEM_NAME]
- [AMOUNT], [MEETING_LOCATION], [DEADLINE_DATE]
- [DATE_1] through [DATE_5], [TIME_1] through [TIME_5]
- [PRESSURE_DETAIL], [SUBJECT_CONCERN]
- [SECOND_ASSET_CODENAME], [CELL_LEADER_CODENAME]

**Gameplay Integration:**
- Discovery: RARE (server compromise or handler device seizure)
- Unlocks: Handler arrest, second asset ID, cell mapping
- Interrogation approaches: Overwhelming evidence (85%), Empathetic victim-focused (90%), Strategic flip (90%)
- Intelligence yield: Cell structure, handler contact, dead drops, payment methods

**Educational Value (CyBOK):**
- Encrypted messaging security & limitations
- OPSEC failures in operational communications
- Mobile device forensics
- Digital evidence authentication
- Insider threat psychology and coercion tactics
- Counterintelligence and asset flipping

### README.md (Comprehensive Template System Guide)
- **Purpose:** Complete documentation for using all 6 evidence templates
- **Sections:** Quick start, substitution guide, best practices, examples

**Key Content:**
- Quick Start Guide (4 steps: Choose templates → Gather values → Substitute → Deploy)
- Complete 6-template overview with summaries
- **Complete Substitution Variable Reference Table:**
  - Core Identity (3 variables - used in ALL templates)
  - ENTROPY Operational (7 variables)
  - Financial (4 variables)
  - Technical/System (3 variables)
  - Communication (3 variables)
  - Location (3 variables)
  - Temporal (5 variables)
  - Contextual (4 variables)
- Evidence Combination Strategies (5 strategic paths)
- Interrogation Approaches by Evidence Collected (clear unlocks)
- Best Practices (DO/DON'T lists)
- Rarity and Discovery Recommendations (progression table)
- Success Metrics and Gameplay Impact (evidence count → outcomes)
- Customization Examples (3 complete NPC scenarios with all substitutions)
- Educational Value Summary (CyBOK alignment)
- Quick Reference Checklist

**DO/DON'T Best Practices:**
✓ Replace ALL placeholders
✓ Keep values consistent across templates for same NPC
✓ Match timeline chronologically
✓ Consider cooperation potential
✗ Don't leave [BRACKETS] in final version
✗ Don't require 100% collection
✗ Don't over-punish coerced NPCs

## Updated Files:

### TEMPLATE_CATALOG.md
- Updated template count: 5 → 6
- Updated section title: "The Five Evidence Templates" → "The Six Evidence Templates"
- Added complete Template 006 entry with:
  - Full substitution variable list (17 variables)
  - Message thread summaries
  - Real name usage pattern analysis
  - 9 red flags documented
  - Evidence strength progression
  - Gameplay integration details
  - Forensic & legal assessment
  - Cross-references to other templates
  - Discovery scenarios and timing
- Updated Evidence Chain diagram to include Message Logs
- Updated Confidence Thresholds table: Added 6-template row (99.9% confidence, 95% cooperation)
- Added 2 new combination strategies:
  - "Real Name Confirmation + High Cooperation" (Templates 006 + 005 + 002 = 99%, 95% cooperation)
  - "Complete Cell Mapping" (Templates 006 + 004 + 002 + 003 = 99.9%, enables handler arrest)
- Added Template 006 to Discovery Placement Recommendations (Very Hard, Late investigation)
- Updated Expansion Opportunities: Renumbered future templates 007-011 (was 006-010)
- Updated Version History: Added v2.0 entry
- Updated Quick Reference Card: Added Template 006 with  NEW marker

## System Impact:

**Template System v2.0:**
- Total Templates: 6 (was 5)
- Total Substitution Variables: 32+ unique placeholders
- Evidence Chain: 6-step progression from suspicion → definitive proof
- Maximum Confidence: 99.9% (all 6 templates)
- Cooperation Range: 50% (1 template) → 95% (all 6 with empathetic approach)

**New Capabilities:**
- Direct real name confirmation via ENTROPY internal comms
- Handler identification and arrest enablement
- Cell structure mapping
- Second asset discovery at same organization
- Coercion documentation for cooperation agreements
- Highest cooperation potential (85-95%)

**Documentation Completeness:**
- Quick start guide for new users
- Complete variable reference (32+ variables documented)
- 5 evidence combination strategies
- 8 interrogation approach unlocks
- 3 complete NPC customization examples
- Educational value mapped to CyBOK

## Integration Notes:

**Template 006 Cross-References:**
- Corroborates Template 002 (payment amounts match message discussions)
- Corroborates Template 003 (data extraction dates align with tasking)
- Corroborates Template 004 (dead drop timing/location matches messages)
- Corroborates Template 005 (emotional arc: trapped, wants out)
- Connects to RECRUITMENT_001 (financial pressure methodology)
- Connects to TACTICAL_001 (if operation is infrastructure attack)
- Connects to LEVERAGE_001 (pressure detail as leverage point)

**Recommended Discovery:**
- Rarity: RARE (Very Hard)
- Timing: Late game (Mid-game for major operation rewards)
- Prerequisites: Server compromise OR handler device seizure
- Value: Very High (real name confirmation + handler intel + cell mapping)

All templates maintain narrative consistency, CyBOK educational alignment, and infinite reusability through [PLACEHOLDER] substitution system.
2025-11-19 17:43:15 +00:00
Z. Cliffe Schreuders
b5d3ee33c4 feat: Add reusable evidence template system for ENTROPY agent identification
Created 5 comprehensive evidence templates with [PLACEHOLDER] substitution system that enable infinite NPC agent identification across scenarios.

## New Files:
- TEMPLATE_AGENT_ID_001_encrypted_comms.md
  * Intercepted PGP-encrypted communications
  * 40% confidence alone, 90% combined
  * Red flags: Policy violations, ProtonMail, after-hours timing

- TEMPLATE_AGENT_ID_002_financial_records.md
  * Bank transactions & cryptocurrency forensics
  * 60% confidence alone, 98% combined
  * Red flags: Unexplained cash, ENTROPY wallet, shell companies

- TEMPLATE_AGENT_ID_003_access_logs.md
  * IT audit showing unauthorized system access
  * 70% confidence alone, 98% combined
  * Documents 5 incidents: Reconnaissance → Exfiltration → Cover-up

- TEMPLATE_AGENT_ID_004_surveillance_photos.md
  * 14-day surveillance op with 7 photo scenarios
  * 50% confidence alone, 95% combined
  * Handler identification, dead drops, countersurveillance

- TEMPLATE_AGENT_ID_005_physical_evidence.md
  * Handwritten 3-page emotional confession
  * 80% confidence alone, 99.9% combined
  * Enables 95-98% cooperation through empathetic approach
  * Arc: Willing participant → Trapped → Desperate for help

- TEMPLATE_CATALOG.md
  * Complete template system documentation
  * Substitution guide & best practices
  * Evidence chain methodology
  * Integration strategies & success metrics

## Template System Features:
- [PLACEHOLDER] format for runtime substitution
- Evidence chain: Single evidence (40-80%) → All 5 (99.9%)
- Cooperation likelihood scales with evidence quality
- Multiple interrogation approaches unlocked by different combinations
- Infinite reusability across NPCs and scenarios

## Integration:
- Updated GAMEPLAY_CATALOG.md with template section
- Evidence Prosecution category expanded from 1 to 6 fragments
- Total gameplay-focused fragments: 13 (8 unique + 5 templates)
- Templates work standalone or combine for overwhelming cases

## Educational Value (CyBOK):
- Digital forensics (email analysis, blockchain tracing)
- Insider threat detection (behavioral indicators)
- Investigation methodology (evidence corroboration)
- Legal process (admissibility, chain of custody)
- Psychological profiling & ethical interrogation

## Gameplay Impact:
Each template enables different player actions and unlocks specific interrogation approaches based on evidence collected. System designed to reward thorough investigation while not requiring 100% collection for success.
2025-11-19 17:43:15 +00:00
Z. Cliffe Schreuders
56b0b654f1 feat: Add gameplay-function LORE fragments with mission integration
Created 8 gameplay-focused LORE fragments organized by what players
can DO with the information, not just narrative content. Each fragment
enables specific mission objectives, player choices, and success metrics.

**Organization by Gameplay Function:**

📋 Evidence Prosecution (1 fragment):
- ALPHA_07 criminal conspiracy communication
- Enables: Federal prosecution, arrest warrants, 95% conviction rate
- Unlocks: Protection for Sarah Martinez, tactical arrests

🎯 Tactical Intelligence (1 fragment):
- 48-hour countdown to power grid attack
- Enables: Time-pressure mission, 3 tactical approaches
- Unlocks: Grid defense, prevents Phase 3 backdoor installation
- Branching: Hard takedown / Insider flip / Extended surveillance

💰 Financial Forensics (1 fragment):
- Complete crypto trail from Sarah's payment to master wallet
- Enables: $8.2M asset seizure, funding disruption
- Unlocks: The Architect identity clues, shell company network
- Impact: -60% ENTROPY operational capacity if successful

🎣 Recruitment Vectors (1 fragment):
- ENTROPY's internal asset recruitment playbook
- Enables: Prevention programs, counter-recruitment, sting ops
- Unlocks: At-risk employee identification, pipeline disruption
- Impact: -30% to -50% future insider threats

🔓 Technical Vulnerabilities (1 fragment):
- SCADA zero-day Equilibrium.dll complete analysis
- Enables: Detection scripts, patch deployment, infrastructure hardening
- Unlocks: Grid protection before Phase 3, honeypot strategies
- Success metric: 100% patched = no Phase 3 grid failures

📍 Asset Identification (1 fragment):
- Complete surveillance package on 3 CELL_DELTA_09 subjects
- Enables: Coordinated arrests, tactical planning, insider cooperation
- Unlocks: Robert Chen flip opportunity, optimized approach
- Success: 85-95% based on intel collected

👥 Victim Testimony (1 fragment):
- Hospital administrator emotional testimony (patient death from ransomware)
- Enables: Emotional investment, motivation, dialog options
- Unlocks: Moral context, interrogation appeals, "Remember Why We Fight"
- Impact: Player engagement, meaningful success/failure consequences

🔄 Leverage Materials (1 fragment):
- Cascade's mother cancer treatment leverage analysis
- Enables: Operative turning, 4 distinct ethical approaches
- Unlocks: CELL_BETA complete intelligence, redemption arc
- Choices: Compassionate (85% success) / Manipulative (45%) /
  Ethical refusal / Anonymous help

**Key Integration Features:**

Mission-Critical Intel:
- TACTICAL_001 triggers 48-hour countdown mission
- ASSET_ID_001 required for optimal tactical planning
- TECHNICAL_001 enables infrastructure protection
- All fragments improve success probability measurably

Branching Player Choices:
- Evidence: Prosecution vs. plea deals
- Tactical: 3 arrest strategies with different risk/reward
- Financial: Seizure priorities and timing
- Recruitment: Prevention vs. counter-recruitment vs. sting
- Technical: Patch race vs. honeypot vs. shutdown
- Leverage: Compassion vs. manipulation vs. ethical stance

Cross-Fragment Integration:
- Operation Glass House appears across 5 functions
- Power Grid Attack requires 3 fragments for optimal success
- The Architect identity clues scattered across all functions
- Success metrics compound (more intel = better outcomes)

Educational Value:
- All fragments teach CyBOK-aligned security concepts
- Real-world attack methodologies and defenses
- Legal, technical, financial, and human factors
- Ethical considerations in security operations

**Gameplay Catalog:**
Complete cross-reference system showing:
- Fragment interconnections and mission integration
- Success probability calculations
- Branching path outcomes
- Player progression through game
- Design principles for future fragments

Each fragment answers "What can I DO with this?" rather than
just "What does this tell me?" - making LORE collection
functionally valuable, not just completionist.

See story_design/lore_fragments/by_gameplay_function/GAMEPLAY_CATALOG.md
for complete integration guide and mission design examples.
2025-11-19 17:43:15 +00:00
Z. Cliffe Schreuders
d93a08c428 feat: Add comprehensive ENTROPY LORE fragments system
Created interconnected LORE fragment collection revealing ENTROPY's
world through discoverable artifacts. Organized by content type and
artifact format for progressive player discovery.

**Structure:**
- 4 content categories: ENTROPY Intelligence, The Architect,
  Character Backgrounds, Location History
- 7 artifact types: encrypted comms, intelligence reports, text notes,
  emails, voice messages, corporate docs, personal items
- Progressive revelation: early game intro → mid game connections →
  late game master plan

**10 Seed Fragments Created:**

ENTROPY Intelligence (5):
- Operation Glass House completion report (cell communication)
- Dead drop server list (compromised infrastructure)
- Thermite.py tool analysis (The Architect's signature)
- Operative "Cascade" profile (true believer)
- Complete organizational history (2015-2025, Phase 3 timeline)

The Architect (2):
- Philosophical manifesto on inevitability (ideology revealed)
- Phase 3 activation directive (July 15, complete master plan)

Character Backgrounds (3):
- Sarah Martinez confession email (insider threat desperation)
- Marcus Chen final voice message (civilian courage, survived!)
- Agent 0x99 axolotl philosophy (regeneration vs entropy)

Location History (1):
- Vanguard Financial complete history (25 years, breach, recovery)

**Key Features:**
- Interconnected narrative web (fragments reference each other)
- Educational value (CyBOK-aligned security lessons)
- Moral complexity (sympathetic characters on both sides)
- Emotional impact (personal stories, real consequences)
- Progressive mystery (builds understanding over time)
- Master catalog tracking all connections and discovery timing

**Thematic Elements:**
- ENTROPY: "For entropy and inevitability" - thermodynamic philosophy
- SAFETYNET: "For regeneration and resilience" - axolotl metaphor
- Phase 3: July 15, 2025 - infrastructure-wide coordinated attack
- Moral gray areas: desperate people, true believers, ethical constraints

Fragments demonstrate sophisticated threat actor (ENTROPY) with
decade-long planning, ideological commitment, and custom tooling,
opposed by dedicated defenders (SAFETYNET) who regenerate after
every setback.

See story_design/lore_fragments/MASTER_CATALOG.md for complete
interconnection map and expansion guidelines.
2025-11-19 17:43:14 +00:00
Z. Cliffe Schreuders
3746212267 docs: Add comprehensive CTF flag narrative integration system
Create design document explaining how CTF flags integrate into
Break Escape's narrative through ENTROPY's dead drop system.

Key concepts:
- Flags as ENTROPY coordination messages
- Drop-site terminals hidden in plain sight
- Why physical presence is required for infiltration
- Flag reward categories (equipment, intel, access, story)
- Complete gameplay loop from briefing to debrief
- Sample Ink dialogue for character interactions

This system allows SecGen CTF scenarios to be embedded
narratively while providing tangible gameplay progression.
2025-11-19 17:32:16 +00:00
Z. Cliffe Schreuders
eaac5c31c5 docs: Update documentation to reflect correct conversation flow pattern
Updated both INK_BEST_PRACTICES.md and NPC_HUB_ARCHITECTURE.md to
accurately document the conversation flow pattern we're using.

Key Corrections:

1. Personal Conversations:
   - Return to mission_hub WITHOUT #end_conversation tag
   - This allows seamless return to hub menu
   - Player can choose more topics without closing UI

2. Exit Options:
   - Located in mission_hub knot
   - Use pattern: #end_conversation -> mission_hub
   - Tag closes UI while preserving state at mission_hub
   - NOT -> DONE (which doesn't preserve hub state)

3. Flow Documentation:
   - Added clear step-by-step flow examples
   - Updated "How It Works" sections
   - Fixed all code examples to show correct pattern
   - Updated checklists and quick reference sections

4. Common Mistakes:
   - Added examples of WRONG patterns (tag in personal endings)
   - Added examples of CORRECT patterns (tag only in exit options)
   - Clarified why each approach matters

5. Tag Name Updates:
   - Changed references from old #exit_conversation to #end_conversation
   - Updated all game engine integration notes

This ensures documentation matches the actual implementation in
chen_hub.ink, netherton_hub.ink, and haxolottle_hub.ink.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
b611c883e0 fix: Apply mission_hub exit pattern to Netherton and Haxolottle
Applied the same conversation flow fix from chen_hub.ink to the other
two NPCs. Exit options now properly preserve state at mission_hub while
closing the conversation.

Pattern Applied:
  #end_conversation
  -> mission_hub

Instead of:
  #end_conversation
  -> DONE

This ensures:
1. Exit options close the conversation minigame (#end_conversation tag)
2. Story state is preserved AT mission_hub (not DONE)
3. Next conversation resumes from mission_hub with all options available
4. Player can have multiple conversation topics before choosing to exit

Files Updated:
- netherton_hub.ink (2 exit options)
- haxolottle_hub.ink (2 exit options)

Recompiled all hub JSON files.

All three NPCs now have consistent conversation flow behavior.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
c83ad8d519 json update 2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
91640d0503 Improve conversation example, returning to the hub while exiting the UI from the interaction with NPC 2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
2a888ccaa3 fix: Remove #end_conversation tag from personal conversation endings
Fixed issue where personal conversations were closing the entire interaction
instead of returning to mission_hub menu.

The Problem:
- Personal conversation endings had #end_conversation tag before -> mission_hub
- This caused the entire conversation to close when personal chat ended
- Player couldn't access mission_hub menu options after personal conversations

The Fix:
- Removed #end_conversation tags from conversation_end knots in ongoing_conversations
- Personal conversations now return to mission_hub WITHOUT closing
- Player sees mission_hub menu again with all available options
- #end_conversation tag remains ONLY in mission_hub exit options

Correct Flow Now:
1. Player chooses personal conversation topic at mission_hub
2. Has personal conversation
3. Personal conversation ends -> mission_hub (no tag)
4. Player sees mission_hub menu again
5. Player can continue with other options OR choose exit
6. Exit option has #end_conversation -> DONE (closes conversation)

Files modified:
- dr_chen_ongoing_conversations.ink
- netherton_ongoing_conversations.ink
- haxolottle_ongoing_conversations.ink

Recompiled all hub JSON files.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
b982158ce5 refactor: Move ink source files to scenarios/ink and add compilation script
Consolidated all ink source files into scenarios/ink directory for better
organization. All ink source files and documentation are now in the same
location as their compiled JSON output.

Changes:
1. Moved all .ink source files from story_design/ink/ to scenarios/ink/
   - chen_hub.ink and supporting files
   - netherton_hub.ink and supporting files
   - haxolottle_hub.ink and supporting files
   - All other ink source files

2. Moved documentation files to scenarios/ink/
   - INK_BEST_PRACTICES.md
   - NPC_HUB_ARCHITECTURE.md
   - ONGOING_CONVERSATIONS_README.md
   - README.md

3. Added scripts/compile-ink.sh
   - Automatically compiles all .ink files in scenarios/ink/
   - Outputs JSON to the same directory
   - Shows colored output with success/failure status
   - Provides compilation summary

Usage:
  ./scripts/compile-ink.sh

This consolidates the ink development workflow into a single directory
and provides an easy way to recompile all ink files after making changes.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
85b620cfcd feat: Add automatic conversation closing for graceful #end_conversation tag
Implemented proper handling for the #end_conversation tag to automatically
close the conversation UI without requiring manual ESC key press.

Changes:
1. Added event listener for 'npc-conversation-ended' event in setupEventListeners()
   - Saves NPC state when event is received
   - Automatically ends minigame and returns to game
   - Verifies event is for current NPC

2. Updated showCurrentDialogue() to detect graceful conversation endings
   - Checks for #end_conversation tag when story reaches hasEnded
   - If tag present, waits for event handler instead of showing manual exit message
   - Preserves manual exit message for unexpected/error END states

Flow:
- Ink script: #end_conversation -> DONE
- PhoneChatConversation processes tag and dispatches npc-conversation-ended event
- PersonChatMinigame receives event and automatically closes
- Player sees smooth transition back to game

This eliminates the "(End of conversation - press ESC to exit)" message
for normal conversation endings while preserving it as a safety fallback.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
b0c56f2eca fix: Change mission_hub exit options to use DONE instead of END
Fixes issue where choosing conversation exit options would show
"reached end of story" console message. All mission_hub exit points
now use:

  #end_conversation
  -> DONE

Instead of:

  #end_conversation
  -> END

This preserves conversation state at mission_hub while cleanly
ending the interaction without triggering ink's end-of-story behavior.

Updated hub files:
- chen_hub.ink
- netherton_hub.ink
- haxolottle_hub.ink

Recompiled all hub JSON files to reflect changes.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
06685b5328 feat: Unify all NPC relationships to use 'influence' scoring
BREAKING CHANGE: Unified relationship variable naming

Old System (Per-NPC Variables):
- Dr. Chen: npc_chen_rapport with #rapport_gained/lost tags
- Director Netherton: npc_netherton_respect with #respect_gained/lost tags
- Haxolottle: npc_haxolottle_friendship_level with #friendship_gained/lost tags

New System (Unified Influence):
- Dr. Chen: npc_chen_influence with #influence_gained/lost tags
- Director Netherton: npc_netherton_influence with #influence_gained/lost tags
- Haxolottle: npc_haxolottle_influence with #influence_gained/lost tags

Benefits:
- Consistent scoring system across all NPCs
- Simpler to understand and balance
- Unified tag system (#influence_gained/lost)
- Messages still customized per NPC based on their personality

Files Changed:
- dr_chen_ongoing_conversations.ink: rapport → influence
- chen_hub.ink: rapport → influence
- netherton_ongoing_conversations.ink: respect → influence
- netherton_hub.ink: respect → influence
- haxolottle_ongoing_conversations.ink: friendship_level → influence
- haxolottle_hub.ink: friendship_level → influence
- PersonChatConversation.js: Updated getInfluenceMessage() for unified system
  - Now detects NPC ID and provides appropriate messages
  - Supports legacy tag names for backward compatibility
- INK_BEST_PRACTICES.md: Updated all examples and documentation
  - Variable naming conventions
  - Tag system documentation
  - All code examples
  - NPC-specific sections
- NPC_HUB_ARCHITECTURE.md: Updated influence system documentation
- Recompiled all hub JSON files

Messages by NPC:
- Dr. Chen: "Dr. Chen appreciates that" / "Dr. Chen is disappointed"
- Netherton: "Director Netherton approves" / "Director Netherton is displeased"
- Haxolottle: "Haxolottle likes that" / "Haxolottle seems disappointed"

All files compile successfully with unified influence system.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
acc793815b fix: Correct conversation ending pattern to preserve state at mission_hub
BREAKING CHANGE: Updated conversation ending behavior

Old Pattern (WRONG):
- Conversations ended with #exit_conversation
- Diverted to -> END (lost state)
- Game code navigated back to mission_hub
- State not preserved between interactions

New Pattern (CORRECT):
- Conversations end with #end_conversation
- Divert to -> mission_hub (preserves state)
- Game code closes UI window
- Next interaction resumes from mission_hub with full context

Why This Matters:
- State preservation: NPC remembers where conversation left off
- Flexible re-entry: Player can talk to NPC multiple times
- Context awareness: Hub can show different options based on prior discussions

Files Changed:
- All *_ongoing_conversations.ink files: Updated conversation_end knots
  - Changed #exit_conversation -> #end_conversation
  - Changed -> END -> -> mission_hub
- PersonChatConversation.js: Renamed handleExitConversation -> handleEndConversation
  - Now dispatches 'npc-conversation-ended' event to close UI
  - Ink handles state preservation via -> mission_hub
- PhoneChatConversation.js: Same changes as PersonChatConversation
- INK_BEST_PRACTICES.md: Updated documentation with correct pattern
  - Fixed conversation ending examples
  - Updated checklists
  - Added state preservation explanation
- NPC_HUB_ARCHITECTURE.md: Updated mission hub flow documentation
- Recompiled all hub JSON files

This ensures conversation state is properly maintained across
multiple interactions with the same NPC within a play session.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
1f5c9e29e8 feat: Add influence tag system with visual feedback for all NPC conversations
Influence Tags System:
- Add #rapport_gained/lost:X tags for Dr. Chen throughout all conversations
- Add #respect_gained/lost:X tags for Director Netherton
- Add #friendship_gained/lost:X tags for Haxolottle
- Tags automatically added after every relationship variable change
- Small changes (±2-5) for minor interactions
- Medium changes (±5-10) for meaningful moments
- Large changes (±10-15) for major trust/betrayal moments

Conversation Handler Updates:
- PersonChatConversation: Add handleInfluenceGained/Lost methods
- PhoneChatConversation: Add tag processing support
- Dispatch 'npc-influence-change' events for UI layer
- Context-appropriate messages based on NPC type and amount

Documentation:
- Create INK_BEST_PRACTICES.md with comprehensive patterns
  - Hub architecture and mission_hub pattern
  - Influence tags system with examples
  - External functions reference
  - Variable persistence patterns
  - Common ink patterns and anti-patterns
  - Complete checklists for new NPC content
- Update NPC_HUB_ARCHITECTURE.md
  - Document mission_hub pattern implementation
  - Document influence tags system
  - Add navigation support requirements
  - Cross-reference best practices

Files Modified:
- All ongoing_conversations.ink files (chen, netherton, haxolottle)
- All hub.ink files (chen, netherton, haxolottle)
- PersonChatConversation.js - influence tag handlers
- PhoneChatConversation.js - influence tag handlers (stub)
- Compiled JSON files regenerated

This provides players with immediate visual feedback for relationship
changes and gives writers a clear pattern to follow for all NPC content.
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
737dc5e032 feat: Implement mission_hub pattern for NPC conversation routing
- Standardize all NPC hub files with a consistent 'mission_hub' knot
- Rename chen_main_hub → mission_hub in chen_hub.ink
- Rename netherton_main_hub → mission_hub in netherton_hub.ink
- Rename haxolottle_main_hub → mission_hub in haxolottle_hub.ink
- Add #exit_conversation tag handling in both conversation classes
- PersonChatConversation: Add handleExitConversation() method
- PhoneChatConversation: Add processTags() and handleExitConversation()
- When personal conversations end, automatically navigate back to mission_hub
- Allows seamless flow between personal/mission topics within same conversation

This creates a hub-and-spoke pattern where:
- mission_hub = central routing point (not visible to player)
- Personal conversations branch off and return to hub
- Mission-specific topics branch off and return to hub
- Player sees continuous conversation, game manages routing
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
37bc334813 fix: Add external function bindings for NPC hub ink files
- Add bindExternalFunction method to InkEngine
- Bind all required EXTERNAL functions in PersonChatConversation:
  - player_name() - returns player's agent name
  - current_mission_id() - returns active mission ID
  - npc_location() - returns conversation location
  - mission_phase() - returns mission phase (planning/active/debriefing/downtime)
  - operational_stress_level() - returns stress level for handler
  - equipment_status() - returns equipment status for Dr. Chen
- Add setupExternalFunctions to PhoneChatConversation
- Fixes: "Missing function binding for externals" error
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
867404e1b0 feat: Add compiled JSON versions of all NPC hub files
- chen_hub.json (133K) - Dr. Chen conversations
- netherton_hub.json (104K) - Director Netherton conversations
- haxolottle_hub.json (95K) - Haxolottle (handler) conversations

All files compile successfully with only warnings (loose ends).
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
4f1f09e42d fix: Add stub knots for haxolottle phase 3/4 and missing conversations
- Add phase_3_hub and phase_4_hub stub knots
- Add favorite_operations and hax_difficult_day conversation knots
- All three NPC hub files (chen, netherton, haxolottle) now compile successfully
2025-11-19 13:44:30 +00:00
Z. Cliffe Schreuders
9344116b74 fix: Fix haxolottle_hub.ink compilation errors and add stub knots
- Replace placeholder variables {twelve} and {moderate} with actual values
- Fix mission_phase() EXTERNAL function call syntax
- Add stub knots for missing diverts (deep_intel_analysis, crisis_triage, etc.)
- Fix netherton action lines with glue operator to prevent choice parsing
2025-11-19 13:44:29 +00:00
Z. Cliffe Schreuders
772b35fe22 fix: Fix EXTERNAL function call syntax across all NPC files
Fixed all player_name references to use function call syntax player_name().
Also removed invalid === END knot definitions from hub files.

Changes:
- Fixed player_name -> player_name() in all ongoing_conversations.ink files
- Removed === END knot definitions (END is a built-in directive)
- chen_hub.ink now compiles successfully with only warnings
- netherton_hub.ink and haxolottle_hub.ink still have some structural issues to resolve

Status:
✓ chen_hub.ink - compiles successfully
⚠ netherton_hub.ink - has choice nesting errors
⚠ haxolottle_hub.ink - has missing knot targets and variable errors
2025-11-19 13:44:29 +00:00
Z. Cliffe Schreuders
ccc08285cd feat: Add new binary file for inklecate tool 2025-11-19 13:44:29 +00:00
Z. Cliffe Schreuders
743e303e4e fix: Remove file prefix from included knot diverts
When using INCLUDE in ink, all knots are brought into the same namespace.
Divert statements should reference knots directly without the file prefix.

Changed:
- chen_hub.ink: -> dr_chen_ongoing_conversations.phase_X_hub
  to -> phase_X_hub
- netherton_hub.ink: -> netherton_ongoing_conversations.phase_X_hub
  to -> phase_X_hub
- haxolottle_hub.ink: -> haxolottle_ongoing_conversations.phase_X_hub
  to -> phase_X_hub

This fixes the "Divert target not found" compilation errors.
2025-11-19 13:44:29 +00:00
Z. Cliffe Schreuders
0aa7942192 fix: Remove duplicate variable declarations and fix EXTERNAL function calls
Fixed multiple Ink compilation errors:

1. Removed duplicate EXTERNAL and VAR declarations from hub files:
   - chen_hub.ink: Removed player_name(), current_mission_id(),
     total_missions_completed, and professional_reputation declarations
     (already declared in dr_chen_ongoing_conversations.ink)
   - netherton_hub.ink: Same removals for netherton context
   - haxolottle_hub.ink: Same removals for haxolottle context

2. Fixed EXTERNAL function call syntax in dr_chen_ongoing_conversations.ink:
   - Changed {player_name} to {player_name()} in phase hubs and conversation ends
   - Fixed 6 instances across phase_2_hub, phase_3_hub, phase_4_hub,
     conversation_end_phase2, and conversation_end_phase3

3. Fixed conditional syntax in chen_hub.ink:
   - Changed `current_mission_id == "ghost_in_machine"` to
     `current_mission_id() == "ghost_in_machine"` with proper brace structure

4. Fixed jump_to_personal_conversations in all hub files:
   - Removed non-existent `_with_return` tunnel calls
   - Changed to direct diverts to phase_hub knots
   - Removed unreachable "return" dialogue

All hub files now properly include the ongoing conversations file and only
declare EXTERNAL variables unique to the hub context.
2025-11-19 13:44:29 +00:00
Z. Cliffe Schreuders
9ed1e68b0a fix: Correct all remaining conditional syntax errors in conversation end knots
Fixed all remaining Ink conditional syntax errors across NPC ongoing
conversation files:

dr_chen_ongoing_conversations.ink (4 fixes):
- conversation_end_phase3 (line 1774)
- conversation_end_phase4 (line 1787)
- conversation_end_phase1 (line 1801)
- conversation_end_phase2 (line 1814)

haxolottle_ongoing_conversations.ink (2 fixes):
- conversation_end (lines 952, 958) - Both conditionals fixed

netherton_ongoing_conversations.ink (7 fixes):
- expectations_current_assessment (line 365)
- development_specific_feedback (line 516)
- rare_praise assessment section (line 1423)
- conversation_end_phase1 (line 1590)
- conversation_end_phase2 (line 1603)
- conversation_end_phase3 (line 1616)
- conversation_end_phase4 (line 1629)

All conditionals now use proper Ink syntax with opening brace on separate
line and hyphenated conditions.
2025-11-19 13:44:29 +00:00
Z. Cliffe Schreuders
f1ffdd5157 fix: Correct conditional syntax in all phase_hub knots across NPC files
Fixed Ink conditional syntax errors in all three NPC ongoing conversation files:

dr_chen_ongoing_conversations.ink:
- phase_2_hub (line 478): Added opening brace and hyphen to first condition
- phase_3_hub (line 917): Added opening brace and hyphen to first condition
- phase_4_hub (line 1343): Added opening brace and hyphen to first condition

netherton_ongoing_conversations.ink:
- phase_1_hub (line 85): Added opening brace and hyphen, fixed double-prefix bug
- phase_2_hub (line 385): Added opening brace and hyphen to first condition
- phase_3_hub (line 770): Added opening brace and hyphen to first condition
- phase_4_hub (line 1211): Added opening brace, hyphen, and proper indentation

haxolottle_ongoing_conversations.ink:
- phase_1_hub (line 93): Added opening brace and hyphen to first condition
- phase_2_hub (line 547): Added opening brace, hyphen, and fixed undefined
  variable reference (missions_together -> total_missions_completed)

All conditionals now follow proper Ink syntax:
{
    - condition:
        content
    - else:
        content
}
2025-11-19 13:44:28 +00:00
Z. Cliffe Schreuders
df5e643431 fix: Correct Ink syntax errors in Chen conversation files
Fixed two compilation errors:
1. dr_chen_ongoing_conversations.ink line 478: Fixed conditional structure
   in phase_2_hub to use proper opening brace and hyphenated first condition
2. chen_hub.ink line 522: Removed invalid '=== END' knot definition
   (END is a built-in directive, not a knot to define)

These syntax errors were preventing ink compilation.
2025-11-19 13:44:28 +00:00
Z. Cliffe Schreuders
1de3653125 fix: Move all NPCs to starting room in Ghost Protocol demo
All three NPCs (Netherton, Dr. Chen, Haxolottle) are now positioned in the
hq_briefing_room starting room so they are immediately visible when the
scenario loads. Previously they were in separate rooms which caused them
not to appear since the game only loads NPCs for the starting room initially.

Changes:
- Moved all NPC definitions from individual rooms to hq_briefing_room
- Updated npc_location context to "briefing_room" for all NPCs
- Positioned NPCs at (3,3), (6,5), and (7,3) respectively
2025-11-19 13:44:28 +00:00
Z. Cliffe Schreuders
abe534dbc0 fix: Correct Ink syntax for EXTERNAL variables and conditionals
CRITICAL FIXES:
- Add empty parentheses to all EXTERNAL declarations
  * EXTERNAL player_name() instead of EXTERNAL player_name
  * EXTERNAL current_mission_id() instead of EXTERNAL current_mission_id
  * Fixed in all hub files and personal conversation files

- Fix conditional syntax to require explicit else clauses
  * Changed from implicit multi-condition to explicit {- condition: ... - else: ...}
  * Fixed in all entry points and hub menus

- Fix player_name references throughout to use function call syntax
  * {player_name()} instead of {player_name}

- Fix remaining double-prefix bug in dr_chen file
  * npc_npc_chen_rapport -> npc_chen_rapport

FILES UPDATED:
- netherton_hub.ink
- netherton_ongoing_conversations.ink
- chen_hub.ink
- dr_chen_ongoing_conversations.ink
- haxolottle_hub.ink
- haxolottle_ongoing_conversations.ink

These changes fix Ink compiler errors:
- 'Expected declaration of arguments for EXTERNAL, even if empty'
- 'Expected an '- else:' clause here rather than an extra condition'

All files should now compile successfully with inklecate.
2025-11-19 13:44:28 +00:00
Z. Cliffe Schreuders
e0daa28b85 feat: Add Ghost Protocol demo scenario showcasing NPC hub architecture
NEW SCENARIO: npc-hub-demo-ghost-protocol.json

Comprehensive demonstration scenario featuring:

SAFETYNET HQ LAYOUT:
- Briefing Room (hub with connections to all NPCs)
- Director Netherton's Office (north)
- Dr. Chen's Technical Lab (east)
- Haxolottle's Handler Station (west)

THREE NPCs WITH HUB INTEGRATION:
1. Director Netherton
   - Uses netherton_hub.json entry point
   - Location: office, Phase: planning
   - Respect: 65 (growing trust)
   - Has discussed: handbook, leadership
   - Holds: Ghost Protocol mission packet

2. Dr. Chen
   - Uses chen_hub.json entry point
   - Location: lab, Phase: planning
   - Rapport: 58, Equipment status: needs_upgrade
   - Has discussed: tech philosophy, ENTROPY tech
   - Holds: Experimental equipment for Ghost Protocol
     * Active Network Camouflage Device
     * Quantum-Encrypted Comm Unit
     * Enhanced Data Exfiltration Tools
     * Technical specifications document

3. Haxolottle (Agent 0x99)
   - Uses haxolottle_hub.json entry point
   - Location: handler_station, Phase: planning
   - Friendship: 35, Operational stress: moderate
   - Has discussed: hobbies, axolotl obsession, music
   - Holds: Handler support plan + personal note

CONTEXT VARIABLES DEMONSTRATED:
- current_mission_id: "ghost_in_machine"
- mission_phase: "planning" (can change to active/debriefing)
- npc_location: Different for each NPC
- total_missions_completed: 3
- professional_reputation: 15
- equipment_status: needs_upgrade (triggers Chen priorities)
- operational_stress_level: moderate

SCENARIO FEATURES:
- Player starts in briefing room with mission notes
- Can visit each NPC to experience context-aware conversations
- Each NPC shows different topics based on mission phase
- Personal conversations available during planning phase
- Mission-specific briefings ready for Ghost Protocol
- Persistent variables track relationship progression

TESTING THE HUB PATTERN:
This scenario allows testing:
✓ Context-aware topic menus
✓ Personal vs. mission content mixing
✓ Equipment priority system (Chen)
✓ Handler coordination (Haxolottle)
✓ Mission briefing system (Netherton)
✓ Relationship persistence across conversations
✓ Navigation between different NPCs and conversation types

Change mission_phase to "active" to see tactical support options
Change to "debriefing" to see post-mission conversations
Change to "downtime" to focus on personal relationship building
2025-11-19 13:44:28 +00:00
Z. Cliffe Schreuders
bd5ffc4d0c feat: Implement three-tier NPC conversation hub architecture
CRITICAL BUG FIXES:
- Fixed double-prefix variable naming bugs in all three NPC files
  * npc_npc_netherton_* → npc_netherton_*
  * npc_npc_chen_* → npc_chen_*
  * npc_chen_npc_chen_* → npc_chen_*
  * npc_haxolottle_npc_haxolottle_* → npc_haxolottle_*

NEW ARCHITECTURE:
- Created central hub files for each NPC that mix personal + mission content
  * netherton_hub.ink - Director hub with mission briefings & tactical support
  * chen_hub.ink - Tech support hub with equipment & experimental tech
  * haxolottle_hub.ink - Handler hub with crisis support & coordination

FEATURES:
- Context-aware conversation menus based on:
  * current_mission_id - What mission is active
  * mission_phase - Planning, active, debriefing, downtime
  * npc_location - Where conversation happens
  * operational_stress_level - Crisis prioritization (Haxolottle)
  * equipment_status - Repair/upgrade priority (Dr. Chen)

- Hybrid approach combines:
  * Separate files for modularity (personal vs mission content)
  * Context-aware presentation (right topics at right time)
  * Helper functions to check topic availability
  * Priority-ordered option menus

EXAMPLES:
- Created netherton_mission_ghost_example.ink showing:
  * Mission briefing system
  * Tactical support during active operations
  * Emergency extraction coordination
  * Post-mission debriefing with performance evaluation

DOCUMENTATION:
- NPC_HUB_ARCHITECTURE.md - Comprehensive documentation including:
  * File structure and organization
  * How hub pattern works
  * Variable scoping (PERSISTENT, GLOBAL, EXTERNAL)
  * Context-aware conversation flow examples
  * Pros/cons of different architectural approaches
  * Best practices and naming conventions
  * Integration requirements for game engine
  * Instructions for adding new missions

BENEFITS:
✓ Clean separation of personal vs mission content
✓ Reusable personal conversations across all missions
✓ Easy to add new missions without touching personal files
✓ Version control friendly (different writers, different files)
✓ Context-aware topic presentation
✓ Scalable to dozens of missions
✓ Natural conversation flow mixing personal & professional

Related to previous work:
- Builds on three-tier variable persistence system
- Uses npc_<npcname>_<variable> scoping convention
- Leverages total_missions_completed for progression
2025-11-19 13:44:28 +00:00
Z. Cliffe Schreuders
04a85f36cf refactor: Add three-tier variable persistence system to NPC conversation files
Updated all three ongoing conversation files (Netherton, Chen, Haxolottle) with
clear PERSISTENT/GLOBAL/LOCAL variable annotations and proper scoping:

PERSISTENT variables:
- Save/load between game sessions
- Use scoped naming (npc_netherton_*, npc_chen_*, npc_haxolottle_*)
- Include all relationship stats, discussed topics, and special moments

GLOBAL variables:
- Session-only, span across NPCs
- total_missions_completed (replaces sequential mission tracking)
- professional_reputation

LOCAL variables:
- Conversation-specific EXTERNAL variables
- player_name, current_mission_id

This enables order-independent mission completion while maintaining
persistent conversation state across game sessions.
2025-11-18 10:36:09 +00:00
Z. Cliffe Schreuders
88b4722a81 feat: Add ongoing conversation systems for Netherton and Dr. Chen
Implement comprehensive drip-fed dialogue systems for building long-term
relationships with Director Netherton and Dr. Chen (Tech Support).

Netherton system (1625 lines):
- Formal, by-the-book personality that gradually reveals care
- 4 phases spanning missions 1-16+
- Phase 1: Establishing standards (handbook, leadership, history)
- Phase 2: Growing respect (difficult decisions, politics, field vs command)
- Phase 3: Earned respect (weight of command, agent losses, ethics)
- Phase 4: Deep trust (legacy, trust discussion, beyond protocol)
- Tracks netherton_respect variable (0-100)
- 16 conversation topics exploring leadership burden and moral complexity

Dr. Chen system (1786 lines):
- Enthusiastic, rapid-fire technical personality
- Collaborative research partnership approach
- 4 phases spanning missions 1-16+
- Phase 1: Professional support (tech philosophy, ENTROPY analysis)
- Phase 2: Growing collaboration (experimental tech, ethics, field shadowing)
- Phase 3: Deep collaboration (dream projects, tech risks, mentorship)
- Phase 4: True partnership (shared vision, friendship, collaborative legacy)
- Tracks chen_rapport and tech_collaboration variables
- 16 conversation topics exploring innovation and partnership

Both systems use:
- Inline speaker format ("Netherton:", "Dr. Chen:", "You:")
- Mission-gated progression with dual requirements (missions + relationship level)
- Boolean topic flags to prevent repetition
- Multiple choice branches for player agency
- Gradual relationship development from professional to personal
- EXTERNAL variables for game integration
- #exit_conversation tags for dialogue closure

These complement the existing Haxolottle friendship system to create
a rich NPC relationship network with distinct personalities.
2025-11-18 10:36:09 +00:00
Z. Cliffe Schreuders
582b7be2e1 refactor: Convert ink dialogue to inline speaker prefix format
Convert all ink files from #speaker: tag format to inline speaker prefixes:
- "Narrator: " for narration/descriptions
- "Netherton: " for Director Netherton dialogue
- "Haxolottle: " for Agent 0x99 dialogue
- "Dr. Chen: " for Dr. Chen dialogue

Changes:
- agent_0x00_cyber_division_intro.ink: Multi-character scene with Netherton and Haxolottle
- haxolottle_ongoing_conversations.ink: Single-NPC conversations (Phases 1-2)
- haxolottle_ongoing_conversations_advanced.ink: Single-NPC conversations (Phases 3-4)
- lore_exploration_hub.ink: Conversations with multiple possible NPCs

Preserves all functional tags (#exit_conversation, etc.)
Follows Break Escape ink best practices for speaker attribution
2025-11-18 10:36:09 +00:00
Z. Cliffe Schreuders
845cd662ca feat: Add ongoing friendship conversation system with Haxolottle and Protocol 47-Alpha
- Add haxolottle_ongoing_conversations.ink: Phases 1-2 conversations (Missions 1-10)
  * Phase 1 (Missions 1-5): Getting to know you - hobbies, interests, axolotl deep dive
  * Phase 2 (Missions 6-10): Deepening connection - philosophy, handler life, field nostalgia
  * Tracks friendship_level (0-100) and conversation topics
  * Personal conversations within identity protection constraints

- Add haxolottle_ongoing_conversations_advanced.ink: Phases 3-4 conversations (Missions 11+)
  * Phase 3 (Missions 11-15): Genuine friendship - fears, meaning, vulnerability
  * Phase 4 (Missions 16+): Deep bond - identity burden, name temptation, explicit friendship
  * Special high-friendship events: personal loss story, secret hobby reveal
  * Deepest emotional moments respecting Protocol 47-Alpha

- Add ONGOING_CONVERSATIONS_README.md: Comprehensive documentation
  * Progression system: mission-based and friendship-based gating
  * 20+ unique conversation topics across 4 phases
  * Integration guide for adding to missions
  * Protocol 47-Alpha guidelines (what can/can't be shared)
  * Character voice guidelines and writing templates
  * Emotional arcs and narrative impact discussion

- Update rules_of_engagement.md: Add Protocol 47-Alpha identity protection rules
  * Protocol 47-Alpha: Agents cannot reveal real identities to each other
  * Regulation 847: Personal sharing encouraged within identity constraints
  * Protocol 180: Specific guidance on what information can be shared
  * Section 19, Clause 11: Friendships acceptable within security protocols
  * Balances operational security with psychological wellbeing

System Features:
- Drip-fed content across 15+ missions for long-term investment
- Genuine friendship despite never knowing real names
- Explores emotional cost of secrecy and hidden identities
- Progressive unlock system prevents rushing content
- Multiple tracking variables (trust_moments, vulnerable_moments, etc.)
- Hub-based conversation pattern with branching choices
- Player agency over engagement depth
- Constraint (Protocol 47-Alpha) becomes part of emotional depth

Conversations respect identity protection while exploring:
- Personal interests (swimming, reading, music, poetry)
- Philosophies and stress management
- Operational experiences and handler life
- Fears, doubts, and emotional struggles
- Meaning of work and future dreams
- The burden of hidden identity
- Temptation to share real names (but choosing not to)
- Explicit acknowledgment of genuine friendship

Designed for authentic emotional progression within spy fiction constraints.
2025-11-18 10:36:09 +00:00
Z. Cliffe Schreuders
7f7ee5d761 feat: Add Agent 0x00 intro cutscene and lore exploration dialogue system
- Add agent_0x00_cyber_division_intro.ink: Introduction cutscene for Agent 0x00 joining SAFETYNET's CYBER-PHYSICAL division
  * Introduces Director Netherton and Agent 0x99 "Haxolottle"
  * Player makes meaningful choices affecting relationships
  * Tracks influence with netherton_respect and haxolottle_trust variables
  * Establishes player_attitude and specialization_interest
  * Multiple branching paths based on player responses

- Add lore_exploration_hub.ink: Reusable dialogue system for exploring ENTROPY and SAFETYNET lore
  * Hub-based conversation pattern with multiple NPCs
  * Tracks influence with handler, tech support, director, and fellow agents
  * Progressive revelation system (deeper topics unlock with higher influence)
  * Covers ENTROPY origins, philosophy, cells, and tactics
  * Covers SAFETYNET mission, methods, shadow war, and field operations
  * Deep lore unlocks: Berlin Crisis, handler backstory, moral complexity
  * Works with different speakers (Haxolottle, Dr. Chen, Director Netherton)
  * Mission-agnostic design for reusability

- Add comprehensive README.md documenting:
  * File purposes and when to use them
  * Variables reference and influence tracking system
  * Character voice guidelines for each NPC
  * Integration examples and usage guidelines
  * Testing checklist and quality standards
  * Future expansion ideas

All dialogue follows established character voices from universe bible and
implements influence-based relationship progression system.
2025-11-18 10:36:08 +00:00
Z. Cliffe Schreuders
147c4af225 feat: Add comprehensive features reference and enhanced Ink scripting guide
Add two critical enhancements to scenario development prompts:

1. FEATURES_REFERENCE.md - Complete game features documentation
   - All available object types (notes, PC, phone, tablet, etc.)
   - All lock types (key, pin, password, bluetooth, rfid, lockpick)
   - NPC system (physical, phone, patrol, event mappings)
   - RFID security protocols (EM4100, MIFARE variants, DESFire)
   - Ink dialogue system with tags and patterns
   - Event system for reactive dialogue
   - Room system and connections
   - Complete examples and best practices
   - Quick reference tables

2. Enhanced 07_ink_scripting.md - Detailed Ink guide with actual structure
   - THREE-ACT STRUCTURE AS ACTUALLY IMPLEMENTED:
     * Act 1: Interactive cutscene (Ink-heavy, 2-5 min, choices)
     * Act 2: Puzzle chain gameplay (game-heavy, 15-40 min, NPC support)
     * Act 3: Resolution and debrief (Ink-heavy, 2-5 min, consequences)
   - Complete templates for opening cutscene with choices
   - NPC dialogue patterns (hub pattern, guards, phone contacts)
   - Closing cutscene with variable callbacks
   - Event-driven dialogue examples
   - Ink tags reference (#speaker, #display, #hostile, etc.)
   - Testing and validation guidance
   - Common errors and solutions

These documents provide the concrete technical details needed for AI agents
to write scenarios with proper features, constraints, and narrative structure.

Based on analysis of existing scenarios:
- scenarios/ceo_exfil.json
- scenarios/test-npc-patrol.json
- scenarios/test-rfid-multiprotocol.json
- scenarios/ink/security-guard.ink
- scenarios/ink/alice-chat.ink
2025-11-18 01:22:08 +00:00
Z. Cliffe Schreuders
fd434762fe feat: Add complete AI prompt system for scenario development (Stages 0-7)
Add comprehensive prompts for all 9 stages of Break Escape scenario development:

- Stage 0: Scenario Initialization - Technical challenges and narrative themes
- Stage 1: Narrative Structure - Three-act story arc development
- Stage 2: Storytelling Elements - Characters, atmosphere, dialogue
- Stage 3: Moral Choices - Player agency and ethical decisions
- Stage 4: Player Objectives - Goals and win conditions
- Stage 5: Room Layout - Physical design with technical constraints
- Stage 6: LORE Fragments - Collectible universe-building content
- Stage 7: Ink Scripting - Interactive dialogue and cutscenes

These prompts guide AI agents (or human designers) through a structured
process to create complete, validated Break Escape scenarios that combine
cybersecurity education with compelling narrative gameplay.

Each prompt includes:
- Role definition and responsibilities
- Required inputs from previous stages
- Essential reference documentation
- Process guidelines and templates
- Quality checklists
- Common pitfalls to avoid
- Tips for success

This completes the story development prompt system alongside the previously
committed README.md and Stage 8 (Review) prompt.
2025-11-18 01:22:08 +00:00
Z. Cliffe Schreuders
4ffb9e2a07 feat: Add scenario review and README for story development prompts
Add comprehensive scenario review and validation prompt (Stage 8) plus
README overview for the story development prompt system.

Note: Files for stages 0-7 need to be recreated - they appear to have
not persisted despite Write tool calls during the session.
2025-11-18 01:22:08 +00:00
Z. Cliffe Schreuders
bbb99cf935 fix: Add teleportation collision boxes for doors to enable bi-directional teleportation 2025-11-17 20:08:07 +00:00
Z. Cliffe Schreuders
56917474fd fix: Add full tile collision boxes above and below side doors for improved player interaction 2025-11-17 19:47:55 +00:00
Z. Cliffe Schreuders
975e9fa069 fix: Update side door dimensions and add collision boxes for east/west connections 2025-11-17 15:53:24 +00:00
Z. Cliffe Schreuders
09cd416d02 fix: Adjust east/west door positioning for consistent alignment and visual display 2025-11-17 15:48:36 +00:00
Z. Cliffe Schreuders
0cf2f0fae3 fix: Standardize east and west door positioning for consistency with north/south doors 2025-11-17 15:40:16 +00:00
Z. Cliffe Schreuders
1947ff3ad4 fix: Adjust door placement to flush with walls for east and west doors 2025-11-17 14:55:29 +00:00
Z. Cliffe Schreuders
d10db55213 feat: Reorganize and expand Break Escape Universe Bible into modular structure
This commit transforms the single universe bible document into a comprehensive,
organized set of reference materials across 74 files in 10 major sections.

Major Changes:
- Split original universe bible into chapter-based documents
- Expanded all content by 50-100% with additional lore and details
- Created modular directory structure for easy navigation
- Added extensive cross-referencing between documents

New Structure:
01. Universe Overview - Setting, premise, and tone
02. Organisations - SAFETYNET and ENTROPY detailed profiles
03. ENTROPY Cells - All 11 cells with expanded operations
04. Characters - SAFETYNET operatives and ENTROPY antagonists
05. World Building - Rules, technology, society, timeline
06. Locations - Environment types and notable locations
07. Narrative Structures - Mission types, arcs, player agency
08. LORE System - Collectibles, progression, writing guides
09. Scenario Design - Framework, templates, and examples
10. Reference - Quick reference, checklists, glossary, style guide

Content Expansions:
- SAFETYNET: 28 Field Operations Handbook rules (from 3)
- ENTROPY Cells: 8 key members per cell (from 4)
- Characters: 8 additional SAFETYNET agents created
- Locations: 7 environment type guides
- Scenario Templates: 4 complete templates + 3 full examples
- LORE System: 220 fragments mapped across 6 categories
- Reference: Comprehensive glossary, checklists, and CyBOK guide

Benefits:
- Easier to find specific information
- Consistent universe across all scenarios
- Supports continuous discovery as players progress
- Comprehensive reference for scenario designers
- Expanded lore enables richer storytelling

Total Documentation: ~500KB across 74 markdown files
2025-11-17 12:41:36 +00:00
Z. Cliffe Schreuders
c3440986a3 fix: Correct side door (E/W) placement, sprites, and animations
This commit fixes several issues with East/West side doors:

1. **Sprite Flipping**: Changed flip direction - East doors are now flipped
   horizontally instead of West doors (opposite direction as requested)

2. **Door Positioning**: Updated E/W door placement from 2 tiles to 3 tiles
   from the top corner for better alignment with room layout

3. **Wall Passage Cutout**: Increased wall tile removal area for side doors
   from 1 tile to 3 tiles vertically, creating a wider passage (matching the
   inset spacing used for N/S doors)

4. **Side Door Animation**:
   - Added `isSideDoor` property to doorProperties to track door type
   - Created new 'door_side_open' animation using frames 1-4 (frames 2-5
     in 1-indexed notation) of door_side_sheet_32 sprite
   - Updated animated door creation to use side door sprite and animation
     for E/W doors

5. **Sprite Alignment**: Door sprites now properly align with the tile grid
   at 3 tiles from corner position

Changes made in:
- js/systems/doors.js: Door placement, sprite creation, and animations
- js/systems/collision.js: Wall tile removal for wider passages
- js/core/game.js: Side door animation definition

Tested with: scenarios/test_horizontal_layout.json
2025-11-17 12:28:19 +00:00
Z. Cliffe Schreuders
aef6e97df0 fix: Update item spawn positioning to respect room GU boundaries and padding
- Modified createSpriteAtRandomPosition() to accept map parameter
- Items now use actual room dimensions based on tilemap (respects room GU)
- Applied correct padding constraints:
  * 1 tile (32px) from left and right sides
  * 2 tiles (64px) from top and bottom
- Random item placement now works correctly with variable room sizes
- Ensures items stay within playable room bounds

Related to new room layout system (Grid Unit based positioning)
2025-11-17 11:19:43 +00:00
Z. Cliffe Schreuders
150e3a6d43 fix: Ensure each connecting room has minimum 1 GU overlap with parent
Updated room positioning to verify overlap for EACH connected room
after grid alignment, not just the group as a whole. This fixes
layouts like:

  122
  00

Where room 1 was previously positioned with no overlap to room 0.

Changes:
- positionNorthMultiple/positionSouthMultiple: After centering and
  aligning group, check first and last room overlap. If insufficient,
  shift entire group to ensure minimum overlap for each room.
- positionEastMultiple/positionWestMultiple: Same approach for
  vertical stacking along east/west edges.

The algorithm now:
1. Centers the group of connecting rooms over parent
2. Aligns starting position to grid
3. Checks if first room has >= 1 GU overlap, adjusts if not
4. Checks if last room has >= 1 GU overlap, adjusts if not
5. Positions all rooms from the adjusted aligned start

This guarantees each connecting room overlaps with the parent room
by at least one Grid Unit, ensuring proper door placement and room
connectivity.
2025-11-17 11:04:52 +00:00