Spoiler & Secret Protection Engine
Protect story twists and secret easter eggs with 7 distinct masking modes, Unicode redaction, and interactive player unmasking.
Table of Contents
- ๐ต๏ธ The 7 Dynamic Secret Modes (
SecretBehavior) - ๐ค Unicode Black-Bar Redaction (
RedactedText) - ๐๏ธ Interactive Player Click-to-Reveal
๐ต๏ธ The 7 Dynamic Secret Modes (SecretBehavior)
| Mode | Title Display | Description Display | Icon Display |
|---|---|---|---|
HiddenUntilUnlocked | ??? Secret Achievement | Keep playing to discover this secret. | Mystery Icon |
ShowTitleOnly | Real Title | ??? Secret details masked until unlocked. | Mystery / Lock Icon |
ShowSpoiler | Real Title | [SPOILER] {Real Description} | Real Icon |
CompletelyHidden | Omitted from gallery entirely until unlocked | Omitted | Omitted |
RedactedText | Real Title | Black bar Unicode: โโโโ โโโโโโ โโโโ | Mystery Icon |
PartialHint | Real Title | Custom secretHint teaser text | Mystery Icon |
BlurOverlay | Real Title | Marked for UI shader blur effect | Mystery Icon |
๐ค Unicode Black-Bar Redaction (RedactedText)
When RedactedText is selected, SpoilerProtectionEngine.RedactText(desc) dynamically replaces alphanumeric characters with solid black bars โ while preserving punctuation, spacing, and word lengths for authentic redacted document styling!
๐๏ธ Interactive Player Click-to-Reveal
If allowPlayerReveal = true on the AchievementSO:
AchievementGalleryItemUIrenders an โ๐๏ธ Reveal Spoilerโ button.- Clicking the button unmasks the description locally and remembers the playerโs reveal preference across sessions.
// Reveal secret programmatically
AchievementManager.RevealSecret("secret_lore_shrine");