From e7cd138d46e19a534ffb70eac703566bd912dfa9 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 29 Dec 2025 14:30:15 +0000 Subject: [PATCH] Fix Ink compilation errors (part 2) Continued fixing conditional syntax and EXTERNAL/VAR issues: - Converted all EXTERNAL declarations to proper VARs - Fixed multi-branch conditionals to use separate blocks - Replaced remaining -> END statements with #exit_conversation - Fixed inline conditional syntax in terminal SCADA display Files updated: - m04_npc_robert_chen.ink - m04_phone_agent0x99.ink - m04_phone_robert_chen.ink - m04_terminal_attack_trigger.ink - m04_terminal_scada_display.ink - m04_closing_debrief.ink Remaining: 7 conditional syntax errors to fix --- .../ink/m04_closing_debrief.ink | 19 +++++---- .../ink/m04_npc_robert_chen.ink | 21 ++++++---- .../ink/m04_phone_agent0x99.ink | 28 ++++++++----- .../ink/m04_phone_robert_chen.ink | 25 +++++++----- .../ink/m04_terminal_attack_trigger.ink | 15 ++++--- .../ink/m04_terminal_scada_display.ink | 40 ++++++++++++------- 6 files changed, 95 insertions(+), 53 deletions(-) diff --git a/scenarios/m04_critical_failure/ink/m04_closing_debrief.ink b/scenarios/m04_critical_failure/ink/m04_closing_debrief.ink index 229f4b8..096437a 100644 --- a/scenarios/m04_critical_failure/ink/m04_closing_debrief.ink +++ b/scenarios/m04_critical_failure/ink/m04_closing_debrief.ink @@ -9,12 +9,14 @@ VAR disclosure_choice = "" // full, quiet, partial VAR task_force_null_assigned = false // Player assigned to TF Null VAR mission_debriefed = false // Debrief completed +// Game state variables +VAR voltage_captured = false +VAR chen_trust_level = 0 +VAR attack_vectors_disabled = 0 +VAR operatives_defeated = 0 + // External variables (set by game) EXTERNAL player_name() -EXTERNAL voltage_captured() -EXTERNAL chen_trust_level() -EXTERNAL attack_vectors_disabled() -EXTERNAL operatives_defeated() // =========================================== // DEBRIEF START @@ -296,9 +298,11 @@ Decision recorded. {disclosure_choice == "full": Public statement will be coordinated with local authorities. -- disclosure_choice == "quiet": +} +{disclosure_choice == "quiet": Incident remains classified. Cover story prepared. -- disclosure_choice == "partial": +} +{disclosure_choice == "partial": Controlled statement will be prepared for media. } @@ -372,4 +376,5 @@ This is just the beginning. // TRIGGERS: Task 3.3 complete (report_to_0x99) // TRIGGERS: Mission complete event --> END +#exit_conversation +-> start diff --git a/scenarios/m04_critical_failure/ink/m04_npc_robert_chen.ink b/scenarios/m04_critical_failure/ink/m04_npc_robert_chen.ink index 4d10211..386da44 100644 --- a/scenarios/m04_critical_failure/ink/m04_npc_robert_chen.ink +++ b/scenarios/m04_critical_failure/ink/m04_npc_robert_chen.ink @@ -12,11 +12,13 @@ VAR chen_provided_keycard = false VAR discussed_optigrid = false VAR scada_threat_confirmed = false +// Game state variables +VAR operatives_defeated = 0 +VAR urgency_stage = 0 + // External variables (set by game) EXTERNAL player_name() EXTERNAL current_time() -EXTERNAL operatives_defeated() -EXTERNAL urgency_stage() // =========================================== // CONVERSATION 1: INITIAL MEETING (Task 1.2) @@ -225,7 +227,8 @@ Let me know if you need anything else. I'll be in the Control Room monitoring sy // TRIGGERS: Task 1.2 completion --> END +#exit_conversation +-> initial_meeting === initial_meeting_end_grateful === #speaker:robert_chen @@ -236,7 +239,8 @@ Of course. And look... if you do find anything, let me know. This facility is my responsibility. These people depend on us. --> END +#exit_conversation +-> initial_meeting // =========================================== // EARLY REVEAL OPTION @@ -363,7 +367,8 @@ Meet me in the Control Room. We'll find what they did to my systems. // TRIGGERS: Task 1.2 completion, chen_is_ally activated early --> END +#exit_conversation +-> initial_meeting === chen_maintains_cover === #speaker:robert_chen @@ -620,7 +625,8 @@ Call me if you need technical support—I know every system in this facility. // TRIGGERS: Task 1.4 completion, Objective 1 complete, Objective 2 unlocked --> END +#exit_conversation +-> initial_meeting === scada_conversation_end_grateful === #speaker:robert_chen @@ -631,4 +637,5 @@ Be careful out there. And... thank you. For taking this seriously. For protecting my people. --> END +#exit_conversation +-> initial_meeting diff --git a/scenarios/m04_critical_failure/ink/m04_phone_agent0x99.ink b/scenarios/m04_critical_failure/ink/m04_phone_agent0x99.ink index d25a593..e23d0ee 100644 --- a/scenarios/m04_critical_failure/ink/m04_phone_agent0x99.ink +++ b/scenarios/m04_critical_failure/ink/m04_phone_agent0x99.ink @@ -11,12 +11,14 @@ VAR server_room_reached = false VAR attack_mechanism_known = false VAR voltage_priority_discussed = false +// Game state variables +VAR chen_is_ally = false +VAR operatives_defeated = 0 +VAR urgency_stage = 0 +VAR flags_submitted = 0 + // External variables (set by game) EXTERNAL player_name() -EXTERNAL chen_is_ally() -EXTERNAL operatives_defeated() -EXTERNAL urgency_stage() -EXTERNAL flags_submitted() // =========================================== // FIRST CALL (Initial Contact) @@ -140,7 +142,8 @@ Stay sharp. These aren't amateurs. If you encounter hostiles, defend yourself. Call if you need guidance. --> END +#exit_conversation +-> start // =========================================== // EVENT: SERVER ROOM ENTERED @@ -202,7 +205,8 @@ Find it, analyze it, and we'll know how to disable their attack. Call when you've got intel. --> END +#exit_conversation +-> start // =========================================== // EVENT: ATTACK MECHANISM IDENTIFIED @@ -323,9 +327,11 @@ Three—disable physical bypass devices and SCADA malware. {operatives_defeated >= 2: You've already taken down {operatives_defeated} operatives. You're doing this. -- operatives_defeated == 1: +} +{operatives_defeated == 1: You've neutralized one operative. Expect resistance from the others. -- else: +} +{operatives_defeated == 0: All three operatives are still active. Be ready for combat. } @@ -347,7 +353,8 @@ Three—disable physical bypass devices and SCADA malware. 240,000 people are counting on you. Bring it home. --> END +#exit_conversation +-> start // =========================================== // OPTIONAL: PLAYER-INITIATED CALL (GUIDANCE REQUEST) @@ -506,4 +513,5 @@ Anything else? Stay safe out there. Call if you need me. --> END +#exit_conversation +-> start diff --git a/scenarios/m04_critical_failure/ink/m04_phone_robert_chen.ink b/scenarios/m04_critical_failure/ink/m04_phone_robert_chen.ink index e2e554f..8478800 100644 --- a/scenarios/m04_critical_failure/ink/m04_phone_robert_chen.ink +++ b/scenarios/m04_critical_failure/ink/m04_phone_robert_chen.ink @@ -8,12 +8,14 @@ VAR chen_support_calls = 0 VAR guidance_provided = "" +// Game state variables +VAR chen_is_ally = false +VAR chen_trust_level = 0 +VAR urgency_stage = 0 +VAR attack_mechanism_known = false + // External variables (set by game) EXTERNAL player_name() -EXTERNAL chen_is_ally() -EXTERNAL chen_trust_level() -EXTERNAL urgency_stage() -EXTERNAL attack_mechanism_known() // =========================================== // PHONE SUPPORT AVAILABILITY CHECK @@ -28,7 +30,8 @@ EXTERNAL attack_mechanism_known() I'm monitoring systems from the Control Room. Come see me if you need something. - -> END + #exit_conversation +-> start - else: // Chen is ally - provides technical support @@ -141,11 +144,13 @@ Three: Remote trigger mechanism. Secure and disable Voltage's command laptop. Priority one: identify how they're compromising the SCADA network. Use the VM terminal in the server room. Find their attack infrastructure. -- urgency_stage >= 3: +} +{attack_mechanism_known and urgency_stage >= 3: We're in the final stages. You need to disable their attack vectors NOW. Physical bypasses, SCADA malware, and the remote trigger. All three. -- else: +} +{attack_mechanism_known and urgency_stage < 3: You know what they did. Now disable it. Three vectors: physical, digital, and the trigger mechanism. @@ -195,7 +200,8 @@ Call if you need more guidance. I'm monitoring systems from here. } --> END +#exit_conversation +-> start // =========================================== // EMERGENCY CALL (If Attack Partially Triggered) @@ -212,4 +218,5 @@ You need to disable those vectors RIGHT NOW—physical bypasses, SCADA script, e // TRIGGERS: Emergency intervention mode --> END +#exit_conversation +-> start diff --git a/scenarios/m04_critical_failure/ink/m04_terminal_attack_trigger.ink b/scenarios/m04_critical_failure/ink/m04_terminal_attack_trigger.ink index d7ba1bf..9fb5d95 100644 --- a/scenarios/m04_critical_failure/ink/m04_terminal_attack_trigger.ink +++ b/scenarios/m04_critical_failure/ink/m04_terminal_attack_trigger.ink @@ -11,9 +11,9 @@ VAR trigger_mechanism_disabled = false // Remote trigger neutralized VAR attack_vectors_disabled = 0 // Total count (0-3) VAR emergency_intervention = false // Voltage triggered attack -// External variables (set by game) -EXTERNAL voltage_captured() -EXTERNAL attack_trigger_secured() +// Game state variables +VAR voltage_captured = false +VAR attack_trigger_secured = false // =========================================== // TERMINAL ACCESS @@ -34,10 +34,12 @@ EXTERNAL attack_trigger_secured() {voltage_captured: [OPERATOR: Voltage - SESSION TERMINATED] [SAFETYNET Override Active] -- attack_trigger_secured: +} +{not voltage_captured and attack_trigger_secured: [OPERATOR: Unknown - SESSION SECURED] [Manual Control Available] -- else: +} +{not voltage_captured and not attack_trigger_secured: [OPERATOR: Voltage - ACTIVE] [WARNING: Session In Progress] } @@ -366,4 +368,5 @@ Terminal session ended. Laptop secured for intelligence analysis. --> END +#exit_conversation +-> start diff --git a/scenarios/m04_critical_failure/ink/m04_terminal_scada_display.ink b/scenarios/m04_critical_failure/ink/m04_terminal_scada_display.ink index aca34a2..08f2506 100644 --- a/scenarios/m04_critical_failure/ink/m04_terminal_scada_display.ink +++ b/scenarios/m04_critical_failure/ink/m04_terminal_scada_display.ink @@ -8,10 +8,10 @@ VAR scada_anomalies_identified = false VAR parameter_readings_reviewed = false -// External variables (set by game) -EXTERNAL urgency_stage() -EXTERNAL attack_vectors_disabled() -EXTERNAL chen_is_ally() +// Game state variables +VAR urgency_stage = 0 +VAR attack_vectors_disabled = 0 +VAR chen_is_ally = false // =========================================== // SCADA TERMINAL ACCESS @@ -30,7 +30,18 @@ EXTERNAL chen_is_ally() ╚════════════════════════════════════════════════╝ [SYSTEM STATUS: {attack_vectors_disabled >= 3: SECURE | MONITORING}] -[URGENCY LEVEL: {urgency_stage >= 4: CRITICAL | urgency_stage >= 3: HIGH | urgency_stage >= 2: ELEVATED | NORMAL}] +{urgency_stage >= 4: + [URGENCY LEVEL: CRITICAL] +} +{urgency_stage == 3: + [URGENCY LEVEL: HIGH] +} +{urgency_stage == 2: + [URGENCY LEVEL: ELEVATED] +} +{urgency_stage < 2: + [URGENCY LEVEL: NORMAL] +} * [View Chemical Dosing Parameters] -> view_dosing_parameters @@ -65,8 +76,8 @@ CHEMICAL DOSING PARAMETERS All parameters within safe operational ranges. Automated control restored. - -- urgency_stage >= 4: +} +{attack_vectors_disabled < 3 and urgency_stage >= 4: [CRITICAL WARNING] Chlorine: 3.2 ppm → 4.1 ppm (DANGEROUS TREND) @@ -75,8 +86,8 @@ CHEMICAL DOSING PARAMETERS ⚠ PARAMETERS APPROACHING TOXIC LEVELS ⚠ IMMEDIATE INTERVENTION REQUIRED - -- urgency_stage >= 3: +} +{attack_vectors_disabled < 3 and urgency_stage == 3: [HIGH ALERT] Chlorine: 1.8 ppm → 2.3 ppm (ELEVATED) @@ -85,8 +96,8 @@ CHEMICAL DOSING PARAMETERS ⚠ ABNORMAL PARAMETER DRIFT DETECTED ⚠ TRENDING TOWARD UNSAFE LEVELS - -- urgency_stage >= 2: +} +{attack_vectors_disabled < 3 and urgency_stage == 2: [ELEVATED MONITORING] Chlorine: 1.1 ppm → 1.4 ppm (RISING) @@ -95,8 +106,8 @@ CHEMICAL DOSING PARAMETERS ⚠ CHLORINE DOSING ANOMALY DETECTED ⚠ PARAMETERS DRIFTING FROM BASELINE - -- else: +} +{attack_vectors_disabled < 3 and urgency_stage < 2: [MONITORING] Chlorine: 0.8 ppm → 0.9 ppm (SLIGHT INCREASE) @@ -265,4 +276,5 @@ Terminal session ended. ⚠ WARNING: Time-sensitive threat } --> END +#exit_conversation +-> start