SCPmirror/scp core systems zpp hb#267
Open
DreamModule wants to merge 30 commits intoRegalis11:masterfrom
Open
Conversation
Implement comprehensive gameplay extension systems in BlitzBasic for the Project Mirror (СТОРОЖ) mod. These systems introduce multi-day narrative progression, dynamic AI behaviors, and quest mechanics. New modules: - ProjectMirror_Story.bb: Global story state management with 3-day chronology, karma system (-100 to +100), branching storylines (Neutral/Redemption/Chaos/Sacrifice), and full dialog system with typewriter effect and choice-consequence mechanics - ProjectMirror_Echo.bb: "Echo of the Past" system for Day 3 phantom manifestations. Spawns semi-transparent NPCs at locations of past events with animation playback, spatial audio, and visual distortion effects. Uses distance-squared checks for performance optimization - ProjectMirror_939.bb: SCP-939 voice mimicry system that learns dialog audio during Days 1-2 and uses cached phrases as lures on Day 3. Implements weighted selection favoring emotional/personal voices (especially Steve's if deceased) - ProjectMirror_914.bb: Quest-conditional SCP-914 transformations. Key mechanic: Level 4 keycard only upgrades to O5 if Harrison's PDA is present (decoded via 914). Includes combo detection and karma- gated recipes - ProjectMirror_MTF.bb: MTF "Foxes" tactical AI with squad-based encirclement, role assignment (leader/flankers/support), line-of- sight checks, shadow detection, and flashbang stun mechanics with screen effects - ProjectMirror_Core.bb: Master controller with unified init/update/ render/cleanup, save/load integration, event hooks for original game systems, console commands, and debug overlays All code targets Blitz3D 1.108 with Type-based memory management and FPSfactor-independent timing. https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
- Changed protagonist from D-class to Security Guard (Markus) - Added Day 1 story dialogs: coffee with Steve, helicopters, convoy to 999, rumors - InitProjectMirror spawns player at cafeteria with radio + keycard lvl 2 - Removed verbose AI-style comments, kept minimal Russian dev notes - Added dialog triggers for room-based story events https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
- Added Day 2 flags (FLAG_DAY2_STARTED, FLAG_SAW_D9341, etc.) - SetupDay2Dialogs(): convoy briefing, 173 chamber scene, Harrison terminal - ContainmentScene system with state machine for 173 cutscene - SceneActor Type for NPC actors (Steve, guards, D-class, D-9341) - Lights flickering effect during "false" containment breach - TWIST: procedure completes normally, no breach on Day 2 - Harrison terminal Easter egg: "079 integrated, algorithm scheduled" - Automatic Day 3 transition after completing Day 2 https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
- Add Day 3 flags (FLAG_DAY3_STARTED, FLAG_FOUND_STEVE_BODY, etc.) - SetupDay3World() with emergency lighting and corpse spawning - SetupDay3Dialogs() - Steve's body scene, 939 voice trap, Harrison quest - SpawnDay3Corpses() - Steve, D-class bodies at 173, Harrison in storage - SpawnHarrisonLoot() - PDA and Level 4 keycard - UpdateEmergencyLighting() - red pulsing ambient light - Update939VoiceTrap() - mimics Steve's voice after finding body - TriggerEchoAtSteveBody() - ghost vision system hook - CheckHarrisonPDAPickup() - item collection with 914 quest integration - UpdateDay3Logic() hook in Core.bb https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
ACT 1 (200-209): Awakening - phantom Steve, looped radio ACT 2 (210-229): Echo of the Past - cafeteria vision, 173 flashback, Steve's dictaphone ACT 3 (230-259): Voices of Friends - 939 zone, Steve voice trap, Harrison body, Project Mirror log ACT 4 (260-279): Machine and Plague - 079 contact, 049 encounter, 914 upgrade to O5 ACT 5 (280-299): Look at the Floor - 096 corridor, 079 trolling ACT 6 (300-319): Surface - MTF betrayal reveal ACT 7 (320-399): Finale - 4 endings (Whistleblower, Symbiosis, Death, Zero Protocol) Sanity System: - 4 levels: Normal, Anxiety (30%), Paranoia (70%), Hysteria (100%) - Audio/visual hallucinations at high sanity - Phantom appearances, fake door sounds, radio static Zero Protocol ending: Nuke ending with Steve's badge authorization, flashbacks https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
NEW MODULES: - ProjectMirror_VFX.bb (~500 lines) - Sanity visual effects (vignette, noise, breathing edges) - Flashback system (grayscale, film grain) - Screen effects (fade, static, red pulse, psycho) - Nuke ending sequence with flashbacks - Phantom visual rendering - ProjectMirror_Cutscene.bb (~450 lines) - Camera modes (fixed, follow, path, orbit, shake) - Interpolated camera movements - Predefined cutscenes for Day 2/3 events - Player camera state save/restore - ProjectMirror_UI.bb (~500 lines) - Sanity meter with pulse animation - Day/Act indicator - Karma display with change animation - Act title cinematics - Objective tracker - Notification queue - Interaction prompts - Radio message overlay - Compass for Day 3 - ProjectMirror_Gameplay.bb (~550 lines) - Stealth system (crouch, noise level) - 939 hearing mechanics - 096 look detection with rage trigger - Tesla gate control - Nuke silo mechanics (dual key auth) - Facility lockdown system - MTF betrayal behavior CORE UPDATES: - Version 2.0.0 - Integrated all new modules - Act title auto-display - Nuke countdown HUD - Extended debug overlay - New console commands (mirror_nuke, mirror_act, etc.) INSTALL GUIDE: - ProjectMirror_INSTALL.txt with integration instructions https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
Added 5 integration hooks: - Include ProjectMirror_Core.bb (after particle system) - InitProjectMirror() (in InitNewGame before CatchErrors) - UpdateProjectMirror() (in main loop after UpdateNPCs) - RenderProjectMirror() (after HUD rendering) - CleanupProjectMirror() (in NullGame cleanup) Game is now ready for compilation and testing. https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
Blitz3D requires parentheses around Not expressions when used with And/Or operators. Fixed all occurrences across modules: - ProjectMirror_Story.bb (3 fixes) - ProjectMirror_Echo.bb (2 fixes) - ProjectMirror_Gameplay.bb (2 fixes) - ProjectMirror_MTF.bb (5 fixes) - ProjectMirror_939.bb (1 fix) - ProjectMirror_914.bb (1 fix) https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
1. Moved Include statement to after NPCs.bb (types must be defined first) 2. Replaced array fields in Types with individual fields: - MTFFoxSquad: members[6] -> member0-member5 + helper functions - EchoEvent: requiredFlags[4], requiredFlagValues[4] -> individual fields - EchoEvent: glowColor[3] -> glowR, glowG, glowB 3. Fixed undefined NPC type constants: - NPCtypeDClass -> NPCtypeD - NPCtype0492 -> NPCtypeZombie 4. Added helper functions for array-like access: - GetSquadMember/SetSquadMember - GetEchoRequiredFlag/GetEchoRequiredFlagVal https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
Blitz3D doesn't have Continue keyword for loops. Replaced with If/Else logic and skip flags pattern. Fixed in: - ProjectMirror_Story.bb (CheckDialogTriggers) - ProjectMirror_Echo.bb (CheckEchoTriggers, UpdateActiveEchoes) - ProjectMirror_MTF.bb (UpdateFoxSquad, InitiateEngagement) - ProjectMirror_914.bb (FindMatchingRecipe) https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
Blitz3D issues fixed: - ProjectMirror_939.bb: Renamed duplicate 'v' variable in LoadVoiceMimicryState - ProjectMirror_939.bb: Removed Local array (personalVoices[8]), use random selection instead - ProjectMirror_UI.bb: Removed Local array (directions$[4]), use Select/Case instead https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
Global ArrayName%[n] is not valid in Blitz3D. Changed to Dim ArrayName%(n): - ProjectMirror_MTF.bb: TacticalRadioSFX%[4] -> Dim TacticalRadioSFX%(4) - ProjectMirror_VFX.bb: VFXStaticFrames%[8] -> Dim VFXStaticFrames%(8) - ProjectMirror_Gameplay.bb: LockedSectors%[8] -> Dim LockedSectors%(8) - ProjectMirror_UI.bb: NotificationQueue$[8], NotificationTimers#[8] -> Dim https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
In Blitz3D: - Dim arrays use parentheses: ArrayName(index) - Type field arrays use brackets: TypeVar\FieldArray[index] Fixed all Dim array accesses: - VFXStaticFrames(i) - LockedSectors(i), LockedSectors(sectorNum) - NotificationQueue(i), NotificationQueue(j), etc. - NotificationTimers(i), NotificationTimers(j), etc. https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
Declare fox.MTFFoxState once at function start, then assign in loops. https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
… font issue - Guards are now friendly to Markus (player is a fellow guard) - MTF remain hostile (they hunt everyone during Day 3 breach) - Translated all UI and dialog text from transliterated Russian to English - Fixed font size issue after ESC menu by resetting font in render functions - Added retry mechanism for guard spawn at cafeteria https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
…-breach lighting - Spawn Steve as guard NPC in cafeteria (removes SCP-066) - Add pre-breach lighting for Day 1 and 2 (normal facility lights) - Upgrade guard equipment: Level 3 keycard, flashlight, navigator, radio - Add compass/GPS navigation UI with direction arrow - Add elevator fast travel system (Day 1/2 skip long walks) - Add navigation guidance system based on story progress - Steve guides Markus to objectives with navigation targets https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
- Removed non-existent flashlight item (caused loading error) - Added Night Vision Goggles (nvgoggles) - Added 9V Battery - Fixed S-NAV 300 Navigator name https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
…ontainment - Fixed Steve spawn position (center of cafeteria, not in walls) - Increased dialog typewriter speed from 0.05 to 0.5 (10x faster) - Fixed navigation arrow rendering (proper angle calculation) - Removed compass (S W E N) from top of screen - only navigation arrow now - Added DisableSCPsBeforeBreach() - all SCPs contained on Day 1 and 2 - Fixed navigation sequence: elevator -> helicopters -> D-Class -> 999 - Updated elevator fast travel destinations Note: Weapons not available for player in SCP:CB (it's a horror survival game) https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
…ontainment - Fixed Steve spawn position (spawns 3m away from player, not inside) - Added Steve AI states: IDLE, FOLLOWING, LEADING, WAITING - Steve now leads player to elevator after coffee dialog - Steve waits for player if too far, then continues leading - Fixed Memory access violation by not deleting NPCs in For Each loop - Added RemoveElevatorCorpses() to hide D-Class corpses (pre-breach) - Added SCPsDisabledOnce flag to prevent repeated processing https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
…ibility) Blitz3D doesn't have the Continue keyword. Restructured loops in DisableSCPsBeforeBreach() and RemoveElevatorCorpses() functions. https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
Changed room173 field from Rooms type to integer handle to avoid type ordering issues during compilation. Using Handle() and Object.Rooms() for conversion. https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
- Added CurrentDay check to cafeteria event to prevent SCP-066 spawn - Added NPCtype066 to DisableSCPsBeforeBreach() function - Removed SCPsDisabledOnce flag to catch newly spawned SCPs every frame This fixes the bug where Steve was replaced by SCP-066 with loud music. https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
… on Day 1/2 - Steve can now open/unlock doors (clearance level 3) - Checkpoint doors stay unlocked on Day 1 and 2 (pre-breach) - Changed helicopter dialog to "time to go" (can't see helicopters from cafeteria) - Steve walks with player instead of teleporting https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
- Use room coordinates for Steve spawn position (not player position) - Add ShowEntity to ensure Steve model is visible - Change Steve walking state from 3 (waypoint) to 10 (free walking) - State 10 properly animates walking without requiring waypoints - Set CurrSpeed = 0 when idle to stop movement animation https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
- Steve spawns 2m in front of player, facing player - Steve doesn't move while DialogActive is true - Elevator target found only once and cached - Fixed state logic: IDLE until coffee dialog done - Added 3D GPS line markers on floor showing path to target - GPS shows green dots from player to destination - Small HUD shows "GPS", distance and target name https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
…rd level fix - Fixed FLAG_SAW_HELICOPTERS being set prematurely in dialog (removed from "Deal." option) - Steve now properly LEADS to elevator (not follows) after coffee dialog - Added obstacle avoidance: Steve turns 45° when stuck for 0.5s - Hidden SCP-106 corrosion decals (black goo) on Day 1/2 - Checkpoint doors now require level 3 keycard on Day 1/2 (instead of 5) https://claude.ai/code/session_01Cy855J54H4ko8jCsB5DcvL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.