6 Commits
Author SHA1 Message Date
paste fe78e6141b add readme 2026-07-17 00:13:13 -05:00
paste 09475b4698 Save CharacterOrder on CHARACTER_LIST_UPDATE 2026-07-17 00:13:13 -05:00
paste 51c987ccf2 fixed wrong character being selected upon logout 2026-07-17 00:13:13 -05:00
paste b460fb2be7 Add MPQ release pipeline (packaged by mpq-packager on v* tag) 2026-07-17 00:13:13 -05:00
paste 9f387a94f1 Add account manager, character reordering, and glue Lua console
Three features layered onto the Turtle WoW baseline:

- Account manager (AccountLogin.lua / .xml): saved-account list backed
  by Windows Credential Manager via ClassicAPI. Pass-through to
  LoginWithSavedAccount; per-account 'last used' timestamp; password
  field hides itself when the typed name matches a saved entry and a
  'Change password' button reveals it on demand.
- Character reordering (CharacterSelect.lua / .xml): drag-to-reorder
  the character list, persisted via ClassicAPI's
  GetSavedCharacterOrder / SetSavedCharacterOrder.
- Glue Lua console (GlueConsole.lua / .xml, new files): in-glue RunScript
  console reachable from the title and char-select screens.

Currently no key opens the console — the backtick binding was removed
pending a ClassicAPI EditBox arrow/key script handler (see TODO.md section 96).
2026-07-17 00:13:13 -05:00
paste 895c7b5a0a Initial: Turtle WoW Glue XML baseline
Pristine baseline for the four Glue files we customize:
- AccountLogin.lua / .xml
- CharacterSelect.lua / .xml

Source: c:/WoW/Octo/BlizzardInterfaceCode/GlueXML (Turtle WoW / Octo
upstream). Refreshed 2026-07-17. The prior baseline (13d77d7) pre-dates
upstream's simplification of the login side-button stack in
AccountLogin.xml (removed Credits, Reddit, Discord, Armory; inlined
LaunchURL calls to octowow.st URLs).

Other files in BlizzardInterfaceCode/GlueXML are not tracked here since
we don't override them on top of the MPQ-provided copies.
2026-07-17 00:10:38 -05:00
2 changed files with 75 additions and 3 deletions
+10 -3
View File
@@ -203,17 +203,24 @@ function CharacterSelect_OnEvent()
elseif ( event == "CHARACTER_LIST_UPDATE" ) then
CharacterSelect_RebuildTranslationTable();
CharacterOrder_Apply();
CharacterOrder_Save();
if ( this.pendingSelectedCharID ) then
this.selectedIndex = GetIndexFromCharID(this.pendingSelectedCharID);
this.pendingSelectedCharID = nil;
end
UpdateCharacterList();
CharSelectCharacterName:SetText(GetCharacterInfo(GetCharIDFromIndex(this.selectedIndex)));
Autologin_OnCharactersLoad();
elseif ( event == "UPDATE_SELECTED_CHARACTER" ) then
-- arg1 is a server-assigned charID; translate to a display index
-- so `selectedIndex` always means "position in the displayed list".
if ( arg1 == 0 ) then
CharSelectCharacterName:SetText("");
else
CharSelectCharacterName:SetText(GetCharacterInfo(arg1));
this.selectedIndex = GetIndexFromCharID(arg1);
if ( table.getn(this.translationTable) == 0 ) then
this.pendingSelectedCharID = arg1;
else
this.selectedIndex = GetIndexFromCharID(arg1);
end
end
UpdateCharacterSelection();
elseif ( event == "SELECT_LAST_CHARACTER" ) then
+65
View File
@@ -0,0 +1,65 @@
# Octo GlueXML
Custom login and character-select UI for [Octo](https://octowow.st). Overlays
a small subset of the stock glue files with three features; everything else in
`Interface/GlueXML/` is loaded unchanged from the base MPQs.
## Features
- **Saved-account login.** The login screen shows a scrollable list of
previously-used accounts with their last-used timestamp. Clicking a row fills
the account name and hides the password field; a login without a typed
password logs in using the credential stored in the Windows Credential
Manager. A "Change password" button reveals the field on demand when you
need to update a saved credential.
- **Character reordering.** Hold on a character in the select screen for half
a second to enter drag mode, then move it up or down. Order is saved
per-realm and restored on the next login.
## ClassicAPI dependency
The saved-login and character-order features rely on Lua bindings exposed by
the ClassicAPI DLL, which is loaded alongside the client. Both features guard
their entry points with `type(fn) ~= "function"` checks so the UI still
functions when the DLL isn't present — you just lose persistence.
### Saved login — Windows Credential Manager
Passwords never live in Lua or in `WTF/`. They go straight from the password
field into the OS credential vault, and login submits are dispatched from C so
the plaintext never crosses back.
| Binding | Purpose |
|---|---|
| `SaveAccount(name, password)` | Writes a credential-vault entry. Called when the user types a password (either a first-time save or a "Change password" update). |
| `LoginWithSavedAccount(name)` | C-side dispatch of the login using the vault password for `name`. |
| `GetSavedAccounts()` | Returns `{ {name=…, lastUsed=epochSeconds}, … }` — `lastUsed` is the Windows `LastWritten` timestamp on the vault entry, auto-refreshed by `LoginWithSavedAccount`. |
| `DeleteAccount(name)` | Removes a vault entry (backs the "Remove account" button). |
| `GetSavedAccountName()` / `SetSavedAccountName(name)` | Persists just the *last-used* account name (via `SavedVariables`) so the same row is pre-selected on next launch. No password, no character map — those were dropped alongside the plaintext store. |
### Character sort order — per-realm WTF persistence
Persistence is keyed by character *name*, not by server-assigned charID. Slots
renumber every time a character is added or deleted, so name is the only
stable identifier.
| Binding | Purpose |
|---|---|
| `GetSavedCharacterOrder(realm)` | Reads a `\|`-separated name string for the current realm. |
| `SetSavedCharacterOrder(realm, names)` | Writes it back. |
On every `CHARACTER_LIST_UPDATE` the code loads the saved string, resolves
each name to the current charID, drops names the server no longer knows about
(deletions), appends any characters not in the saved list (creations), and
re-saves. That means the on-disk order self-cleans without a hook in the
delete path.
## Releases
Push a `v*` tag to trigger the
[mpq-packager](https://octowow.st/git/paste/mpq-packager) Gitea Action
(`.gitea/workflows/release.yml`), which packages this repo into a
`patch-Z.mpq` via StormLib according to `mpq.yaml`. `Z` sorts after Blizzard's
stock MPQs, so its files win on conflict. Only `.lua`, `.xml`, and `.toc`
files are placed in the MPQ — this README, workflow files, and build config
are excluded.