V-Extended is split into two PolymodDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/misterfnflover787/v-extended-fnf/llms.txt
Use this file to discover all available pages before exploring further.
Module classes per edition: one that handles real-time gameplay logic (layout, HUD sprites, score counter) and one that handles menu injection (Options menu page and pause menu modifications). Keeping these concerns separate means the gameplay module can run at a high priority without interfering with options page setup, and the options module can be lightweight since it only fires on state transitions.
Module Classes
Each edition ships exactly two modules. The gameplay module is given a high priority so itsonUpdate callback runs late in the frame; the options module uses the default priority because it only reacts to state change events.
VExtendedGameplayModule
Edition: PCPriority: 1200Handles all real-time gameplay logic during a
PlayState session: middlescroll strumline positioning, opponent note opacity, strumline lane backgrounds, the song progress time bar, and the detailed score counter. Constructs and destroys HUD sprites as PlayState instances come and go.VExtendedOptionsModule
Edition: PCPriority: defaultInjects the V-Extended preferences page into
OptionsState and optionally adds Options and Botplay entries to the standard pause menu. Manages the return-to-song flow when Options is opened from pause.VExtendedMobileGameplayModule
Edition: MobilePriority: 1200Same role as the PC gameplay module but with mobile-specific optimisations: the score counter update is throttled to once every 50 ms (
scoreUpdateTimer >= 0.05) and is driven by a scoreDirty flag set by onNoteHit and onNoteMiss. Opponent strumline remapping uses a simpler offset approach instead of the full PC layout tracker.VExtendedMobileOptionsModule
Edition: MobilePriority: defaultSame role as the PC options module plus
fitMobilePauseMenu(), which redistributes pause menu entries vertically when extra items are injected to prevent overflow on smaller screens.The gameplay module priority of 1200 is intentionally high to ensure V-Extended’s
onUpdate runs after most other modules. FNF’s default module priority is 0; a module with priority 1200 receives update callbacks later in the same frame, so V-Extended can read finalised strumline positions before writing HUD positions.Class Declaration
Both gameplay modules follow this pattern — the priority is passed directly to the parentModule constructor, and loadOptions() is called immediately so that saved preferences are ready before the first onUpdate fires:
Event Hooks
V-Extended uses eight distinct Polymod event hooks across its four module classes.| Event | Module(s) | Purpose |
|---|---|---|
onSubStateOpenEnd(event) | Options (PC & Mobile) | Intercepts PauseSubState opens in Standard mode; injects Options and/or Botplay entries into the pause menu when the corresponding preferences are enabled. Mobile also calls fitMobilePauseMenu() to prevent layout overflow. |
onStateChangeEnd(event) | Options (PC & Mobile) | Intercepts transitions to OptionsState to inject the V-Extended preferences page into the options codex. Also wires the return-to-song callback when opened from pause. Gameplay modules call loadOptions() and destroyHud() on non-PlayState transitions. |
onNoteGhostMiss(event) | Gameplay (PC only) | Calls event.cancel() when ghost tapping is enabled, preventing empty direction presses from registering as misses. |
onNoteHit(event) | Gameplay (PC & Mobile) | In botplay mode, triggers note splash and hold cover animations on the player strumline. On Mobile, also sets scoreDirty = true to schedule a score counter refresh. |
onNoteMiss(event) | Gameplay (Mobile only) | Sets scoreDirty = true so the throttled score counter is refreshed on the next eligible frame. |
onSongEnd(event) | Gameplay (PC & Mobile) | In botplay mode (and not charting mode), calls event.cancel() to suppress the default end-of-song flow, then navigates directly to FreeplayState. |
onUpdate(event) | Gameplay (PC & Mobile) | Per-frame driver: applies middlescroll layout and opponent opacity, creates/updates/destroys strumline backgrounds, time bar, and score counter sprites based on current preferences and PlayState availability. |
onDestroy(event) | Gameplay (PC & Mobile) | Calls destroyHud() to remove and null all HUD sprites, preventing memory leaks when the module is torn down. |
HUD Z-Index Layers
V-Extended inserts customFlxSprite instances at specific z-index values so they sit above the game scene camera but below the native FNF HUD elements. All sprites are assigned to state.camHUD and have scrollFactor set to (0, 0).
| Z-Index | Sprite | Description |
|---|---|---|
| 700 | opponentStrumBackground | Dark lane background behind the opponent strumline |
| 701 | playerStrumBackground | Dark lane background behind the player strumline |
| 803 | scorePrefixText | Score / misses / accuracy prefix segment of the detailed score counter |
| 804 | scoreRankText | Rank letter (P / E / G / L) rendered in its rank colour |
| 805 | scoreSuffixText | Closing bracket ] of the detailed score counter |
| 1200 | barBackground | Dark background rectangle of the song progress time bar |
| 1201 | barFill | White fill rectangle scaled along the X axis to show song progress |
| 1202 | barLabel | VCR bitmap font label showing song name, difficulty, or time |