# Power Source progress fill (staged 2026-10-03, TEST only, not published)

Files: dinput8.dll (md5 6f76b340, client_dll d48c19c = build of 99f8145) and HJ_HoardWnd.xml (md5 b4ecb960,
client_dll master: the Hoard Inspect button; patch_files still has 0b2f6991). The fill itself needs no UI file.
This DLL is client_dll master at d48c19c, so it also carries the other unpublished DLL work since the published
build 540a0c6: hotbar cooldowns (ee3eedb / build df6d6ad) and Hoard window Inspect (10e602f / build 573095a).
verify_sites.py vs patch_files/eqgame.exe: 37 hook sites, 40 byte patches + signatures, 2 call sites, 0 problems.
Server side: test Code 12ff6bd6d (zone Client::SendHJPowerSource), live on the TEST world.

What it does: while an upgradable item sits in the Power Source slot, the slot fills from the left with a
semi-transparent wash (~44%) in the colour of the tier it is working toward (Enchanted blue toward Enchanted,
Legendary orange toward Legendary). Width = the item progress. The server sends PSPROG|pct|tier|item id once
after zone-in and then whenever the whole percent / item / tier changes (checked once a second). At 100% the
item upgrades and the fill restarts from 0 in the next colour; empty slot / Legendary / non-upgradable = no fill.
Independent of /tiercolor (that toggles only the tier name colours and the tier frame/wash).

## Test on the desktop
    scp -r openclawvm:heroes_journey_workspace/patcher/staged_psfill /tmp/ && bash /tmp/staged_psfill/install_desktop.sh
Launch with "EverQuest RoF2 Tanks (Direct)" on the TEST world. Put an upgradable base item in the Power Source
slot, open the inventory, kill things. hjclient.log should show:
- `...+hotbarcd+psfill) loaded`
- `psfill: item <id> toward tier 1 at <n>%` (on zone-in and after each kill that moves a whole percent)
- `psfill: item <id> in slot 0/21/-1: Power Source, drawing` (once per item, first frame drawn)

If the item that IS in the Power Source slot logs `... not the Power Source` with other numbers, the slot test is
wrong: send that line back (it holds the slot values to use).
Undo: `bash /tmp/staged_psfill/install_desktop.sh --revert` (or run the Patcher launcher once).

## Publish (after Trevor confirms on test)
1. Prod server: `flock ~/eqserver-test/.deploy.lock ~/eqserver-test/deploy-psprog/deploy.sh --preflight`, then
   without --preflight (1-minute warning + restart; runs after deploy-psattune, see its header).
2. Patcher: back up patch_files/dinput8.dll to ~/.local/share/eq-backups/<date>/, copy this folder's dinput8.dll
   (or a newer client_dll master build if more DLL work is meant to ship) to patch_files/, add a line at the top of
   news.txt, copy HJ_HoardWnd.xml to patch_files/uifiles/default/ (back it up too), run
   `python3 generate_manifest.py`. This DLL includes hotbar cooldowns and Hoard Inspect, so publish
   it only when their server halves (hotbarcd C++, #hoard inspect quests) are live or ship in the same window.
   Old DLLs ignore the PSPROG line, so the server half is safe to ship first; the new DLL draws nothing without it.
