Prestige System
Relevant source files
The following files were used as context for generating this wiki page:The Prestige System is a core game mechanic in Skid-Inc that allows players to reset their progress in exchange for permanent bonuses. This system is designed to facilitate long-term progression by awarding "botnets," which increase the player's money and experience multipliers. Triggering a prestige resets most aspects of the game but preserves the accumulated botnets, enabling faster progress in subsequent runs.
The system is managed primarily by skidinc.prestige.js and is integrated with the player's state and the game's main UI loop. Prestige data, specifically the number of botnets and prestige count, is stored within the player object and persisted through the game's save mechanism.
Sources: app/js/prestige.js, index.html:244-249, src/renderer/save-manager.js:212-222
User Interface Components
The Prestige System is exposed to the player through two main UI sections within the game's terminal interface.
Sources: index.html
Stats Overview Tab
A dedicated section within the "Stats" tab provides a quick overview of the player's prestige status.
Source: index.html:191-203
This display shows:
- Botnet: The total number of botnets the player currently possesses.
- Botnet reset: The number of botnets the player will gain if they prestige at their current level.
- Prestige mult.: The total multiplier bonus provided by the current number of botnets.
These values are updated by the stats() function in core.js.
Sources: index.html:191-203, app/js/core.js:15-18
Prestige Tab
A separate "Prestige" tab is available in the "More" dropdown menu. This tab contains explanatory text and the action button to initiate the prestige process.
- Description: Informs the player that prestiging earns botnets and that 1 botnet increases money and experience multipliers by 2%.
- Prestige Button: An element with the ID
#prestige-buttonthat, when clicked, triggers theskidinc.prestige.prestige()function.
Sources: index.html:81, index.html:244-249, app/js/prestige.js:6
Core Mechanics
The logic for the prestige system is encapsulated in the skidinc.prestige object.
Sources: app/js/prestige.js
Key Functions
| Function | Description | Source File |
|---|---|---|
init() | Binds a click event listener to the #prestige-button to call the prestige() function. | app/js/prestige.js:4-7 |
getPrestige() | Calculates the number of botnets a player will receive upon prestiging. The formula is Math.floor(player.level / 100). | app/js/prestige.js:9-11 |
getPrestigeMult() | Calculates the prestige multiplier. The formula is (player.botnet * 2) / 100. | app/js/prestige.js:13-15 |
prestige() | Executes the prestige process if the player is eligible (i.e., will gain at least one botnet). | app/js/prestige.js:17-27 |
Prestige Process Flow
The following diagram illustrates the sequence of events when a player initiates a prestige.
This diagram shows the logic flow within the prestige() function.
Sources: app/js/prestige.js:17-27
When the prestige() function is called:
- It checks if the player will gain any botnets by calling
getPrestige(). - If botnets are to be gained, it updates
skidinc.player.botnetandskidinc.player.prestigeCount. - It calls
skidinc.player.reset()to revert game progress. This function resets money, experience, level, scripts, servers, and battery, but crucially preservesbotnetandprestigeCount. - The new game state is saved by calling
skidinc.save.save(). - The application is reloaded to apply the reset state.
Sources: app/js/prestige.js:17-27, app/js/player.js:31-44
Data Model and State Management
Prestige-related data is stored as part of the main player object.
Player Data Fields
| Field | Type | Description | Source File |
|---|---|---|---|
botnet | Number | The total number of botnets accumulated by the player. Initialized to 0. | app/js/player.js:12 |
prestigeCount | Number | The total number of times the player has prestiged. Initialized to 0. | app/js/player.js:13 |
Save State Integration
The prestige data is persisted as part of the main game state object. The save-manager.js for the Electron version and save.js for the web version include the player object in the data payload, ensuring that botnet and prestigeCount are saved and loaded correctly.
The getCurrentGameState function in src/renderer/save-manager.js explicitly includes these fields in the save object.
// From src/renderer/save-manager.js
return {
// ...
player: {
// ...
botnet: window.skidinc.player?.botnet || 0,
prestigeCount: window.skidinc.player?.prestigeCount || 0
},
// ...
};
Source: src/renderer/save-manager.js:212-222
The following sequence diagram shows how the prestige action propagates through the system to be saved.
This diagram illustrates the interaction between modules during a prestige action.
Sources: app/js/prestige.js:17-27, app/js/player.js:31-44, app/js/save.js
Summary
The Prestige System is a fundamental progression loop in Skid-Inc. It incentivizes players to reset their game by offering permanent botnet rewards that boost money and exp multipliers. The system is self-contained within prestige.js but is tightly integrated with the player object for state persistence and the core game loop for UI updates. Its implementation ensures that prestige bonuses are correctly calculated, applied, and saved across game sessions.
Sources: app/js/prestige.js, app/js/player.js, app/js/core.js