187 lines
7.6 KiB
Markdown
187 lines
7.6 KiB
Markdown
|
|
# Console Display Template — start.bat to PowerShell
|
||
|
|
|
||
|
|
Reference document for the custom FXServer console wrapper display format.
|
||
|
|
|
||
|
|
## Banner — ANSI Shadow Font (figlet)
|
||
|
|
|
||
|
|
The banner uses the **ANSI Shadow** figlet font for "RED VALLEY". Because PowerShell terminals have encoding issues with Unicode characters stored directly in `.ps1` files, we use a **template + replacement system**:
|
||
|
|
|
||
|
|
### Character Mapping (ASCII → Unicode)
|
||
|
|
|
||
|
|
| Placeholder | Unicode Char | Code Point | Name |
|
||
|
|
|---|---|---|---|
|
||
|
|
| `#` | █ | `[char]9608` | Full Block |
|
||
|
|
| `>` | ╗ | `[char]9559` | Box Top-Right |
|
||
|
|
| `<` | ╔ | `[char]9556` | Box Top-Left |
|
||
|
|
| `[` | ╚ | `[char]9562` | Box Bottom-Left |
|
||
|
|
| `]` | ╝ | `[char]9565` | Box Bottom-Right |
|
||
|
|
| `~` | ═ | `[char]9552` | Double Horizontal |
|
||
|
|
| `!` | ║ | `[char]9553` | Double Vertical |
|
||
|
|
|
||
|
|
### Banner Templates (6 lines)
|
||
|
|
|
||
|
|
```
|
||
|
|
######> #######>######> ##> ##> #####> ##> ##> #######>##> ##>
|
||
|
|
##<~~##>##<~~~~]##<~~##> ##! ##!##<~~##>##! ##! ##<~~~~][##> ##<]
|
||
|
|
######<]#####> ##! ##! ##! ##!#######!##! ##! #####> [####<]
|
||
|
|
##<~~##>##<~~] ##! ##! [##> ##<]##<~~##!##! ##! ##<~~] [##<]
|
||
|
|
##! ##!#######>######<] [####<] ##! ##!#######>#######>#######> ##!
|
||
|
|
[~] [~][~~~~~~][~~~~~] [~~~] [~] [~][~~~~~~][~~~~~~][~~~~~~] [~]
|
||
|
|
```
|
||
|
|
|
||
|
|
### Rendered Output (what the user sees)
|
||
|
|
|
||
|
|
```
|
||
|
|
██████╗ ███████╗██████╗ ██╗ ██╗ █████╗ ██╗ ██╗ ███████╗██╗ ██╗
|
||
|
|
██╔══██╗██╔════╝██╔══██╗ ██║ ██║██╔══██╗██║ ██║ ██╔════╝╚██╗ ██╔╝
|
||
|
|
██████╔╝█████╗ ██║ ██║ ██║ ██║███████║██║ ██║ █████╗ ╚████╔╝
|
||
|
|
██╔══██╗██╔══╝ ██║ ██║ ╚██╗ ██╔╝██╔══██║██║ ██║ ██╔══╝ ╚██╔╝
|
||
|
|
██║ ██║███████╗██████╔╝ ╚████╔╝ ██║ ██║███████╗███████╗███████╗ ██║
|
||
|
|
╚═╝ ╚═╝╚══════╝╚═════╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═╝
|
||
|
|
```
|
||
|
|
|
||
|
|
### Color Gradient
|
||
|
|
|
||
|
|
- Lines 1-3: `Red` (ForegroundColor)
|
||
|
|
- Lines 4-6: `DarkRed` (ForegroundColor)
|
||
|
|
|
||
|
|
### Subtitle Bar
|
||
|
|
|
||
|
|
```
|
||
|
|
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ (78x [char]9604, DarkRed)
|
||
|
|
ROLEPLAY SERVER v2.0 | vlxre.cata
|
||
|
|
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ (78x [char]9600, DarkRed)
|
||
|
|
```
|
||
|
|
|
||
|
|
Colors: `ROLEPLAY SERVER` = White, `v2.0` = DarkGray, `|` = DarkRed, `vlxre.cata` = DarkGray
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Console Layout Order
|
||
|
|
|
||
|
|
### Phase 1: Loading Bar (single, in-place)
|
||
|
|
|
||
|
|
```
|
||
|
|
Loading resources...
|
||
|
|
██████████████████████████████████████████████████ 100% COMPLETE
|
||
|
|
──────────────────────────────────────────────────────────
|
||
|
|
```
|
||
|
|
|
||
|
|
- Green filled blocks `[char]9608` + DarkGray empty blocks `[char]9617`
|
||
|
|
- Updates on same line using `\r` (carriage return)
|
||
|
|
- No blank line between loading text, bar, and separator
|
||
|
|
|
||
|
|
### Phase 2: ERRORS + WARNINGS (immediately after separator)
|
||
|
|
|
||
|
|
```
|
||
|
|
■ ERRORS (Red)
|
||
|
|
X resource_name error description
|
||
|
|
|
||
|
|
■ WARNINGS (DarkYellow)
|
||
|
|
! resource_name warning description
|
||
|
|
```
|
||
|
|
|
||
|
|
### Phase 3: Categorized Resource Summary (by dev team)
|
||
|
|
|
||
|
|
Each category has a colored `■` ([char]9632) bullet and numbered `[NR]` entries:
|
||
|
|
|
||
|
|
| Category | Color | Notes |
|
||
|
|
|---|---|---|
|
||
|
|
| QBCore Framework | **ANSI RGB Orange** `(255,140,0)` | PowerShell DarkYellow looks yellow, use ANSI escape |
|
||
|
|
| 17mov Malizniakk | Magenta | 17mov_CharacterSystem, 17mov-plugin-char-creator, 17mov_Hud |
|
||
|
|
| Quasar Store | Cyan | qs-inventory, qs-advancedgarages, qs-housing, qs-shops, qs-smartphone-pro, qs-vehiclekeys |
|
||
|
|
| T1GER | Yellow | t1ger_mechanic, t1ger_tuningsystem |
|
||
|
|
| Wasabi Scripts | Green | wasabi_police, wasabi_ambulance, wasabi_bridge |
|
||
|
|
| CodeM | DarkYellow | codem-mdt, codem-dispatch, codem-mdtProp |
|
||
|
|
| rcore | DarkCyan | rcore_casino, rcore_prison, rcore_doorlock |
|
||
|
|
| MLOs Map Interiors | DarkGreen | MLO entries with streaming warnings show `[N warn]` in DarkYellow |
|
||
|
|
| Other | DarkGray | ox_lib, PolyZone, pma-voice, luxu_admin, etc. |
|
||
|
|
|
||
|
|
### Phase 4: Status + Updates
|
||
|
|
|
||
|
|
```
|
||
|
|
■ STATUS (Green)
|
||
|
|
+ Database connected - MariaDB 10.4.32
|
||
|
|
+ cfx.re Nucleus: kotzu-el7krp.users.cfx.re
|
||
|
|
|
||
|
|
■ UPDATES (Magenta)
|
||
|
|
^ resource_name old_ver -> new_ver
|
||
|
|
```
|
||
|
|
|
||
|
|
### Phase 5: Footer
|
||
|
|
|
||
|
|
```
|
||
|
|
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ (58x [char]9604, DarkGray)
|
||
|
|
█ SERVER READY │ 64 loaded │ 43 tracked │ HH:mm:ss
|
||
|
|
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ (58x [char]9600, DarkGray)
|
||
|
|
|
||
|
|
RV> (Cyan prompt — replaces cfx>)
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## ANSI RGB Colors (PowerShell)
|
||
|
|
|
||
|
|
PowerShell's 16 standard colors don't include true orange. Use ANSI escape sequences:
|
||
|
|
|
||
|
|
```powershell
|
||
|
|
$esc = [char]27
|
||
|
|
$orange = "$esc[38;2;255;140;0m" # true orange
|
||
|
|
$reset = "$esc[0m"
|
||
|
|
|
||
|
|
# Usage:
|
||
|
|
Write-Host "${orange}■${reset} " -NoNewline
|
||
|
|
```
|
||
|
|
|
||
|
|
> **Note**: DarkYellow renders as yellow on most modern terminals. Always use ANSI RGB for orange.
|
||
|
|
|
||
|
|
## Conversion Function (PowerShell)
|
||
|
|
|
||
|
|
```powershell
|
||
|
|
function Get-BannerLine {
|
||
|
|
param([string]$t)
|
||
|
|
return $t.Replace('#',([string][char]9608)).Replace('>',([string][char]9559)).Replace('<',([string][char]9556)).Replace('[',([string][char]9562)).Replace(']',([string][char]9565)).Replace('~',([string][char]9552)).Replace('!',([string][char]9553))
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
## Other Unicode Characters Used
|
||
|
|
|
||
|
|
| Char | Code | Usage |
|
||
|
|
|---|---|---|
|
||
|
|
| █ | `[char]9608` | Progress bar filled, banner |
|
||
|
|
| ░ | `[char]9617` | Progress bar empty |
|
||
|
|
| ▄ | `[char]9604` | Separator bar bottom |
|
||
|
|
| ▀ | `[char]9600` | Separator bar top |
|
||
|
|
| ─ | `[char]9472` | Thin separator line |
|
||
|
|
| │ | `[char]9474` | Footer column separator |
|
||
|
|
| ■ | `[char]9632` | Category bullet |
|
||
|
|
|
||
|
|
## Filter Rules (for real wrapper — start_console.ps1)
|
||
|
|
|
||
|
|
### HIDE (suppress completely)
|
||
|
|
- `MiB of physical memory` — asset memory warnings
|
||
|
|
- `Oversized assets can and WILL` — continuation
|
||
|
|
- `citizen-server-impl.*fff|cccc|xx.*rr` — cfx.re ASCII art
|
||
|
|
- `Creating script environments for` — c-scripting-core noise
|
||
|
|
- `Scanning resources.` / `Found \d+ resources.` — startup scan
|
||
|
|
- `completely imported, these furniture` — DLC furniture spam
|
||
|
|
- Empty `[citizen-server-impl]` lines
|
||
|
|
|
||
|
|
### ERROR (Red)
|
||
|
|
- `SCRIPT ERROR`, `Error:`, `attempt to`, `unexpected symbol`, stack traces
|
||
|
|
|
||
|
|
### WARNING (DarkYellow)
|
||
|
|
- `[WARNING]`, `Warning:`, `oversized result set`, `is NOT up to date`, `SELECT * FROM`
|
||
|
|
|
||
|
|
### SUCCESS (Green)
|
||
|
|
- `Started resource`, `Authenticated`, `Database server connection established`, `Up to date`, `Discord bot logged in`
|
||
|
|
|
||
|
|
### INFO (Cyan)
|
||
|
|
- `New version available`, `CACHED ALL`, `Multi-identifier system ready`
|
||
|
|
|
||
|
|
## File Reference
|
||
|
|
|
||
|
|
- **Demo**: `e:\FiveMserver\server\console_demo.ps1` — simulation with sample data
|
||
|
|
- **Production**: `e:\FiveMserver\server\start_console.ps1` — real wrapper (TODO)
|
||
|
|
- **Fallback**: `e:\FiveMserver\server\start.bat` — original unfiltered startup
|