Created proper Ink source file for Security Guard NPC: Ink Story File: - Created scenarios/ink/rfid-security-guard.ink (proper Ink format) - Follows equipment-officer.ink pattern - Uses # speaker:npc and # speaker:player tags - Implements hub dialogue structure - Contains clone_keycard tag: # clone_keycard:Master Keycard|FF4A7B9C21 - Multiple dialogue branches and paths Story Structure: - start knot → hub knot - ask_keycard knot with multiple choices - cloned knot for post-clone conversation - Proper conversation flow with END points Removed: - Deleted placeholder rfid-security-guard.json (incorrect format) - JSON must be compiled from .ink source using inklecate or Inky Updated README: - Added compilation instructions section - Option 1: Inky editor (recommended, GUI) - Option 2: inklecate command line - Warning that .json needs compilation before use - Links to download tools The .ink file is the source of truth and must be compiled to .json before the scenario will work properly.
6.0 KiB
RFID System Test Scenario
Overview
This scenario tests all RFID keycard functionality in BreakEscape.
⚠️ Important: Compile Ink Story First
Before running the scenario, you need to compile the Ink story file:
Option 1: Using Inky (Recommended)
- Download Inky (Ink editor with built-in compiler)
- Open
scenarios/ink/rfid-security-guard.inkin Inky - Click File → Export story.json only...
- Save as
scenarios/ink/rfid-security-guard.json
Option 2: Using inklecate (Command Line)
# Install inklecate
# https://github.com/inkle/ink/releases
# Compile the story
inklecate scenarios/ink/rfid-security-guard.ink -o scenarios/ink/rfid-security-guard.json
Note: The current rfid-security-guard.json file is a placeholder and won't work without proper compilation from the .ink source.
Scenario Structure
Room 1: Test Lobby
Items:
-
📇 Employee Badge (keycard) - Physical item you can pick up
- Hex:
01AB34CD56 - This is a standard badge that won't open the secure door
- Hex:
-
🔧 Flipper Zero (rfid_cloner) - The RFID cloner device
- Pick this up first to enable card cloning
-
📄 Security Notice (notes) - Instructions about RFID system
NPC:
- 👮 Security Guard
- Has a Master Keycard in holdsItems (Hex:
FF4A7B9C21) - Conversation includes clone_keycard tag to clone their badge
- This is the keycard that unlocks the secure door
- Has a Master Keycard in holdsItems (Hex:
Door:
- 🚪 Secure Room Door (locked with RFID)
- Requires:
master_keycard(the guard's badge) - Won't open with the employee badge
- Requires:
Room 2: Secure Room
Items:
- ✅ Success Note - Congratulations message
- 📇 CEO Keycard - Bonus keycard you can take
Test Procedure
Test 1: Pick Up Items
- Start the scenario
- Pick up the Flipper Zero (RFID cloner)
- Pick up the Employee Badge
- Read the Security Notice to understand the system
Test 2: Try Wrong Card
- Try to unlock the secure door
- Select the Employee Badge from the tap interface
- Should get "Access Denied" (wrong card)
Test 3: Clone Card from NPC
- Talk to the Security Guard
- Choose: "Ask about the keycard"
- Choose: "Try to clone it secretly"
- RFID minigame should launch in clone mode
- Watch the Flipper Zero read the card
- Card data should display:
- Name: Master Keycard
- Hex: FF 4A 7B 9C 21
- Facility: 255
- Card: 18811
- Checksum: calculated
- DEZ 8: calculated
- Click "Save" to save to cloner
- Should return to conversation automatically
- Finish the conversation
Test 4: Emulate Cloned Card
- Go back to the secure door
- Try to unlock it again
- This time, choose "Saved" from the Flipper menu
- Select "Master Keycard" from saved cards list
- RFID minigame shows emulation screen
- Should display "Access Granted" ✓
- Door unlocks!
Test 5: Click to Clone
- After getting into secure room, pick up the CEO Keycard
- Open inventory and click on the CEO Keycard
- RFID minigame should launch in clone mode
- Save it to your cloner
- Now you have 2 cards saved!
Test 6: Verify Saved Cards
- Try to unlock the secure door again (from inside)
- Go to Saved cards
- Should see both cards:
- Master Keycard
- CEO Keycard
Expected Behavior
Unlock Mode
- Shows "RFID > Read" screen
- Lists available keycards from inventory
- Shows "RFID > Saved" option if cloner has cards
- Tap animation when selecting card
- Success/failure feedback
- Door unlocks on success
Clone Mode (from conversation tag)
- Shows "RFID > Read" screen
- Reading progress bar animation
- Displays full card data after reading
- Save/Cancel buttons
- Returns to conversation after save
- Card added to cloner's saved_cards
Clone Mode (from inventory click)
- Click keycard while holding cloner
- Same clone flow as above
- No conversation return
Saved Card Emulation
- Lists all saved cards
- Shows card details when emulating
- "Emulating..." message with RF waves
- Success/failure feedback
Keycards in Scenario
| Card Name | Hex ID | Facility | Card # | Opens Secure Door? |
|---|---|---|---|---|
| Employee Badge | 01AB34CD56 | 1 | 43981 | ❌ No |
| Master Keycard | FF4A7B9C21 | 255 | 18811 | ✅ Yes |
| CEO Keycard | FFAA55CC33 | 255 | 43597 | ❌ No (not required) |
How to Load
- Copy
test-rfid.jsonto the scenarios folder - Modify
js/main.jsto load it:
const scenarioUrl = 'scenarios/test-rfid.json';
- Reload the game
- You should spawn in the Test Lobby
Troubleshooting
If RFID minigame doesn't start:
- Check browser console for errors
- Verify all RFID files are loaded
- Make sure CSS is linked in index.html
If conversation doesn't return:
- Check that
window.returnToConversationAfterRFIDexists - Verify
window.pendingConversationReturnis set - Look for errors in console
If door doesn't unlock:
- Verify the keycard's
key_idmatches door'srequires - Check that you're using the correct card (Master Keycard)
- Ensure unlock-system.js has the rfid case
If clone_keycard tag doesn't work:
- Verify you have the Flipper Zero in inventory
- Check chat-helpers.js has the clone_keycard case
- Look for tag processing errors in console
Success Criteria
✅ Pick up Flipper Zero and keycards ✅ Wrong keycard shows "Access Denied" ✅ Clone NPC's keycard from conversation ✅ Conversation returns after cloning ✅ Cloned card appears in Saved list ✅ Emulate cloned card to unlock door ✅ Clone keycard by clicking in inventory ✅ Multiple saved cards work correctly ✅ All UI animations display properly ✅ Flipper Zero styling looks correct
Notes
- All hex IDs are valid 10-character hex strings
- Facility codes and card numbers are properly calculated
- The scenario tests both clone modes (conversation tag and inventory click)
- Door is one-way locked (secure room exit is unlocked)
- CEO Keycard is a bonus to test inventory cloning