Files
TeslaSuite/Console/Plasma Images/README.md
T
CydandClaude Opus 5 2a5a387381 Console: remember Enable Custom Bitmaps, ship the art; bump suite to 4.11.4.5
Settings -> Enable Custom Bitmaps was a static bool with no backing store:
it defaulted to off on every launch, so an operator had to re-tick it each
session and any custom plasma art was silently ignored until they did. New
ConsoleSettings persists machine-level menu toggles as XML in
%ProgramData%\Tesla Console\console.settings, alongside RPDefaults.rpd /
BTDefaults.btd / local.siteconfig. It is loaded once from Main and never
from a static initializer: the differential suite drives PlasmaBitmaps
directly and must keep seeing the original defaults rather than whatever
this machine has saved. A missing file is the first-run case; a corrupt one
is ignored and rewritten by the next toggle, because losing a menu setting
must never stop the console starting.

Custom art is now version-controlled and rolls with the release. New
Console\Plasma Images\ is copied into the package, and the lookup searches
%ProgramData%\Tesla Console\Plasma Images first and the exe-relative folder
second, so a release can never clobber a site's own name bitmaps.
install.bat creates the data-dir folder before the icacls grant so an
unelevated operator can write it. Ships with three 128x32 name bitmaps
(Deadmeat, Muerte, Phrogg); Muerte arrived as "Muerte_128x32-2.bmp", a name
the lookup can never build, so it is renamed to match its pilot.

Two fixes fell out of making the flag sticky. Path.Combine ran on the raw
participant name outside the try block, so with the option on a pilot named
"A:B" threw ArgumentException straight out of egg generation; names that
cannot be a Windows file name now just render procedurally. And the art was
loaded with Image.FromFile, which keeps the bitmap backed by the file and
locked for its whole lifetime — it is copied out through a stream now, so
art can be swapped between missions without restarting the console.

Verified against the built net40 exe: all three shipped bitmaps resolve by
pilot name, ProgramData wins over the shipped copy, a wrong-size file is
ignored, an illegal-character name does not throw, the file is not left
locked, and the settings round-trip and corrupt-file tolerance both hold.
Diff suite 106/106.

Version bumped 4.11.4.4 -> 4.11.4.5 across Console, Launcher, vPOD, the
install/build banners, the diff-suite version assertion and the README's
latest-release pointer.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 13:16:11 -05:00

61 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Plasma Images
Hand-made art for the pods' plasma name displays. Anything dropped in here is
version-controlled and rolls out with the release: `build-package.bat` copies the
folder into `App\`, and `install.bat` puts it beside `TeslaConsole.exe`.
The folder ships empty on purpose — populate it per site.
## How it works
When the console builds a mission egg it renders every participant name into a
1-bit-per-pixel bitmap in two sizes and embeds it in the egg. By default those are
drawn procedurally: `Microsoft Sans Serif`, white on black, no anti-aliasing, the
point size stepped down from 24 until the text fits.
With **Settings → Enable Custom Bitmaps** ticked, the console looks for a matching
file here first and only falls back to the procedural renderer when there isn't
one. The toggle is remembered in `console.settings` (see below), so it survives a
restart.
## File naming
```
<text>_<width>x<height>.bmp
```
The `<text>` part is matched **exactly** against the string being rendered — the
pilot/player name, the Red Planet football team name, or the literal `Camera` for
camera pods. Matching is per-name, not global, so you can override one name and
let the rest render normally.
Two sizes are needed to cover a name completely; supplying only one is fine, the
other falls back to the font renderer:
| Size | Egg section | Example |
| -------- | ------------------ | ---------------------- |
| 128 × 32 | `BitMap::Large::…` | `Camera_128x32.bmp` |
| 64 × 16 | `BitMap::Small::…` | `Camera_64x16.bmp` |
Rules:
- **Dimensions must match exactly.** A 130×32 file is ignored, silently, and the
name renders procedurally instead.
- **Only brightness matters.** Every pixel at or above 50% brightness lights up on
the plasma; everything else is dark. Colour art gets thresholded, so design in
black and white.
- Any name that cannot be a Windows file name (`:`, `\`, `|`, `?`, `*`, …) can't
have an override — those names always render procedurally.
- Files are read at egg-build time and copied into memory, not locked, so art can
be swapped between missions without restarting the console.
Preview how a name looks before a mission with the console's **Plasma Font Tool**,
which renders through the same path — with the option on it shows the override.
## Where the console looks
1. `%ProgramData%\Tesla Console\Plasma Images\` — this machine's own art. Takes
precedence, and survives a reinstall, so a site can keep local overrides that
a release will not overwrite.
2. `Plasma Images\` next to `TeslaConsole.exe` — this folder, as shipped.