Quest Log Interface
Relevant source files
The following files were used as context for generating this wiki page:
The Quest Log Interface is the primary user interaction layer for the Solo Leveling Penalty System. It serves as a gamified task management dashboard where users track their daily progress, view their current Hunter Rank, and manage specific tasks categorized into physical, mental, and discipline-based objectives. The system is designed to simulate a "Leveling System" environment, rewarding completion with Experience Points (XP) and penalizing failure or neglect.
The interface is built as a single-page application (SPA) using HTML5, CSS3, and vanilla JavaScript. It relies on localStorage for data persistence, ensuring that user progress, levels, and task states are maintained across sessions without the need for a dedicated backend server.
System Architecture and Data Flow
The Quest Log Interface operates on a cycle centered around Riyadh time (KSA). It synchronizes tasks daily and updates the user's status based on their interaction with the task list.
Core Logic Flow
When the application loads, it initializes the state from local storage and checks if a new day has started. If the date has changed, the system calculates penalties for unfinished tasks from the previous day before generating a new set of quests.
The system ensures that user data is always synchronized with the current date using the Asia/Riyadh timezone.
Sources: Quest.html:158-188, index.html:158-188
Progression System: Ranks and Levels
The progression system is governed by a Rank Configuration that dictates rewards, penalties, and XP requirements. As a user's total XP increases, they move through different Hunter Ranks (from F to R).
Rank Configurations
The getRankConfig function defines the scaling difficulty and rewards for the system.
| Rank | Min XP | Reward (per task) | Penalty (per fail) | Difficulty Key |
|---|---|---|---|---|
| F | 0 | +2 | -3 | f (Easy) |
| E | 70 | +2 | -3 | f (Easy) |
| D | 150 | +3 | -5 | d (Medium) |
| C | 300 | +3 | -5 | d (Medium) |
| B | 500 | +4 | -6 | d (Medium) |
| A | 800 | +4 | -6 | a (Hard) |
| S | 1200 | +4 | -6 | a (Hard) |
| SS | 2000 | +6 | -8 | r (Legendary) |
| R | 3000 | +6 | -8 | r (Legendary) |
Sources: Quest.html:132-142, index.html:132-142
Level Calculation Logic
Levels are calculated dynamically based on total points. Unlike ranks, levels have a shifting XP requirement that increases as the user grows stronger.
- Levels 1-5: Fixed requirement of 5 XP per level.
- Levels 6+: Requirement based on the
reqvalue defined in the current Rank configuration.
Sources: Quest.html:144-152, index.html:144-152
Quest Generation and Task Database
Quests are pulled from a structured taskDatabase which contains three primary categories: physical, discipline, and mental. Each task has different variations based on the user's current difficulty level (f, d, a, r).
Task Distribution
The generateTasks() function creates a daily set of 5 quests:
- 2 Physical Tasks: Selected randomly from the physical pool.
- 2 Discipline Tasks: Selected randomly from the discipline pool.
- 1 Mental Task: Selected randomly from the mental pool.
User Interface Components
The UI is designed with a dark "system" aesthetic, utilizing neon blue accents and radial gradients to mimic RPG interfaces.
UI Elements Description
- Header: Displays the "SYSTEM STATUS" title and a real-time clock synchronized to Saudi Arabia time (KSA).
- Stats Panel: Contains the Level badge, the Rank letter (with dynamic glow effects), and the Total XP count.
- XP Bar: A visual progress bar that fills based on the percentage of XP gained toward the next level.
- Task Cards: Interactive elements that change state (grayscale and opacity reduction) when marked as completed.
Sources: Quest.html:13-90, index.html:13-90, Quest.html:190-200
Data Persistence
The system uses a single JSON object stored in localStorage under the key solo_penalty_v1.
| Field | Type | Description |
|---|---|---|
points | Number | The cumulative XP earned by the user. |
lastUpdate | String | The last date (YYYY-MM-DD) tasks were refreshed. |
dailyTasks | Array | Objects containing task name (n), category (c), and done status (d). |
lastPenalty | Number | The amount of XP deducted during the last daily cycle check. |
Sources: Quest.html:130-132, Quest.html:208
Conclusion
The Quest Log Interface provides a robust, client-side gamification engine. By integrating a dynamic difficulty scaler (Ranks) with a persistent task management system, it creates an automated daily routine for users. The reliance on local timezones and localized storage ensures a low-latency, private experience for the user within the Solo-System environment.