# DriftwoodXI Installer Bundle

Sets up FFXI + Ashita + the DriftwoodXI launcher on any Linux box
(Bazzite, SteamOS, Ubuntu, etc.) with a Wine/Proton installed.

## What's in here
- `driftwoodxi-install.sh`  - the installer
- `Ashita/`                 - the July-30 Ashita bundle (plugins, addons, config)
- `dw-grid.png` etc.        - Steam artwork (optional)

## You also need
- The updated FFXI client: a `PlayOnline` folder (or the zip) from a working
  install - the fully-updated client with current executables + patch.ver.

## FULLY AUTOMATED for any Linux (not just Bazzite/SteamOS)

The installer handles everything itself:
- No Wine? It downloads GE-Proton automatically (works on any distro).
- No client? Give it --client-url (your Google Drive link) or set
  DEFAULT_CLIENT_URL at the top of the script.
- No Ashita bundle next to it? It downloads the July-30 bundle from Driftwood.
- --steam adds the Steam shortcut + artwork automatically.

```
./driftwoodxi-install.sh --client-url <google-drive-link> --user X --pass Y --steam
```

## Usage
```
./driftwoodxi-install.sh --client /path/to/PlayOnline --user YOURNAME --pass YOURPASS
```
Or download the client automatically (Google Drive link or any direct zip URL):
```
./driftwoodxi-install.sh --client-url <google-drive-link> --user YOURNAME --pass YOURPASS
```
Optional:
- `--prefix /path` - where the wine prefix goes (default ~/driftwoodxi/pfx)
- `--wine /path`   - the wine binary (auto-detects GE-Proton in Steam/Lutris)
- `--steam`        - prints Steam shortcut instructions

## If you only have a BASE client (not POL-updated)
Run the installer with no --client - it prints the update steps. Short version:
open PlayOnline Viewer -> log in (any retail POL account; a dummy works for the
update) -> Check Files -> FINAL FANTASY XI -> File Repair -> Yes -> do the same
for PlayOnline Viewer. That makes the executables + patch.ver current.

## After install - ONE-TIME POL CHECK FILES
The installer writes `~/driftwoodxi-pol.sh` (opens PlayOnline Viewer). Run it, then:
1. Login screen: a **dummy account is fine** - any username/password works for
   the update check (no real Square Enix account needed).
2. Left menu -> **Check Files** -> drop-down -> **FINAL FANTASY XI**
3. **Check Files** -> **File Repair** -> Yes when it reports errors
4. Repeat for **PlayOnline Viewer**.
5. Let it download - this makes the executables + patch.ver current.

Then play with `~/driftwoodxi-play.sh`.

## After install
- Run `~/driftwoodxi-play.sh` to play (autologins if you passed --user/--pass).
- Set the resolution in the FFXI Config tool if 1280x800 isn't right for you.
- To add to Steam: Steam > Add a Non-Steam Game > ~/driftwoodxi-play.sh,
  then set the artwork (dw-grid.png) via right-click > Set Custom Artwork.

## Notes
- Requires the client to already be POL-updated (current FFXiMain.dll + patch.ver).
- The game needs a Wine with 32-bit support and a D3D8 (DXVK). GE-Proton works.
- If POL offers a big update after install, run Check Files (FFXI) - it only
  downloads what differs.
