XP Settings - xopherdeep/do-it-for-the-xp GitHub Wiki

XP Settings & Profile Management

Family Settings

Game Masters configure the family, heroes, and multi-device cloud synchronization under Settings > Family.

Hero & GM Management

  • Game Masters: Adults who approve quests, oversee bank funds, manage rules, and link cloud devices.
  • Heroes: Kids and players who complete chores, explore temples, and level up.
  • Family Setup Lock: Hides add, edit, and delete buttons to prevent accidental modifications by kids.

Cloud Account & Sync Inspector

  • Connection Status: Displays linked Town Hall / WordPress parent account name and cloud status badge (Home Device, Family Device, Mismatch, or Disconnected).
  • Hero Sync Status: Compares local profiles with cloud records (Synced, Needs Nickname, or Local Ready).
  • Remote Heroes: Lists any heroes registered in the cloud family that are played on other devices.
  • Manual Refresh: Synchronizes local hero records with the cloud on demand.

Cloud Family Mismatch Resolution (other-family)

When an account already runs an earlier family on the cloud (e.g., from an older install or setup with kids):

  • Resolution Modal: Accessible from both Account Settings and the Family Settings cloud card.
  • Connect to Cloud Family: Adopts the cloud family ID (adoptFamily) and registers current local heroes to that family without deleting local progress.
  • Keep Device Isolated: Unlinks the cloud account to keep the device independent.
  • Download Local Backup: One-tap export to preserve an offline safety file before modifying family association.

Account Settings & Pre-Link Safety

Settings > Account connects the family install to the Town Hall / WordPress online account:

  • Pre-Link Safety Prompt: Automatically offers a one-tap backup download before redirecting to the WordPress authorization flow if local profiles exist.
  • Application Password: Connects device credentials securely without storing website master passwords locally.
  • Unlink: Revokes the application connection on this device while keeping cloud records safe.

Backup & Restore (Merge vs Replace)

Settings > General provides full database export and import:

  • Back up everything: Exports all family databases, quest logs, and hero stats into a timestamped JSON file.
  • Restore from backup:
    • Merge with current data: Non-destructive restore (mode: "merge"). Adds backup heroes, quests, and records into existing stores while preserving current local data.
    • Replace everything: Destructive restore (mode: "replace"). Completely overwrites the local database with the backup contents.