I will start by listing the files in the project to understand the structure and locate the key files we need to work with.
I will read the contents of index.html to see the structure and update the title, and then check src/App.tsx to prepare for our implementation.
I will read the contents of src/App.tsx to understand the entry point of our React application.
I will search for the Skyrim Special Edition (.ess) save file header format using web_search to ensure our parser is accurate and handles all fields properly.
I will search for the official documentation of the Skyrim save file format on the Unofficial Elder Scrolls Pages (UESP) wiki, which describes the bytes, headers, and fields.
I will search for the specific details of the initial magic string of a Skyrim save game file to know its byte representation and length.
I will search for the definition of the wstring type in Skyrim's .ess format, specifically whether it starts with a 16-bit length prefix followed by characters or if it's UTF-16, to parse it correctly.
I will search specifically for "wstring" in Skyrim modding / file format documentation to confirm if it represents a 16-bit (2 bytes) character length prefix followed by characters of that length.
I will search for the relationship between the Header structure, the screenshot data, and the compression type in a Skyrim save file to get the exact sequence of bytes.
I will read package.json to see what dependencies are available (like icons, state management, etc.) so we can build a highly interactive experience.
I will install lucide-react to provide a rich set of icons for the Skyrim save file dashboard (like levels, shield, calendar, gender icons, and hex viewers).
I will create src/utils/skyrimSaveParser.ts. This file will contain:
- Complete types for the Skyrim Save file header.
- A binary
BinaryReader and BinaryWriter to read and write actual .ess save headers.
- High-quality programmatic screenshot pixel generators for 3 stunning Skyrim scenes: Throat of the World (Sunset), Castle Volkihar/Blackreach (Cave Nebula), and Riften Valley (Pine Forest and Castle).
- Full Elder Scrolls calendar lore decoding that maps in-game dates (like "Sundas, 17th of Last Seed") to actual Gregorian equivalents (Sunday, August 17th) and displays lore-rich descriptions of holidays, seasons, and days.
- Extensive information about Skyrim's playable races (Nord, Khajiit, Breton, etc.), their active abilities, and lore.
- A generator that constructs a valid binary
.ess save game header byte stream for simulation.
Let's write this complete parser and generator.
I will now create src/components/HexViewer.tsx. This component provides an immersive binary view of the uploaded or simulated .ess file. It displays hex offsets, raw hex bytes, and printable ASCII on the side. Crucially, it highlights exactly where the Magic Signature, the Header Size uint32, the Header Fields, and the Screenshot Block reside in memory, so users can hover over any field and see its exact byte layout. It uses virtualization to remain super fast even with larger files. Let's write this now.
I will edit src/components/HexViewer.tsx to remove the unused variable visibleBytes and fix the TypeScript type error.
I will create the src/components/ScreenshotCanvas.tsx component. It renders the binary pixel data of the screenshot to an HTML5 <canvas> in real-time, handling both RGB (Legendary Edition) and RGBA (Special Edition) pixel layouts. It also features interactive sliders for visual adjustments (brightness, contrast, saturation, sepia, blur) and an instant "Download Screenshot" button to save the extracted image as a high-quality PNG file! Let's write this now.
I will now create the src/components/CharacterCard.tsx component. This component renders an "Adventurer Guild Passport" for the parsed save game. It uses parchment-style styling, golden dragon-scroll borders, detailed level-up bars, specific race abilities with descriptions, and the decoded lore calendars. It provides a visual recap of the dragonborn's stats and lore. Let's write this now.
I will export WEEKDAY_MAP from src/utils/skyrimSaveParser.ts so it can be referenced in src/components/CharacterCard.tsx.
I will update the imports in src/components/CharacterCard.tsx to include WEEKDAY_MAP from our parser utilities.
I will now create the src/components/ParserLogs.tsx component. This component displays a live step-by-step developer console log of the parser's operations, showing the exact byte offset where each field was read, and classifying each operation as Info, Success, Warning, or Error. It also supports interactive filtering by log type so users can isolate warnings or read specific offsets. Let's write this now.
I will edit src/components/ParserLogs.tsx to remove the unused Filter icon import to resolve the TypeScript compilation warning.
I will update src/components/CharacterCard.tsx to handle the screenshot rendering locally inside its own <canvas> using the raw screenshotBytes and dimensions. This makes the component self-contained and avoids complex prop drilling or timing issues.
I will read the section of src/components/CharacterCard.tsx where the character mugshot / canvas screenshot is rendered to replace screenshotSrc with our actual <canvas> element.
I will edit src/components/CharacterCard.tsx to replace the img-based mugshot using screenshotSrc with our own local <canvas ref={canvasRef}> element. This completes the self-contained mugshot implementation inside the card.
I will update the title in index.html to a beautiful, lore-friendly title: "Skyrim .ESS Save File Header Parser & Visualizer".
I will now create the main dashboard component in src/App.tsx. It acts as the central hub of our application. It integrates the upload and drag-and-drop system, the mock save buffer generators, the presets, the interactive filters, the customizer form, and the help guide. This dashboard allows users to experience the parser right away by pre-loading our Level 81 Dovahkiin sample on startup. Let's write the complete code for src/App.tsx.
I will read the section around line 268 in src/App.tsx to fix the compilation errors and clean up any unused variables or imports.
I will read the top imports section of src/App.tsx to align the imports precisely with what's actually being used and eliminate any compilation issues.
I will now edit src/App.tsx to fix the imports and remove the unused activeRace assignment. This resolves all the TypeScript errors reported.
I will read lines 255 to 270 of src/App.tsx to precisely match the context for removing the unused activeRace variable.
I will now edit src/App.tsx to remove the unused activeRace assignment.
I will update the imports in src/App.tsx to remove the unused getRaceDetails import to clear the compilation warning.
I will run build_project now to verify that our TypeScript compilation and React build execute successfully with Vite.
I have designed and built a web application that parses the header of Skyrim Special Edition (SE) and Legendary Edition (LE) save files (.ess).
The application is written using React, TypeScript, and Tailwind CSS. To ensure the application is immediately usable even if you don't have a .ess save file on hand, it comes pre-packaged with simulated binary save files of real Skyrim characters (e.g., Level 81 Dovahkiin) that are generated as actual binary ArrayBuffer objects in JavaScript, parsed in real-time, and rendered dynamically!
Here is a summary of the systems built:
1. Robust Binary .ess Header Parser (src/utils/skyrimSaveParser.ts)
- Implements a low-level
BinaryReader using DataView to step through the binary structure byte-by-byte.
- Validates Signature: Inspects the first 13 bytes of the save to verify the classic
TESV_SAVEGAME magic signature.
- Decodes Header Metadata: Reads the 4-byte
headerSize and parses the subsequent header fields:
- Version: Correctly identifies if the save belongs to Special Edition (v12) or Legendary Edition (v9).
- Character Name & Location: Reads
wstring fields (composed of a 2-byte character length prefix followed by UTF-8 bytes).
- Level Progress: Parses experience metrics (
playerCurExp and playerLvlUpExp) to calculate progress.
- Sex: Translates
playerSex (0 for Male, 1 for Female).
- FILETIME Timestamp: Parses Windows 64-bit timestamps representing the creation date and converts them to human-readable local time.
- Screenshot Dimensions & Compression: Reads screenshot width, height, and compression types (None, zLib, or LZ4).
2. Live Screenshot Visualizer (src/components/ScreenshotCanvas.tsx)
- Extracts raw pixel bytes directly from the save file. Special Edition save games write screenshots as raw 32-bit RGBA pixels, while Legendary Edition writes them as 24-bit RGB pixels.
- Dynamically paints the pixels onto an HTML5
<canvas>.
- Image Enhancement Controls: Includes interactive sliders to customize Brightness, Contrast, Saturation, Sepia tone, and Ambient blur.
- Screenshot Export: Features a high-quality "Export Screenshot (PNG)" button which renders the visual enhancements and lets you save your in-game snapshot directly.
3. Binary Hex Inspector (src/components/HexViewer.tsx)
- An interactive, scrollable binary HEX editor showing offsets, raw hex bytes, and printable ASCII text on the right.
- High-performance paging/virtualization ensures it stays fast even with larger files.
- Color-Coded Segments: Hovering over bytes highlights exactly where they live inside the
.ess file structure:
- Green: Magic Signature (
TESV_SAVEGAME)
- Indigo: Header Size (uint32)
- Amber: Header Payload
- Rose: Screenshot Pixels
4. Skyrim Lore Calendar & Race Traits (src/components/CharacterCard.tsx)
- Includes full calendar decoding which maps standard save-game date strings (e.g., "Sundas, 17th of Last Seed") to their lore-friendly Tamriel equivalents (Sunday, August 17th). It details in-game holiday alerts and seasonal weather descriptions.
- Features complete trait sheets for all 10 playable Skyrim races (Nord, Khajiit, Breton, Argonian, Dunmer, Altmer, Bosmer, Imperial, Redguard, Orc), outlining active powers and starting alchemical/weapon skill bonuses.
5. Interactive Mock Save File Creator (src/App.tsx)
- Allows you to create your own custom Skyrim Save. Enter a custom name, select a playable race, input level progress, assign a custom location, and select one of our three custom programmatic landscape scenes (Throat of the World Mountain Sunset, Whiterun Pine Valley, or Bioluminescent Blackreach Cavern).
- Click "Generate & Analyze" to compile the form into a real, valid binary
.ess byte buffer, parse it instantly through the analyzer, and download the actual generated file to your local computer!
Files built: src/utils/skyrimSaveParser.ts, src/components/HexViewer.tsx, src/components/ScreenshotCanvas.tsx, src/components/CharacterCard.tsx, src/components/ParserLogs.tsx, index.html, src/App.tsx