Sphere  v1.0.3
================================================

Windows 10 or 11, 64-bit. One file, no installation.

What this is
------------
Sphere shows the world map of your Last War server as a searchable table:
name, alliance, level, position, distance, kills, power and shield time.
One click moves the in-game camera to that player.

It does not touch the game. No process access, no injection, no memory
reading. The camera is moved with ordinary Windows input events.

Where to put it
---------------
Anywhere you can write to -- for example  C:\Tools\Sphere\
NOT  C:\Program Files.

Your data does not go next to the program. It goes to

  %LOCALAPPDATA%\Sphere\

so the program folder stays clean and can be moved or deleted.
There is only one file: sphere.exe. Everything it needs is inside it.

Start
-----
Double-click sphere.exe. Two things happen on the first start:

1. ADMINISTRATOR RIGHTS.
   If a window says "Administrator rights required", click "Restart" and
   confirm the Windows prompt. Sphere needs them for exactly two things:

     * starting Last War -- the game's own launcher runs elevated,
     * moving the camera inside the running game.

   Scanning, the table, search and filters work without them.
   If you decline, Sphere closes and does nothing.

2. YOUR LICENCE CODE.
   Enter the code you received at purchase -- seven blocks of four, like
   ABCD-EFGH-.... Sphere checks it, binds it to this PC and opens.

After that the tool remembers the licence and starts without asking.

Sphere needs an internet connection while it runs.

Windows may show "Windows protected your PC" on the first start:
  More info  ->  Run anyway

Questions: https://spherehq.pages.dev/faq

Set up once per server
----------------------
Without a configured server the tool cannot scan.

  1. Start Last War and log in on the server you want to analyse.
  2. In Sphere: Overview -> "Add server", then follow the steps shown.
  3. Close the game when the steps are done.

Scanning
--------
  !!!  Close Last War first.  !!!

A scan logs in to the server with your account. If the game runs at the same
time, the server ends your session and you get kicked out. Sphere checks this
itself and refuses to scan while the game is open.

  Overview -> "Scan"  ->  about 4 to 5 minutes

A progress bar appears right under the Scan button. When it is done, open the
"Player" page -- the table is filled. The last scan is read again automatically
on the next start, so scanning again is only needed for fresh numbers.

The data lives in

  %LOCALAPPDATA%\Sphere\data\snapshot_<ServerID>.json

one file per server, so scanning another server overwrites nothing.

Reading the table
-----------------
Search, sort, and filter by alliance, shield, level or favourites. Right-click
a player -- or the empty area of the list -- to:

  Send to Discord     post the visible list into a Discord channel
  Export as CSV       write a file that Excel opens directly
  Copy as text        put a block of text on the clipboard

"Visible" means what is on screen after search, filter and sorting. The CSV
contains the raw numbers; the Discord message shows the same values as the
table.

Discord (set up once)
---------------------
  1. In Discord: Server Settings -> Integrations -> Webhooks -> New Webhook.
     Choose the channel and copy the address.
  2. In Sphere: Settings -> Alerts. Paste the address, click "Save", then
     "Send test message".
  3. Done.

The address works like a password: whoever has it can write in that channel.
It is stored encrypted and only shown shortened.

One message holds at most 25 players. For more, Sphere says so and points you
to the CSV export.

Settings
--------
  Appearance   theme (dark / light / follow Windows) and language
  Account      the stored login of the selected server, and "Delete login"
  Alerts       the Discord webhook

What you can try
----------------
  * Search by name, alliance tag or UID; click a column to sort
  * Filters: no alliance, no shield, only watchlist, level range
  * Right-click a row: add to or remove from the watchlist (kept across restarts)
  * Camera jump: the arrow in the row, or double-click (the game must run)
  * Six languages: English, German, Spanish, French, Chinese, Arabic

If something does not work
--------------------------
Under  %LOCALAPPDATA%\Sphere\ :

  data\captures\lastwar-client.log   full log of the last scan
  data\captures\_scan_progress.json  progress and phases of the last scan
  imgui_layout.ini                   window size, columns, theme
                                     (delete it to reset the interface)

For scan problems send  data\captures\lastwar-client.log  -- only that file,
not the whole captures folder.

Known limits
------------
  * Player NAMES use Windows fonts. If one is missing, affected characters
    show as empty boxes.
  * Complex scripts (Thai, Arabic, Indic) are displayed but not shaped
    typographically; coloured emoji do not render.
  * Shield times are what the server sends, not an estimate.
  * Power and kills come from the profile queries at the end of a scan.
    Missing profiles are named in the status line; scanning again fetches them.
  * A scan is a real login. Do not scan every minute.
  * The EXE is not code-signed. Some virus scanners react to the helpers the
    tool writes into your user profile on first use. They only read this PC's
    traffic during setup and send nothing.

Privacy
-------
Everything stays in your user profile, nothing in the program folder.

  *  session-key.bin          key to your server sessions, bound to your
                              Windows account. Do not delete, do not pass on.
  *  sessions\server_*.json   your LIVE login token, ENCRYPTED (AES-256-GCM).
                              Never pass these on.
  *  snapshot_*.json          names, alliances and positions of real players.
  *  captures\                during setup, login data IN PLAIN TEXT. The tool
                              deletes these itself; after an aborted setup they
                              remain for diagnosis -- do not pass them on.

The tool talks only to the game servers. No telemetry, nothing else.
