Player Information Display
Relevant source files
The following files were used as context for generating this wiki page:
- index.html
- Quest.html
- README.md
- index.html:112-140 (Script Logic)
- Quest.html:112-140 (Quest Logic)
The Player Information Display is a central component of the Solo Leveling System, designed to provide users with a real-time overview of their character's progression and current standing. It serves as a visual interface for the underlying gamification engine, translating raw experience points (XP) into recognizable RPG-style metrics such as Levels and Ranks.
This system is responsible for calculating current status based on accumulated points, displaying progress toward the next level via a dynamic XP bar, and notifying the user of recent status changes, such as penalties or rewards. The display is synchronized with the Riyadh timezone to manage daily quest cycles and penalty applications. Sources: index.html:1-80, Quest.html:1-80
Core Components and Architecture
The display architecture is divided into three primary visual layers within the stats-panel: the Level Badge, the Rank Information block, and the XP Progress Container.
1. Stats Panel Data Structure
The display relies on a persistent data object stored in the browser's local storage. This object tracks the player's total points and the history of penalties.
| Field | Type | Description |
|---|---|---|
points | Integer | The total accumulated Experience Points (XP). |
lastUpdate | String | The last date (KSA) the system was accessed. |
lastPenalty | Integer | The value of the most recent penalty applied. |
Sources: index.html:108-110, Quest.html:108-110
2. Rank and Level Calculation Logic
The system uses two primary functions to determine what information to display. The getRankConfig function maps total points to specific Rank tiers (F through R), while calculateLevel determines the numerical level and percentage of progress.
Sources: index.html:112-127, Quest.html:112-127
Leveling and Ranking Tiers
The system defines specific thresholds for player progression. As a player earns points through tasks, their Rank and the difficulty of their requirements change dynamically.
| Rank | Points Threshold | Reward (XP) | Penalty (XP) | Required for LVL |
|---|---|---|---|---|
| F | 0 - 69 | 2 | 3 | 10 |
| E | 70 - 149 | 2 | 3 | 10 |
| D | 150 - 299 | 3 | 5 | 12 |
| C | 300 - 499 | 3 | 5 | 15 |
| B | 500 - 799 | 4 | 6 | 20 |
| A | 800 - 1199 | 4 | 6 | 25 |
| S | 1200 - 1999 | 4 | 6 | 30 |
| SS | 2000 - 2999 | 6 | 8 | 40 |
| R | 3000+ | 6 | 8 | 50 |
Sources: index.html:113-121, Quest.html:113-121
Visual Updates and State Management
The updateUI() function is the primary driver for refreshing the display. It synchronizes the HTML elements with the data calculated from systemData.points.
Status Messaging System
The display includes a status-msg field that toggles between two states:
- Reward/Penalty Info: Displays the current potential gains or losses based on the player's rank.
- Penalty Alert: If a penalty was applied during the daily cycle check, the display shifts to a red "Penalty Message" style to alert the user.
Sources: index.html:132-150, Quest.html:132-150
Time Synchronization
The header of the display features a real-time clock synchronized to the Asia/Riyadh timezone. This is critical because the system's "Daily Cycle"—which determines when tasks expire and penalties are applied—is based on the date in Saudi Arabia, ensuring consistent behavior regardless of the user's local device time.
Sources: index.html:176-178, Quest.html:176-178, index.html:200-202
Summary
The Player Information Display is a reactive interface that effectively communicates progress within the Solo Leveling System. By integrating level calculation logic, rank-based styling, and a specialized status messaging system, it provides immediate feedback on user performance and system-enforced penalties.