Adds a new dialogue option for Kevin where the player can provide a
preliminary security audit update. The feature includes:
- 5 MCQ-style security assessment questions covering:
* Physical security (locks and access control)
* Access control patterns (Derek's suspicious activities)
* Password security (predictable patterns)
* Personnel security (Patricia's firing)
* Data protection (network segmentation)
- Answer tracking system (correct/wrong counts)
- Kevin provides context-appropriate responses to each answer
- Influence point adjustments based on answers
- Available after player makes progress (gets items from Kevin)
- Debrief feedback section that evaluates player's security analysis:
* Excellent performance: 4+ correct answers
* Solid performance: 3 correct answers
* Poor performance: ≤2 correct answers
* Feedback on tradecraft and cover maintenance
This enhances the undercover security consultant role-play and provides
educational value on security assessment best practices.
- Change debrief to be tactical/professional rather than judgmental
- Add emphasis on field immunity for SAFETYNET operatives
- Frame fight as valid tactical choice, not a mistake
- Keep practical implications without moral judgment
- Update mission summary: "Hostile engagement neutralized" instead of "Excessive force allegations"
- Agent 0x99 now validates player agency rather than shaming the choice
- Add objective "defeat_derek_hostile" when Derek becomes hostile
- Emit event "hostile_npc_defeated:derek" when Derek is subdued
- Complete objective when Derek is defeated in fight outcome
- Add "fight" choice alongside arrest/recruit/expose options
- Derek becomes hostile when player chooses to fight (#hostile tag)
- Closing debrief includes moral consequences of fighting vs arresting
- Agent 0x99 discusses excessive force and SAFETYNET protocol
- Mission summary reflects fight outcome with allegations
Fixes two critical issues when multiple doors lead to the same room:
1. Room reloading: Added checks in loadRoom() and createRoom() to prevent
reloading/recreating rooms that are already loaded. This prevents the
room from being unnecessarily recreated when opening a second door to
the same room.
2. Door location detection: Updated removeMatchingDoorSprite() to use
position and direction when finding the matching door. Previously it
only checked connectedRoom, which caused it to remove the wrong door
when multiple doors connected the same two rooms at different locations.
Now it checks:
- Opposite direction matches
- Position matches within tolerance (X for N/S doors, Y for E/W doors)
This ensures that opening different doors to the same room works correctly
without causing room reloads or removing the wrong door sprites.
- Created 9 Ink dialogue files for all mission branches
- Opening briefing with 4-way crisis choice
- Director Morgan, Agent 0x99, and Architect communications
- Branch-specific crisis dialogues for all 4 options
- Closing debrief with deterministic outcomes
- Note: Ink files need compilation fixes before JSON generation
- Added json helper methods for proper escaping
- Use .to_json for multi-line text variables
- Replaced UTF-8 special characters with ASCII equivalents
- Fixed emergency_briefing_text, tomb_gamma_coordinates, mole_evidence_text
JSON now parses correctly but schema validation shows objects need proper format
- Implemented crisis_terminal room with ERB conditionals based on crisis_choice
- 4 distinct crisis scenarios (infrastructure, data, supply_chain, corporate)
- Branch-specific NPCs for each option:
* Infrastructure: Marcus 'Blackout' Chen
* Data: Specter + Rachel Morrow (dual threat)
* Supply Chain: Adrian Cross (recruitable)
* Corporate: Victoria 'V1per' Zhang + Marcus 'Shadow' Chen
- Crisis control systems with unique observations per branch
- Video feed displays showing remote facility status
- Crisis timer tracking progress and countermeasures
- Conditional room type based on crisis choice
- Connection from operations_floor to crisis_terminal
- Set all_flags_submitted when flag4 submitted
Complete scenario structure now includes 7 rooms total
Major design revision to accommodate single floor plan constraint while maintaining
branching narrative and player choice.
Key Changes to README.md:
LOCATION CHANGE:
- Changed from 4 separate physical facilities to single SAFETYNET Emergency Operations
Center (EOC)
- Player remains in SAFETYNET HQ throughout mission
- 4 crisis response zones within same facility
- Player chooses which crisis terminal to directly control
- Other SAFETYNET teams (Alpha/Bravo/Charlie/Delta) visible working in adjacent zones
FLOOR PLAN DESIGN:
- 6 shared rooms (all branches visit these):
1. Emergency Briefing Room (choice presentation)
2. Main Operations Floor (central hub with all 4 crisis zones visible)
3. Server Room (VM challenges)
4. Communications Center (The Architect's taunts)
5. Intelligence Archive (Tomb Gamma discovery)
6. Debrief Room (outcomes revealed)
- 1 branch-specific crisis terminal (player's choice determines which):
7A. Infrastructure Crisis Terminal (power grid remote control)
7B. Election Security Terminal (voter database protection)
7C. Supply Chain Terminal (software distribution security)
7D. Corporate Defense Terminal (corporate zero-day defense)
NPC INTERACTION MODEL:
- ENTROPY antagonists appear via video feeds/screens (not physically present in EOC)
- Maintains distinct antagonists per branch without violating single-location constraint
- Player interacts with remote operatives through crisis terminal displays
FILE STRUCTURE SIMPLIFICATION:
- Changed from 4 separate scenario files to 1 scenario.json.erb with ERB branching logic
- Uses globalVariable "crisis_choice" to conditionally render crisis terminal content
- Dramatically reduces development complexity while preserving 4 distinct narratives
TECHNICAL APPROACH:
- ERB conditionals switch crisis terminal NPCs/objects based on player choice
- Shared rooms identical for all players (easier testing/maintenance)
- VM challenges reusable across all branches
- LORE reveals centralized in Intelligence Archive
- Timer mechanic consistent regardless of choice
BRANCHING PRESERVATION:
- ✅ Still 4 distinct story paths (Infrastructure/Data/Supply Chain/Corporate)
- ✅ Still meaningful choice with permanent consequences
- ✅ Still deterministic outcomes matrix for unchosen operations
- ✅ Still unique antagonists per branch (via video feeds)
- ✅ Still branch-specific technical challenges at crisis terminals
BENEFITS:
- Drastically reduces development time (1 scenario vs 4)
- Easier to maintain consistency across branches
- Simpler testing (test shared rooms once, then 4 crisis terminal variations)
- Cleaner file structure
- More realistic (command center coordination vs field deployment)
Next Steps:
- Update stage 0 planning documents to reflect single-location design
- Begin scenario.json.erb implementation with shared rooms
- Implement choice mechanism in Emergency Briefing Room
- Build crisis terminal templates
Updated Stages 1, 4, 5, and 6 to align with new design:
- Torres knows about casualties and foreign sales (not "journalist" lie)
- Radicalized with extremist ideology over 3 months
- Shows cognitive dissonance but can be de-radicalized
- 5 endings: Turn, Arrest, Combat (lethal/non-lethal), Public Exposure
Changes via small edits:
- Stage 1 (Narrative): Journal entries show radicalization, confrontation dialogue updated
- Stage 1 (Narrative): Replaced "Sympathetic Release" with Combat options
- Stage 4 (Objectives): Updated task 26 to reflect 5 choices, updated stop_upload task
- Stage 5 (Room Layout): Updated evidence correlation matrix and design philosophy
- Stage 6 (LORE): Updated Fragment 1 (radicalization methodology) and Fragment 2 (Architect protocol)
All stages now consistent with evil radicals framing while maintaining moral complexity.
Changes:
- Add Stage 3: Moral Choices with arrest/combat options
- Update Stage 0: Torres knows about casualties, radicalized with extremist ideology (3 months)
- Update Stage 2: Torres is radicalized recruit showing cognitive dissonance, not victim
- Update Mission Summary: 5 endings including arrest and combat (lethal/non-lethal)
Design Philosophy Changes:
- ENTROPY clearly evil radicals (accelerationist extremism)
- Torres radicalized but only 3 months in - can be de-radicalized
- Player has arrest/combat/turn options when confronting ENTROPY agents
- New recruits can be saved before full radicalization
- Maintains player agency across all moral choices
Created comprehensive atmospheric design for corporate investigation mission:
TONE & ATMOSPHERE:
- Corporate noir thriller with mounting moral complexity
- Tense investigation (not high-action, slow-burn)
- Tonal shift: Professional → Empathetic → Moral crisis
- Environmental storytelling through objects and spaces
QUANTUM DYNAMICS CORPORATION:
- Modern Bay Area tech campus (450 employees, 5 floors)
- Aesthetic: Clean minimalist + high-tech research + defense contractor security
- Color palette: Cool blues/whites (sterile), warm woods (corporate friendly)
- Sensory details: Server hum, badge beeps, nervous energy, forced normalcy
TIME & PACING:
- Wednesday afternoon: Mission start, interviews available
- Wednesday night: Empty building, free exploration
- Friday night: Final exfiltration trap scenario
- Environmental progression mirrors moral weight
ROOM-SPECIFIC ATMOSPHERES:
- Corporate lobby: Professional surveillance, unwelcoming
- Patricia's office: Frustrated competence, investigation chaos
- Engineering wing: Nervous productivity, team strain
- Torres' office: **CRITICAL** Quiet desperation
* Family photos, medical bills ($380K visible), children's drawings
* 'Get well soon Mommy' with hearts, 'Best Dad' caption
* Half-finished coffee, expired parking permit (sold car)
* This space makes player feel terrible about investigation
- Server room: Surveillance thriller, digital battlefield
- Conference room: War room, evidence mounting
CHARACTER ATMOSPHERE & VOICES:
DAVID TORRES (Manipulated Insider - NOT typical ENTROPY villain):
- Age 38, Hispanic, thin from stress, constantly adjusts wedding ring
- Voice: Intelligent/technical, exhausted, defensive → breaks easily
- Physical tells: Removes glasses, adjusts ring, long pauses
- Confrontation tone: Horror and disbelief (NOT evil monologue)
- Can be turned, feels genuine remorse
- Dialogue: 'What did I do for them? What did I do?'
THE RECRUITER (True ENTROPY Villain - Unseen):
- Actual true believer, professional manipulator
- Calculated recruitment, identified Torres' vulnerability
- Communications show methodical exploitation
- Goes dark after Torres compromised
PATRICIA MORGAN (CSO):
- Age 52, former FBI Cyber (15 years), armed, no-nonsense
- Voice: Direct law enforcement style, frustrated, defensive about team
- 'God. That's how they get people.'
DR. SARAH CHEN (Team Lead):
- Age 41, maternal toward team, guilty about missing signs
- Defensive → Accepting progression
- 'If David did this... those soldiers. Their lives. God.'
SUPPORTING CAST:
- Lisa Rodriguez: Sympathetic friend, emotional context provider
- Marcus Webb: IT manager, guilty about security gaps
- Kevin Tran: Junior engineer, idolizes Torres ('He's a good person')
- Michael Park: RED HERRING (affair, not espionage)
- Dr. Amara Johnson: RED HERRING (legitimate collaboration)
5 KEY EMOTIONAL MOMENTS:
1. Medical bills discovery: $380K, insurance denials, family photo
2. Torres' journal: 8 months of moral descent in real-time
3. Confrontation revelation: Torres realizes 'journalists' are foreign intel
4. Children's drawings: Innocence amid tragedy
5. The choice: No good options (justice vs. mercy)
ENVIRONMENTAL STORYTELLING:
- Torres' desk items tell complete story (coffee, USB, parking permit, photos)
- Engineering whiteboard shows isolation (missed meetings, unanswered questions)
- Server room evidence (fingerprints, blind spots, Friday logs)
- Corporate sterility vs. personal tragedy contrast
ATMOSPHERIC PROGRESSION:
- Act 1: Professional investigator (clean, cooperative, satisfying)
- Act 2: Humanization (complexity, empathy, uncertainty)
- Act 3: Moral weight (impossible decisions, professional detachment gone)
Document: 350+ lines defining complete sensory framework, character voices,
and emotional progression for investigation thriller atmosphere.
Created comprehensive 3-act structure for 'Insider Trading' investigation mission:
ACT 1: THE CORPORATE INFILTRATION (20-25 min)
- Arrival at Quantum Dynamics as security consultant
- Meet CSO Patricia Morgan, receive investigation brief
- Review security logs, narrow 8 suspects to 3
- First NPC interactions (Lisa Rodriguez provides Torres background)
- Discovery of Bludit server (Torres' personal blog = ENTROPY comms)
ACT 2: THE INVESTIGATION (35-45 min)
- VM Challenge: Bludit CMS exploitation (CVE-2019-16113)
* Flag 1: Recruitment timeline, $45K payments received
* Flag 2: Digital Vanguard server IPs, exfiltration proof
* Flag 3: File manifest (3.1 TB / 4.2 TB stolen)
* Flag 4: The Architect's approval message (foreign sales)
- Employee interviews: Chen, Park, Johnson, Kevin (eliminate red herrings)
- Physical evidence: Medical bills, Torres' journal, encrypted USB
- Evidence correlation: Overwhelming proof Torres is insider
- Moral complexity established: Sympathetic motivation (Elena's cancer)
ACT 3: THE CONFRONTATION & CHOICE (15-20 min)
- Confront Torres with evidence (approach varies by player)
- Reveal ENTROPY's deception ('journalists' = Chinese MSS/Russian GRU)
- Torres' breakdown: Realizes 12-40 intelligence officers will die
- CRITICAL CHOICE (4 distinct paths):
* A. Turn Torres into double agent (family saved, ongoing intel for M6-M10)
* B. Arrest Torres (justice, Elena dies, children orphaned, limited intel)
* C. Sympathetic release (family escapes, player misconduct, partial failure)
* D. Public exposure (ENTROPY disrupted, Quantum Dynamics destroyed, 450 jobs lost)
- Prevent final data exfiltration (varies by choice)
- Secure remaining Project Heisenberg data
CLOSING DEBRIEF (5-7 min)
- Tracks ACTUAL player actions (60+ variables)
- NO vague 'approach' labels, only specific discoveries
- Choice consequences revealed (Elena's fate, Torres' cooperation, ENTROPY network)
- ENTROPY business model revealed: Criminal corporation with SLAs
* Insider Threat Initiative: Talent acquisition ($15K per placement)
* Digital Vanguard: Technical analysis infrastructure
* Zero Day Syndicate: Weaponization and sales
* Crypto Anarchists: Payment processing
- HashChain Exchange foreshadowed (sets up M6)
- The Architect pattern: 4th mention across campaign
CONCRETE STAKES ESTABLISHED:
- Operation Schrödinger: 4.2 TB quantum cryptography theft
- 12-40 intelligence officers will die if data reaches foreign governments
- Elena Torres: Stage 3 cancer, $380K treatment, 60% survival with treatment
- Children: Sofia (11), Miguel (8) - family photos/drawings shown
- $45-70 million ENTROPY revenue from foreign sales
- 450 Quantum Dynamics employees (jobs at risk)
MORAL COMPLEXITY:
- Torres is sympathetic: Desperate to save wife, manipulated by ENTROPY
- Journal shows moral descent (8 months of gradual compromise)
- No 'right' answer: All choices have severe consequences
- Family vs. national security, justice vs. mercy, transparency vs. secrecy
CAMPAIGN INTEGRATION:
- If Torres turned: Intelligence asset through M10 finale
- 22 other Insider Threat Initiative placements revealed
- Links M4 (infrastructure attacks) to M6 (crypto tracking)
- Task Force Null investigation advances
Document includes complete variable tracking system (60+ variables),
detailed beat-by-beat structure, and specific implementation notes.
Ready for Stage 2: Atmosphere & Environment Design.
Created comprehensive initialization document with SPECIFIC ENTROPY threat details:
TARGET:
- Quantum Dynamics Corporation (quantum computing research)
- 450 employees, DoD/DARPA contracts
- Post-quantum cryptography for military applications
SPECIFIC STOLEN DATA (Project Heisenberg):
- Quantum Key Distribution military specs (847 pages, classified)
- 14 zero-day vulnerabilities in competitor products
- DoD deployment database (247 facilities, schedules, network topology)
- Cryptographic key material and test data
- Total: 4.2 TB across 18,000 files (73% exfiltrated)
CONCRETE CONSEQUENCES IF ENTROPY SUCCEEDS:
- $4.2 billion DoD quantum crypto program wasted
- 12-40 intelligence officers at risk (retroactive decryption)
- 247 military facilities vulnerable during installations
- 5-year quantum supremacy advantage to China/Russia
- US quantum computing industry reputation destroyed
THE INSIDER - David Torres:
- Senior Cryptography Engineer, PhD from Stanford
- $180K medical debt (wife Elena has Stage 3 cancer)
- Recruited 8 months ago by Insider Threat Initiative
- Paid $45K so far, promised $200K total
- Exfiltration method: Steganography in training videos → YouTube
- Believes he's helping 'journalists expose military-industrial complex'
- Morally conflicted, can be turned if shown ENTROPY's true plan
ENTROPY 4-PHASE PLAN:
1. Exfiltration (current) - 73% complete via Torres
2. Analysis (2 weeks) - Digital Vanguard weaponizes research
3. Distribution (4 weeks) - Zero Day Syndicate sells to China/Russia/Iran
4. Deployment (12 weeks) - Decrypt DoD comms, attack facilities
CROSS-CELL COORDINATION (First Business Model Mission):
- Insider Threat Initiative: Recruitment ($15K per placement)
- Digital Vanguard: Technical analysis & infrastructure
- Zero Day Syndicate: Exploit weaponization & sales
- Crypto Anarchists: Payment processing
- Expected revenue: $45-70 million USD split across cells
INVESTIGATION STRUCTURE:
- 8-10 employee NPCs to interview
- Evidence correlation puzzle (logs, access records, financials)
- Non-combat resolution (dialogue-driven confrontation)
- Bludit CMS exploitation (CVE-2019-16113) for digital evidence
MORAL COMPLEXITY:
- Turn Torres into double agent (saves wife, provides intel for M6-M10)
- Arrest Torres (justice, but wife likely dies, limited intel)
- Sympathize and release (saves family, endangers national security)
- Expose everything publicly (disrupts ENTROPY but destroys company)
CAMPAIGN IMPACT:
- If turned: Torres provides intelligence through M10 finale
- Reveals ENTROPY operates as criminal corporation with service contracts
- Sets up M6 financial tracking, M8 insider threat patterns
- Human cost in M7 if data sold to foreign governments
Educational focus: Human Factors (insider threats), Web Security (CMS exploitation),
Security Operations (forensic investigation), Systems Security (privilege escalation)
Document: 600+ lines detailing specific operational plans, consequences, and NPCs.
Mission ready for Stage 1 narrative structure development.
- Updated status from 85% to 90% (dialogue + compilation complete)
- Added compilation status: All 12 files compile successfully (0 errors, 1 warning)
- Updated file inventory to show all 26 files (12 .ink + 12 .json + 2 config)
- Added development highlights about Ink compilation process
- Updated next steps: compilation complete, testing is next priority
Mission 4 now at 90% completion with all dialogue scripts created and compiled to JSON.
Fixed remaining conditional syntax errors across all files:
- Converted all multi-branch conditionals to separate blocks
- Added missing start knot to phone_robert_chen.ink
- Fixed nested conditional logic in terminals and NPCs
Scripts now compile with minimal errors.
Remaining: 5 minor conditional errors to fix
Created m04_closing_debrief.ink (327 lines) - mission wrap-up conversation
with Agent 0x99 featuring Task Force Null revelation and disclosure choice.
Key features:
- Mission outcome report (attack status, Voltage status)
- Intelligence analysis (Critical Mass + Social Fabric coordination)
- The Architect revelation and multi-city threat
- Task Force Null formation and player assignment
- Public disclosure choice (full/quiet/partial)
- Consequence explanation for each choice
- Robert Chen farewell based on trust level
- Mission completion and campaign progression
Implements dialogue planning from Stage 6 for closing debrief.
All 6 critical path scripts now complete.
Created m04_npc_voltage.ink (374 lines) - climactic antagonist encounter
with Critical Mass leader featuring complex branching outcomes.
Key features:
- Voltage leverage system (active trigger vs. disabled)
- Player choice: capture risky vs. disable safe
- Negotiation paths with ideology explanation
- Combat difficulty based on player priority
- Multiple outcomes (capture, escape, emergency trigger)
- The Architect intelligence revelation
- OptiGrid Solutions multi-site threat hint
Implements dialogue planning from Stage 6 for Voltage confrontation.
Critical path script 4 of 6 complete.