# DriftwoodXI for Steam Deck

**New to Steam Deck + retail FFXI?** Start here:  
**[Steam Deck guide (fresh Deck / retail FFXI)](docs/STEAM-DECK-GUIDE.md)**

Reproducible helpers to run **DriftwoodXI** (FFXI private server + Ashita + xiloader) on **Steam Deck / SteamOS**, with:

- GE-Proton launch (no nested Proton from Steam)
- Zenity login GUI + optional **Remember** (keyring / private file)
- Steam Game Mode silent login via saved creds
- FFXI **1280×720** window + menu (Deck-native **1280×800 is invalid** in FFXI → grey UI)
- Xbox 360 / **Alternate Setup E** (XInput) pad map
- Ashita `gamepad.disableenumeration=0` (required for pads)
- Non-Steam Steam library entry + FFXI store art + Deck **Gamepad** controller template

This package does **not** redistribute the FFXI client, PlayOnline, or Ashita binaries.

## What you still provide

| Piece | Typical location |
|--------|------------------|
| Updated FFXI client in a Wine/Proton prefix | `~/ffxi/pfx` |
| Driftwood Ashita bundle (`Ashita-cli.exe`, addons, `xiloader`) | `~/ffxi/Ashita` |
| GE-Proton **11-5** | `~/.local/share/Steam/compatibilitytools.d/GE-Proton11-5/` |
| Driftwood account | [xi.driftwoodgaming.com](https://xi.driftwoodgaming.com) |

Use POL **Check Files / File Repair** on a real Square Enix account before expecting the private server client to boot.

## Quick install (Deck Desktop)

```bash
# copy or clone this repo somewhere, then:
chmod +x install.sh scripts/*.sh steam/*.sh steam/*.py
./install.sh          # installs into ~/ffxi/bin
./install.sh --steam  # also adds Non-Steam game + art + gamepad template
```

Override install root:

```bash
export DRIFTWOOD_ROOT=~/Games/driftwood
./install.sh --steam
```

## First launch

1. **Desktop Mode** → run **DriftwoodXI** (or `~/ffxi/play.sh`).
2. Enter username/password → **Remember**.
3. Confirm the username prompt (typo catch).
4. Fully **restart Steam** / return to Game Mode.
5. Launch **DriftwoodXI** from the Steam library.

Game Mode cannot reliably show zenity; saved credentials are required.

## Steam properties (important)

- **Compatibility:** do **not** force Proton — `play-steam.sh` already uses GE-Proton11-5.
- **Controller:** should be **Gamepad** (installer writes `controller_neptune_gamepad_joystick.vdf`). If inputs feel like a mouse/keyboard layout, set Gamepad manually.

## Controls

Default map = FFXI Pad Config **Alternate Setup E** + **XInput** (console-style Xbox: A confirm, B cancel).

To tweak: Desktop → `~/ffxi/padconfig.sh` → Enable Gamepad + XInput → Setup E → save.

## Resolution notes

| Setting | Registry | Value |
|---------|----------|-------|
| Window | `0001`×`0002` | 1280×720 |
| Background | `0003`×`0004` | 1280×720 |
| Menu | `0037`×`0038` | 1280×720 |
| Windowed | `0034` | 1 |

Do **not** use 1280×800 — FFXI does not support it and commonly greys out.

Override via env before launch:

```bash
export DRIFTWOOD_WIDTH=1024 DRIFTWOOD_HEIGHT=768
~/ffxi/play.sh
```

## Layout after install

```
~/ffxi/
  bin/env.sh play.sh play-steam.sh padconfig.sh
  play.sh -> bin/play.sh
  art/          # Steam grid assets
  pfx/          # your Wine prefix (you create)
  Ashita/       # Driftwood Ashita (you create)
```

Credentials: `~/.config/driftwoodxi/` + `secret-tool` service `driftwoodxi`.

## Refreshing art

```bash
./steam/fetch-art.sh          # pulls from Steam CDN app 230330
./install.sh --steam          # re-copy + re-register
```

## Troubleshooting

| Symptom | Fix |
|---------|-----|
| Grey screen after login | Use 1280×720 (not 800); restart client |
| Invalid username/password then menu | Typo / bad Remember — clear `~/.config/driftwoodxi` and `secret-tool clear service driftwoodxi account login` |
| No controls in Game Mode | Gamepad template; `disableenumeration=0`; relaunch Steam |
| Stuck xiloader menu | Kill wineserver / `xiloader` and relaunch with correct `--user/--pass` |
| Steam forces Proton | Turn off compatibility tool for this shortcut |

Logs: `/tmp/driftwood-console.log`, `~/ffxi/Ashita/logs/`.

## Reproducing on another Deck

1. Install GE-Proton11-5.
2. Copy or rebuild `pfx` + `Ashita` (or document your preferred installer: Lutris / Lumoria / manual).
3. Copy this repo → `./install.sh --steam`.
4. Desktop login once with Remember.
5. Restart Steam.

Optional: ship a companion guide for “how we built the prefix,” but keep **client files** out of git.

## Version

See `VERSION`. Verified against DriftwoodXI + Ashita 4.3 + GE-Proton11-5 on Steam Deck (Aug 2026).
